.scroll-story {
    --scroll-story-dot-size: 8px;
    --scroll-story-dot-activesize: 12px;
    --scroll-story-dot-gap: 20px;
    --scroll-story-dot-idle: #EEEEF2;  
    --scroll-story-dot-active: #1354DE;
    position: relative;
    margin: clamp(3rem, 7vw, 7rem) 0;
}

.scroll-story__layout {
    display: grid;
    grid-template-columns: 2rem 1fr 1fr;
    gap: clamp(2rem, 4vw, 5rem);
    align-items: start;
}

.scroll-story__content {
    min-width: 0;
}

.scroll-story__aside {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-self: start;
}

.scroll-story__stage {
    position: relative;
}

.scroll-story__stage:empty {
    display: none;
}

.scroll-story__nav {
    display: flex;
    justify-content: center;
    align-items: start;
    align-self: stretch;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scroll-story.is-pinned .scroll-story__nav {
    opacity: 1;
}

.scroll-story__dots {
    display: flex;
    flex-direction: column;
    gap: var(--scroll-story-dot-gap);
    position: sticky;
    top: 50vh;
    transform: translateY(-50%);
}

.scroll-story__dot {
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    padding: 0;
    min-width: 0;
    line-height: 1;
    flex: 0 0 var(--scroll-story-dot-size);
    width: var(--scroll-story-dot-size);
    height: var(--scroll-story-dot-size);
    border: 0;
    border-radius: 999px;
    background: var(--scroll-story-dot-idle);
    box-shadow: 0 0 0 1px rgba(36, 59, 90, 0.08);
    transition: all 0.25s ease;
    opacity: 0.95;
    cursor: pointer;
}

.scroll-story__dot.is-active {
    background: var(--scroll-story-dot-active);
    transform: scale(1.5);
}

.scroll-story-step {
    margin-block: 0 !important;
}

.scroll-story__content .scroll-story-step {
    display: block;
}

/* Hide right image column in content — images are shown in the sticky aside */
.scroll-story__content .scroll-story-step > .wp-block-column:last-child {
    display: none;
}

.scroll-story__content .scroll-story-step > .wp-block-column:first-child {
    width: 100%;
    margin-left: 0;
}

.scroll-story-step__left,
.scroll-story-step__right {
    width: 100%;
}

.scroll-story-step__left {
    max-width: 50rem;
    min-height: 100vh;
    padding-block: clamp(3rem, 8vw, 7rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
}


.scroll-story-step__left .wp-block-buttons {
    margin-top: 1.5rem;
}

.scroll-story-step__right {
    width: 100%;
}

.scroll-story-step__right img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 1.35rem;
    box-shadow: 0 18px 48px rgba(36, 59, 90, 0.12);
}

.scroll-story-step__right > * + * {
    margin-top: 1rem;
}

/* Stage: stack all right sections, crossfade to active */
.scroll-story__stage {
    position: relative;
}

.scroll-story__stage .scroll-story-step__right {
    opacity: 0;
    transition: opacity 0.35s ease;
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.scroll-story__stage .scroll-story-step__right.is-active {
    opacity: 1;
    position: relative;
    pointer-events: auto;
}

.scroll-story__content .scroll-story-step__right {
    display: none;
}

.scroll-pinned-block.is-scroll-pinned {
    position: fixed;
    top: var(--scroll-pinned-top, 40px);
    left: var(--scroll-pinned-left, 0);
    width: var(--scroll-pinned-width, auto);
    max-width: var(--scroll-pinned-width, none);
    z-index: 30;
}

.scroll-pinned-block__spacer {
    pointer-events: none;
}

@media (max-width: 900px) {
    .scroll-story__layout {
        grid-template-columns: 1fr;
    }

    .scroll-story__nav {
        display: none;
    }

    .scroll-story__aside {
        display: none;
    }

    .scroll-story__stage {
        display: none;
    }

    .scroll-story-step__left {
        min-height: auto;
        padding-block: 2rem;
    }

    /* script.js interleaves each media group into the text column (after its
       matching step) on mobile, so just reveal it there and space it. The now-
       empty second column stays hidden via the base rule. */
    .scroll-story__content .scroll-story-step__right {
        display: block;
        margin-block: 1.5rem;
    }
}



.wp-admin .scroll-story__layout {
    grid-template-columns: 1fr;
}

.wp-admin .scroll-story__nav {
    display: none;
}

.wp-admin .scroll-story__aside {
    position: static;
    top: auto;
    margin-top: 1.5rem;
}

.wp-admin .scroll-story__stage,
.wp-admin .scroll-story__dots {
    display: none;
}

.wp-admin .scroll-story__content .scroll-story-step {
    display: flex;
}

.wp-admin .scroll-story__content .scroll-story-step > .wp-block-column {
    flex-basis: 100% !important;
    display: block;
}

.wp-admin .scroll-story__content .scroll-story-step > .wp-block-column:last-child {
    display: block;
}

.wp-admin .scroll-story__content .scroll-story-step > .wp-block-column + .wp-block-column {
    margin-top: 1.5rem;
    margin-left: 0;
}

.wp-admin .scroll-story__content .scroll-story-step__right {
    display: block;
    margin-top: 1.5rem;
}
