/**
 * Stili Overlay Page Transition
 * Replica le transizioni di pagina del sito Webflow Cobo
 */

/* Open/Exit Overlay - layout (animazioni gestite da JS con transform y%) */
.open,
.exit {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    background: transparent !important;
    padding-left: 21px;
    padding-right: 21px;
    padding-bottom: 21px;
    padding-top: var(--pt-header-offset, 86px);
    box-sizing: border-box;
    pointer-events: none;
    display: none;
    overflow: hidden;
    border-radius: 0;
}

/* Evita interferenza con editor/anteprima Elementor */
body.elementor-editor-active .open,
body.elementor-editor-active .exit,
body.elementor-editor-preview .open,
body.elementor-editor-preview .exit {
    display: none !important;
}

body.elementor-editor-active .main,
body.elementor-editor-active .elementor-location-single,
body.elementor-editor-active .site-main,
body.elementor-editor-active main#content,
body.elementor-editor-active #content,
body.elementor-editor-active main,
body.elementor-editor-active #page,
body.elementor-editor-preview .main,
body.elementor-editor-preview .elementor-location-single,
body.elementor-editor-preview .site-main,
body.elementor-editor-preview main#content,
body.elementor-editor-preview #content,
body.elementor-editor-preview main,
body.elementor-editor-preview #page {
    transform: none !important;
}

/* Nel Webflow: open z-index basso, exit altissimo */
.open {
    z-index: 998;
}

.exit {
    z-index: 999;
}

.open-inner,
.exit-inner {
    background-color: #151515 !important;
    width: 100%;
    height: 100%;
    border-radius: .5vw;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: transform;
}

/* Webflow: .page-logo { width: 4vw } */
.page-logo {
    width: 4vw;
    max-width: 72px;
    min-width: 40px;
}

.page-logo img,
.page-logo svg {
    width: 100%;
    height: auto;
    display: block;
}

/*
 * Stato iniziale pre-paint (previene salto/FOUC all'entrata).
 * Mantiene l'overlay open visibile e sposta il contenuto principale in basso.
 */
html.pt-preload .open {
    display: block;
}

html.pt-preload .open-inner {
    transform: translate3d(0, 0%, 0);
}

html.pt-preload .main,
html.pt-preload :not(body).wp-singular,
html.pt-preload :not(body).home,
html.pt-preload .elementor-location-single,
html.pt-preload .site-main,
html.pt-preload main#content,
html.pt-preload #content,
html.pt-preload main {
    transform: translate3d(0, 7%, 0);
    will-change: transform;
}

/* Previene scroll durante la transizione */
body.transitioning {
    overflow: hidden;
}
