/* ==========================================================================
   1. VARIABLES GLOBALES Y RESET (CON PROTECCIÓN ANTI-DESBORDAMIENTO)
   ========================================================================== */
:root {
    --azul-rey: #0041C2;
    --blanco-gris: #F2F2F2;
    --blanco: #FFFFFF;
    --negro: #1A1A1A;
    --fuente-montserrat: 'Montserrat', sans-serif;
    --fuente-industrial: 'Barlow Semi Condensed', sans-serif;
}

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

html, body {
    overflow-x: hidden; 
    width: 100%;
    position: relative;
    scroll-behavior: smooth;
}

body { 
    font-family: var(--fuente-montserrat); 
    background-color: var(--blanco-gris); 
}

img, iframe, video, .elfsight-app {
    max-width: 100% !important;
}

/* ==========================================================================
   2. HEADER Y MENÚ HAMBURGUESA
   ========================================================================== */
.main-header {
    background-color: var(--azul-rey);
    padding: 10px 5%;
    position: sticky;
    top: 0; 
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

.nav-col { flex: 1; display: flex; align-items: center; }
.logo-col { justify-content: flex-start; }
.menu-col { justify-content: center; flex: 2; }
.user-col { justify-content: flex-end; }

.logo-small { height: 40px; }

/* Menú en Escritorio */
.nav-links { 
    list-style: none; 
    display: flex; 
    gap: 25px; 
}

.nav-links a { 
    color: var(--blanco); 
    text-decoration: none; 
    font-weight: bold; 
    font-size: 14px; 
    text-transform: uppercase; 
    transition: color 0.3s ease;
}

.nav-links a:hover { color: #A0C4FF; }

/* Ícono de Usuario (Igual a la foto) */
.user-icon i { 
    color: var(--blanco); 
    font-size: 26px; 
    transition: transform 0.3s ease;
}

.user-icon:hover i { transform: scale(1.1); }

/* Botón 3 líneas (Oculto en PC) */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 1001;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--blanco);
    transition: all 0.3s ease;
}

/* Responsivo Header (Móvil) - CENTRADO PERFECTO */
@media (max-width: 768px) {
    .navbar {
        position: relative; 
    }

    .menu-toggle { 
        display: flex; 
        position: absolute; 
        left: 50%;
        transform: translateX(-50%); 
    }
    
    .nav-links {
        display: none; 
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: var(--azul-rey);
        padding: 20px 0;
        text-align: center;
        box-shadow: 0 10px 15px rgba(0,0,0,0.2);
        z-index: 9999; /* Para que aparezca sobre el banner */
    }

    .nav-links.active { 
        display: flex !important; /* Sin esto, el menú sigue oculto aunque le des a las barras */
        z-index: 9999;
    }

    .nav-links li { margin: 15px 0; }
    
    .logo-col { flex: 1; }
    .user-col { flex: 1; justify-content: flex-end; }

    /* Animación X en las barras */
    .menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.is-active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* ==========================================================================
   3. BANNER PREMIUM
   ========================================================================== */
.banner-imagen-container {
    width: 100%;
    height: 685px; 
    background-color: var(--negro); 
    overflow: hidden; 
    border-bottom: 6px solid var(--azul-rey);
    display: flex;
    align-items: center;
    position: relative; 
}

.banner-img {
    width: 100%; height: 100%; object-fit: cover; opacity: 0.55; 
}

.banner-overlay {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); 
    color: white; text-align: center; width: 90%; z-index: 10;
}

.banner-overlay h1 { 
    font-family: var(--fuente-montserrat);
    font-weight: 900; font-size: 4.5rem; text-transform: uppercase; letter-spacing: 8px; 
    line-height: 1.1; margin-bottom: 10px; text-shadow: 0px 4px 15px rgba(0, 0, 0, 0.8);
    background: linear-gradient(to bottom, #ffffff, #f0f0f0); 
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

.banner-overlay p { 
    font-family: var(--fuente-montserrat);
    font-weight: 400; font-size: 1.2rem; text-transform: uppercase; letter-spacing: 5px;
}

.banner-overlay p::after {
    content: ''; display: block; width: 60%; height: 3px;
    background-color: var(--azul-rey); margin: 15px auto 0;
    box-shadow: 0px 0px 10px var(--azul-rey);
}

@media (max-width: 768px) {
    .banner-imagen-container { height: 250px; }
    .banner-overlay h1 { font-size: 2.2rem; letter-spacing: 3px; }
    .banner-overlay p { font-size: 0.85rem; letter-spacing: 2px; }
}

/* ==========================================================================
   4. SECCIÓN CONTENIDO (ZIGZAG)
   ========================================================================== */
.nosotros-content { padding: 100px 10%; background-color: var(--blanco); }

.nosotros-item {
    display: flex; flex-direction: row; align-items: center; gap: 80px; margin-bottom: 120px;
}

.nosotros-item.reverse { flex-direction: row-reverse; }

.item-text { flex: 1.2; }

.item-text h2 {
    font-family: var(--fuente-industrial); font-size: 3rem;
    text-transform: uppercase; color: var(--negro); font-weight: 900; margin-bottom: 15px;
}

.divider, .divider-blue {
    width: 60px; height: 5px; background-color: var(--azul-rey); margin-bottom: 25px;
}

.item-text p {
    font-family: var(--fuente-montserrat); font-size: 1.1rem; line-height: 1.8; color: #444; text-align: justify;
}

.item-img {
    flex: 1; border-radius: 15px; overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08); border-bottom: 8px solid var(--azul-rey);
}

.item-img img { width: 100%; height: auto; transition: 0.6s ease; }
.nosotros-item:hover .item-img img { transform: scale(1.03); }

/* Animaciones de Scroll */
.reveal { opacity: 0; transform: translateY(40px); transition: all 0.8s ease-out; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 768px) {
    .nosotros-item, .nosotros-item.reverse { flex-direction: column !important; text-align: center; }
    .item-img { order: 1; margin-bottom: 25px; }
    .item-text { order: 2; }
    .item-text p { text-align: center; }
    .divider, .divider-blue { margin: 0 auto 25px; }
}

/* ==========================================================================
   5. FOOTER
   ========================================================================== */
.footer-copy { background-color: var(--azul-rey); color: white; text-align: center; padding: 30px 5%; font-size: 0.85rem; }

/* ==========================================================================
   6. WHATSAPP FLOTANTE
   ========================================================================== */
.whatsapp-float {
    position: fixed; bottom: 30px; right: 30px; background-color: var(--azul-rey); color: #FFFFFF;
    width: 60px; height: 60px; border-radius: 50%; display: flex; justify-content: center; align-items: center;
    font-size: 35px; z-index: 9999; text-decoration: none; animation: pulse-blue 2s infinite; transition: 0.3s;
}

.whatsapp-float:hover { background-color: #FFFFFF; color: var(--azul-rey); transform: scale(1.1); animation: none; }

@keyframes pulse-blue {
    0% { box-shadow: 0 0 0 0 rgba(0, 65, 194, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(0, 65, 194, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 65, 194, 0); }
}