/* --- 1. VARIABLES Y CONFIGURACIÓN BASE --- */
:root { 
    --azul: #005596; 
    --blanco: #ffffff; 
    --celeste-menu: #bdd6ff;
}

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

body { 
    font-family: 'Segoe UI', Arial, sans-serif; 
    background: #f4f4f4; 
    padding-top: 0 !important; /* Eliminamos el hueco forzado */
    margin: 0;
}

ul, li { list-style: none !important; }

/* --- 2. CABECERA FIJA --- */
.header-fixed-wrapper { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    z-index: 10000;
    display: flex;
    flex-direction: column;
}

.header-banner { 
    background: var(--azul); 
    padding: 10px 20px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    color: white; 
    margin-bottom: 0 !important;
}

.burger { display: none; }

.logo-side { flex: 1; display: flex; justify-content: center; }
.brand { font-size: 24px; font-weight: bold; color: white; text-decoration: none; display: flex; align-items: center; }
.heart { color: red; font-size: 28px; margin-left: 8px; }

.social-side { flex: 1; display: flex; flex-direction: column; align-items: flex-end; }
.icons-row { display: flex; gap: 10px; margin-bottom: 2px; }
.farma-link { font-size: 11px; font-weight: bold; text-transform: uppercase; color: white !important; text-decoration: none; }

/* --- 3. NAVEGACIÓN Y SUBMENÚS (ESCRITORIO) --- */
nav { 
    background: var(--azul); 
    min-height: 42px; 
    display: flex; 
    padding: 0 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.nav-list { display: flex; flex-wrap: wrap; width: 100%; }

.nav-link { 
    color: white !important; 
    text-decoration: none; 
    font-size: 14px; 
    font-weight: bold; 
    padding: 12px 15px; 
    text-transform: uppercase; 
    display: block;
}

/* SUBMENÚS: Sin !important para permitir alternancia */
.submenu { 
    display: none; 
    position: absolute; 
    background: white; 
    min-width: 200px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
    z-index: 1000;
}

/* Apertura por interacción */
.nav-list li:hover > .submenu,
.nav-list li:focus-within > .submenu { 
    display: block; 
}

.submenu a { 
    color: var(--azul) !important; 
    padding: 10px 15px; 
    display: block; 
    text-decoration: none; 
    border-bottom: 1px solid #eee; 
    text-transform: none;
}

/* --- 4. GRID PRINCIPAL (3 COLUMNAS MANTENIDAS) --- */
.main-grid { 
    display: grid !important; 
    grid-template-columns: 240px 1fr 240px !important;
    gap: 20px; 
    max-width: 1200px;
    margin: 20px auto; 
}

/* --- 5. MÓVIL (SISTEMA DE TOGGLE) --- */
@media (max-width: 900px) {
    body { padding-top: 80px !important; }

    .burger { 
        display: block !important; 
        order: -1; 
        font-size: 28px; 
        color: white !important; 
        cursor: pointer; 
    }
    
    .logo-side { flex: 1; justify-content: flex-start; margin-left: 10px; }
    .brand { font-size: 18px; }

    nav { 
        display: none; 
        position: absolute; 
        top: 100%; 
        left: 0; 
        width: 100%; 
        background: var(--azul) !important; 
        flex-direction: column;
        z-index: 9999;
        max-height: 80vh;
        overflow-y: auto;
    }

    nav.active { display: flex !important; }

    .nav-list { flex-direction: column; }
    .nav-link { border-bottom: 1px solid rgba(255,255,255,0.1); }

    /* Submenú móvil */
    .submenu { 
        position: static; 
        width: 100%; 
        background: rgba(0,0,0,0.2) !important; 
        box-shadow: none;
    }

    /* Al tocar Educación (u otro), se abre. Si tocas otra categoría, se cierra el anterior. */
    .nav-list li:focus-within > .submenu { 
        display: block; 
    }

    .submenu a { 
        color: var(--celeste-menu) !important; 
        padding: 12px 35px !important;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    .main-grid { grid-template-columns: 1fr !important; }
}

/* --- 6. COMPONENTES --- */
.card-noticia { 
    background: white; 
    border-radius: 25px; 
    overflow: hidden; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.08); 
    margin-bottom: 30px;
}

.noticia-img-container { width: 100%; height: 250px; overflow: hidden; }
.noticia-img-container img { width: 100%; height: 100%; object-fit: cover; }
.noticia-autor { padding: 5px 20px; font-size: 0.75rem; color: #888; font-style: italic; }
.peli-mini-card, .peli-mini-card img { border-radius: 25px !important; }
