/* ── Testimonials carousel ───────────────────────────────────────────────────
   Uniform quote cards in a horizontal scroller, divided by hairline rules, with
   circular prev/next controls centred underneath. Replaces the bento grid.

   Loaded after testimonials.css so the old .bento-* rules are simply unused —
   this file introduces its own .ts-* namespace and does not fight them. */

.testimonials-section {
    background: #ffffff;
    padding: 5rem 0 4rem;
    overflow: hidden;

    /* testimonials.css lays this section out for the old bento grid:
       display:flex + flex-direction:column + align-items:center, plus
       min-height:100vh. Under that, .ts-carousel is a flex item sized to its
       content instead of the full width, and the 100vh floor leaves a screen of
       empty space below the row. Both have to be undone here. */
    display: block;
    min-height: 0;
}

.testimonials-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 3rem;
    padding: 0 20px;
}

.testimonials-title {
    margin: 0 0 .75rem;
    font-size: clamp(1.75rem, 3.4vw, 2.6rem);
    font-weight: 800;
    color: #0f1b2d;
    letter-spacing: -.02em;
}

.testimonials-subtitle {
    margin: 0;
    font-size: .98rem;
    line-height: 1.6;
    color: #64748b;
}

/* ── Track ───────────────────────────────────────────────────────────────────
   A natively scrollable row rather than a transform slider, so touch swipe,
   trackpad and keyboard all work on their own. The marquee drives it by
   advancing scrollLeft each frame; the arrows nudge it by one card. */
/* ── Marquee ─────────────────────────────────────────────────────────────────
   Same construction as the partners strip further up the page, which is known
   to work here: an overflow-hidden window, a fit-content flex row inside it,
   and a CSS keyframe sliding that row by exactly -50%. The list is rendered
   twice, so -50% lands on an identical frame and the loop is seamless.

   The motion is pure CSS with no script involved at all, so there is nothing
   that can mis-measure and translate the row out of view. */

.ts-carousel {
    position: relative;
    width: 100%;
    /* Plain overflow:hidden. Setting overflow-y:visible beside overflow-x:hidden
       would compute to auto and add a stray scrollbar — instead each card
       reserves the space its portrait needs in its own padding-bottom. */
    padding: 16px 0 22px;
    overflow: hidden;
}

.ts-track {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    width: fit-content;
    animation: tsMarquee 55s linear infinite;
}

/* In RTL the row is laid out right-to-left, so it has to travel the other way */
[dir="rtl"] .ts-track {
    animation-name: tsMarqueeRtl;
}

@keyframes tsMarquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

@keyframes tsMarqueeRtl {
    from { transform: translateX(0); }
    to   { transform: translateX(50%); }
}

/* Hold still while someone is reading a card or tabbing through */
.ts-carousel:hover .ts-track,
.ts-carousel:focus-within .ts-track {
    animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
    .ts-track { animation: none; }
}

/* ── Card ────────────────────────────────────────────────────────────────────
   White panel, portrait and name at the top, quote beneath. Everything is in
   normal flow — no absolute positioning and nothing hanging outside the panel,
   which is what previously left the row looking empty when a box collapsed. */

.ts-card {
    flex: 0 0 auto;
    flex-shrink: 0;
    width: clamp(268px, 26vw, 330px);
    /* Gap between cards comes from margin, so the padding can belong to the
       white panel itself. */
    margin: 0 11px;
    padding: 28px 24px 30px;

    /* The card IS the container. Styling it here rather than an inner wrapper
       means the panel shows whichever version of the markup is being served.

       The surface colour comes from --ts-tint, set per card by the nth-child
       cycle below, so the row reads as a band of pastels rather than a row of
       identical white boxes. */
    background: var(--ts-tint, #ffffff);
    border: 1px solid var(--pastel-edge, rgba(15, 27, 45, .06));
    border-radius: 18px;
    box-shadow: 0 6px 22px rgba(15, 27, 45, .06);

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
}

/* ── Palette ─────────────────────────────────────────────────────────────────
   Seven pastels for the seven quotes. The list is rendered twice for the
   seamless loop, so a 7n cycle lands each quote on the same colour in both
   passes and the marquee never jumps to a different hue mid-scroll. */

/* Shared site palette — see the --pastel-* block in main.css. Exposed as
   numbered slots so the template can pick one per quote: an nth-child cycle
   cannot work here, because the list is rendered twice for the seamless loop
   and only lines up when the number of quotes is a multiple of the cycle. With
   7 tints and 10 Turkish quotes the second pass would recolour every card and
   the marquee would visibly jump at the loop point. */
.ts-track {
    --ts-tint-1: var(--pastel-coral, #FCA5A0);
    --ts-tint-2: var(--pastel-peach, #FBCB93);
    --ts-tint-3: var(--pastel-butter, #FBE59B);
    --ts-tint-4: var(--pastel-mint, #B4E4C6);
    --ts-tint-5: var(--pastel-sky, #A6D8F5);
    --ts-tint-6: var(--pastel-lilac, #D7B0F2);
    --ts-tint-7: var(--pastel-blush, #F9C4D8);
}

/* Layout group only — the white surface is the card above. */
.ts-panel {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.ts-person {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* Tinted ring around the portrait. On its own element so it shows even when the
   photo itself fails to load — the avatars are hosted off-site and some
   browsers' tracking protection blocks them. */
.ts-avatar-ring {
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
    max-width: 72px;
    max-height: 72px;
    border-radius: 50%;
    padding: 3px;
    background: rgba(255, 255, 255, .75);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ts-avatar {
    /* Hard caps, not just percentages: a percentage alone resolves against
       whatever box the image lands in, so a stretched parent turned these into
       full-height ovals. The aspect-ratio keeps it a circle regardless. */
    width: 66px;
    height: 66px;
    max-width: 66px;
    max-height: 66px;
    aspect-ratio: 1;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: #e2e6ea;      /* visible circle if the image never arrives */
    border: 3px solid #ffffff;
}

.ts-person__text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.ts-name {
    font-size: .92rem;
    font-weight: 700;
    color: var(--pastel-ink, #0f1b2d);
    line-height: 1.3;
}

.ts-role {
    font-size: .74rem;
    color: var(--pastel-ink-muted, rgba(15, 27, 45, .55));
    line-height: 1.35;
}

.ts-quote {
    margin: 0;
    width: 100%;
    font-size: .88rem;
    line-height: 1.7;
    color: var(--pastel-ink-soft, #38434f);
}

@media (max-width: 640px) {
    .testimonials-section { padding: 3.5rem 0 3rem; }
    .testimonials-header { margin-bottom: 2rem; }
    .ts-card { width: min(80vw, 320px); margin: 0 8px; padding: 24px 18px 26px; }
}

/* The marquee itself is skipped in JS when reduced motion is requested; the
   track stays scrollable by hand and the arrows still work. */
