/* SSVB-CSS-VERSION: 1.6.0 */
/* Host establishes a stacking context so the scrub video sits behind the
   section's content. This does NOT affect sibling sticky/fixed elements
   (headers, nav bars) — they live in the root stacking context and stack
   independently. */
.ssvb-enabled {
    position: relative;
    z-index: 0;
}

/* The scrub video sits at the very back of the section. */
.ssvb-video-layer {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.ssvb-video-el {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* The plugin's own optional dark overlay, above the video. */
.ssvb-overlay-el {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: #000;
    pointer-events: none;
}

/* Elementor's own background overlay must sit ABOVE the scrub video (0) and
   BELOW the content (2). Elementor defaults this element to z-index:0, tying
   it with the video, so force it to 1. Applies regardless of scrub state so
   it is correct even before the video finishes initializing. Covers both
   Section and Container (flexbox) markup. */
.ssvb-enabled > .elementor-background-overlay {
    position: absolute !important;
    inset: 0 !important;
    z-index: 1 !important;
}

/* Section/column/container content stays on top of both video and overlay. */
.ssvb-enabled > .elementor-container,
.ssvb-enabled > .elementor-widget-wrap,
.ssvb-enabled > .e-con-inner,
.ssvb-enabled > .elementor-element-populated {
    position: relative;
    z-index: 2;
}

.ssvb-enabled .elementor-widget {
    position: relative;
    z-index: 2;
}

/* Never let the background layers become a competing scroll/click surface. */
.ssvb-video-layer,
.ssvb-video-el,
.ssvb-overlay-el {
    pointer-events: none !important;
}

/* Optional escape hatch: an element intentionally marked with the id/class
   "stick" is kept above the pinned scrub section.

   CRITICAL: this must NOT set visibility/opacity/position. Elementor Pro's
   sticky feature inserts a hidden CLONE of the element
   (.elementor-sticky__spacer) to preserve layout. Forcing visibility:visible
   on it makes that clone appear, duplicating the header. The clone is
   explicitly excluded here and only z-index is touched. */
#stick:not(.elementor-sticky__spacer),
.stick:not(.elementor-sticky__spacer) {
    z-index: 100;
}

/* Viewport lock: when the section is taller than the screen, pinning at
   "top top" only freezes the first screenful. Everything below the fold then
   scrolls up after unpinning and reads as a partial repeat of the section.
   Constraining the section to the viewport while scrubbing prevents that. */
.ssvb-enabled.ssvb-viewport-lock {
    height: 100vh;
    min-height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

.ssvb-enabled.ssvb-viewport-lock > .elementor-container,
.ssvb-enabled.ssvb-viewport-lock > .e-con-inner {
    height: 100%;
}
