/**
 * Header Styles - ExadonboscoCR
 * Estilos específicos para el header y navegación superior
 */

/* ==========================================================================
   Top Navigation (En la parte superior de la página)
   ========================================================================== */

#top-nav {
    background: #1e3c72;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1em 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

#top-nav .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2em;
    display: flex;
    justify-content: center;
}

#top-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1em;
}

#top-nav ul li a {
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.75em 1.5em;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    font-size: 0.9em;
    transition: all 0.3s ease;
    min-width: 120px;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

#top-nav ul li a:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#top-nav ul li.current a,
#top-nav ul li.active a {
    background: #ffd700;
    color: #1e3c72;
    font-weight: 600;
}

#top-nav ul li.current a:hover,
#top-nav ul li.active a:hover {
    background: #ffed4e;
    transform: translateY(-2px);
}

#top-nav ul li a i {
    font-size: 1em;
}

/* ==========================================================================
   Header Principal (Solo logo y título)
   ========================================================================== */

#header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 4em 0 3em 0;
    position: relative;
    z-index: 10;
}

#header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2em;
}

/* ==========================================================================
   Logo y Título
   ========================================================================== */

#logo {
    margin: 0 0 1em 0;
    text-align: center;
}

#logo a {
    color: #ffffff;
    font-weight: 700;
    font-size: 2.5em;
    line-height: 1.2;
    text-decoration: none;
    transition: color 0.3s ease;
}

#logo a:hover {
    color: #ffd700;
}

#header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1em;
    text-align: center;
    margin: 0;
    font-style: italic;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Navigation responsive */
@media screen and (max-width: 768px) {
    #top-nav ul {
        flex-direction: column;
        gap: 0.5em;
        align-items: center;
    }

    #top-nav ul li {
        width: 100%;
        max-width: 280px;
    }

    #top-nav ul li a {
        width: 100%;
        padding: 1em;
        font-size: 1em;
        min-width: auto;
    }
}

@media screen and (max-width: 480px) {
    #top-nav .container {
        padding: 0 1em;
    }

    #top-nav ul li a {
        padding: 0.8em;
        font-size: 0.9em;
    }
}

/* Header responsive */
@media screen and (max-width: 768px) {
    #header {
        padding: 2em 0 1.5em 0;
    }

    #header .container {
        padding: 0 1em;
    }

    #logo a {
        font-size: 2em;
    }

    #header p {
        font-size: 1em;
    }
}

@media screen and (max-width: 480px) {
    #logo a {
        font-size: 1.8em;
    }

    #header p {
        font-size: 0.9em;
        padding: 0 1em;
    }
}

/* Large screens */
@media screen and (min-width: 1024px) {
    #header {
        padding: 5em 0 4em 0;
    }
    
    #header .container {
        max-width: 1400px;
    }
}

/* ==========================================================================
   Efectos Especiales
   ========================================================================== */

/* Animación de carga */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#header.loaded #logo,
#header.loaded p {
    animation: fadeInUp 0.6s ease-out;
}

#top-nav.loaded ul li {
    animation: fadeInUp 0.6s ease-out;
    animation-delay: calc(var(--index) * 0.1s);
}

/* ==========================================================================
   Accesibilidad
   ========================================================================== */

#top-nav ul li a:focus {
    outline: 2px solid #ffd700;
    outline-offset: 2px;
}

#top-nav ul li a:focus:not(:focus-visible) {
    outline: none;
}

/* Reducir movimiento para usuarios que lo prefieren */
@media (prefers-reduced-motion: reduce) {
    #top-nav ul li a {
        transition: none;
    }
    
    #top-nav ul li a:hover {
        transform: none;
    }
    
    #header.loaded #logo,
    #header.loaded p,
    #top-nav.loaded ul li {
        animation: none;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    #top-nav {
        display: none;
    }
    
    #header {
        background: none;
        color: #000;
        padding: 1em 0;
    }
    
    #logo a,
    #header p {
        color: #000;
    }
}