/* ── Trade steps ────────────────────────────────────────────
   Figma: desktop 3315:65742 — numbers joined by a line, each
   over an icon card, on Surface/Grey. Tablet 3315:66288: two
   by two on white, no cards. Mobile 3315:65802: a list, the
   number beside each step, on grey.
   ─────────────────────────────────────────────────────────── */

.trade-steps {
    padding: var(--pad-y) var(--pad-x);
    background: var(--color-grey);
}

.trade-steps__inner {
    display: flex;
    flex-direction: column;
    gap: 60px;
    max-width: var(--site-max-w);
    margin: 0 auto;
}

.trade-steps__head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.trade-steps__text {
    max-width: 620px;
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 600;
    line-height: 25px;
}

.trade-steps__list {
    display: grid;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    gap: 16px;
    list-style: none;
}

.trade-steps__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

/* The line through the numbers: across each step's column, from the first
   number's middle to the last's (gaps between, as in the design) */
.trade-steps__step {
    position: relative;
}

.trade-steps__step::before {
    content: "";
    position: absolute;
    top: 23px;
    right: 0;
    left: 0;
    height: 2px;
    background: var(--color-text);
}

.trade-steps__step:first-child::before {
    left: 50%;
}

.trade-steps__step:last-child::before {
    right: 50%;
}

.trade-steps__number {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-white);
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 600;
    line-height: 25px;
}

.trade-steps__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 180px;
    padding: 24px 20px;
    border: 2px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-white);
    box-shadow: 0 0 12px rgb(0 0 0 / 0.12);
    text-align: center;
}

.trade-steps__icon {
    flex: none;
}

.trade-steps__step-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 500;
    line-height: 20px;
}

.trade-steps__step-text {
    font-size: 12px;
    line-height: 15px;
}

/* ── Tablet: two by two, on white, no cards ─────────────────── */
@media (max-width: 1024px) {
    .trade-steps {
        background: var(--color-white);
    }

    .trade-steps__inner {
        gap: 32px;
    }

    .trade-steps__text {
        font-size: 16px;
        line-height: 20px;
    }

    .trade-steps__list {
        grid-auto-flow: row;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 32px 24px;
    }

    .trade-steps__step::before,
    .trade-steps__icon {
        display: none;
    }

    .trade-steps__card {
        min-height: 0;
        padding: 0;
        border: 0;
        background: none;
        box-shadow: none;
        gap: 6px;
    }

    .trade-steps__step-title {
        font-size: 18px;
        font-weight: 600;
        line-height: 24px;
    }
}

/* ── Mobile: a list, the number beside each step, on grey ───── */
@media (max-width: 767px) {
    .trade-steps {
        background: var(--color-grey);
    }

    .trade-steps__head {
        align-items: flex-start;
        text-align: left;
    }

    .trade-steps__list {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .trade-steps__step {
        flex-direction: row;
        align-items: flex-start;
    }

    .trade-steps__number {
        flex: none;
        width: 24px;
        height: 24px;
        font-size: 12px;
        line-height: 16px;
    }

    .trade-steps__card {
        align-items: flex-start;
        gap: 4px;
        text-align: left;
    }

    .trade-steps__step-title {
        font-size: 14px;
        font-weight: 500;
        line-height: 18px;
    }
}
