/* ========================================
   OVERLAY
   ======================================== */

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    backdrop-filter: blur(4px);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   MOBILE MENU CONTAINER
   ======================================== */

.mobile-menu {
    position: fixed;
    top: 105px;
    right: -100%;
    width: 85%;
    max-width: 400px;
    height: 100vh;
    background: #fff;
    z-index: 1000;
    transition: right 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

.mobile-menu.active {
    right: 0;
}

/* ========================================
   MENU HEADER
   ======================================== */

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    min-height: 70px;
}

.menu-back-btn,
.menu-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #082F73;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}
.menu-back-btn span {
    font-size: 1.1rem;
}
.menu-back-btn:hover,
.menu-close-btn:hover {
    background: #e5e7eb;
}

.menu-back-btn svg,
.menu-close-btn svg {
    flex-shrink: 0;
}

.menu-back-btn {
    transition: all 0.3s ease;
}

/* ========================================
   MENU SLIDER CONTAINER
   ======================================== */

.menu-slider-container {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.menu-slider {
    display: flex;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* ========================================
   MENU LEVEL
   ======================================== */

.menu-level {
    min-width: 100%;
    width: 100%;
    flex-shrink: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
}

.menu-level::-webkit-scrollbar {
    width: 6px;
}

.menu-level::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.menu-level::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.menu-level::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ========================================
   MENU TITLE
   ======================================== */

.menu-title {
    padding: 24px 20px 16px;
    font-size: 24px;
    font-weight: 700;
    color: #082F73;
    background: linear-gradient(135deg, #f9fafb 0%, #fff 100%);
    border-bottom: 2px solid #0A66D6;
}

/* ========================================
   MENU LIST
   ======================================== */

.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#mobileMenu .menu-item {
    border-bottom: 1px solid #f3f4f6;
}

#mobileMenu .menu-item:last-child {
    border-bottom: none;
}

#mobileMenu .menu-item a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 20px;
    color: #082F73;
    text-decoration: none;
    font-size: 16px;
    font-weight: 400;
    transition: all 0.2s ease;
    position: relative;
}

#mobileMenu .menu-item a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: #0A66D6;
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

#mobileMenu .menu-item a:hover {
    background: #f9fafb;
    color: #0A66D6;
}

#mobileMenu .menu-item a:hover::before {
    transform: scaleY(1);
}

#mobileMenu .menu-item.has-children a {
    cursor: pointer;
} */

/* ========================================
   CHEVRON ICON
   ======================================== */

.chevron-icon {
    flex-shrink: 0;
    color: #9ca3af;
    transition: all 0.2s ease;
}

.menu-item:hover .chevron-icon {
    color: #0A66D6;
    transform: translateX(3px);
}

/* ========================================
   MENU LINK SPAN
   ======================================== */
#mobileMenu .menu-link {
    border: none;
    border-radius: 0;
}
.menu-link span {
    flex: 1;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 480px) {
    .mobile-menu {
        width: 90%;
        max-width: none;
    }
    
    .menu-title {
        font-size: 20px;
        padding: 20px 16px 14px;
    }
    
    .menu-item a {
        padding: 14px 16px;
        font-size: 15px;
    }
    
    .mobile-menu-trigger {
        width: 45px;
        height: 45px;
    }
    
    .hamburger-icon span {
        width: 18px;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.mobile-menu.active {
    animation: slideInRight 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.no-scroll {
    overflow: hidden;
}

/* ========================================
   MENU MOBILE SECONDARIO
   Stili per il secondo menu sotto al principale
   ======================================== */

/* Separatore tra menu principale e secondario */
.mobile-menu-separator {
    height: 1px;
    background: linear-gradient(to right, transparent, #e5e7eb 20%, #e5e7eb 80%, transparent);
    margin: 20px 0;
}

/* Variante con bordo piÃ¹ evidente */
.mobile-menu-separator.thick {
    height: 2px;
    background: #cbd5e1;
    margin: 24px 0;
}

/* Variante con spaziatura */
.mobile-menu-separator.spaced {
    margin: 32px 0;
}

/* Container del menu secondario */
.mobile-submenu-container {
    padding: 0;
    overflow-x: hidden;
}

/* Il menu secondario ha gli stessi stili del principale */
.mobile-submenu-container .menu-slider {
    /* Eredita tutti gli stili dal menu principale */
}

/* Opzionale: Stile diverso per il titolo del menu secondario */
.mobile-submenu-container .menu-level[data-level="1"] .menu-title {
    font-size: 20px; /* Leggermente piÃ¹ piccolo del principale */
    color: #475569; /* Colore piÃ¹ tenue */
}

/* Opzionale: Link del menu secondario con colore diverso */
.mobile-submenu-container .menu-item a {
    color: #475569;
}

.mobile-submenu-container .menu-item a:hover {
    color: #0A66D6;
}

/* ========================================
   VARIANTI DI SEPARATORE (opzionali)
   ======================================== */

/* Separatore con testo */
.mobile-menu-separator.with-text {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 20px;
}

.mobile-menu-separator.with-text::before,
.mobile-menu-separator.with-text::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.mobile-menu-separator.with-text span {
    color: #94a3b8;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Separatore puntinato */
.mobile-menu-separator.dotted {
    height: 0;
    border: none;
    border-top: 2px dotted #cbd5e1;
    margin: 24px 20px;
}

/* Separatore con ombra */
.mobile-menu-separator.shadow {
    height: 8px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.05), transparent);
    margin: 20px 0;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 480px) {
    .mobile-menu-separator {
        margin: 16px 0;
    }
    
    .mobile-submenu-container .menu-level[data-level="1"] .menu-title {
        font-size: 18px;
        padding: 20px 16px 14px;
    }
}

/* ========================================
   ACCESSIBILITÃ€
   Mantieni lo stesso focus style per entrambi i menu
   ======================================== */

.mobile-submenu-container .menu-item a:focus {
    outline: 2px solid #0A66D6;
    outline-offset: 2px;
}