﻿/* ========================================
   TOPNAV - ESTILOS MÓVILES MEJORADOS
   ======================================== */

/* Botón de menú hamburguesa */
.btn-menu-toggle {
    background: transparent;
    border: none;
    color: #111111;
    padding: 0.5rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

    .btn-menu-toggle:hover {
        background: #f8f9fa;
        color: #111111;
    }

    .btn-menu-toggle:active {
        background: #e9ecef;
        transform: scale(0.95);
    }

/* Navbar sticky mejorada */
.navbar.sticky-top {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    background: white;
}

/* Mobile actions - organización horizontal */
.mobile-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

    .mobile-actions .btn-link {
        padding: 0.5rem;
        color: #495057;
        text-decoration: none;
    }

        .mobile-actions .btn-link:hover {
            color: #111111;
        }

/* Ajustes para el logo en móvil */
@media (max-width: 991.98px) {
    .navbar-brand {
        margin: 0 auto;
        padding: 0;
    }

    .app-icon {
        height: 36px;
        width: auto;
    }

    .container-fluid {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem 1rem;
    }

    /* Menú hamburguesa a la izquierda */
    .btn-menu-toggle {
        order: -1;
        margin-right: auto;
    }

    /* Logo en el centro */
    .navbar-brand {
        order: 0;
        margin: 0;
    }

    /* Acciones a la derecha */
    .mobile-actions {
        order: 1;
        margin-left: auto;
    }
}

/* Desktop - mantener estructura original */
@media (min-width: 992px) {
    .container-fluid {
        padding: 0.75rem 2rem;
    }

    .navbar-brand {
        margin-right: 2rem;
    }

    .app-icon {
        height: 40px;
    }

    .search-section {
        max-width: 450px;
    }

    .navbar-nav .nav-link {
        padding: 0.5rem 1rem;
        font-weight: 500;
        color: #495057;
        transition: all 0.2s;
        border-radius: 6px;
    }

        .navbar-nav .nav-link:hover {
            background: #f8f9fa;
            color: #111111;
        }

    .desktop-actions {
        flex-shrink: 0;
    }
}

/* Dropdown mejorado */
.dropdown-menu {
    min-width: 220px;
    border: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    margin-top: 0.5rem;
    padding: 0.5rem;
}

.dropdown-header {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6c757d;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 0.5rem;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

    .dropdown-item:hover {
        background: #f8f9fa;
    }

    .dropdown-item.text-danger:hover {
        background: #fff5f5;
        color: #dc3545 !important;
    }

.dropdown-divider {
    margin: 0.5rem 0;
}

/* User avatar */
.user-avatar i {
    font-size: 1.5rem;
}

/* Animación para icono de menú */
@keyframes slideIn {
    from {
        transform: translateX(-10px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.btn-menu-toggle i {
    animation: slideIn 0.3s ease;
}

/* ========================================
   AJUSTES DE RESPONSIVIDAD
   ======================================== */

@media (max-width: 576px) {
    .container-fluid {
        padding: 0.5rem;
    }

    .app-icon {
        height: 32px;
    }

    .btn-menu-toggle {
        width: 40px;
        height: 40px;
    }

    .mobile-actions .btn-link {
        padding: 0.375rem;
    }
}

/* ========================================
   ACCESIBILIDAD
   ======================================== */

.btn-menu-toggle:focus-visible {
    outline: 2px solid #111111;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .btn-menu-toggle,
    .navbar-nav .nav-link,
    .dropdown-item {
        transition: none;
    }

        .btn-menu-toggle i {
            animation: none;
        }
}
