/* =============================================
   Steps Block — taubenloft/steps
   Figma 1:2581 Frame 17740 (how it works steps)
   ─────────────────────────────────────────────
   Section bg:    #EAEBE6 (inherits from how-it-works frame)
   Per row:       1920w, padding 0/240/0/240, gap 114-118
   ─────────────────────────────────────────────
   Image col:     586w, caption below 16/24 weight 400
   Timeline col:  40w (dot 12×12 in 32×32 wrapper, line dashed 600h)
   Content col:   680w, connector 92w dashed → step text
   Number:        58×58, fs 48 weight 500
   Title:         24/28.8 weight 600
   ============================================= */

.tl-steps {
    background: #eaebe6;
    color: #333a42;
    font-family: 'Nunito Sans', 'Nunito Sans Fallback', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    padding: 96px 24px;
}

.tl-steps__container {
    max-width: 1200px;
    margin: 0 auto;
}

.tl-steps__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 96px;                  /* Figma 2026-05: each row 680h with internal whitespace → ~96 gap between rows */
    position: relative;         /* anchor the one continuous timeline line */
}
/* ONE continuous dashed timeline line spanning every step AND the gaps
   between them, so it reads as an unbroken timeline (per-row rails used to
   leave a 96px gap in the line between rows). The symmetric grid keeps the
   rail centred, so this sits at the same X (50%) as every dot. */
.tl-steps__list::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 0;
    border-left: 1px dashed #333a42;
    transform: translateX(-50%);
    pointer-events: none;
}

/* ── One step row ──────────────────────────────────
   Grid: image | rail | content (or content | rail | image for mirror).
   Rail spans full row height so the dashed line is continuous across
   all rows by virtue of overlap.
*/
/* Each row: media | rail | content (3 columns).
   Use SYMMETRIC grid (same template for both row types) so the rail center
   is at row's 50% in both image-left and image-right rows → vertical timeline
   reads as one straight line across all rows.
   Compromise vs Figma: image and content columns same width (Figma uses
   asymmetric 586/740 which would skew the timeline). */
.tl-steps__item {
    display: grid;
    grid-template-columns: 586fr 117fr 586fr;  /* symmetric */
    column-gap: 0;
    align-items: flex-start;
    position: relative;
    padding: 24px 0;
}
.tl-steps__item--image-right {
    grid-template-columns: 586fr 117fr 586fr;  /* same template — line stays straight */
}
.tl-steps__item--image-right .tl-steps__media     { grid-column: 3; order: 3; }
.tl-steps__item--image-right .tl-steps__rail      { grid-column: 2; order: 2; }
.tl-steps__item--image-right .tl-steps__content   { grid-column: 1; order: 1; }

/* ── Media column ─────────────────────────────────── */
.tl-steps__media {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    max-width: 586px;
    justify-self: end;      /* default: photo aligned to right edge of its column (adjacent to gap) */
}
.tl-steps__item--image-right .tl-steps__media {
    justify-self: start;    /* mirror: photo aligned to left edge of its column */
}
.tl-steps__photo {
    width: 100%;
    aspect-ratio: 586 / 400;
    overflow: hidden;
    border-radius: 0;
}
.tl-steps__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.tl-steps__caption {
    margin: 0;
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
    color: #333a42;
}

/* ── Vertical timeline column ────────────────────────
   The dashed vertical line must stay at the SAME X position across
   all row types (image-left and image-right) so it looks straight.
   Center the line and dot horizontally within the rail column. */
.tl-steps__rail {
    position: relative;
    align-self: stretch;
    display: flex;
    justify-content: center;        /* dot centered in rail column */
}
.tl-steps__item--image-right .tl-steps__rail {
    justify-content: center;        /* same on mirror */
}
/* The vertical dashed line is now drawn once on .tl-steps__list::before
   (continuous across rows). The per-row rail only carries the dot, so it no
   longer draws its own segment (which would double up the dashes). */
/* Figma 2026-05: stepper 32×32 wrapper with dashed border (4,4), inner dot 12×12.
   The wrapper bg masks the vertical dashed line behind it (matches section bg). */
.tl-steps__dot {
    position: relative;
    z-index: 1;
    width: 32px;
    height: 32px;
    background: #eaebe6;             /* mask vertical dashed line behind */
    border: 1px dashed #333a42;      /* Figma 2026-05: stroke #333A42 opacity 1.0 */
    border-radius: 50%;
    /* extend the background mask beyond the ring so the timeline line stops
       with a gap around the dot (in the design the line does not touch the ring).
       The same mask trims the horizontal connector, so this one value sets the
       gap equally on all sides. */
    box-shadow: 0 0 0 21px #eaebe6;
    margin-top: 38px;                /* was 48 for plain 12px dot; -10 to center 32px ring at same Y */
    flex: 0 0 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}
.tl-steps__dot::before {
    content: '';
    width: 12px;
    height: 12px;
    background: #333a42;
    border-radius: 50%;
}

/* ── Content column ───────────────────────────────── */
.tl-steps__content {
    display: flex;
    align-items: center;
    padding: 24px 0;
    justify-self: start;
    width: 100%;
    max-width: 740px;
}
.tl-steps__item--image-right .tl-steps__content {
    justify-self: end;
    flex-direction: row-reverse;
    justify-content: space-between;   /* number+title to the outer (left) edge, connector to the timeline */
}
.tl-steps__connector {
    flex: 0 0 136px;                     /* 92 visible + 44 that runs under the dot so its rail-side end
                                            gets masked by the dot's box-shadow → same gap as the vertical line */
    height: 0;
    border-top: 1px dashed #333a42;      /* Figma 2026-05: stroke #333A42 opacity 1.0 */
    margin-right: 24px;
    margin-left: -44px;                  /* image-left: extend the rail-side end under the dot */
}
.tl-steps__item--image-right .tl-steps__connector {
    margin-right: -44px;                 /* image-right: extend the rail-side end under the dot */
    margin-left: 24px;
}
.tl-steps__head {
    display: flex;
    align-items: center;
    gap: 32px;
    flex: 1 1 auto;
    min-width: 0;
}
.tl-steps__item--image-right .tl-steps__head {
    flex-direction: row;        /* number stays left of the title (same reading order as image-left), per design */
    text-align: left;
}
.tl-steps__num {
    font-size: 48px;
    line-height: 57.6px;            /* Figma 2026-05: lineHeightPx 57.6 */
    font-weight: 500;
    color: #333a42;
    letter-spacing: 0;
    flex: 0 0 auto;
}
.tl-steps__title {
    margin: 0;
    font-size: 24px;
    line-height: 28.8px;
    font-weight: 500;               /* Figma 2026-05 audit verified: 500 (was 600) */
    color: #333a42;
    letter-spacing: 0;
}

/* ── Laptop ≤1440 ─────────────────────────────────── */
@media (max-width: 1440px) {
    .tl-steps { padding: 96px 32px; }
    /* connector stays 92 — matches Figma */
}

/* ── Tablet ≤1024 ─────────────────────────────────── */
@media (max-width: 1024px) {
    .tl-steps { padding: 64px 32px; }
    .tl-steps__connector { flex: 0 0 40px; }
    .tl-steps__num { font-size: 36px; }
    .tl-steps__head { gap: 20px; }
}

/* ── Mobile ≤767 — block hidden entirely (not present in Figma mobile) ─── */
@media (max-width: 767px) {
    .tl-steps { display: none; }
    /* Also hide the section-intro that immediately precedes hidden Steps */
    .tl-section-intro:has(+ .tl-steps) { display: none; }
}
