#header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.contenido-header {
    max-width: 100%;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 10px;
    height: 70px;
}



/* ── Logo ── */

.logo_nav img {
    width: 55px;
    height: auto;
}

/* ── Menú centrado ── */
#nav {
    flex: 1;
    display: flex;
    justify-content: center;
    
}

#nav ul {
    list-style: none;
    display: flex;
    align-items: center;
}

#nav ul li a .menu-activo {    
    color: #fff;
    font-weight: bold;
    text-decoration: underline;
    text-underline-offset: 6px; 
    text-decoration-thickness: 2px;  /* Grosor de la línea */
}

#nav ul li a {
    color: #fff;
    text-decoration: none;
    margin: 0 12px;
    font-weight: 400;
    font-size: 20px;
    transition: 0.3s;
    font-weight: bold;
}


/* Deja inicio activado con underline, y luego activa los otros con hover para obtener tambien el underline */
#nav ul li a.menu-activo,
#nav ul li a:hover {
    text-decoration: underline;
      text-underline-offset: 6px; 
      text-decoration-thickness: 2px;  /* Grosor de la línea */
}



/* ── Icono usuario ── */
.usuario_icono {
    display: flex;
    align-items: center;
}

.usuario_icono > a i,
.user-dropdown > i {
    font-size: 18px;
    color: #fff;
    padding: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: 0.3s;
    border: 2px solid transparent;
}

.usuario_icono > a i:hover,
.user-dropdown > i:hover {
    background-color: rgba(255, 255, 255, 0.25); 
    /*transform: scale(1.1);*/
}

/* ── Dropdown ── */
.user-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: #13131a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 0.5rem;
    min-width: 185px;
    z-index: 9999;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    animation: fadeDown 0.2s ease;
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.user-dropdown.active .dropdown-menu { display: block; }

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.9rem;
    border-radius: 10px;
    color: #f0f0f5;
    text-decoration: none;
    font-size: 0.875rem;
    transition: background 0.15s;
    white-space: nowrap;
}

.dropdown-menu a:hover { background: rgba(124, 92, 252, 0.12); color: #a78bfa; }
.dropdown-menu a i { width: 16px; color: #7a7a8c; font-size: 0.85rem; }
.dropdown-menu a:hover i { color: #a78bfa; }
.dropdown-menu hr { margin: 0.4rem 0.5rem; border: none; border-top: 1px solid rgba(255,255,255,0.07); }
.dropdown-menu a:last-child { color: #f87171; }
.dropdown-menu a:last-child:hover { background: rgba(248,113,113,0.1); }
.dropdown-menu a:last-child i { color: #f87171; }

/* ── Hamburguesa ── */
#icono-nav {
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: none;
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media screen and (max-width: 768px) {

    /* Ocultar logo y menú */
    .logo_nav { display: none; }
    #nav { display: none; }

    /* Usuario a la izquierda, hamburguesa a la derecha */
    .contenido-header {
        justify-content: space-between;
    }

    .usuario_icono { order: 1; }
    #icono-nav { display: block; order: 2; }

    /* Menú desplegable móvil */
    #nav.responsive {
        display: block;
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        padding: 10px 0;
    }

    #nav.responsive ul {
        display: block;
        text-align: center;
    }

    #nav.responsive ul li { margin: 20px 0; }

    /* Dropdown usuario en móvil abre a la derecha */
    
    @media screen and (max-width: 768px) {
    .user-dropdown .dropdown-menu {
        right: auto;
        left: 0;
    }
}

@media screen and (min-width: 769px) {
    .user-dropdown .dropdown-menu {
        right: 0;
        left: auto;
    }

    .usuario_icono {
        flex-shrink: 0;
        margin-right: 10px;
    }

    .contenido-header {
        box-sizing: border-box;
        overflow: visible;
    }
}

/*Con eso fuerzo que en escritorio el dropdown y el ícono vuelvan a alinearse 
hacia dentro del navbar.*/
.contenido-header {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}




}