:root {
    --primary: #1E40AF;
    --accent: #F97316;
    --secondary: #10B981;
    --light: #D1D5DB;
    --dark: #111827;
    --transition: all 0.3s ease-in-out;
    --background-gradient: linear-gradient(135deg, #E0E7FF 0%, #D1D5DB 100%), url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAJElEQVQYV2NkYGD4zwEQwGAAD4AJpX8n+xAAAAAElFTkSuQmCC);
    --text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--background-gradient);
    background-size: cover;
    font-weight: 400;
    overflow-x: hidden;
    padding-top: 80px; /* Espacio para header fijo */
}

.alt-font {
    font-family: 'Roboto Slab', serif;
    font-weight: 600;
}

.titleh1 {
    font-size: 2.2rem;
    text-shadow: var(--text-shadow);
}

strong {
    font-weight: 700;
}

@media (min-width: 850px) {
    .titleh1 {
        font-size: 3.5rem;
        line-height: 1.2;
    }
}

/* Navegación */
.header.has-sticky {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    transition: background 0.3s, padding 0.3s;
    padding: 1rem 5%;
}

.header.has-sticky.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 5%;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.navbar-brand .logo {
    max-width: 180px;
    height: auto;
    border-radius: 15px;
    transition: transform 0.3s;
}

.header.has-sticky.scrolled .logo {
    max-width: 150px;
    transform: scale(0.9);
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.5rem;
    color: var(--light);
}

.header.has-sticky.scrolled .navbar-toggle {
    color: var(--dark);
}

.navbar-toggle-icon::before {
    content: '\2630';
}

.navbar-menu {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.nav-link {
    text-decoration: none;
    font-weight: 500;
    color: var(--light);
    font-size: 1.1rem;
    text-shadow: var(--text-shadow);
    transition: var(--transition);
}

.header.has-sticky.scrolled .nav-link {
    color: var(--dark);
}

.nav-link:hover {
    color: var(--accent);
}

.cta-btn {
    background: var(--secondary);
    color: white !important;
    padding: 0.75rem 1.5rem;
    border-radius: 99px;
    transition: var(--transition);
    text-decoration: none;
}

.cta-btn:hover {
    background: #0E7A5A;
    opacity: 0.9;
}

.header.has-sticky.scrolled .cta-btn {
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@media (max-width: 768px) {
    .header.has-sticky {
        padding: 1rem 3%;
    }
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .navbar-brand {
        margin-bottom: 1rem;
    }
    .navbar-toggle {
        display: block;
    }
    .navbar-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background: rgba(255, 255, 255, 0.95);
        padding: 1rem 0;
        border-radius: 10px;
        box-shadow: var(--box-shadow);
    }
    .navbar-menu.active {
        display: flex;
    }
    .nav-link {
        font-size: 1rem;
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    .cta-btn {
        width: 100%;
        text-align: center;
    }
}

/* Hero */
.hero {
    text-align: center;
    background: linear-gradient(135deg, var(--primary), #1E40AF);
    color: white;
    padding: 8rem 5% 4rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    z-index: 2;
    position: relative;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
}

.hero-content::before {
    content: '';
    position: absolute;
    top: -30%;
    left: -30%;
    width: 160%;
    height: 160%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
    animation: pulse 12s infinite alternate;
    z-index: 1;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.3); opacity: 0; }
}

.hero h1 {
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 99px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: white;
    background: var(--secondary);
    box-shadow: var(--box-shadow);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.btn-outline {
    border: 2px solid white;
    background: transparent;
}

/* Servicios */
.services {
    padding: 4rem 5%;
    background: var(--light);
    border-top: 1px solid rgba(30, 64, 175, 0.1);
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 0 1rem;
}

.service-card {
    background: white;
    border-radius: 20px;
    box-shadow: var(--box-shadow);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    text-align: center;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.2);
}

.service-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 3px solid var(--secondary);
    border-radius: 10px 10px 0 0;
}

.service-card .card-content {
    padding-top: 1rem;
}

.service-card h3 {
    font-size: 1.5rem;
    color: var(--dark);
    margin-bottom: 0.8rem;
}

.service-card p {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
}

.service-btn {
    margin-top: 1.2rem;
    display: inline-block;
    padding: 0.8rem 1.8rem;
    background: var(--secondary);
    color: white;
    border-radius: 99px;
    text-decoration: none;
    transition: var(--transition);
}

.service-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Nosotros */
.nosotros {
    padding: 4rem 5%;
    background: var(--light);
    border-top: 1px solid rgba(30, 64, 175, 0.1);
}

.nosotros p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1.5rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

/* Testimonios */
.testimonials {
    padding: 4rem 5%;
    background: var(--light);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    justify-content: center; /* Centrado */
    padding: 0 1rem;
}

.testimonial-card {
    background: white;
    border-radius: 20px;
    box-shadow: var(--box-shadow);
    padding: 2rem;
    text-align: center;
    max-width: 400px; /* Límite para centrar */
    margin: 0 auto;
}

.thanks-message {
    text-align: center;
    padding: 1.5rem;
    background: var(--secondary);
    color: white;
    border-radius: 10px;
    margin-top: 1.5rem;
    display: none;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Certificaciones */
.certifications {
    padding: 4rem 5%;
    background: var(--light);
}

.certifications-grid {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.certifications-grid img {
    max-width: 150px;
    height: auto;
    border-radius: 10px;
    transition: var(--transition);
    filter: grayscale(80%);
}

.certifications-grid img:hover {
    transform: scale(1.05);
    filter: grayscale(0);
}

/* Blog */
.blog {
    padding: 4rem 5%;
    background: var(--light);
    border-top: 1px solid rgba(30, 64, 175, 0.1);
}

.blog-subtitle {
    text-align: center;
    font-size: 1.3rem;
    color: var(--dark);
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(30, 64, 175, 0.05);
    border-left: 4px solid var(--primary);
    border-radius: 10px;
    font-weight: 500;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.blog-card {
    background: white;
    border-radius: 20px;
    box-shadow: var(--box-shadow);
    padding: 2rem;
    transition: var(--transition);
    text-align: center;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.2);
}

.blog-card h3 {
    font-size: 1.5rem;
    color: var(--dark);
    margin-bottom: 0.8rem;
}

.blog-card p {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
}

.blog-btn {
    margin-top: 1.2rem;
    display: inline-block;
    padding: 0.8rem 1.8rem;
    background: var(--accent);
    color: white;
    border-radius: 99px;
    text-decoration: none;
    transition: var(--transition);
}

.blog-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.blog-link {
    display: block;
    text-align: center;
    margin-top: 2rem;
    background: var(--primary);
    color: white;
    padding: 0.8rem 1.8rem;
    border-radius: 99px;
    text-decoration: none;
    transition: var(--transition);
}

.blog-link:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Contacto */
.contact {
    padding: 4rem 5%;
    background: var(--light);
}

.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.contact-info h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.contact-info p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 1.5rem;
}

.map {
    width: 100%;
    height: 300px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.contact-form {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--box-shadow);
}

.contact-form label {
    display: block;
    margin-bottom: 1rem;
    color: var(--dark);
    font-weight: 500;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.9rem;
    border: 1px solid #ddd;
    border-radius: 40px;
    font-size: 1rem;
    transition: border-color 0.3s;
    background: rgba(255, 255, 255, 0.8);
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary);
    outline: none;
}

.contact-form textarea {
    resize: vertical;
    min-height: 150px;
    border-radius: 15px;
}

.contact-form button {
    width: 100%;
    padding: 1rem;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 99px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
}

.contact-form button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Footer */
.footer-wrapper {
    background: var(--dark);
    color: white;
    padding: 3rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 0 5%;
}

.footer-logo img {
    max-width: 200px;
    border-radius: 15px;
}

.footer-logo .footer-luz {
    max-width: 100px;
    height: auto;
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.7;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, -5px); }
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-links a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-social {
    text-align: center;
}

.footer-social p {
    margin-top: 1.5rem;
    color: var(--secondary);
    font-size: 0.9rem;
}

.footer-contact {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.footer-contact p {
    margin-bottom: 0.5rem;
}

.footer-social-icon {
    display: inline-block;
    margin-left: 0.5rem;
    transition: transform 0.3s;
}

.footer-social-icon:hover {
    transform: scale(1.1);
}

.footer-social-icon svg {
    fill: var(--secondary);
}

.footer-policies {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.footer-policies a {
    color: var(--secondary);
    text-decoration: none;
    margin: 0 0.5rem;
}

.footer-policies a:hover {
    color: var(--accent);
}

.footer-credits {
    margin-top: 1rem;
    font-size: 0.7rem;
    color: #D1D5DB;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .header.has-sticky {
        padding: 1rem 3%;
    }
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .navbar-brand {
        margin-bottom: 1rem;
    }
    .navbar-toggle {
        display: block;
    }
    .navbar-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background: rgba(255, 255, 255, 0.95);
        padding: 1rem 0;
        border-radius: 10px;
        box-shadow: var(--box-shadow);
    }
    .navbar-menu.active {
        display: flex;
    }
    .nav-link {
        font-size: 1rem;
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    .cta-btn {
        width: 100%;
        text-align: center;
    }
    .hero {
        padding: 6rem 3% 3rem;
        min-height: 80vh;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .hero-actions {
        flex-direction: column;
        gap: 0.8rem;
    }
    .services-grid, .testimonials-grid, .blog-grid {
        grid-template-columns: 1fr;
    }
    .contact-container {
        grid-template-columns: 1fr;
    }
    .footer-content {
        grid-template-columns: 1fr;
    }
    .footer-logo .footer-luz {
        max-width: 60px;
        bottom: 5px;
    }
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}
