/* =============================================
   Model Section — Build Smart Brands
   Layout: Image rows as background, text overlay
   ============================================= */

/* ── CSS Custom Properties for image sizing ── */
.bsb-model-section {
    --model-img-w: 428px;
    --model-img-h: 220px;
    /* slightly taller for better portrait feel */
    --model-img-gap: 20px;

    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #000000;
    min-height: 680px;
    display: flex;
    align-items: center;
    padding: 7rem 0;
}

/* ────────────────────────────────────────────
   BACKGROUND LAYER: Image Rows
   Absolutely fills the full section width
   Rows are right-ALIGNED (overflow clips LEFT)
   ──────────────────────────────────────────── */
.bsb-model-bg-rows {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--model-img-gap);
    padding: 25px 0;
    pointer-events: none;
    /* text layer handles events */
}

/* ── Row Track: clips overflow, right-aligns row ── */
.bsb-model-row-track {
    overflow: hidden;
    display: flex;
    /* right-justify: pushes the max-content row to the right edge,
       leftward overflow gets clipped → only RIGHT portion is visible */
    justify-content: flex-start;
    /* Right-align the TRACK itself within the column flex parent */
    align-self: flex-end;
}

/*
   Visibility widths — viewport-relative, right-aligned (align-self: flex-end)
   Left edge of each track starts at ~50% of screen, creating a right-heavy layout.
   Track 1 is narrowest (fewest images), Track 3 widest — staircase from top to bottom.

   At 1440px viewport:
   Track 1: 50vw = 720px  → ~2.4 images visible
   Track 2: 55vw = 792px  → ~2.6 images visible
   Track 3: 60vw = 864px  → ~2.9 images visible
*/

.bsb-model-track-1 {
    width: 50vw;
}

.bsb-model-track-2 {
    width: 55vw;
}

.bsb-model-track-3 {
    width: 60vw;
}

/* ── The scrolling row strip ── */
.bsb-model-row {
    display: flex;
    gap: var(--model-img-gap);
    flex-shrink: 0;
    /* must not shrink — stays at full max-content width */
    will-change: transform;
}

/* ── Individual Image Card ── */
.bsb-model-image-wrapper {
    position: relative;
    width: var(--model-img-w);
    height: var(--model-img-h);
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
    background: #111111;
}

.bsb-model-image-wrapper img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    /* center crop — prevents face/head cutoff */
    z-index: 1;
    display: block;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Dark tint overlay per card */
.bsb-model-image-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.42);
    z-index: 2;
    pointer-events: none;
    transition: background 0.3s ease;
}

/* ────────────────────────────────────────────
   GRADIENT OVERLAY LAYER (z-index 2 → above bg rows)
   Left solid black → fades to transparent over images
   Strong right fade masks any animation edge artifacts
   ──────────────────────────────────────────── */
.bsb-model-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;

    /*
     Gradient breakdown aligned to vw-based track widths:
     - 0-38%  : solid black (text area — left side of 1400px container)
     - 38-50% : transition zone (images start entering at ~50vw)
     - 50-82% : light tint — images clearly visible
     - 82-100%: right fade back to black — masks row edge artifacts
    */
    background: linear-gradient(45deg, #000000 0%, #000000 58%, #000000 100%);
    opacity: 40%;
}

/* ────────────────────────────────────────────
   FOREGROUND LAYER: Text Content
   ──────────────────────────────────────────── */
.bsb-model-foreground {
    position: relative;
    z-index: 3;
    width: 100%;
    pointer-events: auto;
    /* No manual padding — bsb-container inside handles 1400px / 20px alignment */
}

.bsb-model-text-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Left ~38% of the 1400px container (after 20px padding) */
    max-width: 460px;
}

.bsb-model-heading {
    font-family: var(--bsb-font-display);
    font-size: clamp(3rem, 5.5vw, 5rem);
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 1;
    margin: 0 0 2rem 0;
}

.bsb-model-description {
    font-family: var(--bsb-font-primary);
    font-size: clamp(0.88rem, 1.15vw, 1rem);
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.78;
    margin: 0 0 3rem 0;
    max-width: 400px;
    font-weight: 400;
}

/* ── CTA Buttons ── */
.bsb-model-ctas {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bsb-model-btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1.5rem;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    border-radius: 50px;
    color: #ffffff;
    font-family: var(--bsb-font-primary);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    text-decoration: none;
    width: fit-content;
    min-width: 230px;
    background: transparent;
    cursor: pointer;
    transition: background-color 0.28s ease, border-color 0.28s ease, color 0.28s ease;
}

.bsb-model-btn:hover {
    background-color: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

.bsb-model-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: transform 0.28s ease;
}

.bsb-model-btn:hover svg {
    transform: translateX(5px);
}

/* ────────────────────────────────────────────
   RESPONSIVE
   ──────────────────────────────────────────── */
@media (max-width: 1200px) {
    .bsb-model-section {
        --model-img-w: 240px;
        --model-img-h: 300px;
    }

    .bsb-model-track-1 {
        width: 55vw;
    }

    .bsb-model-track-2 {
        width: 60vw;
    }

    .bsb-model-track-3 {
        width: 80vw;
    }
}

@media (max-width: 900px) {
    .bsb-model-section {
        --model-img-w: 200px;
        --model-img-h: 250px;
        --model-img-gap: 14px;
        padding: 5rem 0 8rem;
    }

    /* On mobile, stack text above the bg rows */
    .bsb-model-text-col {
        padding-left: 20px;
        padding-right: 20px;
        max-width: 100%;
    }

    .bsb-model-track-1 {
        width: 90vw;
    }

    .bsb-model-track-2 {
        width: 90vw;
    }

    .bsb-model-track-3 {
        width: 90vw;
    }

    .bsb-model-overlay {
        /* Full gradient top-to-bottom on mobile */
        background: linear-gradient(to bottom,
                #000000 0%,
                #000000 45%,
                rgba(0, 0, 0, 0.7) 65%,
                rgba(0, 0, 0, 0.1) 100%);
    }

    .bsb-model-bg-rows {
        justify-content: flex-end;
        padding-bottom: 1rem;
    }
}

@media (max-width: 600px) {
    .bsb-model-section {
        --model-img-w: 165px;
        --model-img-h: 210px;
        --model-img-gap: 12px;
    }

    .bsb-model-image-wrapper {
        border-radius: 10px;
    }
}