/**
 * 🖥️ CORRECCIÓN DE NAVBAR PARA ESCRITORIO
 * Asegura que todos los menús estén siempre visibles en escritorio
 */

/* ============================================================================
   🖥️ NAVBAR SIEMPRE VISIBLE EN ESCRITORIO
   ============================================================================ */

/* En pantallas grandes (≥992px), el navbar siempre está expandido */
@media (min-width: 992px) {
    .navbar-collapse {
        display: block !important;
        height: auto !important;
        overflow: visible !important;
        transition: none !important;
    }
    
    .navbar-collapse.collapse {
        display: block !important;
    }
    
    .navbar-collapse.collapsing {
        display: block !important;
        height: auto !important;
    }
    
    /* Ocultar el botón toggler en escritorio */
    .navbar-toggler {
        display: none !important;
    }
    
    /* Asegurar que el navbar-nav esté siempre visible */
    .navbar-nav {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        width: auto !important;
    }
    
    /* Asegurar que los nav-items estén siempre visibles */
    .nav-item {
        display: block !important;
        width: auto !important;
    }
    
    /* Asegurar que los nav-links estén siempre visibles */
    .nav-link {
        display: block !important;
        width: auto !important;
    }
}

/* ============================================================================
   🖥️ MEJORAS ESPECÍFICAS PARA ESCRITORIO
   ============================================================================ */

@media (min-width: 992px) {
    /* Asegurar que los dropdowns funcionen correctamente */
    .dropdown-menu {
        position: absolute !important;
        display: none !important;
    }
    
    .dropdown-menu.show {
        display: block !important;
    }
    
    /* Mejorar el espaciado en escritorio */
    .navbar-nav {
        gap: 0.5rem;
    }
    
    .nav-link {
        padding: 0.5rem 1rem;
        white-space: nowrap;
    }
    
    /* Asegurar que la información del usuario esté visible */
    .user-info-container {
        display: flex !important;
        align-items: center;
    }
    
    .user-details {
        display: block !important;
    }
    
    .xp-progress {
        display: block !important;
    }
}

/* ============================================================================
   🖥️ CORRECCIÓN DE Z-INDEX PARA ESCRITORIO
   ============================================================================ */

@media (min-width: 992px) {
    .navbar {
        z-index: 1050 !important;
    }
    
    .dropdown-menu {
        z-index: 1060 !important;
    }
}

/* ============================================================================
   🖥️ ANIMACIONES SUAVES PARA ESCRITORIO
   ============================================================================ */

@media (min-width: 992px) {
    .nav-link {
        transition: all 0.3s ease;
    }
    
    .nav-link:hover {
        background: rgba(255, 255, 255, 0.15);
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    
    .dropdown-item {
        transition: all 0.2s ease;
    }
    
    .dropdown-item:hover {
        transform: translateX(5px);
    }
}

/* ============================================================================
   🖥️ CORRECCIÓN DE ACCESIBILIDAD
   ============================================================================ */

@media (min-width: 992px) {
    .nav-link:focus,
    .dropdown-item:focus {
        outline: 2px solid rgba(255, 255, 255, 0.5);
        outline-offset: 2px;
    }
    
    /* Asegurar que los elementos sean accesibles por teclado */
    .nav-link:focus-visible,
    .dropdown-item:focus-visible {
        outline: 2px solid rgba(255, 255, 255, 0.8);
        outline-offset: 2px;
    }
}

/* ============================================================================
   🖥️ CORRECCIÓN DE RESPONSIVIDAD
   ============================================================================ */

/* En pantallas muy grandes, mejorar el espaciado */
@media (min-width: 1200px) {
    .navbar-container {
        padding: 0 2rem;
    }
    
    .navbar-nav {
        gap: 0.75rem;
    }
    
    .nav-link {
        padding: 0.6rem 1.2rem;
        font-size: 0.95rem;
    }
}

/* En pantallas extra grandes, optimizar aún más */
@media (min-width: 1400px) {
    .navbar-container {
        padding: 0 3rem;
    }
    
    .navbar-nav {
        gap: 1rem;
    }
    
    .nav-link {
        padding: 0.7rem 1.5rem;
        font-size: 1rem;
    }
}
