/* =========================================
   1. IMPOSTAZIONI GENERALI
   ========================================= */
html {
    scroll-behavior: smooth;
}

/* =========================================
   2. HEADER IN SOVRAPPOSIZIONE E LIQUID GLASS
   ========================================= */

/* A. Facciamo "galleggiare" il contenitore principale, ma in modo trasparente */
.elementor-location-header {
    position: absolute !important; 
    width: 100% !important;
    top: 0;
    left: 0;
    z-index: 9999 !important;
    margin: 0 !important;
    background: transparent !important; /* Forza la trasparenza per togliere la banda blu */
    backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* B. Creiamo la classe magica per la tua barra arrotondata */
.glass-pill {
    /* Ho raddoppiato il blur a 24px e portato la saturazione a 200% per un effetto vetro liquido molto più intenso */
    backdrop-filter: blur(24px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(200%) !important;
    
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* C. Regola per bloccare lo scroll quando il menu mobile è aperto */
body.no-scroll {
    overflow: hidden !important;
    touch-action: none; /* Disabilita anche il trascinamento su schermi touch */
}
/* =========================================
   3. FIX VIDEO FULL WIDTH (Cover Mode)
   ========================================= */
.elementor-background-video-container video,
.elementor-background-video-container iframe,
.elementor-widget-video video {
    object-fit: cover !important;
    width: 100% !important;
    height: 100% !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}

.elementor-background-video-container {
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
    left: 0 !important;
}

/* =========================================
   4. MENU MOBILE (MOBMENU)
   ========================================= */
.mobmenu-button {
    --hamburger-color: white; /* Puoi cambiare questo colore direttamente da Elementor se in futuro decidi di non usare variabili CSS */
    --close-x-color: #fff;
    display: block;
    height: 18px;
    width: 30px;
    cursor: pointer;
    position: relative;
    z-index: 101;
}

.elementor-187 {
    width: 100%;
}

.mobmenu-navigation {
    position: fixed;
    top: 0;
    left: 0;
    transform: translateX(100%);
    overflow: hidden;
    transition: transform 0.2s;
    width: 100%;
    height: 100vh;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Lasciamo il colore di sfondo fisso qui perché serve al contenitore fullscreen del menu */
    background-color: #101434;
}

.mobmenu-button .hamburguer {
    position: relative;
    width: 24px;
    height: 18px;
}

.mobmenu-button .hamburguer span {
    display: block;
    height: 2px;
    width: 24px;
    background: var(--hamburger-color);
    transform-origin: 50% 50%;
    transition: all 0.1s 0.2s ease, transform 0.2s ease;
    position: absolute;
    left: 0;
}

.mobmenu-button .hamburguer span:nth-child(1) { top: 0; }
.mobmenu-button .hamburguer span:nth-child(2) { top: 6px; }
.mobmenu-button .hamburguer span:nth-child(3) { top: 12px; }

.mobmenu-nav_control {
    position: absolute;
    left: -9999px;
    width: 100%;
    clip: rect(0, 0, 0, 0);
}

/* --- ANIMAZIONI --- */
.mobmenu-nav_control:checked ~ .mobmenu-navigation,
.mobmenu-navigation.active {
    transform: translateX(0);
    opacity: 1;
    transition: transform 0.3s, opacity 0.3s;
}

.mobmenu-nav_control:checked ~ .mobmenu-button .hamburguer,
.mobmenu-button.active .hamburguer {
    transition: all 0.1s 0s ease;
}

.mobmenu-nav_control:checked ~ .mobmenu-button .hamburguer span,
.mobmenu-button.active .hamburguer span {
    background: var(--close-x-color);
    transition: all 0.1s ease, transform 0.1s 0.2s ease;
}

.mobmenu-nav_control:checked ~ .mobmenu-button .hamburguer span:first-child,
.mobmenu-button.active .hamburguer span:first-child {
    opacity: 0;
}

.mobmenu-nav_control:checked ~ .mobmenu-button .hamburguer span:nth-child(2),
.mobmenu-button.active .hamburguer span:nth-child(2) {
    top: 6px;
    transform: rotate(45deg);
}

.mobmenu-nav_control:checked ~ .mobmenu-button .hamburguer span:nth-child(3),
.mobmenu-button.active .hamburguer span:nth-child(3) {
    top: 6px;
    transform: rotate(-45deg);
}