/* Mobile Menu Styles */
.mobile-menu-container {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: transparent;
    z-index: 9999;
}

.mobile-header {
    height: 98px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 18px;
    padding: 0 25px;
}

.menu-sticky .mobile-header {
    background-color: #fff;
}

/* Hamburger Toggle Button */
.mobile-menu-toggle {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 10001;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Hamburger Icons */
.hamburger-icon {
    display: block;
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
}

.hamburger-icon.close-icon {
    position: absolute;
    top: 10px;
    left: 10px;
    opacity: 0;
    transform: rotate(180deg);
}

.menu-sticky .hamburger-icon.open-icon line {
    stroke: #333;
}

.mobile-menu-toggle.menu-open .hamburger-icon.open-icon {
    opacity: 0;
    transform: rotate(180deg);
}

.mobile-menu-toggle.menu-open .hamburger-icon.close-icon {
    opacity: 1;
    transform: rotate(0deg);
}

/* Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 115px;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #ffffff;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
    /* Blocca scroll orizzontale */
    -webkit-overflow-scrolling: touch;

    /* Previeni dragging e selezione */
    touch-action: none;
    /* Blocca completamente il touch */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;

    /* Previeni highlight su touch */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;

    /* Forza hardware acceleration */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);

    /* Previeni scroll con mouse wheel orizzontale */
    overscroll-behavior-x: none;
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* Nascondi scrollbar orizzontale completamente */
.mobile-menu-overlay::-webkit-scrollbar-x {
    display: none;
}

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

/* Menu Levels */
.menu-level {
    position: absolute;
    top: 100px;
    left: 0;
    width: 100%;
    min-height: 100%;
    background-color: #ffffff;
    transform: translateX(0);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    /* Blocca scroll orizzontale */

    /* Previeni dragging sui livelli del menu */
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;

    /* Hardware acceleration */
    transform: translateX(0) translateZ(0);
    -webkit-transform: translateX(0) translateZ(0);

    /* Blocca comportamenti indesiderati */
    pointer-events: auto;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;


    background: linear-gradient(180deg, #1200AD 0%, #000 121.21%);
}

/* Stato iniziale dei menu */
.menu-level.main-menu {
    transform: translateX(0) translateZ(0);
    -webkit-transform: translateX(0) translateZ(0);
}

.menu-level.submenu {
    transform: translateX(100%) translateZ(0);
    -webkit-transform: translateX(100%) translateZ(0);
}

/* Stati attivi */
.menu-level.main-menu.slide-left {
    transform: translateX(-100%) translateZ(0);
    -webkit-transform: translateX(-100%) translateZ(0);
}

.menu-level.submenu.active {
    transform: translateX(0) translateZ(0);
    -webkit-transform: translateX(0) translateZ(0);
}

/* Menu Header */
.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: #ffffff;
}

/* Close Button (nel menu principale) */
.menu-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
}

.menu-close:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Back Button */
.back-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #1200AD;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-family: 'Onest', sans-serif;
    font-weight: 700;
}

.back-button:hover {
    color: #005a87;
}

.back-button:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.back-arrow {
    font-size: 18px;
    line-height: 1;
}

.submenu-title h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #333333;
}

/* Menu Navigation */
.menu-nav {
    flex: 1;
    padding: 0;
}

.menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    padding-bottom: 60px;
    background-color: #ffffff;
}


/* Menu Links */
.menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 30px;
    font-size: 16px;
    font-weight: 500;
    color: #333333;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.menu-link,
.menu-item a {
    font-family: 'Onest', sans-serif;
    color: #333;
    font-size: 24px;
    line-height: 30px;
}

.menu-link:focus {
    /* outline: 2px solid #007cba;
    outline-offset: -2px; */
}

/* Arrow per sottomenu */
.arrow {
    font-size: 18px;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

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

/* CTA Button (se presente nel menu) */
.menu-item.cta-item .menu-link {
    background-color: #007cba;
    color: #ffffff;
    margin: 20px;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
}

.menu-item.cta-item .menu-link:hover {
    background-color: #005a87;
    color: #ffffff;
}

/* Prevenire scroll del body quando menu è aperto */
body.mobile-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

body.mobile-menu-open .mobile-header {
    background-color: #fff;
}

.mobile-header .logo {
    background-image: url("../../uploads/2025/11/angelomelone-logo-vettoriale-bianco-def.svg");
    background-size: contain;
    background-repeat: no-repeat;
    width: 127px;
    height: 41px;
}

.menu-sticky .mobile-header .logo,
body.mobile-menu-open .mobile-header .logo {
    background-image: url("../../uploads/2025/11/angelomelone-logo-vettoriale-blu.svg");
}

body.mobile-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}