/* ==========================================================================
   1. VARIABLES, RESET Y GENERALES
   ========================================================================== */
:root {
    --azul-inem: #0a2a66;
    --azul-claro: #0d6efd;
    --verde-inem: #28a745;
    --amarillo-inem: #ffc107;
    --gris-fondo: #f4f7fb;
    --gris-suave: #e0e0e0;
    --blanco: #ffffff;
    --sombra-suave: 0 10px 30px rgba(0,0,0,0.08);
    --sombra-fuerte: 0 15px 45px rgba(0,0,0,0.07);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    color: #333;
    background-color: var(--gris-fondo);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==========================================================================
   2. COMPONENTES DE NAVEGACIÓN (Menú Sticky)
   ========================================================================== */
.menu {
    background-color: var(--blanco);
    border-bottom: 2px solid #e0e6ed;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.menu-list {
    max-width: 1200px;
    margin: auto;
    display: flex;
    justify-content: center;
    list-style: none;
    flex-wrap: wrap;
}

.menu-list a {
    display: block;
    padding: 15px 25px;
    text-decoration: none;
    color: var(--azul-inem);
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.menu-list a:hover, .menu-list a.active {
    background-color: var(--gris-fondo);
    border-bottom: 3px solid var(--azul-claro);
    color: var(--azul-claro);
}

/* Dropdown */
.dropdown { position: relative; }
.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--blanco);
    min-width: 200px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.1);
    z-index: 1001;
    border-radius: 0 0 8px 8px;
    border-top: 3px solid var(--azul-claro);
}
.dropdown:hover .dropdown-content { display: block; }

/* ==========================================================================
   3. BANNER PRINCIPAL
   ========================================================================== */
.banner-history {
    background: linear-gradient(rgba(10, 42, 102, 0.2), rgba(10, 42, 102, 0.2)), url('img/Banner.jpg'); 
    background-size: cover;
    background-position: center;
    padding: 60px 20px;
    color: var(--blanco);
    border-bottom: 5px solid var(--azul-claro);
    clip-path: ellipse(150% 100% at 50% 0%);
    text-align: center;
}

.logo img {
    width: 140px;
    padding: 10px;
    background: var(--blanco);
    border-radius: 50%;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
}

.banner-content h1 {
    font-size: 2.3rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin-bottom: 10px;
}

/* ==========================================================================
   4. SECCIÓN HISTORIA (Layout de 2 Columnas)
   ========================================================================== */
.full-history-section {
    width: 100%;
    padding: 40px 0 20px 0; /* Reducido de 80px a 40px arriba y 20px abajo */    background-color: #f8f9fa;
    overflow: hidden;
}

.history-grid-expanded {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    gap: 50px;
    margin-bottom: 0; /* Asegura que no empuje la siguiente sección */
    align-items: center;
}

/* Columna Izquierda */
.history-column-left { width: 100%; }
.main-title {
    color: var(--azul-inem);
    font-size: 3.2rem;
    margin: 10px 0 20px;
    line-height: 1.2;
}
.subtitle-green {
    text-align: center;
    color: var(--verde-inem);
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    display: block;
}

/* Columna Derecha (Tarjeta Dinámica) */
.history-column-right {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.highlight-card {
    background: var(--blanco);
    padding: 50px;
    border-radius: 40px;
    box-shadow: var(--sombra-fuerte);
    border: 1px solid #eee;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 25px;
}

#card-text { font-size: 1.1rem; color: #555; line-height: 1.6; margin-bottom: 20px; }
.card-author { color: var(--azul-inem); font-weight: bold; }

/* Controles de la Tarjeta */
.nav-wrapper { margin-top: 40px; text-align: center; }
.nav-controls { display: flex; align-items: center; justify-content: center; gap: 30px; margin-bottom: 15px; }

.book-circle {
    background: var(--amarillo-inem);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.btn-nav {
    background: none;
    border: none;
    color: var(--amarillo-inem);
    font-size: 2.2rem;
    cursor: pointer;
    transition: transform 0.3s;
}
.btn-nav:hover { transform: scale(1.2); }

/* ==========================================================================
   5. LÍNEA DE TIEMPO (Timeline)
   ========================================================================== */
.timeline-section { 
    padding: 20px 0 60px 0; /* Reducido arriba para que se acerque a la sección anterior */    
    background-color: var(--gris-fondo); 
}

.timeline-container { position: relative; max-width: 1000px; margin: auto; padding: 40px 0; }

.timeline-intro h2 {
    margin-top: 5px; /* Quita margen extra arriba del título */
}

.timeline-line {
    position: absolute; left: 50%; transform: translateX(-50%);
    width: 4px; background-color: var(--gris-suave); z-index: 1;
    top: 45px; bottom: 155px;
}
.timeline-title {
    text-align: center;
    color: var(--azul-inem);
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    display: block;
}

.timeline-progress {
    position: absolute; top: 0; left: 0; width: 100%; height: 0%;
    background-color: var(--azul-inem); z-index: 2;
    transition: height 0.1s linear;
}

.timeline-item {
    display: flex; align-items: center; width: 100%; margin-bottom: 40px;
    position: relative; z-index: 3;
}

.timeline-dot {
    width: 45px; height: 45px; background: var(--gris-suave); color: white;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    position: absolute; left: 50%; transform: translateX(-50%);
    border: 4px solid var(--gris-fondo); z-index: 4; transition: all 0.4s ease;
}

/* Estado Activo Scroll */
.timeline-item.active .timeline-dot {
    background-color: var(--azul-inem) !important;
    transform: translateX(-50%) scale(1.2);
    box-shadow: 0 0 15px rgba(10, 42, 102, 0.4);
}

.timeline-content {
    width: 40%; padding: 25px; background: var(--blanco);
    border-radius: 20px; box-shadow: var(--sombra-suave);
}

.timeline-date { width: 40%; font-size: 1.4rem; font-weight: bold; color: var(--azul-inem); padding: 0 10px; }

.timeline-item.left { justify-content: flex-start; }
.timeline-item.right { justify-content: flex-end; }
.timeline-item.right .timeline-date { order: -1; text-align: right; }

/* ==========================================================================
   6. OTROS ELEMENTOS Y UTILITARIOS
   ========================================================================== */
.orgullo-text { 
    text-align: center; 
    color: var(--azul-inem); 
    font-weight: bold; 
    font-size: 1.8rem; 
    margin-top: 60px;
    text-shadow: 0 0 10px rgba(10, 42, 102, 0.2); /* Brillo solicitado */
}

/* ==========================================================================
   7. RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 992px) {
    .history-grid-expanded {
        grid-template-columns: 1fr;
        gap: 60px; /* Reducido de 100px a 60px para mayor cohesión */        text-align: center;
    }

    .timeline-line { left: 20px; transform: none; }
    .timeline-dot { left: 20px; transform: none; }
    .timeline-item { flex-direction: column; align-items: flex-start; margin-left: 50px; }
    .timeline-content, 
    .timeline-date { width: 100%; text-align: left !important;}
}