:root {
    --wpsh-font-color: #ffffff;
    --wpsh-text-shadow: 0 4px 20px rgba(0,0,0,0.8);
    --wpsh-font-weight: 800;
    --wpsh-letter-spacing: -0.02em;
}

.wpsh-breakout-wrapper {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    box-sizing: border-box;
}

.wpsh-track-lento   { height: 400vh; }
.wpsh-track-normale { height: 250vh; }
.wpsh-track-veloce  { height: 150vh; }

.wpsh-sticky-viewport {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    background-color: #000000;
    isolation: isolate; 
}

.wpsh-media-element {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateZ(0);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    display: block;
    z-index: 1; 
}

canvas.wpsh-media-element {
    width: 100%;
    height: 100%;
}

/* Contenitore principale dei testi a schermo intero */
.wpsh-text-overlay-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999 !important; /* Forza il posizionamento davanti a Salient */
    pointer-events: none; 
}

/* Centratura assoluta geometrica dei blocchi di testo */
.wpsh-animated-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 900px;
    margin: 0;
    padding: 0;
    text-align: center;
    visibility: hidden; /* Gestito da autoAlpha in JS per prevenire flash */
    will-change: transform, opacity, filter;
    
    font-family: inherit; 
    color: var(--wpsh-font-color);
    font-weight: var(--wpsh-font-weight);
    letter-spacing: var(--wpsh-letter-spacing);
    text-shadow: var(--wpsh-text-shadow);
}

h1.wpsh-animated-text { font-size: 5rem; line-height: 1.1; }
h2.wpsh-animated-text { font-size: 3.8rem; line-height: 1.2; }
h3.wpsh-animated-text { font-size: 2.8rem; line-height: 1.2; }
p.wpsh-animated-text  { font-size: 1.6rem; line-height: 1.5; font-weight: 400; }

/* GRAPHIC INTERFACE: Stile dell'Overlay di Precaricamento */
.wpsh-preloader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wpsh-loader-box {
    text-align: center;
    color: #ffffff;
    font-family: sans-serif;
}
.wpsh-spinner {
    width: 40 taxi;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    border-top-color: #ffffff;
    margin: 0 auto 20px auto;
    animation: wpsh-spin 1s ease-in-out infinite;
}
@keyframes wpsh-spin {
    to { transform: rotate(360deg); }
}

/* Responsive Mobile Fallback */
@media (max-width: 768px) {
    h1.wpsh-animated-text { font-size: 2.5rem; }
    h2.wpsh-animated-text { font-size: 2rem; }
    p.wpsh-animated-text  { font-size: 1.1rem; }

    .wpsh-mobile-fallback .wpsh-sticky-viewport {
        position: relative !important;
        height: auto !important;
        overflow: visible !important;
    }
    .wpsh-mobile-fallback.wpsh-track-lento,
    .wpsh-mobile-fallback.wpsh-track-normale,
    .wpsh-mobile-fallback.wpsh-track-veloce {
        height: auto !important;
    }
    .wpsh-mobile-fallback .wpsh-media-element {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        width: 100% !important;
        height: auto !important;
    }
    .wpsh-mobile-fallback .wpsh-text-overlay-container {
        position: relative !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 30px !important;
        padding: 50px 20px !important;
        height: auto !important;
        background: #000000 !important;
    }
    .wpsh-mobile-fallback .wpsh-animated-text {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}