/* =========================================
   FindiBANKIT Impact Story Section (Phase J.1)
   Linear Vertical Scroll - No Sticky, No Scroll Trapping
   ========================================= */

/* Section Containers - Force zero margin to prevent spillover */
#impact-story,
#findibankit-impact-story {
    position: relative;
    width: 100%;
    overflow: visible;
    padding: 0;
    margin-top: 0 !important;
}

/* First Section Padding Polish - Reduced for editorial flow */
.story-impact-wrapper:first-of-type {
    padding-top: var(--space-8, 2rem) !important;
}

/* Section Header */
.impact-story-header {
    text-align: center;
    padding: 0 0 var(--space-12, 3rem);
    background: var(--bg-surface, #f8f9fa);
}

.impact-story-header .overline {
    display: block;
    margin-bottom: 1rem;
}

.impact-story-header h2 {
    margin-bottom: 1rem;
}

.impact-story-header p {
    max-width: 600px;
    margin: 0 auto;
    color: var(--text-secondary);
}

/* Opening Intent - Editorial Accent */
.impact-story-header::after {
    content: "A narrative of digital empowerment, unfolding across the heart of Bharat.";
    display: block;
    margin-top: var(--space-8, 2rem);
    font-size: 14px;
    font-style: italic;
    color: var(--text-secondary);
    opacity: 0.6;
}

/* Scene Container - Normalized rhythm */
.impact-story-scene {
    min-height: 90vh;
    padding-block: var(--space-12, 3rem);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    /* Subtle fade transition on scroll - using CSS only */
    opacity: 1;
    transition: opacity 0.4s ease;
}

/* Unified Background for Visual Calm - Continuous editorial canvas */
.impact-story-scene {
    background: var(--bg-surface, #f8f9fa);
}

.impact-story-scene:nth-child(even) {
    background: var(--bg-surface, #f8f9fa);
}

/* Scene Inner Layout - Elevated Image Dominance (58% Visual / 37% Text) */
.impact-story-scene-inner {
    display: grid;
    grid-template-columns: 58% 37%;
    /* 58% visual : 37% text + 5% gap */
    gap: 5%;
    align-items: center;
    width: 100%;
    max-width: var(--container-max-width, 1280px);
    margin: 0 auto;
    padding: var(--space-8, 2rem);
    min-height: 70vh;
    /* Elevated content focus */
}

/* Visual Variance - Rhythmic vertical offsets */
.impact-story-scene:nth-child(odd) .impact-story-scene-inner {
    transform: translateY(-24px);
}

.impact-story-scene:nth-child(even) .impact-story-scene-inner {
    transform: translateY(24px);
}

/* Alternate layout direction for visual variety */
.impact-story-scene:nth-child(even) .impact-story-scene-inner {
    direction: rtl;
}

.impact-story-scene:nth-child(even) .impact-story-scene-inner>* {
    direction: ltr;
}

/* Visual Container (Image or Video) */
.impact-story-visual {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 75vh;
    /* Prevent over-scaling and face cropping */
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(11, 171, 228, 0.08) 0%, rgba(0, 0, 0, 0.02) 100%);
    border: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.08));
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.12);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Subtle gradient overlay for visual depth and grounding */
.story-scene-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.25) 100%);
    z-index: 2;
    pointer-events: none;
    border-radius: 20px;
    /* Match container curvature */
}


/* Media Elements */
.impact-story-visual img,
.impact-story-visual video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 20px;
}

/* Content Container */
.impact-story-content {
    padding: var(--space-8, 2rem) 0;
}

.story-scene-label {
    display: inline-block;
    background: transparent;
    color: var(--brand-primary, #0babe4);
    padding: 0;
    letter-spacing: 0.12em;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 2rem;
    /* Hierarchy Breathing Room */
}

.story-scene-title {
    font-size: clamp(40px, 5vw, 64px);
    line-height: 1.1;
    font-weight: 700;
    color: var(--brand-dark, #1C3C5F);
    margin-bottom: 1.5rem;
}

.story-scene-description {
    font-size: clamp(18px, 1.25vw, 20px);
    line-height: 1.7;
    color: var(--text-secondary, #495057);
    max-width: 520px;
    opacity: 1;
    /* Full accessibility compliance */
}

/* Responsive Styles - Maintain 75/20 Ratio */
@media (max-width: 768px) {
    .impact-story-scene {
        min-height: auto;
        padding-block: var(--space-8, 2rem);
    }

    .impact-story-scene-inner {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        gap: var(--space-6, 1.5rem);
        text-align: center;
        min-height: auto;
        padding: var(--space-6, 1.5rem);
    }

    /* Neutralize desktop rhythmic offsets for mobile linear flow */
    .impact-story-scene:nth-child(odd) .impact-story-scene-inner,
    .impact-story-scene:nth-child(even) .impact-story-scene-inner {
        transform: translateY(0);
    }

    /* Reset RTL direction on mobile */
    .impact-story-scene:nth-child(even) .impact-story-scene-inner {
        direction: ltr;
    }

    .impact-story-content {
        order: 2;
        padding: 0;
    }

    .impact-story-visual {
        order: 1;
        aspect-ratio: 4 / 3;
        /* More vertical dominance on mobile */
        max-height: 50vh;
        /* Prevent viewport takeover */
        width: 100%;
        height: auto;
    }

    .story-scene-title {
        font-size: clamp(28px, 8vw, 36px);
        margin-bottom: 1rem;
    }

    .story-scene-description {
        font-size: 17px;
        line-height: 1.6;
        max-width: 100%;
        margin: 0 auto;
    }

    .story-scene-label {
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .impact-story-header {
        padding-bottom: var(--space-8, 2rem);
    }

    .impact-story-header::after {
        font-size: 13px;
        padding-inline: var(--space-4);
    }

    .impact-story-visual {
        aspect-ratio: 1 / 1;
        /* Square for focus on mobile small screens */
        border-radius: 16px;
    }

    .story-scene-title {
        font-size: 24px;
    }

    .story-scene-description {
        font-size: 16px;
    }
}

/* Smooth Scroll Behavior - Body-owned, no hijacking */
#findibankit-impact-story {
    scroll-behavior: smooth;
    /* Allow natural scroll - NO scroll-snap-type to avoid trapping */
}

/* Optional: Subtle entrance animation for scenes */
.impact-story-scene {
    scroll-snap-align: start;
    /* Gentle snap suggestion only */
    scroll-snap-stop: normal;
    /* Allow passing through - no trapping */
}

/* Perception Hardening - Softer entrance for cognitive continuity */
.impact-story-scene[data-visible="false"] {
    opacity: 0.2;
    transform: translateY(12px);
    /* Reduced for visual calm */
    transition: opacity 0.8s var(--ease-out-smooth), transform 0.8s var(--ease-out-smooth);
}

.impact-story-scene[data-visible="true"] {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 1s var(--ease-out-smooth), transform 1s var(--ease-out-smooth);
}

/* Closing Resolution - Nationwide Impact */
#findibankit-impact-story::after {
    content: "FindiBANKIT — Strengthening the digital fabric of a rising nation.";
    display: block;
    text-align: center;
    padding: var(--space-24, 6rem) var(--space-8, 2rem);
    font-size: clamp(18px, 1.5vw, 22px);
    font-weight: 500;
    color: var(--brand-dark);
    opacity: 0.8;
    letter-spacing: 0.02em;
    max-width: 1000px;
    margin: 0 auto;
}