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

/* =========================================
   SCROLL TEXT SECTION
========================================= */

.scroll-text-section {
    position: relative;
    width: 100%;
    min-height: 200vh;
    overflow: visible !important;
    /* Background is handled by Divi's Advanced Settings */
}


/* =========================================
   STICKY TEXT AREA
========================================= */

.scroll-text-section .scroll-text-container {
    position: sticky;
    top: var(--mc-sticky-top, 0px);

    width: 100%;
    min-height: calc(100vh - var(--mc-sticky-top, 0px));

    display: flex;
    align-items: center;

    padding: 80px 8%;

    box-sizing: border-box;
}


/* =========================================
   PARAGRAPH
========================================= */

.scroll-text-section .scroll-text-content {
    max-width: 1100px;
    margin: 0 auto;
    
    font-family: Arial, sans-serif;
    font-size: 50px;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -0.03em;
}

/* =========================================
   EVERY WORD
========================================= */

.scroll-text-section .scroll-text-content .word {
    color: var(--scroll-text-inactive, #cfcfcf);
    transition: color 0.15s linear;
}

/* ACTIVE WORD */

.scroll-text-section .scroll-text-content .word.active {
    color: var(--scroll-text-active, #111111);
}

/* =========================================
   RESPONSIVE (TABLET & MOBILE)
========================================= */

@media (max-width: 980px) {
    .scroll-text-section {
        /* Remove the artificial 200vh height to eliminate extra spacing */
        min-height: auto;
    }
    
    .scroll-text-section .scroll-text-container {
        /* Disable sticky so it flows naturally on smaller screens */
        position: relative;
        min-height: auto;
        padding: 60px 5%;
    }
}

@media (max-width: 767px) {
    .scroll-text-section .scroll-text-container {
        padding: 40px 5%;
    }

    .scroll-text-section .scroll-text-content {
        font-size: 28px;
    }
}
