/* Scroll Video v9.0 — Frontend CSS */

/* ── Wrapper: provides the scroll distance ──────────────────────── */
.sv-wrapper {
    position: relative;
    width: 100%;
    /* No margin/padding here — prevents any extra gap between the
       wrapper and the next section after sticky detaches. */
    margin: 0;
    padding: 0;
}

/* ── Normal mode sticky container ───────────────────────────────── */
.sv-sticky {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    z-index: 10;
    box-sizing: border-box;
    margin: 0;
    /* height/min-height/max-height are set inline by JS to the exact
       resolved pixel value — these CSS rules are just safe defaults. */
}

.sv-canvas {
    display: block;
    width: 100%;
    height: 100%;
    background: #000;
}

.sv-overlay-layer {
    background: transparent;
}

/* ── Background mode ─────────────────────────────────────────────
 * The Elementor Container (.e-con) itself becomes sticky and is
 * given an explicit height/min-height/max-height by JS (matching
 * the configured section height exactly, with box-sizing:border-box
 * so padding never adds extra px beyond that height).
 *
 * Canvas sits as the first child, position:absolute, z-index:0.
 * All other children (the real Elementor widgets) get position:
 * relative + z-index:1 so they stack above the canvas while still
 * participating in the Container's normal flex/grid layout
 * (this preserves Justify Content / Align Items settings).
 */
.sv-wrapper > .e-con > *:not(.sv-canvas):not(.sv-overlay-layer),
.sv-wrapper > .elementor-section > *:not(.sv-canvas):not(.sv-overlay-layer),
.sv-wrapper > .elementor-container > *:not(.sv-canvas):not(.sv-overlay-layer) {
    position: relative;
    z-index: 1;
}

/* Ensure Elementor's internal flex wrapper actually fills the
   Container's height in BG mode, so Align Items/Justify Content
   on the Container behave as expected rather than collapsing to
   the height of their own content. */
.sv-wrapper > .e-con > .e-con-inner,
.sv-wrapper > .e-con > .elementor-widget-wrap,
.sv-wrapper > .elementor-section > .elementor-container,
.sv-wrapper > .elementor-container > .elementor-row {
    height: 100%;
    min-height: 100%;
    box-sizing: border-box;
}
