/* ==========================================================================
   Layout: Steps Cards
   Scroll-pinned stepped walkthrough — centered intro, horizontal nav,
   cards animate from below and stack. Previous card peeks 60px at top.

   Animation logic (GSAP — all controlled by JS, no CSS transforms for cards):
   - Past card  (dist < 0):  y slides from PEEK(60) → 0, opacity = 1
   - Active card (dist = 0): y = PEEK(60) — leaves 60px gap at top showing past card
   - Future card (dist > 0): y = PEEK + dist*500, fades in (opacity 0 → 1)
   - No scale change at any step.
   ========================================================================== */

/* Section ----------------------------------------------------------------- */

.pb-sc {
    /* overflow: hidden; */
    position: relative;
    padding: 100px 16px 100px;
}

/* Inner ------------------------------------------------------------------- */

.pb-sc__inner {
    max-width: 960px;
    margin: 0 auto;
}

/* Top: label + heading + description -------------------------------------- */

.pb-sc__top {
    text-align: center;
    margin-bottom: 48px;
}

.pb-sc__label {
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 15px;
    line-height: 160%;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-base);
    margin: 0 0 16px;
    display: block;
}

.pb-sc__heading {
    font-family: var(--second-family);
    font-weight: 550;
    font-size: 44px;
    line-height: 118%;
    letter-spacing: -0.02em;
    color: var(--text-bold);
    margin: 0 0 20px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.pb-sc__desc {
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 16px;
    line-height: 162%;
    letter-spacing: 0.01em;
    color: var(--text-base);
    max-width: 560px;
    margin: 0 auto;
}

/* Horizontal nav ---------------------------------------------------------- */

.pb-sc__nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-bottom: 0px;
}

/* Nav dot */

.pb-sc__nav-dot {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    outline-offset: 4px;
}

/* All three icons stacked absolutely */

.pb-sc__nav-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

/* Default: inactive visible, others hidden */
.pb-sc__nav-icon--active   { opacity: 0; transform: translate(-50%,-50%) scale(0.6); }
.pb-sc__nav-icon--done     { opacity: 0; transform: translate(-50%,-50%) scale(0.6); }
.pb-sc__nav-icon--inactive { opacity: 1; transform: translate(-50%,-50%) scale(1); }

/* Active state */
.pb-sc__nav-dot.is-active .pb-sc__nav-icon--active   { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.pb-sc__nav-dot.is-active .pb-sc__nav-icon--done     { opacity: 0; transform: translate(-50%,-50%) scale(0.6); }
.pb-sc__nav-dot.is-active .pb-sc__nav-icon--inactive { opacity: 0; transform: translate(-50%,-50%) scale(0.6); }

/* Done state */
.pb-sc__nav-dot.is-done .pb-sc__nav-icon--done     { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.pb-sc__nav-dot.is-done .pb-sc__nav-icon--active   { opacity: 0; transform: translate(-50%,-50%) scale(0.6); }
.pb-sc__nav-dot.is-done .pb-sc__nav-icon--inactive { opacity: 0; transform: translate(-50%,-50%) scale(0.6); }

/* Nav line — horizontal */

.pb-sc__nav-line {
    flex: 1;
    max-width: 260px;
    height: 2px;
    background: var(--base-border-black);
    border-radius: 1px;
    position: relative;
    overflow: hidden;
}

.pb-sc__nav-line-fill {
    position: absolute;
    inset: 0;
    background: #2F6CFA;
    transform-origin: left center;
    transform: scaleX(0);
    border-radius: 1px;
    will-change: transform;
}

/* Cards container --------------------------------------------------------- */

.pb-sc__cards {
    position: relative;
    min-height: 520px;
    /* clip top only so future cards entering from above are hidden,
       but box-shadows on sides/bottom remain visible */
    clip-path: inset(0 -120px -120px -120px);
}

/* Card — all positioned absolute, GSAP handles all transforms */

.pb-sc__card {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    will-change: transform, opacity;
    transition: all .2s linear;
    
}

/* No-JS fallback: first card visible */
.pb-sc__card.is-active {
    opacity: 1 !important;
}

/* Card inner — two columns: text left, image right (full bleed) */

.pb-sc__card-inner {
    display: grid;
    grid-template-columns: 6fr 6fr;
    min-height: 356px;
    border: 1px solid var(--base-border-black);
    border-radius: 8px;
    background: var(--base-white);
transition: all .2s linear;
    overflow: hidden;
    border-radius: var(--8, 8px);
border: 1px solid var(--base-border-black, rgba(18, 23, 51, 0.04));
background: var(--base-white, #FFF);
/* margin-top: 48px; */

}

.pb-sc__card.is-active .pb-sc__card-inner{
box-shadow: 0 -14.52px 39.902px 0 rgba(0, 0, 0, 0.07), 0 5.837px 17.474px 0 rgba(0, 0, 0, 0.01), 0 1.306px 7.563px 0 rgba(0, 0, 0, 0.01);
}
.pb-sc__cards .pb-sc__card:first-child{
   box-shadow: none !important; 
}
.pb-sc__card:first-child .pb-sc__card-inner {
    box-shadow: none !important;
}
.pb-sc__nav{
    margin-bottom: 40px;
}

/* Card left — step+title at top, desc pushed to bottom */

.pb-sc__card-left {
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.pb-sc__card-left-top {
    display: flex;
    flex-direction: column;
}

.pb-sc__card-step {
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 14px;
    line-height: 160%;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-base);
    display: block;
    margin-bottom: 20px;
}

.pb-sc__card-title {
    font-family: var(--second-family);
    font-weight: 600;
    font-size: 28px;
    line-height: 130%;
    letter-spacing: -0.01em;
    color: var(--text-bold);
    margin: 0;
}

.pb-sc__card-desc {
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 16px;
    line-height: 162%;
    letter-spacing: 0.01em;
    color: var(--text-base);
    margin: 0;
}

/* Card image — right side, full bleed (no padding) */

.pb-sc__card-image {
    padding: 16px;
    overflow: hidden;
    border-radius: 8px;
    overflow: hidden;
  
}

.pb-sc__card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* Responsive -------------------------------------------------------------- */

@media (max-width: 768px) {
    .pb-sc {
        padding: 60px 16px 48px;
    }

    .pb-sc__heading {
        font-size: 32px;
    }

    .pb-sc__nav-line {
        max-width: 80px;
    }

    .pb-sc__card-inner {
        grid-template-columns: 1fr;
    }

    .pb-sc__card-left {
        padding: 28px 24px;
        min-height: 200px;
    }

    .pb-sc__card-image {
        min-height: 240px;
    }

    .pb-sc__nav {
        margin: 0;
    }

    .pb-sc__label {
        font-size: 12px;
        line-height: 133%;
        letter-spacing: 0.05em;
        margin-bottom: 24px;
    }

    .pb-sc__desc {
        font-size: 14px;
        line-height: 157%;
        letter-spacing: 0.02em;
    }

    .pb-sc__top {
        margin-bottom: 24px;
    }

    .pb-sc__card-step {
        font-size: 12px;
        line-height: 133%;
        letter-spacing: 0.05em;
    }

    .pb-sc__card-title {
        margin-bottom: 16px;
    }

    .pb-sc__card-desc {
        font-size: 14px;
        line-height: 157%;
        letter-spacing: 0.02em;
    }

    .pb-sc__card-image {
        height: 243px;
        border-radius: 8px;
    }

    /* ── Mobile Swiper mode ── */

    /* overflow: visible дозволяє наступній картці трохи виглядати;
       .pb-sc має overflow: hidden — він і обрізає по краю секції */
    .pb-sc__cards.swiper {
        min-height: auto;
        overflow: visible;
    }

    /* Stretch all slides to the height of the tallest one */
    .pb-sc__cards.swiper .swiper-wrapper {
        align-items: stretch;
    }

    /* Cards are now swiper-slides — reset absolute positioning */
    .pb-sc__card.swiper-slide {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        opacity: 1 !important;
        transform: none;
        will-change: auto;
        height: auto;
    }

    /* Card inner: flex-column щоб зображення тягнулось до низу */
    .pb-sc__card.swiper-slide .pb-sc__card-inner {
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    /* Текстова частина займає вільний простір, зображення залишається внизу */
    .pb-sc__card.swiper-slide .pb-sc__card-left {
        flex: 1;
    }
    .pb-sc__card-left{
        justify-content: flex-start;
        padding-bottom: 6px;
    }
    .pb-sc__nav{
        margin-bottom: 24px;
    }
}

@media (max-width: 480px) {
    .pb-sc__heading {
        font-size: 28px;
    }

    .pb-sc__card-title {
        font-size: 22px;
    }
    
}
