/* ========================================
   MOBILE MENU - DARK SIDEBAR STYLE
   ======================================== */

.nav-bar__mobile-menu {
    /* Layout */
    display: flex !important;
    flex-direction: column;
    position: fixed !important;
    top: 0 !important;
    right: -100%; /* Offscreen right */
    width: 350px; /* Fixed width sidebar */
    max-width: 85%; /* Responsive for small screens */
    height: 100vh;

    /* Theme - FORZATO scuro con !important */
    background-color: #1a1a1a !important; /* Darker background */
    color: white !important;

    /* Effects */
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.8) !important;
    z-index: 99999 !important; /* Menu mobile sopra tutto */
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);

    /* Spacing */
    padding: 0;
}

.nav-bar__mobile-menu.is-open {
    right: 0;
}

/* --- Header --- */
.mobile-menu__header {
    padding: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu__title {
    font-family: 'Roboto', sans-serif;
    font-weight: 900;
    font-size: 24px;
    margin: 0;
    text-transform: uppercase;
    color: white;
    letter-spacing: 1px;
}

/* --- Content (Menu Items) --- */
.mobile-menu__content {
    flex-grow: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-bar__mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* FORZA colori scuri per gli elementi interni del menu */
.mobile-menu__header,
.mobile-menu__title,
.mobile-menu__content,
.nav-bar__mobile-menu-list,
.nav-bar__mobile-menu-item,
.nav-bar__mobile-menu-link,
.mobile-menu__footer,
.mobile-menu__footer p {
    background-color: #1a1a1a !important;
    color: white !important;
}

/* FORZA sfondo scuro per tutto il menu */
.nav-bar__mobile-menu,
.nav-bar__mobile-menu * {
    background-color: #1a1a1a !important;
    color: white !important;
}

.nav-bar__mobile-menu-item {
    margin-bottom: 5px;
}

.nav-bar__mobile-menu-link {
    display: block;
    padding: 15px 30px;
    font-size: 14px;
    font-weight: 700;
    color: white;
    text-decoration: none;
    transition: background-color 0.2s ease, padding-left 0.2s ease;
}

/* Spazio tra icona e testo */
.nav-bar__mobile-menu-link i {
    margin-right: 12px;
}

.nav-bar__mobile-menu-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
    padding-left: 35px; /* Subtle slide effect */
    color: white;
}

/* Active State (Orange Background) */
.nav-bar__mobile-menu-link.active {
    background-color: rgb(241, 126, 24); /* Orange */
    color: white;
}

/* --- Footer --- */
.mobile-menu__footer {
    padding: 20px 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #888;
}

.mobile-menu__footer p {
    margin: 0;
}

/* Close Button (Bottom Right) */
.mobile-menu__close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ccc;
    width: 36px;
    height: 36px;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-menu__close:hover {
    background-color: white;
    color: #222;
}

/* Overlay */
.nav-bar__overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Semi-trasparente per intravedere la pagina */
    backdrop-filter: blur(2px); /* Leggero blur per effetto moderno */
    z-index: 99998; /* Overlay sotto al menu */
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* When mobile menu is open, hide main content footer - MAXIMUM SPECIFICITY */
body.mobile-menu-open footer,
body.mobile-menu-open footer.site-footer,
body.mobile-menu-open .site-footer,
body.mobile-menu-open .site-footer *,
body.mobile-menu-open footer.site-footer *,
body.mobile-menu-open .site-footer * {
    display: none !important;
    visibility: hidden !important;
}

body.mobile-menu-open main {
    overflow: hidden;
}

.nav-bar__overlay.is-visible {
    display: block;
    opacity: 1;
}

/* === MOBILE DROPDOWN === */
.nav-bar__mobile-dropdown {
    display: none;
    background-color: rgba(0, 0, 0, 0.2);
    margin-bottom: 5px;
}

.nav-bar__mobile-dropdown.is-open {
    display: block;
}

.nav-bar__mobile-dropdown-link {
    display: block;
    padding: 12px 30px 12px 50px; /* Indented */
    color: #bbb;
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-bar__mobile-dropdown-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.03);
    padding-left: 55px;
    border-left-color: var(--alife-primary);
}

/* Arrow rotation for mobile */
.nav-bar__mobile-menu-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Button senza freccia (es. Mappa Interattiva) - allineati a sinistra */
.nav-bar__mobile-menu-link:not(:has(.fa-chevron-down)) {
    justify-content: flex-start;
}

/* Fallback per browser senza :has() */
.nav-bar__mobile-menu-item:not(.has-dropdown) .nav-bar__mobile-menu-link {
    justify-content: flex-start;
}

.nav-bar__mobile-menu-link i.fa-chevron-down {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.nav-bar__mobile-menu-link.is-open i.fa-chevron-down {
    transform: rotate(180deg);
}
