:root {
    --header-top-space: 30px;
    --capsule-height: 50px;     /* Altura de la cápsula del menú */
    --capsule-radius: 50px;
    --switch-bg: #FFFFFF;       /* Color de la pastilla activa */
    --text-idle: #FFFFFF;       /* Texto normal */
    --text-active: #000000;     /* Texto seleccionado */
    
}

/* 1. LAYOUT PRINCIPAL (Contenedor invisible) */
.main-header {
    position: fixed;
    top: var(--header-top-space);
    left: 50%;
    transform: translateX(-50%);
    width: 85%;
    max-width: 1400px;
    
    /* Flexbox para separar Logo y Menú */
    display: flex;
    justify-content: space-between; 
    align-items: center;
    
    /* SIN FONDO NI BORDES AQUI */
    background: transparent;
    border: none;
    box-shadow: none;
    z-index: 1000;
}

/* --- LÓGICA DE FADE DEL LOGO --- */
.logo a {
    display: block;
    position: relative; /* Clave para encimar el segundo logo */
}

.logo img {
    height: 70px;
    width: auto;
    display: block;
    transition: opacity 0.4s ease-in-out; /* Esta es la duración del fade */
}

/* El logo alternativo va posicionado encima, pero invisible al inicio */
.logo .img-logo-alt {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0; 
}

/* Cuando el JS le ponga esta clase al header, intercambiamos opacidades */
.main-header.logo-alt-active .img-logo-default {
    opacity: 0;
}

.main-header.logo-alt-active .img-logo-alt {
    opacity: 1;
}

/* Responsividad para ambos logos (lo que ya tenías) */
@media (max-width: 992px) {
    .logo img { height: 55px; }
}
@media (max-width: 576px) {
    .logo img { height: 45px; }
}

/* 3. LA CÁPSULA DEL MENÚ (A la derecha) */
.nav-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    height: var(--capsule-height);
    
    /* ESTILO CÁPSULA: Transparente con borde blanco */
    background-color: rgba(255, 255, 255, 0.02); /* Mínimo tinte o transparent */
    border: var(--capsule-border);
    border-radius: var(--capsule-radius);
    padding: 4px; /* Espacio entre el borde y la pastilla blanca */
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1);
    
    /* Blur opcional solo dentro de la cápsula */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(5px);
    border: var(--capsule-border);
}

/* 4. ITEMS DE LA LISTA */
.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 2; /* Texto sobre la pastilla */
}

/* 4. ITEMS DE LA LISTA (MICRO-AJUSTADO) */
.nav-item {
    height: 100%;
    position: relative;
    z-index: 2;
}

.nav-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    
    /* 1. CORRECCIÓN VERTICAL: */
    /* "line-height: 1" elimina el espacio fantasma arriba y abajo */
    line-height: 1; 
    /* Si aún lo sientes muy arriba, sube este valor a 1px o 2px */
    padding-top: 1px; 
    
    /* 2. CORRECCIÓN HORIZONTAL (El truco del pixel): */
    /* Letter-spacing de 1.5px */
    letter-spacing: 1.5px;
    
    /* TRUCO MAESTRO: */
    /* Agregamos el mismo valor (1.5px) al padding IZQUIERDO. */
    /* Padding original: 20px. */
    /* Izquierda: 20px + 1.5px = 21.5px */
    /* Derecha: 20px (el letter-spacing pone el 1.5px restante visualmente) */
    padding: 0 14px 0 25px; 
    
    /* Resto de estilos */
    text-decoration: none;
    font-family: 'Acumin Pro', sans-serif;
    font-size: 11px;
    font-weight: 400;
    text-transform: uppercase;
    
    color: var(--text-idle);
    transition: color 0.3s ease;
}

/* El activo se mantiene igual */
.nav-item.active a {
    color: var(--text-active);
}

/* 5. EL SWITCH (Pastilla Blanca de Fondo) */
.nav-switch {
    position: absolute;
    top: 4px; 
    left: 4px;
    height: calc(100% - 8px); /* Altura dinámica */
    
    background-color: var(--switch-bg); /* BLANCO */
    border-radius: var(--capsule-radius);
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    
    z-index: 1; /* Detrás del texto */
    pointer-events: none;
    
    /* Animación */
    transition: width 0.4s cubic-bezier(0.23, 1, 0.32, 1), 
                transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    opacity: 0; 
}

/* =========================================
   RESPONSIVE: TABLETAS Y MÓVILES
   ========================================= */
@media (max-width: 992px) {
    /* 1. Usamos el 96% de la pantalla para dar más espacio a los lados */
    .main-header { 
        width: 96%; 
        justify-content: space-between; /* Mantenemos logo a la izq y menú a la der */
    } 

    /* 2. Achicamos sutilmente el logo en tabletas */
    .logo img {
        height: 55px; 
    }

    /* 3. Reducimos el espacio dentro de los botones de la cápsula */
    .nav-item a {
        padding: 0 10px 0 15px; 
        font-size: 10px; 
        letter-spacing: 1px;
    }
}

@media (max-width: 576px) {
    /* 1. En teléfonos móviles, usamos el 100% de la pantalla con un margen mínimo */
    .main-header { 
        width: 100%; 
        padding: 0 10px;
    } 

    /* 2. Logo más compacto para no robar espacio al menú */
    .logo img {
        height: 45px; 
    }

    /* 3. Comprimimos el menú al máximo para que quepa en un celular */
    .nav-item a {
        padding: 0 5px 0 11px;
        font-size: 8px;
        letter-spacing: 0.5px;
    }
    
    /* Hacemos la cápsula un poco más delgada */
    :root {
        --capsule-height: 40px;
    }
}




/* --- SECCIÓN NOSOTROS (TRAYECTORIA, MISIÓN, VISIÓN) --- */

.about-section {
    position: relative;
    overflow: hidden;
    /* Fondo base por si no carga la animación */
    background-color: #051937; 
}

/* 1. FONDO ANIMADO "DEEP OCEAN" */
.about-bg-gradient {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Degradado de azules profundos */
    background: linear-gradient(135deg, #02111b 0%, #0d253f 50%, #163c5e 100%);
    background-size: 200% 200%;
    animation: oceanFlow 10s ease infinite;
    z-index: 0;
}

@keyframes oceanFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Utilidad para poner contenido sobre el fondo */
.z-2 { position: relative; z-index: 2; }


/* 2. ESTILOS DE TARJETAS GENERALES */
.about-card {
    padding: 40px;
    border-radius: 24px;
    color: white;
    transition: transform 0.3s ease;
}

.about-card:hover {
    transform: translateY(-5px);
}

.card-icon {
    font-size: 24px;
    width: 50px; height: 50px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}

/* 3. TARJETA MISIÓN (SÓLIDA - AZUL VIBRANTE) */
/* Representa la acción presente */
.mission-card {
    background-color: #0056b3; /* Azul JBC más brillante */
    /* Sutil degradado interno */
    background: linear-gradient(135deg, #0056b3 0%, #004494 100%);
    box-shadow: 0 10px 30px rgba(0, 86, 179, 0.3);
    border: 1px solid rgba(255,255,255,0.1);
}

/* 4. TARJETA VISIÓN (GLASS - CRISTAL) */
/* Representa el futuro y transparencia */
.vision-card {
    background: rgba(255, 255, 255, 0.03); /* Casi transparente */
    backdrop-filter: blur(12px); /* Efecto borroso detrás */
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1); /* Borde fino */
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}


/* =========================================
   INVERSIÓN DE COLORES EN ZONAS CLARAS
   ========================================= */
.main-header.logo-alt-active {
    /* Cambiamos el texto inactivo a un gris oscuro elegante para que resalte sobre el fondo blanco */
    --text-idle: #555555; 
    
    /* El texto activo sigue siendo negro puro y la pastilla blanca */
    --text-active: #000000; 
}

/* Opcional: Si quieres darle un sutil tono grisáceo al fondo de la cápsula en zonas claras 
   para que no se pierda la forma redondeada, descomenta la siguiente línea */
/* .main-header.logo-alt-active .nav-wrapper {
    background-color: rgba(0, 0, 0, 0.04);
} */