/* Narrative Scroller Section Styling */

.scroller-narrative {
    position: relative;
    width: 100%;
    background-color: var(--bg-color);
}

.scroller-spacer {
    height: 350vh;
    /* Increased for hold at the end */
}

.scroller-sticky {
    position: sticky;
    top: 100px;
    /* Offset to avoid being cut by the glass navbar */
    height: calc(100vh - 100px);
    width: 100%;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.scroller-layout {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
}

.scroller-visual {
    position: relative;
    height: 75vh;
    flex: 0 0 50%;
    /* Exactly half of viewport */
    display: flex;
    align-items: center;
    justify-content: flex-end;
    /* Move more to the right as requested */
    padding-right: var(--spacing-md);
}

.scroller-img-container {
    position: relative;
    width: 90%;
    /* Sized slightly smaller to move it within the 50% zone comfortably */
    height: 100%;
    transform: translateX(-100%);
    filter: blur(20px);
    will-change: transform, filter;
    overflow: hidden;
}

.scroller-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Technical drawing precision */
    object-position: center;
    /* Centered within its container */
}

.img-overlay {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    will-change: opacity, clip-path;
}

.scroller-content {
    flex: 0 0 50%;
    opacity: 0;
    transform: translateY(30px);
    will-change: opacity, transform;
    padding-left: var(--spacing-lg);
    padding-right: var(--spacing-md);
}

.scroller-subheading {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 480px;
}

/* Button override to ensure it matches the landing page theme */
.scroller-content .btn-budget {
    margin-left: 0;
    display: inline-block;
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .scroller-spacer {
        height: auto;
    }

    .scroller-sticky {
        position: relative;
        height: auto;
        padding: var(--spacing-lg) 0;
        top: 0;
    }

    .scroller-img-container {
        transform: translateX(0);
        filter: blur(0);
        height: 60vh;
        width: 100%;
    }

    .img-overlay {
        opacity: 1;
        clip-path: inset(0 0 0 0);
    }

    .scroller-content {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Adjustments */
@media (max-width: 991px) {
    .scroller-sticky {
        top: 60px;
        /* Safe area below navbar on mobile */
        height: calc(100vh - 60px);
    }

    .scroller-layout {
        flex-direction: column;
        justify-content: center;
        padding-top: var(--spacing-lg);
    }

    .scroller-visual {
        flex: 0 0 auto;
        width: 100%;
        height: 40vh;
        margin-bottom: var(--spacing-md);
        justify-content: center;
        padding-right: 0;
    }

    .scroller-img-container {
        width: 90%;
        transform: translateX(-10%);
        /* Subtle movement for mobile */
    }

    .scroller-img {
        object-position: center;
    }

    .scroller-content {
        flex: 0 0 auto;
        width: 100%;
        text-align: center;
        padding: 0 var(--spacing-md) var(--spacing-lg);
    }

    .scroller-subheading {
        margin: 1rem auto 2rem;
    }
}