/* ==========================================================================
   LIFE IN MOTION SECTION
   ========================================================================== */

.life-in-motion-section {
    background-color: #C3D0D9;
    overflow: hidden;
    /* FIX: without an explicit height, GSAP pins this section at its
       natural content height. If that's shorter than the viewport, the
       gap below exposes the page's background — that's the white strip
       showing under the last slide. min-height + flex centering keeps it
       always filling the viewport while pinned, on any content height. */
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.story-tag {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: #0E101499;
    display: block !important;
    font-family: "Space Grotesk", sans-serif;
    padding-bottom: 11px;
}

.story-section-title {
    font-size: calc(2.2rem + 2vw);
    font-weight: 700;
    line-height: 1.1;
    color: #0A0A0A;
}

.story-description {
    color: #33354F;
    font-size: 15px;
    line-height: 1.6;
    max-width: 340px;
    font-family: "Inter", sans-serif;
    font-weight: 400;
}

h2.story-section-title .gradient-text {
  background-image:
    linear-gradient(0deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0)),
    linear-gradient(94.74deg, #1A1A1A 13.33%, #0F0361 38.3%, #1339DE 53.34%, #0973E2 57.64%, #32BDED 84.23%, #9ADEF6 89.13%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Swiper Slider Wrapper Node Configuration */
.glideStoriesSwiper {
    width: 100%;
    overflow: hidden !important;
    z-index: 999;
}

.glideStoriesSwiper .swiper-slide { padding-left: 10px; }

/* .wrap-shape::before {
    position: absolute;
    content: "";
    width: 500px;
    height: 400px;
    background-image: url(../images/life-in-motion-shape.svg);
    left: -207px;
    bottom: 27px;
    z-index: 1;
}
 */
/* ==========================================================================
   CARD WRAPPER — now a clean hover surface; background image moved to a
   dedicated .story-card-bg layer so it can zoom without dragging the text
   ========================================================================== */
.story-card-wrapper {
    position: relative;
    width: calc(100% - 292px);
    height: 548px;
    border-radius: 32px;
/*     overflow: hidden;  */
    padding: 24px;
    --mx: 50%;
    --my: 50%;
}

/* ADDED: dedicated background layer, receives the inline background-image
   that used to sit directly on .story-card-wrapper */
.story-card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 26%;
    background-repeat: no-repeat;
    border-radius: 32px;
    transform: scale(1);
    transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 0;
    will-change: transform;
}

.story-card-wrapper:hover .story-card-bg {
    transform: scale(1.08);
}

/* ADDED: cursor-following spotlight glow, driven by --mx/--my set in JS on
   mousemove (see initCardParallax in the JS file) */
.story-card-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 32px;
    background: radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, 0.20), transparent 45%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 2;
}

.story-card-wrapper:hover::after {
    opacity: 1;
}

.wrap_full_content {
    position: relative;
    height: 100%;
    border-radius: 40px;
    background: linear-gradient(246.78deg, rgba(255, 255, 255, 0.024) 8.48%, rgba(0, 0, 0, 0) 30.72%, rgba(0, 0, 0, 0.08) 78.87%, rgba(0, 0, 0, 0.18) 97.04%),
        linear-gradient(199.09deg, rgba(0, 0, 0, 0) 55.39%, rgba(0, 0, 0, 0.32) 75.7%, rgba(0, 2, 35, 0.0) 91.99%),
        linear-gradient(4.49deg, rgba(0, 0, 0, 0.6) -5.17%, rgba(118, 118, 118, 0) 38.19%),
        linear-gradient(278.77deg, rgba(255, 255, 255, 0) 51.5%, rgba(204, 204, 211, 0.2) 82.13%, rgba(153, 154, 167, 0.2) 91.54%);
    width: 100%;
    border-top: .1px solid #F9F8F4;
    font-family: "Space Grotesk", sans-serif;
    z-index: 1;
}

/* Glassmorphism Dynamic Content Card Layout Inside Slide */
.story-card-overlay-content {
    position: absolute;
    bottom: 30px;
    left: 30px;
    right: 40px;
    padding: 30px;
    max-width: 500px;
    z-index: 3;
}

.story-card-overlay-content-top {
    position: absolute;
    top: 40px;
    right: -156px;
    background: #FFFFFF80;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 24px;
    padding: 23px;
    max-width: 500px;
    z-index: 999;
}

.card-context-tag {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #FFFFFFCC;
    display: inline-block;
    margin-bottom: 8px;
    text-transform: uppercase;
    position: relative;
}

.story-card-overlay-content-top .num {
    color: #155DFC;
    font-size: 14px;
    font-weight: 400;
}
.story-card-overlay-content-top h3 {
    color: #0A0A0A;
    font-size: 22px;
    font-weight: 500;
    margin: -6px 0 0;
}
.story-card-overlay-content-top h5 {
    color: #0E1014CC;
    font-size: 14px;
    font-family: "Inter", sans-serif;
    margin-bottom: 16px;
}
.story-card-overlay-content-top p {
    font-size: 12px;
    color: #0E101480;
    font-family: "Inter", sans-serif;
    line-height: 15px;
}

.story-card-overlay-content > span.card-context-tag { padding-inline-start: 15px; }
.story-card-overlay-content > span.card-context-tag::before {
    position: absolute;
    content: "";
    width: 7.95px;
    height: 7.95px;
    background: #63CEF5;
    top: 50%;
    transform: translateY(-50%);
    left: -1px;
    right: 0;
    border-radius: 50%;
}

.card-main-title {
    font-size: 37px;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 6px;
    line-height: 55.65px;
}

.card-meta-info {
    font-size: 15px;
    font-weight: 400;
    color: #FFFFFFB2;
    margin: 0;
    font-family: "Inter", sans-serif;
    line-height: 23.85px;
}

/* Subtle Massive Background Number Accent */
.wrap_slide_num {
    position: absolute;
    bottom: 47px;
    right: 56px;
    text-align: center;
    pointer-events: none;
    z-index: 2;
}

.giant-slide-number {
    font-size: 95px;
    font-weight: 700;
    color: #FFFFFF66;
    line-height: 95.4px;
    font-family: "Space Grotesk", sans-serif;
    margin-bottom: -6px;
}

.wrap_slide_num .card-context-tag {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 21.86px;
    color: #FFFFFF;
}

/* ---------------------------------------------------------------------------- */

@media (min-width: 768px) {

    /* Custom Textual Timeline Bar Rules
       Reference design: ONE continuous track spans the full width. A grey
       base line sits underneath; a gradient fill grows from the left up to
       a glowing dot that marks the exact scroll progress (not snapped to
       item boundaries). Labels below are "01 — TITLE": grey by default,
       the nearest/active one goes dark + bold with a blue number. */
    .timeline-pagination-outer {
        position: relative;
        width: 100%;
        z-index: 999;
        padding-top: -14px;
        --progress: 0; /* driven from JS: 0 to 1, continuous scroll progress */
    }

    .timeline-track {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 2px;
        background-color: rgba(14, 16, 20, 0.15);
        z-index: 1;
    }

    .timeline-track-fill {
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width: calc(var(--progress) * 100%);
        background: linear-gradient(90deg, #0F0361, #1339DE, #32BDED);
        z-index: 2;
    }

    .timeline-track-dot {
        position: absolute;
        top: 1px;
        left: calc(var(--progress) * 100%);
        width: 10px;
        height: 10px;
        background-color: #0973E2;
        border-radius: 50%;
        transform: translate(-50%, -50%);
        box-shadow: 0 0 10px 2px #32BDED, 0 0 26px 6px rgba(19, 57, 222, 0.55);
        z-index: 3;
    }

    .swiper-pagination-timeline {
        display: flex;
        justify-content: space-between;
        width: 100%;
        position: relative;
        z-index: 3;
        margin-top: 26px;
    }

    .swiper-pagination-timeline .timeline-bullet {
        background: none !important;
        opacity: 1 !important;
        width: auto !important;
        height: auto !important;
        border-radius: 0 !important;
        margin: 0 !important;
        font-family: "Space Grotesk", sans-serif;
        font-size: 13px;
        font-weight: 600;
        letter-spacing: 1.5px;
        color: #999AA7;
        text-transform: uppercase;
        cursor: pointer;
        position: relative;
        flex: 1 1 0;
        text-align: left;
        transition: color 0.3s ease;
    }

    .swiper-pagination-timeline .timeline-bullet:last-child {
        flex: 0 0 auto;
        text-align: right;
    }

    .swiper-pagination-timeline .timeline-bullet .tl-num {
        font-weight: 700;
        margin-right: 8px;
        color: inherit;
        transition: color 0.3s ease;
    }

    .swiper-pagination-timeline .timeline-bullet .tl-sep {
        margin-right: 8px;
        opacity: .6;
        color: inherit;
    }

    .swiper-pagination-timeline .timeline-bullet-active {
        color: #0A0A0A !important;
        font-weight: 700;
    }

    .swiper-pagination-timeline .timeline-bullet-active .tl-num {
        color: #155DFC !important;
    }
}

/* Small Viewport Fixes */
@media (max-width: 991.98px) {
    .story-card-wrapper {
        height: 440px;
    }
    .story-card-overlay-content {
        bottom: 20px;
        left: 20px;
        right: 20px;
        padding: 20px;
    }
    .swiper-pagination-timeline .timeline-bullet {
        font-size: 11px;
    }
}

@media (max-width: 767.98px) {
    .story-card-overlay-content, .wrap_slide_num {
        display: none;
    }
    .wrap-shape::before { content: none; }

    .wrap_full_content {
        background: transparent;
        border: none;
        position: relative;
    }

    .story-card-overlay-content-top {
        top: auto;
        bottom: -2px;
        left: 0;
        right: auto;
        max-width: 100%;
        width: 100%;
    }

    .story-card-wrapper {
        width: 100% !important;
    }

    .glideStoriesSwiper { padding-bottom: 0 !important; }

    /* --------------- timeline pagination (mobile: horizontal pill scroller) --------------- */

    .timeline-pagination-outer {
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        padding: 10px 24px;
        box-sizing: border-box;
        -webkit-overflow-scrolling: touch;
        position: relative;
        z-index: 99999;
        bottom: 13px;
        left: 6px;
    }

    .timeline-pagination-outer::-webkit-scrollbar { display: none; }
    .timeline-pagination-outer {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .swiper-pagination-timeline.swiper-pagination-bullets.swiper-pagination-horizontal {
        display: inline-flex;
        gap: 12px;
        position: static;
        width: auto;
        transform: none !important;
    }

    .timeline-bullet {
        display: inline-flex;
        align-items: center;
        padding: 14px 28px;
        border-radius: 100px;
        box-sizing: border-box;
        cursor: pointer;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        font-size: 15px;
        font-weight: 500;
        letter-spacing: -0.01em;
        flex-shrink: 0;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        user-select: none;
        background-color: transparent !important;
        border: 1px solid rgba(0, 0, 0, 0.15);
        color: #0A0A0A !important;
        opacity: 0.65;
        border-radius: 100px !important;
        border: 1px solid #0000001F;
    }

    .timeline-bullet.timeline-bullet-active {
        background-color: #f4f5f7 !important;
        border-color: transparent;
        color: #000223;
        opacity: 1;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
    }

    .timeline-bullet::first-letter {
        font-weight: 800;
        margin-right: 2px;
    }

    .timeline-bullet .tl-num {
        font-weight: 700;
        margin-right: 6px;
    }

    .timeline-bullet .tl-sep {
        margin-right: 6px;
        opacity: .5;
    }

    .timeline-bullet {
        text-indent: 0;
    }

    /* CHANGED: was "height/max-height: unset !important" alone. Since the
       base rule now sets min-height:100vh (for the pin fix above), this
       needs to explicitly override that on mobile too, or the pinned
       section will force a full 100vh scroll-jack on phones as well —
       likely too aggressive for a 6-slide carousel on a small screen. */
    .life-in-motion-section {
        min-height: unset !important;
        height: unset !important;
        max-height: unset !important;
        display: block !important;
    }
}

/* ---------------------------------------------- */


/* REMOVE these two — no longer relevant without Swiper:
   .glideStoriesSwiper { ... }
   .glideStoriesSwiper .swiper-slide { padding-left: 10px; }
*/

/* NEW: replaces .glideStoriesSwiper as the card stage.
   Fixed height so absolutely-positioned cards have something to
   center against; overflow hidden contains cards animating off to
   the sides so they don't create horizontal scroll. */
.story-stage {
    position: relative;
    width: 100%;
    height: 548px;
/*     overflow: hidden; */
    isolation: isolate;
}

/* CHANGED: was in-flow inside a swiper-slide (width: calc(100% - 170px)
   as a block). Now absolutely centered — JS sets the full transform
   (translate3d/rotate/scale) on top of this base every frame. */
.story-card-wrapper {
    position: absolute;
    left: 50%;
    top: 50%;
    width: calc(100% - 292px);
    height: 548px;
    border-radius: 32px;
    padding: 24px;
    margin: 0;
    transform: translate(-50%, -50%);
    will-change: transform, opacity, filter;
    --mx: 50%;
    --my: 50%;
}

@media (max-width: 991.98px) {
    .story-stage { height: 440px; }
    .story-card-wrapper { height: 440px; }
}