/* =========================================================
   PARENT SECTION & ROW RESETS (Divi 4 & Divi 5)
========================================================= */
.et_pb_section:has(.reverse-choreography-section),
.et_pb_section.di-reverse-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(.reverse-choreography-section),
.et_pb_row.di-reverse-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(.reverse-choreography-section),
.et_pb_column.di-reverse-parent-col {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    overflow: visible !important;
}

/* =========================================================
   REVERSE SCROLL CHOREOGRAPHY (DIVI SCOPED)
========================================================= */

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

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

.reverse-choreography-section .di-reverse-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;
}

.reverse-choreography-section .di-reverse-image {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 38%;
    height: 26%;
    max-width: 100%;
    max-height: 100%;
    overflow: hidden;
    box-sizing: border-box;
    transform-origin: center center;
    will-change: transform, width, height, opacity;
}

.reverse-choreography-section .di-reverse-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    will-change: transform;
}

/* =========================================================
   Z-INDEX
========================================================= */

.reverse-choreography-section .di-reverse-top-left {
    z-index: 10;
}

.reverse-choreography-section .di-reverse-hero {
    z-index: 50;
}

.reverse-choreography-section .di-reverse-bottom-left {
    z-index: 20;
}

.reverse-choreography-section .di-reverse-bottom-right {
    z-index: 30;
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {
    .reverse-choreography-section .di-reverse-image {
        width: 44%;
        height: 18%;
    }
}

/* =========================================================
   VISUAL BUILDER RESPONSIVE (NO SCROLL)
========================================================= */

@media (max-width: 980px) {
    .et-fb .reverse-choreography-section .di-reverse-choreography {
        height: auto !important;
        min-height: 60vh;
    }
    .et-fb .reverse-choreography-section .di-reverse-sticky {
        position: relative !important;
        height: 60vh !important;
    }
}
