/* =========================================
   PARENT SECTION & ROW RESETS (Divi 4 & Divi 5)
   ========================================= */
.et_pb_section:has(.scroll-choreography-section),
.et_pb_section.di-scroll-parent-section {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    overflow: visible !important;
}

.et_pb_row:has(.scroll-choreography-section),
.et_pb_row.di-scroll-parent-row {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    overflow: visible !important;
}

.et_pb_column:has(.scroll-choreography-section),
.et_pb_column.di-scroll-parent-col {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    overflow: visible !important;
}

/* =========================================
   DIVI SCROLL CHOREOGRAPHY MODULE
   ========================================= */

.scroll-choreography-section {
    position: relative;
    width: 100%;
    overflow: visible !important;
}

.scroll-choreography-section .di-scroll-choreography {
    position: relative;
    width: 100%;
    height: 300vh;
    overflow: visible;
}

.scroll-choreography-section .di-scroll-sticky {
    position: sticky;
    top: var(--mc-sticky-top, 0px);
    width: 100%;
    height: calc(100vh - var(--mc-sticky-top, 0px));
    min-height: calc(100vh - var(--mc-sticky-top, 0px));
    overflow: hidden;
}

.scroll-choreography-section .di-scroll-stage,
.scroll-choreography-section .di-choreo-stage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-choreography-section .di-choreo-image {
    position: absolute;
    left: 50%;
    top: 50%;

    /* Default sizes, overridden by Divi responsive options */
    width: 36vw;
    height: 24vh;

    overflow: hidden;
    transform: translate3d(-50%, -50%, 0);
    background: #eee;

    /* Default box-shadow, overridden by Divi */
    box-shadow: 0 20px 50px rgba(0, 0, 0, .18);

    will-change: transform, width, height, opacity;
    transition: none;
}

.scroll-choreography-section .di-choreo-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* -----------------------------------------
   INITIAL POSITIONS
   ----------------------------------------- */

.scroll-choreography-section .di-top-left {
    z-index: 10;
    --x: -20vw;
    --y: -14vh;
}

.scroll-choreography-section .di-bottom-right {
    z-index: 20;
    --x: 20vw;
    --y: 14vh;
}

.scroll-choreography-section .di-bottom-left {
    z-index: 30;
    --x: -20vw;
    --y: 14vh;
}

.scroll-choreography-section .di-top-right {
    z-index: 40;
    --x: 20vw;
    --y: -14vh;
}

/* -----------------------------------------
   POSITION TRANSFORM
   ----------------------------------------- */

.scroll-choreography-section .di-top-left,
.scroll-choreography-section .di-bottom-right,
.scroll-choreography-section .di-bottom-left,
.scroll-choreography-section .di-top-right {
    transform: translate3d(calc(-50% + var(--x)), calc(-50% + var(--y)), 0);
}

/* -----------------------------------------
   MOBILE
   ----------------------------------------- */

@media (max-width: 767px) {
    .scroll-choreography-section .di-top-left {
        --x: -12vw;
        --y: -12vh;
    }
    .scroll-choreography-section .di-bottom-right {
        --x: 12vw;
        --y: 12vh;
    }
    .scroll-choreography-section .di-bottom-left {
        --x: -12vw;
        --y: 12vh;
    }
    .scroll-choreography-section .di-top-right {
        --x: 12vw;
        --y: -12vh;
    }
}

/* -----------------------------------------
   VISUAL BUILDER RESPONSIVE (NO SCROLL)
   ----------------------------------------- */
@media (max-width: 980px) {
    .et-fb .scroll-choreography-section .di-scroll-choreography {
        height: auto !important;
        min-height: 60vh;
    }
    .et-fb .scroll-choreography-section .di-scroll-sticky {
        position: relative !important;
        height: 60vh !important;
    }
}
