/* ============================================= */
/* VARIABLES Y ESTILOS GENERALES                 */
/* ============================================= */
:root {
    --color-verde: #49944D;
    --color-azul: #089BCF;
    --color-dark: #04173C;
    --color-acento: #028fc2;
    --color-light: #ffffff;
    --color-gris-claro: #f8f9fa;
    --color-texto: #333;
    --color-texto-light: #f1f1f1;
    --color-gris-texto: #6c757d;

    --font-titulos: 'Arial black', sans-serif;
    --font-texto: 'Open Sans', sans-serif;
    --container-width: 1140px;
}

/* Reset y estilos base */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-texto); color: var(--color-texto); line-height: 1.7; background-color: var(--color-light); }
h1, h2, h3 { font-family: var(--font-titulos); font-weight: 700; }
a { text-decoration: none; color: var(--color-acento); }
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 1.5rem; }
section { padding: 6rem 0; }
h2 { font-size: 2.5rem; text-align: center; margin-bottom: 4rem; }

/* ============================================= */
/* BOTONES Y ELEMENTOS REUTILIZABLES             */
/* ============================================= */
.btn { display: inline-block; padding: 0.8rem 1.8rem; border-radius: 50px; font-weight: 600; transition: all 0.3s ease; text-align: center; border: 2px solid transparent; }
.btn-accent { background-color: var(--color-acento); color: #fff; border-color: var(--color-acento); }
.btn-accent:hover { background-color: #8BC34A; border-color: #8BC34A; transform: translateY(-2px); }
.btn-large { padding: 1rem 2.5rem; font-size: 1.1rem; }
.btn-outline { background-color: transparent; color: var(--color-dark); border: 2px solid var(--color-dark); }
.btn-outline:hover { background-color: var(--color-dark); color: #fff; }

/* ============================================= */
/* HEADER (Estilo v2)                            */
/* ============================================= */
.header { width: 100%; position: absolute; top: 0; left: 0; z-index: 1000; transition: background-color 0.4s ease, padding 0.4s ease; padding: 1.5rem 0; }
.header .container { display: flex; justify-content: space-between; align-items: center; }
.header.scrolled { position: fixed; background-color: var(--color-dark); padding: 1rem 0; box-shadow: 0 3px 10px rgba(0,0,0,0.2); }
.header .logo img { height: 50px; transition: height 0.4s ease; }
.header.scrolled .logo img { height: 40px; }
.nav-menu ul { list-style: none; display: flex; gap: 2rem; }
.nav-menu a { color: var(--color-light); font-weight: 600; padding-bottom: 5px; border-bottom: 2px solid transparent; transition: color 0.3s ease, border-color 0.3s ease; }
.nav-menu a:hover { color: var(--color-acento); border-bottom-color: var(--color-acento); }
.cta-header { display: block; } /* Aseguramos que sea visible */

/* ============================================= */
/* HERO SECTION (Estilo v2)                      */
/* ============================================= */
.hero-section { position: relative; height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--color-light); background: url('../img/hero-background.jpg') no-repeat center center/cover; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(30, 42, 56, 0.7); }
.hero-content { position: relative; z-index: 2; }
.hero-content h1 { font-size: 3.8rem; font-weight: 900; margin-bottom: 1rem; }
.hero-content .subtitle { font-size: 1.3rem; max-width: 700px; margin: 0 auto 2.5rem; font-weight: 400; }

/* ============================================= */
/* SECCIONES RECUPERADAS DE LA V1 Y ADAPTADAS    */
/* ============================================= */

/* Social Proof */
.social-proof-section { background-color: var(--color-gris-claro); padding: 3rem 0; text-align: center; }
.social-proof-section p { font-weight: 600; color: var(--color-gris-texto); letter-spacing: 1px; margin-bottom: 1.5rem; }
.client-logos { display: flex; justify-content: center; align-items: center; gap: 3rem; flex-wrap: wrap; }
.client-logos img { max-height: 35px; opacity: 0.7; transition: opacity 0.3s ease; }
.client-logos img:hover { opacity: 1; }

/* Services */
.services-section { background-color: var(--color-light); }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.service-card { border: 1px solid #e9ecef; padding: 2.5rem; text-align: center; border-radius: 8px; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.service-card:hover { transform: translateY(-10px); box-shadow: 0 10px 20px rgba(0,0,0,0.08); }
.service-icon { font-size: 3rem; margin-bottom: 1rem; color: var(--color-azul); }
.service-card h3 { margin-bottom: 1rem; font-size: 1.5rem; color: var(--color-dark); }
.service-card a { font-weight: 600; }

/* About */
.about-section { background-color: var(--color-gris-claro); }
.about-flex { display: flex; align-items: center; gap: 4rem; flex-wrap: wrap; }
.about-text, .about-image { flex: 1; min-width: 300px; }
.about-text h2 { text-align: left; }
.about-text p { margin-bottom: 2rem; }
.about-image img { max-width: 100%; border-radius: 8px; }

/* Blog */
.blog-section { background-color: var(--color-light); }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; }
.blog-post-card { border-radius: 8px; overflow: hidden; box-shadow: 0 4px 8px rgba(0,0,0,0.1); transition: transform 0.3s ease; }
.blog-post-card:hover { transform: translateY(-5px); }
.blog-post-card img { width: 100%; height: 200px; object-fit: cover; display: block; }
.blog-post-content { padding: 1.5rem; }
.blog-post-content .category { display: inline-block; background-color: var(--color-verde); color: #fff; padding: 0.2rem 0.8rem; border-radius: 20px; font-size: 0.8rem; font-weight: 600; margin-bottom: 1rem; }
.blog-post-content h3 { font-size: 1.3rem; margin-bottom: 0.5rem; color: var(--color-dark); }

/* ============================================= */
/* FORMULARIO DE CONTACTO (Estilo v2)            */
/* ============================================= */
.contact-section { background-color: #f2f2f2; /* Un gris muy claro */ color: var(--color-texto); /* Aseguramos que el texto sea oscuro para contrastar */ text-align: center; padding: 6rem 0; /* Mantenemos el padding */ }
.contact-form { max-width: 700px; margin: 0 auto; }
.contact-form .form-group { display: flex; gap: 1rem; margin-bottom: 1rem; }
.contact-form input, .contact-form textarea { width: 100%; padding: 1rem; border: 1px solid #555; background-color: #2b3e51; color: #fff; border-radius: 5px; font-family: var(--font-texto); }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #aaa; }
.contact-form textarea { margin-bottom: 1.5rem; resize: vertical; }

/* ============================================= */
/* FOOTER (Estilo v1, adaptado a colores v2)     */
/* ============================================= */
.footer { background-color: var(--color-dark); color: var(--color-texto-light); padding-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; padding-bottom: 4rem; }
.footer-col h4 { margin-bottom: 1.5rem; color: #fff; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.8rem; }
.footer-col a { color: var(--color-gris-texto); transition: color 0.3s ease; }
.footer-col a:hover { color: var(--color-acento); }
.footer .logo-footer img { height: 40px; margin-bottom: 1rem; }
.footer-bottom { border-top: 1px solid #343a40; padding: 1.5rem 0; }
.footer-bottom .container { display: flex; justify-content: space-between; align-items: center; font-size: 0.9rem; color: var(--color-gris-texto); flex-wrap: wrap; }

/* Se aplica en pantallas de 992px de ancho o más (tablets grandes y PC) */
@media (min-width: 992px) {

    /* HERO SECTION - Alineación a la izquierda */
    .hero-section {
        /* Movemos el contenedor del contenido (hijo del flex) al inicio (izquierda) */
        justify-content: flex-start; 
    }

    .hero-content {
        /* Alineamos el texto dentro del contenedor a la izquierda */
        text-align: left;
    }

    .hero-content .subtitle {
        /* Eliminamos el centrado automático del subtítulo para que respete el text-align: left */
        margin-left: 0;
        margin-right: 0;
    }
}

/* ============================================= */
/* SEPARADOR CTA                                 */
/* ============================================= */
.cta-separator-section {
    background-color: var(--color-dark);
    color: var(--color-light);
    text-align: center;
    padding: 5rem 0;
}

.cta-separator-section h2 {
    color: var(--color-light);
    margin-bottom: 1rem;
}

.cta-separator-section p {
    font-size: 1.2rem;
    color: var(--color-gris-texto);
    margin-bottom: 2.5rem;
}

/* ============================================= */
/* SEPARADOR CON VIDEO (Estilos Corregidos)      */
/* ============================================= */

/* 1. Estilos para el contenedor principal de la sección */
.video-separator-section {
    padding: 0 !important;
    background-color: #C7E5E4; /* El color de fondo que pediste */
    text-align: center;
    display: flex; /* Usamos flexbox para alinear fácilmente */
    flex-direction: column; /* Apilamos los elementos verticalmente */
    align-items: center; /* Centramos todo horizontalmente */
}

/* 2. Estilos para el video */
.video-separator-section video {
    /* Eliminamos el posicionamiento absoluto */
    display: block;
    width: 100%; /* El video será responsivo */
    max-width: 500px; /* Ancho máximo en pantallas grandes */
    height: auto;
    border-radius: 8px; /* Bordes redondeados para un look moderno */
}

/* 3. Estilos para el texto (título) */
.video-content h2 {
    color: var(--color-dark); /* Color oscuro para que sea legible sobre el fondo claro */
    margin: 0;
}

/* 4. Eliminamos el overlay que ya no se usa */
.video-overlay {
    display: none;
}

/* 5. Ajustes para móviles (celulares) */
@media (max-width: 768px) {
    .video-separator-section video {
        /* En celulares, el video ocupará todo el ancho menos un pequeño margen */
        max-width: calc(100% - 2rem);
    }

    .video-separator-section {
        padding: 4rem 0; /* Un poco menos de padding en móviles */
    }
}

/* ============================================= */
/* HEADER RESPONSIVE Y MENÚ HAMBURGUESA          */
/* ============================================= */

/* Estilos para el botón hamburguesa */
.nav-toggle {
    display: none; /* Oculto por defecto en PC */
    cursor: pointer;
    width: 30px;
    height: 25px;
    flex-direction: column;
    justify-content: space-between;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--color-light);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Animación de la hamburguesa a una 'X' */
.nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}
.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}


/* ============================================= */
/* AJUSTES RESPONSIVOS GENERALES (MÓVILES)       */
/* ============================================= */

/* Media query para tablets y móviles (hasta 992px) */
@media (max-width: 992px) {
    
    /* Hacemos visible el botón hamburguesa */
    .nav-toggle {
        display: flex;
        z-index: 1001; /* Aseguramos que esté por encima de otros elementos */
    }

    /* Ocultamos el botón "Contáctanos" del header para dar espacio */
    .header .cta-header {
        display: none;
    }

    /* Estilos del menú de navegación en móvil */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%; /* Empieza oculto fuera de la pantalla */
        width: 70%;
        height: 100vh;
        background-color: var(--color-dark);
        padding: 6rem 2rem 2rem;
        transition: right 0.5s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 1000;
        box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    }
    
    /* Clase que se añade con JS para mostrar el menú */
    .nav-menu.show-menu {
        right: 0;
    }

    .nav-menu ul {
        flex-direction: column;
        align-items: center;
        gap: 2.5rem;
    }

    .nav-menu a {
        font-size: 1.2rem;
    }

    /* Ajuste de Títulos para Móviles */
    .hero-content h1 {
        font-size: 2.5rem; /* Título principal más pequeño */
    }

    h2 {
        font-size: 2rem; /* Títulos de sección más pequeños */
    }

    .cta-separator-section h2 {
        font-size: 1.8rem;
    }
}

/* Ajustes adicionales para celulares muy pequeños */
@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }
    h2 {
        font-size: 1.8rem;
    }
    .footer-bottom .container {
        flex-direction: column;
        gap: 1rem;
    }
}