/* ============================================================================
 * HEADER 2050 - Estilos del header, navegación, footer y componentes globales
 * Archivo: static/css/header-2050.css
 *
 * Extraído de base.html para cumplir regla: NO CSS inline en templates
 * ============================================================================ */

/* ==================== VARIABLES 2050 - COLORES DEL LOGO ==================== */
:root {
    /* Colores institucionales del logo */
    --logo-blue: #0049ff;
    --logo-yellow: #fff100;
    --logo-blue-light: #e6f0ff;

    /* Colores base claros */
    --neo-bg: #f5f7fa;
    --neo-surface: #ffffff;
    --neo-elevated: #fafbfc;
    --neo-border: rgba(0, 73, 255, 0.12);

    /* Espaciado consistente */
    --spacing-1: 0.25rem;
    --spacing-2: 0.5rem;
    --spacing-3: 0.75rem;
    --spacing-4: 1rem;
    --spacing-5: 1.25rem;
    --spacing-6: 1.5rem;
    --spacing-8: 2rem;
    --spacing-10: 2.5rem;
    --spacing-12: 3rem;

    /* Radios */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;

    /* Acentos del colegio */
    --holo-primary: #0049ff;
    --holo-secondary: #fff100;
    --holo-accent: #0066ff;
    --holo-gold: #ffc107;

    /* Gradientes institucionales */
    --holo-gradient: linear-gradient(135deg,
        #0049ff 0%,
        #0066ff 50%,
        #ffc107 100%);
    --glass-gradient: linear-gradient(135deg,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(255, 255, 255, 0.7) 100%);

    /* Tipografía */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Texto */
    --text-primary: #1a1a1a;
    --text-secondary: #4a5568;
    --text-dim: #718096;

    /* Sombras institucionales */
    --shadow-holo: 0 8px 32px rgba(0, 73, 255, 0.15);
    --shadow-neo: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-glow: 0 0 20px rgba(0, 73, 255, 0.3);
}

/* ==================== TEMA OSCURO ==================== */
[data-theme="dark"] {
    --neo-bg: #0f1419;
    --neo-surface: #1a1f2e;
    --neo-elevated: #242938;
    --neo-border: rgba(255, 255, 255, 0.1);

    --text-primary: #e8eaed;
    --text-secondary: #b4bcc4;
    --text-dim: #8a9199;

    --shadow-holo: 0 8px 32px rgba(0, 73, 255, 0.3);
    --shadow-neo: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background: var(--neo-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    padding-top: 80px;
}

/* ==================== HEADER 2050 ==================== */
.header-2050 {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--neo-border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* ==================== ESTRELLAS CAYENDO - EFECTO MÁGICO ==================== */
.stars-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    clip-path: inset(0 0 0 0);
}

.star {
    position: absolute;
    top: -50px;
    width: 4px;
    height: 4px;
    background: var(--holo-secondary);
    border-radius: 50%;
    box-shadow:
        0 0 8px var(--holo-secondary),
        0 0 16px var(--holo-secondary),
        0 0 24px rgba(255, 241, 0, 0.4);
    animation: starFall linear infinite;
    opacity: 0;
}

.star::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 241, 0, 0.8) 0%, transparent 70%);
    border-radius: 50%;
    animation: starPulse 2s ease-in-out infinite;
}

.star.blue {
    background: var(--holo-primary);
    box-shadow:
        0 0 8px var(--holo-primary),
        0 0 16px var(--holo-primary),
        0 0 24px rgba(0, 73, 255, 0.4);
}

.star.blue::before {
    background: radial-gradient(circle, rgba(0, 73, 255, 0.8) 0%, transparent 70%);
}

.star.large {
    width: 6px;
    height: 6px;
    box-shadow:
        0 0 12px currentColor,
        0 0 24px currentColor,
        0 0 36px currentColor;
}

.star.small {
    width: 2px;
    height: 2px;
    opacity: 0.7;
}

@keyframes starFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(150px) rotate(360deg);
        opacity: 0;
    }
}

@keyframes starPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0.4;
    }
}

.star:nth-child(3n) {
    animation-duration: 3s;
}

.star:nth-child(3n+1) {
    animation-duration: 4s;
}

.star:nth-child(3n+2) {
    animation-duration: 5s;
}

.star.with-trail::after {
    content: '';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 30px;
    background: linear-gradient(to bottom, currentColor, transparent);
    opacity: 0.6;
}

/* ==================== HEADER CONTENT ==================== */
.header-content {
    max-width: 100%;
    margin: 0;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 10;
    gap: clamp(1rem, 2vw, 3rem);
}

.header-menu-section {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
    gap: clamp(0.5rem, 1.5vw, 2rem);
    padding: 0 1rem;
    min-width: 0;
    margin-right: 1.5rem;
}

.header-user-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    margin-left: 2rem;
}

/* ==================== SELECTOR DE AÑO ESCOLAR ==================== */
.year-selector-wrapper {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
    margin-left: auto;
    margin-right: 0.5rem;
}

.year-selector-select {
    padding: 0.3rem 1.8rem 0.3rem 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 0.4rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23ffffff'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.4rem center;
    background-size: 0.85rem;
    transition: border-color 0.2s, background-color 0.2s;
}

.year-selector-select:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background-color: rgba(255, 255, 255, 0.18);
}

.year-selector-select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15);
}

.year-selector-select option {
    background-color: #1a1a2e;
    color: #fff;
}

.year-selector-historic {
    border-color: #f59e0b;
    background-color: rgba(245, 158, 11, 0.15);
}

.year-selector-icon {
    font-size: 0.9rem;
    line-height: 1;
}

/* ==================== BANNER AÑO HISTÓRICO ==================== */
.historic-year-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 1400px;
    margin: 0.75rem auto 0;
    padding: 0.6rem 1.25rem;
    background-color: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 0.5rem;
    color: #92400e;
    font-size: 0.875rem;
}

.historic-year-banner-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.historic-year-banner-text {
    flex: 1;
}

.historic-year-banner-btn {
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    background-color: #f59e0b;
    color: #fff;
    border: none;
    border-radius: 0.35rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.historic-year-banner-btn:hover {
    background-color: #d97706;
}

/* ==================== LOGO ==================== */
.logo-2050 {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--holo-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.nav-2050 {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-2050 a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.3s;
    position: relative;
}

.nav-2050 a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--holo-gradient);
    transition: width 0.3s;
}

.nav-2050 a:hover {
    color: var(--holo-primary);
}

.nav-2050 a:hover::after {
    width: 100%;
}

/* Logo y nombre del colegio */
.logo-container {
    display: flex;
    align-items: center;
    gap: clamp(0.5rem, 1vw, 1rem);
    text-decoration: none;
    flex-shrink: 0;
    margin-right: clamp(1rem, 3vw, 2.5rem);
    transition: opacity 0.2s ease;
}

.logo-container:hover {
    text-decoration: none;
    opacity: 0.85;
}

.logo-image {
    height: clamp(50px, 8vw, 80px);
    width: auto;
    transition: transform 0.3s;
    filter: drop-shadow(0 2px 8px rgba(0, 73, 255, 0.15));
}

.logo-image:hover {
    transform: scale(1.05);
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.logo-name {
    font-size: clamp(0.85rem, 1.5vw + 0.4rem, 1.6rem);
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
    white-space: nowrap;
}

.logo-location {
    font-size: clamp(0.65rem, 1.5vw, 0.9rem);
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ==================== DROPDOWN INTRANET ==================== */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-btn {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.3s;
    position: relative;
    padding: 0.5rem 0.25rem;
}

.nav-dropdown-btn::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--holo-gradient);
    transition: width 0.3s;
}

.nav-dropdown-btn:hover {
    color: var(--holo-primary);
}

.nav-dropdown-btn:hover::after {
    width: 100%;
}

.dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* Puente invisible para evitar que desaparezca el menú */
.nav-dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 15px;
    background: transparent;
    z-index: 999;
}

.nav-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--neo-surface);
    min-width: 260px;
    box-shadow: 0 8px 32px rgba(0, 73, 255, 0.2);
    border-radius: 12px;
    border: 1px solid var(--neo-border);
    z-index: 9999;
    overflow: hidden;
    animation: dropdownFadeIn 0.2s ease;
    padding-top: 10px;
    margin-top: 0;
}

.nav-dropdown-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 10px;
    background: transparent;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.nav-dropdown:hover .nav-dropdown-content,
.nav-dropdown-content:hover {
    display: block;
}

.nav-dropdown-content a {
    display: block;
    padding: 0.7rem 1.15rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
    border-bottom: 1px solid var(--neo-border);
    font-weight: 500;
    font-size: 0.85rem;
}

.nav-dropdown-content a:last-child {
    border-bottom: none;
}

.nav-dropdown-content a:hover {
    background: var(--logo-blue-light);
    color: var(--holo-primary);
    padding-left: 1.5rem;
}

.nav-dropdown-content a::after {
    display: none;
}

/* ==================== MAIN CONTENT ==================== */
.main-2050 {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding-top: 70px;
}

.container-2050 {
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 0 2rem !important;
}

/* ==================== GLASS CARD 2050 ==================== */
.glass-card {
    background: var(--neo-surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--neo-border);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-neo);
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--holo-gradient);
    opacity: 0;
    transition: opacity 0.3s;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: var(--holo-primary);
    box-shadow: var(--shadow-holo);
}

.glass-card:hover::before {
    opacity: 1;
}

/* ==================== BUTTONS 2050 ==================== */
.btn-2050 {
    padding: 0.65rem 1.5rem;
    background: var(--holo-primary);
    border: 2px solid var(--holo-primary);
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-block;
}

.btn-2050::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--holo-accent);
    transition: left 0.4s;
    z-index: -1;
}

.btn-2050:hover {
    border-color: var(--holo-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-holo);
}

.btn-2050:hover::before {
    left: 0;
}

/* ==================== FOOTER 2050 ==================== */
.footer-2050 {
    position: relative;
    z-index: 1;
    margin-top: 8rem;
    background: var(--neo-surface);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--neo-border);
    padding: 3rem 0 1.5rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.footer-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-section p,
.footer-section a {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 0.5rem 0;
}

.footer-section a {
    display: block;
    text-decoration: none;
    transition: all 0.3s;
}

.footer-section a:hover {
    color: var(--holo-primary);
    transform: translateX(5px);
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-contact-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--neo-border);
    color: var(--text-dim);
    font-size: 0.85rem;
}

.footer-bottom-tagline {
    font-size: 0.75rem;
    opacity: 0.6;
    margin-top: 0.5rem;
    display: inline-block;
}

.footer-about-tagline {
    margin-top: 1rem;
}

/* Enlace OIRS destacado en footer */
.footer-oirs-link {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    color: white !important;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-top: 0.75rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    display: block;
    text-align: center;
    transition: all 0.3s;
}

.footer-oirs-link:hover {
    transform: translateX(0) scale(1.02);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.4);
}

.footer-oirs-tracking {
    color: #8b5cf6 !important;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: block;
    text-align: center;
}

/* Footer enlace de contacto info */
.footer-info-link {
    display: inline;
    color: var(--holo-primary);
    font-weight: 600;
}

/* Footer wrapper del enlace info */
.footer-info-link-wrapper {
    margin-top: 1rem;
}

/* Footer enlace de seguimiento OIRS */
.footer-oirs-tracking {
    color: #8b5cf6 !important;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: block;
    text-align: center;
}

.footer-oirs-tracking:hover {
    text-decoration: underline;
}

/* Formulario de logout sin margen */
.logout-form {
    margin: 0;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ==================== RESPONSIVE HEADER ==================== */
@media (max-width: 768px) {
    .header-content {
        padding: 1rem;
    }

    .header-user-section {
        margin-left: 0;
        gap: 0.5rem;
    }

    .user-menu-btn {
        min-width: auto;
        padding: 0.4rem 0.6rem;
        gap: 0.5rem;
    }

    .user-name-display {
        display: none;
    }

    .user-avatar {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }

    .container-2050 {
        padding: 0 1rem;
    }

    .main-2050 {
        padding-top: 100px;
    }

    .logo-image {
        height: 65px;
    }

    .logo-container {
        gap: 0.9rem;
    }

    .logo-name {
        white-space: normal;
        font-size: clamp(0.8rem, 3.5vw, 1.1rem);
    }
}

/* ==================== BOTÓN HAMBURGUESA ==================== */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 100;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 3px;
    min-height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover .hamburger-line {
    background: var(--holo-primary);
}

/* Ocultar elementos del menú móvil en desktop */
.mobile-nav-header {
    display: none;
}

.mobile-overlay {
    visibility: hidden;
    opacity: 0;
}

/* ==================== RESOLUCIONES INTERMEDIAS ==================== */
@media (max-width: 1500px) and (min-width: 1281px) {
    .header-menu-section {
        gap: clamp(0.25rem, 0.8vw, 1rem);
    }

    .header-menu-section .site-menu .menu-link {
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
    }

    .header-user-section {
        gap: 0.5rem;
        margin-left: 0.75rem;
    }

    .logo-container {
        margin-right: clamp(0.5rem, 1.5vw, 1.5rem);
    }
}

/* ==================== TABLET Y RESOLUCIONES INTERMEDIAS - SIDEBAR ==================== */
@media (max-width: 1280px) {
    /* Mostrar botón hamburguesa */
    .mobile-menu-toggle {
        display: flex !important;
    }

    /* Ocultar hamburguesa cuando menú está abierto (el sidebar ya tiene su propio botón ✕) */
    .mobile-menu-toggle.active {
        opacity: 0;
        pointer-events: none;
    }

    .nav-2050 {
        display: none !important;
    }

    /* Sidebar menú móvil */
    .header-menu-section {
        position: fixed;
        top: 0;
        left: -320px;
        width: 300px;
        height: 100vh;
        background: var(--neo-surface);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.2);
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        z-index: 9999;
        transition: left 0.3s ease;
        display: flex !important;
        justify-content: flex-start;
        gap: 0;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .header-menu-section > .site-menu {
        padding: 0.75rem 1rem 2rem;
        margin-top: 65px;
    }

    .header-menu-section.active {
        left: 0;
    }

    /* Estilos para el menú del CMS (site-menu) */
    .header-menu-section .site-menu {
        display: block !important;
        width: 100%;
    }

    .header-menu-section .site-menu .menu-list {
        display: flex !important;
        flex-direction: column;
        gap: 0.25rem;
        width: 100%;
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .header-menu-section .site-menu .menu-item {
        width: 100%;
    }

    .header-menu-section .site-menu .menu-link {
        display: flex !important;
        align-items: center;
        gap: 0.5rem;
        padding: 0.875rem 1rem;
        border-radius: 8px;
        font-size: 1rem;
        color: var(--text-primary);
        text-decoration: none;
        transition: background 0.2s;
        width: 100%;
        box-sizing: border-box;
    }

    .header-menu-section .site-menu .menu-link:hover {
        background: var(--logo-blue-light);
    }

    .header-menu-section .site-menu .menu-item.active .menu-link {
        background: var(--logo-blue-light);
        color: var(--holo-primary);
    }

    /* ==================== SUBMENÚS ACORDEÓN EN SIDEBAR ==================== */
    .header-menu-section .site-menu [class*="menu-submenu"] {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        min-width: auto !important;
        width: 100% !important;
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    }

    .header-menu-section .site-menu [class*="menu-item"].submenu-open > [class*="menu-submenu"] {
        max-height: 1000px;
        padding: 0.25rem 0 0.5rem 0 !important;
        transition: max-height 0.4s ease-in, padding 0.3s ease-in;
    }

    .header-menu-section .site-menu [class*="menu-submenu"] [class*="menu-item"] {
        padding: 0;
    }

    .header-menu-section .site-menu [class*="menu-submenu"] [class*="menu-link"] {
        padding: 0.65rem 1rem 0.65rem 2.5rem !important;
        border-radius: 6px;
        margin: 0.125rem 0.5rem;
        font-size: 0.9rem;
        color: var(--text-secondary, #64748b);
        background: transparent;
        transition: all 0.2s ease;
    }

    .header-menu-section .site-menu [class*="menu-submenu"] [class*="menu-link"]:hover {
        background: rgba(0, 73, 255, 0.08);
        color: var(--holo-primary, #0049ff);
        padding-left: 2.75rem !important;
    }

    .header-menu-section .site-menu [class*="menu-submenu"] [class*="menu-link"]::before {
        display: none;
    }

    .header-menu-section .site-menu [class*="menu-submenu"] [class*="menu-submenu"] {
        margin-left: 0 !important;
    }

    .header-menu-section .site-menu [class*="menu-submenu"] [class*="menu-submenu"] [class*="menu-link"] {
        padding-left: 3.5rem !important;
    }

    .header-menu-section .site-menu [class*="menu-submenu"] [class*="menu-submenu"] [class*="menu-link"]:hover {
        padding-left: 3.75rem !important;
    }

    .header-menu-section .site-menu [class*="menu-item"].has-submenu > [class*="menu-link"] .menu-dropdown-icon {
        margin-left: auto;
        transition: transform 0.3s ease;
    }

    .header-menu-section .site-menu [class*="menu-item"].has-submenu.submenu-open > [class*="menu-link"] .menu-dropdown-icon {
        transform: rotate(180deg);
    }

    .header-menu-section .site-menu [class*="menu-submenu"] [class*="menu-item"].active > [class*="menu-link"] {
        background: rgba(0, 73, 255, 0.12);
        color: var(--holo-primary, #0049ff);
        font-weight: 600;
    }

    .header-menu-section .site-menu .submenu-list {
        display: none;
        flex-direction: column;
        padding-left: 1rem;
        margin-top: 0.25rem;
    }

    .header-menu-section .site-menu .menu-item.open .submenu-list {
        display: flex;
    }

    .header-menu-section .nav-2050 {
        display: flex !important;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    .header-menu-section .nav-2050 a,
    .header-menu-section .nav-dropdown-btn {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.875rem 1rem;
        border-radius: 8px;
        font-size: 1rem;
        color: var(--text-primary);
        text-decoration: none;
        transition: background 0.2s;
    }

    .header-menu-section .nav-2050 a:hover,
    .header-menu-section .nav-dropdown-btn:hover {
        background: var(--logo-blue-light);
    }

    /* Header del menú móvil - sticky */
    .mobile-nav-header {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        position: sticky;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        margin: 0;
        padding: 1rem 1.25rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        background: #0049ff;
        z-index: 10;
        box-sizing: border-box;
        min-height: 60px;
        flex-shrink: 0;
    }

    .mobile-nav-title {
        font-weight: 700;
        font-size: 1.2rem;
        color: white;
    }

    .mobile-nav-close {
        background: rgba(255, 255, 255, 0.2);
        border: none;
        border-radius: 50%;
        font-size: 1.5rem;
        cursor: pointer;
        color: white;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
        transition: background 0.2s;
    }

    .mobile-nav-close:hover {
        background: rgba(255, 255, 255, 0.3);
    }

    /* Overlay oscuro - usar visibility para transiciones suaves */
    .mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9998;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        pointer-events: none;
    }

    .mobile-overlay.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}

/* Pantallas grandes */
@media (min-width: 1601px) {
    .header-content {
        padding: 1.25rem 4rem;
    }
}

/* ==================== UTILITY CLASSES ==================== */
.text-gradient {
    background: var(--holo-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glow-text {
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

/* ==================== THEME SWITCHER ==================== */
.theme-switcher {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle-btn {
    background: var(--neo-surface);
    border: 1px solid var(--neo-border);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

.theme-toggle-btn:hover {
    transform: scale(1.1);
    border-color: var(--holo-primary);
    box-shadow: var(--shadow-holo);
}

.login-btn {
    padding: 0.6rem 1.4rem;
    background: #DBEAFE;
    color: #1e40af;
    border: 1px solid #93c5fd;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.login-btn:hover {
    background: #BFDBFE;
    border-color: #60a5fa;
    box-shadow: 0 2px 6px rgba(96, 165, 250, 0.3);
    transform: translateY(-1px);
}

.login-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ==================== USER MENU ==================== */
.user-menu {
    position: relative;
    display: inline-block;
}

.user-menu::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 15px;
    background: transparent;
    z-index: 999;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--neo-surface);
    border: 1px solid var(--neo-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.875rem;
    min-width: clamp(120px, 15vw, 200px);
    max-width: 220px;
}

.user-menu-btn:hover {
    border-color: var(--holo-primary);
    box-shadow: var(--shadow-neo);
    background: var(--logo-blue-light);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--holo-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 73, 255, 0.2);
}

.user-name-display {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    overflow: hidden;
    flex: 1;
}

.user-name-full {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.user-role-badge {
    font-size: 0.65rem;
    color: var(--holo-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.user-menu-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--neo-surface);
    min-width: 280px;
    box-shadow: var(--shadow-holo);
    border-radius: 12px;
    border: 1px solid var(--neo-border);
    z-index: 9999;
    overflow: hidden;
    animation: dropdownFadeIn 0.2s ease;
    max-height: 85vh;
    overflow-y: auto;
}

.user-menu:hover .user-menu-dropdown,
.user-menu-dropdown:hover {
    display: block;
}

.user-menu-dropdown a,
.user-menu-dropdown button {
    display: block;
    padding: 0.7rem 1.15rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--neo-border);
}

.user-menu-dropdown a:last-child,
.user-menu-dropdown button:last-child {
    border-bottom: none;
}

.user-menu-dropdown a:hover,
.user-menu-dropdown button:hover {
    background: var(--logo-blue-light);
    color: var(--holo-primary);
}

/* ==================== CMS SECTION IN DROPDOWN ==================== */
.cms-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 15px;
    border-bottom: 1px solid var(--neo-border);
}

.cms-section h4 {
    margin: 0 0 8px 0;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cms-toggle-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 4px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
    transition: background 0.2s;
}

.cms-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.cms-toggle-btn.active {
    background: #ef4444;
}

.cms-status {
    font-size: 11px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.cms-buttons {
    display: none;
    gap: 6px;
    flex-direction: column;
}

.cms-buttons.active {
    display: flex;
}

.cms-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    width: 100%;
    transition: all 0.2s;
    text-align: left;
}

.cms-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(2px);
}

.cms-btn-primary {
    background: rgba(16, 185, 129, 0.3);
}

.cms-btn-primary:hover {
    background: rgba(16, 185, 129, 0.5);
}

.menu-divider {
    height: 1px;
    background: var(--neo-border);
    margin: 0;
}

/* ==================== CMS EDITOR STYLES ==================== */
.cms-editable {
    position: relative;
}

.cms-editable.cms-edit-mode {
    cursor: pointer;
}

.cms-editable.cms-edit-mode:hover {
    outline: 1px dashed rgba(102, 126, 234, 0.3);
    outline-offset: 0px;
}

.cms-editable.cms-editing {
    outline: 2px solid #10b981 !important;
    outline-offset: 0px;
    background: rgba(16, 185, 129, 0.02) !important;
    z-index: 50;
    filter: none !important;
    backdrop-filter: none !important;
}

.cms-editable.cms-modified {
    box-shadow: -4px 0 0 0 #fbbf24;
}

.cms-editable.cms-success-flash {
    animation: successFlash 1s ease;
}

@keyframes successFlash {
    0%, 100% { background: transparent; }
    50% { background: rgba(16, 185, 129, 0.2); }
}

/* Resize Handles */
.cms-resize-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #667eea;
    border: 2px solid white;
    border-radius: 50%;
    z-index: 110;
    opacity: 0;
    transition: all 0.2s ease;
}

.cms-edit-mode .cms-resize-handle {
    opacity: 1;
}

.cms-resize-handle:hover {
    transform: scale(1.5);
    background: #764ba2;
}

.cms-resize-handle.top-left {
    top: -6px;
    left: -6px;
    cursor: nwse-resize;
}

.cms-resize-handle.top-right {
    top: -6px;
    right: -6px;
    cursor: nesw-resize;
}

.cms-resize-handle.bottom-left {
    bottom: -6px;
    left: -6px;
    cursor: nesw-resize;
}

.cms-resize-handle.bottom-right {
    bottom: -6px;
    right: -6px;
    cursor: nwse-resize;
}

/* Drag & Drop */
.cms-ghost {
    opacity: 0.4;
}

.cms-drag {
    cursor: grabbing !important;
}

.cms-placeholder {
    background: #fef3c7;
    border: 2px dashed #fbbf24;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    color: #92400e;
}

/* ==================== SKIP LINK - ACCESIBILIDAD ==================== */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--holo-primary, #0049ff);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 8px 8px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    z-index: 99999;
    transition: top 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 73, 255, 0.3);
}

.skip-link:focus {
    top: 0;
    outline: 2px solid var(--holo-secondary, #fff100);
    outline-offset: 2px;
}

/* Filas clickeables en tablas y cards */
.clickable-row {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

tr.clickable-row:hover {
    background-color: #f0f7ff !important;
}

div.clickable-row:hover {
    background-color: rgba(0, 0, 0, 0.03) !important;
}

/* Breadcrumbs wrapper */
.breadcrumbs-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Footer email link */
.footer-email-link {
    color: var(--holo-primary);
}

/* ==================== PRINT STYLES ==================== */
@media print {
    body > *:not(main),
    header,
    .header-2050,
    .header-content,
    .header-nav,
    .header-menu-section,
    .header-user-section,
    .logo-container,
    .mobile-overlay,
    .mobile-menu-toggle,
    footer,
    .footer-2050,
    .footer-content,
    .footer-grid,
    .footer-section,
    .footer-bottom,
    nav,
    .navbar,
    .site-menu,
    .breadcrumb,
    .breadcrumbs-wrapper,
    .messages-container,
    .btn-scroll-top,
    .cookie-banner,
    .impersonation-banner,
    [class*="footer"],
    [id*="footer"] {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        max-width: 0 !important;
        max-height: 0 !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        position: absolute !important;
        top: -9999px !important;
        left: -9999px !important;
        clip: rect(0,0,0,0) !important;
        clip-path: inset(100%) !important;
    }

    main {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    html, body {
        margin: 0 !important;
        padding: 0 !important;
    }
}
