/* =================================================================
   MENÚ HORIZONTAL & NAVEGACIÓN - Libremente
   ACTUALIZADO: Sin iconos izquierdos + flechas derechas + UX profesional
   ================================================================= */

/* =================================================================
   BASE DEL NAVBAR
   ================================================================= */
.navbar-horizontal {
    background: linear-gradient(135deg, #faf8fc 0%, #f3eef7 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1050;
    width: 100%;
    height: 70px;
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: flex;
    align-items: center;
}

.brand-link {
    display: block;
}

.navbar-logo {
    height: 75px;
    width: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-logo:hover {
    transform: scale(1.05);
}

.navbar-main {
    display: flex;
    align-items: center;
    flex: 1;
    margin: 0 30px;
}

/* =================================================================
   MENÚ PRINCIPAL - SIN ICONOS IZQUIERDOS
   ================================================================= */
.navbar-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
    align-items: center;
}

.menu-item {
    position: relative;
}

.menu-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    color: #333;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.menu-link:hover {
    color: #6b4c7f;
    background: rgba(107, 76, 127, 0.08);
}

.menu-link.active {
    color: #6b4c7f;
    background: transparent !important;
}

/* Flecha de dropdown - derecha, visible y animada */
.menu-link .arrow {
    font-size: 0.7rem;
    margin-left: 4px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    opacity: 0.8;
}

.menu-link:hover .arrow {
    opacity: 1;
}

.has-dropdown:hover .menu-link .arrow {
    transform: rotate(180deg);
}

/* =================================================================
   DROPDOWNS
   ================================================================= */
.has-dropdown {
    position: relative;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    min-width: 300px;
    list-style: none;
    margin: 0;
    padding: 10px 0;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.3s;
    z-index: 1000;
}

.has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown li a {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    gap: 8px;
}

.dropdown li a:hover {
    background: linear-gradient(135deg, #6b4c7f 0%, #5a3f6f 100%);
    color: #ffffff;
    padding-left: 25px;
}

.dropdown li a i {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* =================================================================
   MENÚ DE USUARIO
   ================================================================= */
.navbar-user {
    display: flex;
    align-items: center;
}

.user-menu-wrapper {
    position: relative;
}

.user-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    background: rgba(107, 76, 127, 0.1);
    border-radius: 25px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.user-toggle:hover {
    background: rgba(107, 76, 127, 0.2);
}

.user-avatar {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, #5a9e7f 0%, #4a8b6f 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
}

.user-role {
    font-size: 0.75rem;
    color: #666;
}

.user-dropdown-menu {
    min-width: 220px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    margin-top: 10px;
    border: none;
}

.user-dropdown-menu .dropdown-item {
    padding: 10px 20px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-dropdown-menu .dropdown-item:hover {
    background: rgba(107, 76, 127, 0.1);
}

/* =================================================================
   TOGGLE MÓVIL
   ================================================================= */
.navbar-mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 6px;
}

.navbar-mobile-toggle:hover {
    background: rgba(107, 76, 127, 0.1);
}

.navbar-mobile-toggle span {
    width: 25px;
    height: 3px;
    background: #6b4c7f;
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.navbar-mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.navbar-mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* =================================================================
   RESPONSIVE MENÚ
   ================================================================= */
@media (max-width: 992px) {
    .navbar-mobile-toggle {
        display: flex;
    }
    
    .navbar-main {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: #ffffff;
        margin: 0;
        padding: 20px;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        z-index: 1040;
    }
    
    .navbar-main.mobile-active {
        left: 0;
    }
    
    .navbar-menu {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }
    
    .menu-item {
        width: 100%;
    }
    
    .menu-link {
        padding: 15px 20px;
        width: 100%;
        justify-content: space-between;
    }
    
    .menu-link .arrow {
        margin-left: 0;
        margin-right: 4px;
    }
    
    .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(107, 76, 127, 0.05);
        margin: 0 0 10px 20px;
        display: none;
        border-radius: 6px;
    }
    
    .has-dropdown[aria-expanded="true"] .dropdown,
    .has-dropdown:hover .dropdown {
        display: block;
    }
    
    .dropdown li a {
        padding: 12px 20px;
    }
    
    .navbar-user {
        margin-top: 20px;
        width: 100%;
        justify-content: center;
    }
    
    .user-toggle {
        width: 100%;
        justify-content: center;
    }
    
    .user-dropdown-menu {
        position: static;
        box-shadow: none;
        margin-top: 0;
        background: rgba(107, 76, 127, 0.03);
        border-radius: 6px;
    }
}

@media (max-width: 576px) {
    .navbar-container {
        padding: 0 15px;
    }
    
    .navbar-logo {
        height: 60px;
    }
    
    .user-name {
        font-size: 0.85rem;
    }
    
    .user-role {
        font-size: 0.7rem;
    }
}

/* =================================================================
   ACCESIBILIDAD - ESTADOS DE FOCO
   ================================================================= */
.menu-link:focus-visible,
.user-toggle:focus-visible,
.dropdown-item:focus-visible,
.navbar-mobile-toggle:focus-visible {
    outline: 2px solid #6b4c7f;
    outline-offset: 2px;
}

/* Indicador visual para item activo (sutil) */
.menu-link.active {
    position: relative;
}

.menu-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 2px;
    background: #6b4c7f;
    border-radius: 2px;
}

@media (max-width: 992px) {
    .menu-link.active::after {
        bottom: 0;
        left: 0;
        transform: none;
        width: 4px;
        height: 100%;
        border-radius: 2px 0 0 2px;
    }
}