@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600&display=swap');

/* variables principales del header */
:root {
    --primary-blue: #003366;
    --accent-gold: #c5a059; /* El color dorado crema recuperado */
    --white: #ffffff;
    --header-height: 100px;
}

/* reset básico y espacio superior para el header fijo */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Montserrat', sans-serif; padding-top: var(--header-height); }

/* contenedor principal del header */
.header-container {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    position: fixed;
    top: 0; left: 0; right: 0;
    background: var(--primary-blue);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Estilo base del logo */
.header-logo-img { 
    height: 55px; 
    width: auto; 
    transition: all 0.4s ease; /* Transición suave para el efecto */
    border-radius: 50%;       /* Para que la luz salga circular si el logo es redondo */
}

/* efecto luminoso del logo al pasar el ratón */
.header-logo:hover .header-logo-img {
    /* Crea un resplandor dorado suave */
    box-shadow: 0 0 15px 5px rgba(197, 160, 89, 0.5), 
                0 0 30px 10px rgba(197, 160, 89, 0.3);
    
    /* Aumenta un poco el brillo y el tamaño */
    filter: brightness(1.2);
    transform: scale(1.05);
}

/* Menú Navegación con Efecto Línea */
.header-nav-links { display: flex; list-style: none; gap: 1.5rem; align-items: center; }

.header-nav-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 600;
    transition: 0.3s;
    position: relative;
    padding-bottom: 5px;
}

/* La línea dorada que se desliza */
.header-nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-gold);
    transition: 0.3s;
}

.header-nav-links a:hover::after {
    width: 100%;
}

.header-nav-links a:hover {
    color: var(--accent-gold);
}

/* Badge de Usuario (Desktop) */
.header-auth-links { display: flex; align-items: center; gap: 1rem; }

.header-welcome {
    background: rgba(255,255,255,0.1);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    transition: 0.3s;
}

.header-welcome i { color: var(--accent-gold); }

.header-welcome:hover { 
    background: rgba(255,255,255,0.2); 
    border-color: var(--accent-gold);
}

/* botón de cerrar sesión */
.header-logout-btn { color: var(--white); font-size: 1.2rem; transition: 0.3s; }
.header-logout-btn:hover { color: var(--accent-gold); }

/* botón de login */
.header-btn-login {
    color: var(--white);
    text-decoration: none;
    border: 1px solid var(--accent-gold);
    padding: 8px 18px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: 0.3s;
}

.header-btn-login:hover {
    background: var(--accent-gold);
    color: var(--white);
}

.header-menu-icon, .mobile-only { display: none; }

/* ================= Mobile ================= */
@media (max-width: 900px) {
    .header-auth-links { display: none; }

    /* icono hamburguesa para móvil */
    .header-menu-icon { 
        display: block; 
        color: var(--accent-gold); 
        font-size: 1.8rem; 
        cursor: pointer; 
    }
    .mobile-only { display: block; }

    /* menú desplegable móvil */
    .header-main-nav {
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: var(--primary-blue);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
    }

    .header-nav-links {
        flex-direction: column;
        padding: 25px;
        text-align: center;
        gap: 1.5rem;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    .header-nav-links a::after { display: none; } /* Quitamos línea en móvil */

    /* abre el menú cuando el checkbox está marcado */
    .header-checkbox:checked ~ .header-main-nav {
        max-height: 500px;
        border-bottom: 4px solid var(--accent-gold);
    }
}

/* animación dorada del logo */
@keyframes pulse-gold {
    0% { box-shadow: 0 0 15px 2px rgba(197, 160, 89, 0.4); }
    50% { box-shadow: 0 0 25px 8px rgba(197, 160, 89, 0.7); }
    100% { box-shadow: 0 0 15px 2px rgba(197, 160, 89, 0.4); }
}

.header-logo:hover .header-logo-img {
    animation: pulse-gold 1.5s infinite;
    filter: brightness(1.1);
}
