/* ── Trust bar ──────────────────────────────────────────────
   Figma: desktop 812:2364, tablet 3128:25809, mobile 2225:554.
   Spread across the width on desktop; on tablet and mobile the
   row slides left in an endless loop (CSS only — the list is
   printed twice and the track moves by one copy's width).
   ─────────────────────────────────────────────────────────── */

.trust-bar {
    padding: 20px var(--pad-x);
    background: var(--color-grey-light);
}

.trust-bar--dark {
    background: var(--color-secondary);
    color: var(--color-white);
}

.trust-bar__track {
    max-width: var(--site-max-w);
    margin: 0 auto;
}

.trust-bar__list {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    list-style: none;
}

/* The loop's second copy, only needed on tablet and mobile */
.trust-bar__list[aria-hidden] {
    display: none;
}

.trust-bar__item {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 12px;
}

.trust-bar__icon {
    flex-shrink: 0;
}

.trust-bar__text {
    display: flex;
    flex-direction: column;
    white-space: nowrap;
}

.trust-bar__text strong {
    margin-bottom: -4px;
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 20px;
}

.trust-bar__text span {
    line-height: 20.8px;
}

/* ── Tablet and mobile: endless loop ───────────────────────── */
@media (max-width: 1024px) {
    /* Edge to edge, so the row slides in and out of the screen */
    .trust-bar {
        --trust-gap: 80px;
        padding: 16px 0;
        overflow: hidden;
    }

    .trust-bar__track {
        display: flex;
        width: max-content;
        max-width: none;
        animation: trust-bar-loop 30s linear infinite;
    }

    /* Each copy ends with the gap too, so moving by -50% is seamless */
    .trust-bar__list,
    .trust-bar__list[aria-hidden] {
        display: flex;
        gap: var(--trust-gap);
        padding-right: var(--trust-gap);
    }
}

@media (max-width: 767px) {
    .trust-bar {
        --trust-gap: 40px;
    }
}

@keyframes trust-bar-loop {
    to {
        transform: translateX(-50%);
    }
}

/* Anyone who asks for less motion gets a still row they can swipe */
@media (max-width: 1024px) and (prefers-reduced-motion: reduce) {
    .trust-bar {
        overflow-x: auto;
        scrollbar-width: none;
    }

    .trust-bar::-webkit-scrollbar {
        display: none;
    }

    .trust-bar__track {
        padding-left: var(--pad-x);
        animation: none;
    }

    .trust-bar__list[aria-hidden] {
        display: none;
    }
}
