/**
 * CSS comuni tema: scroll lock, navbar, logo, button, mega menu.
 * Caricato globalmente per evitare duplicazione negli head e nei content.
 */

/* ========== SCROLL LOCK + MENU ========== */
body.scroll-locked {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    overflow: hidden;
    touch-action: none;
}

.scroll-blocker {
    position: fixed;
    z-index: 9998;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.scroll-blocker.active {
    opacity: 1;
    pointer-events: all;
}

nav[data-nav-menu-open] {
    height: calc(100vh + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
}

body {
    overflow-x: hidden !important;
}

body:has(nav.data-nav-menu-open),
body.no-scroll {
    overflow: hidden !important;
}

/* SECTION LOGOS */
.section-logos .w-layout-cell img:hover {
    background-color: #ffffff;
}

.is-youtube {
    margin-top: 4px;
}

/* LOGO */
#logo-brand {
    display: none;
}
#logo-brand-mobile {
    display: flex;
    position: absolute;
}

@media screen and (min-width: 769px) {
    #logo-brand {
        display: block;
        border: none !important;
    }
    #logo-brand-mobile {
        display: none;
    }
}

@media screen and (max-width: 991px) {
    .second-text-none {
        display: none !important;
    }
}

/* ========== CUSTOM BUTTON ========== */
.button {
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
    text-align: center;
    letter-spacing: 0;
    text-transform: uppercase;
    border-radius: 5rem;
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1;
    padding: unset !important;
}

.link-block-4.button {
    padding: unset !important;
}

.button-container {
    position: relative;
    flex-direction: column;
    justify-content: center;
    display: flex;
}

.overflow-hidden {
    overflow: hidden;
}

.button-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 2rem;
    border: 1px solid #000;
    border-radius: 50px;
    background-color: transparent;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
    line-height: 1;
    gap: 0.25rem;
}

.button-text-wrapper {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-flow: column;
    transition: transform 0.45s cubic-bezier(0.77, 0, 0.175, 1);
}

.button-text-front,
.button-text-back {
    display: block;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    transition: transform 0.45s cubic-bezier(0.77, 0, 0.175, 1);
    white-space: nowrap;
}

.button-text-back {
    position: absolute;
    top: 100%;
}

.button-icon-front,
.button-icon-back {
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.45s cubic-bezier(0.77, 0, 0.175, 1);
}

.button-icon-back {
    position: absolute;
    opacity: 0;
    margin-left: 1.4375rem;
}

@media (hover: hover) and (pointer: fine) {
    .button:hover .button-text-front {
        transform: translateY(-100%);
    }
    .button:hover .button-text-back {
        transform: translateY(-100%);
    }
    .button:hover .button-text-wrapper {
        transform: translateX(1.25rem);
        transition: transform 0.3s cubic-bezier(0.77, 0, 0.175, 1);
    }
    .button:hover .button-icon-front {
        transform: translateX(1.75rem);
        opacity: 0;
        transition: all 0.3s cubic-bezier(0.77, 0, 0.175, 1);
    }
    .button:hover .button-icon-back {
        transform: translateX(1.75rem);
        opacity: 1;
        transition: all 0.3s cubic-bezier(0.77, 0, 0.175, 1);
    }
}

.footer-content .button .button-text-front,
.footer-content .button .button-text-back {
    color: #fff;
}

.footer-content .button .button-inner {
    border-color: #fff;
    color: #fff;
}

.footer-content .button .button-icon-front img,
.footer-content .button .button-icon-back img {
    filter: brightness(0) invert(1);
}

@media (hover: hover) and (pointer: fine) {
    .footer-content .button .button-inner {
        color: #ffffff;
    }
    .footer-content .button:hover .button-icon-front img {
        filter: brightness(0) invert(1);
    }
    .footer-content .button:hover .button-icon-back img {
        filter: brightness(0) invert(1);
    }
}

/* ========== MEGA MENU ========== */
.nav-item {
    position: static;
}

.mega-dropdown {
    background-color: var(--_color-palette---background-color--primary) !important;
    position: absolute;
    top: 78%;
    left: 0;
    right: 0;
    min-height: 320px;
    background: #fff;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease;
    z-index: 999;
}

@media (min-width: 992px) {
    .has-children:hover .mega-dropdown {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }
}

.mega-links-wrapper {
    display: flex;
    flex-direction: row;
    width: 75%;
    gap: 60px;
}

.mega-image-column {
    width: 25%;
}

.mega-dropdown .mega-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 80px;
    padding: 60px 20px 20px 20px;
}

.mega-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
}

body.mega-open {
    overflow: hidden;
}

.mega-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 998;
}

@media (min-width: 992px) {
    body:has(.has-children:hover) .mega-overlay {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}

.image-3 {
    position: relative;
    z-index: 1000;
}
