/* Home page: customer stories carousel. One story at a time in a wide card: media on the left
   with a slanted edge, the quote on the right, arrows either side and avatar dots below.
   Fed by the published testimonials collection; hidden entirely when there is nothing to show. */
.cs-section {
    width: 100%;
    padding: 4.5rem 1.5rem 5rem;
    display: flex;
    justify-content: center;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background:
        radial-gradient(ellipse 60% 70% at 0% 50%, rgba(0, 168, 150, .10), transparent 60%),
        radial-gradient(ellipse 60% 70% at 100% 50%, rgba(0, 168, 150, .08), transparent 60%),
        #f4fbfa;
}
.cs-inner { width: 100%; max-width: 1180px; }

.cs-head { max-width: 46rem; margin: 0 auto 2.4rem; text-align: center; }
.cs-eyebrow { display: inline-flex; align-items: center; gap: 12px; font-size: .8rem; font-weight: 600; color: #00A896; }
.cs-eyebrow i { display: block; width: 34px; height: 1px; background: currentColor; }
.cs-title {
    margin: 16px 0 0;
    font-family: 'Inter Tight', 'Inter', system-ui, sans-serif;
    font-size: clamp(26px, min(4.3vw, 6.2vh), 46px);
    font-weight: 500;
    color: #0f172a;
    letter-spacing: -0.022em;
    line-height: 1.08;
    text-wrap: balance;
}
.cs-sub { margin: 14px auto 0; max-width: 34rem; font-size: 1.02rem; line-height: 1.6; color: #475569; }

/* ── carousel frame: card in the middle, arrows outside it ── */
.cs-carousel {
    position: relative;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) 56px;
    align-items: center;
    gap: 22px;
}
.cs-arrow {
    width: 56px; height: 56px; border-radius: 50%;
    display: grid; place-items: center;
    background: #fff; color: #0f172a;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 24px -14px rgba(15, 23, 42, .35);
    cursor: pointer; padding: 0;
    transition: transform .15s, box-shadow .15s, opacity .2s;
}
.cs-arrow:hover { transform: scale(1.06); box-shadow: 0 14px 30px -14px rgba(15, 23, 42, .45); }
.cs-arrow:focus-visible { outline: 3px solid #00A896; outline-offset: 3px; }
.cs-arrow svg { width: 20px; height: 20px; }
.cs-arrow[disabled] { opacity: .35; cursor: default; transform: none; }

.cs-stage {
    position: relative;
    min-height: 420px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 30px 60px -40px rgba(15, 23, 42, .4);
    overflow: hidden;
}

/* ── one story ── */
.cs-card {
    position: absolute; inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 46%) minmax(0, 1fr);
    opacity: 0; visibility: hidden;
    transform: translateX(24px);
    transition: opacity .4s ease, transform .5s cubic-bezier(.2, .8, .3, 1), visibility 0s linear .5s;
}
.cs-card.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity .4s ease, transform .5s cubic-bezier(.2, .8, .3, 1); position: relative; }
.cs-card.is-leaving-back { transform: translateX(-24px); }

/* media column: slanted right edge */
.cs-media {
    position: relative;
    margin: 28px 0 28px 28px;
    border-radius: 18px;
    overflow: hidden;
    background: #0f172a;
    clip-path: polygon(0 0, 100% 0, 92% 100%, 0 100%);
    min-height: 364px;
}
.cs-media img, .cs-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-media .cs-thumb-bg { filter: blur(18px) brightness(.7); transform: scale(1.15); }
.cs-media .cs-thumb { object-fit: contain; z-index: 1; }
.cs-media video { object-fit: contain; background: #000; z-index: 1; }
.cs-media--photo .cs-thumb { object-fit: cover; }
.cs-media.is-playing .cs-thumb, .cs-media.is-playing .cs-thumb-bg, .cs-media.is-playing .cs-play { display: none; }

.cs-play {
    position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2;
    /* the button sits at the bottom-left of the photo (the right edge is slanted, so left keeps it clear) */
    display: flex; align-items: flex-end; justify-content: flex-start;
    background: linear-gradient(to top, rgba(15, 23, 42, .6), rgba(15, 23, 42, 0) 55%);
    border: 0; cursor: pointer; padding: 22px; color: #fff; font: inherit;
}
.cs-play span {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 10px 16px 10px 10px; border-radius: 8px;
    background: rgba(255, 255, 255, .95); color: #0f172a;
    font-size: .9rem; font-weight: 600;
    box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .6);
    transition: transform .15s;
}
.cs-play:hover span { transform: scale(1.04); }
.cs-play i { width: 30px; height: 30px; border-radius: 6px; background: #00A896; display: grid; place-items: center; }
.cs-play i svg { width: 12px; height: 12px; margin-left: 2px; }
.cs-play:focus-visible { outline: 3px solid #00A896; outline-offset: -3px; }

/* quote column */
.cs-body { display: flex; flex-direction: column; padding: 34px 36px 30px 30px; min-width: 0; }
.cs-mark { width: 34px; height: 34px; border-radius: 9px; background: #f1f5f9; color: #00A896; display: grid; place-items: center; margin-bottom: 18px; }
.cs-mark svg { width: 18px; height: 18px; }
.cs-quote { margin: 0; font-size: 1.08rem; line-height: 1.7; color: #334155; }
.cs-quote.is-clamped { display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.cs-more { align-self: flex-start; margin-top: 8px; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-size: .84rem; font-weight: 600; color: #00877a; }
.cs-more:hover { text-decoration: underline; }
.cs-who { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 24px; }
.cs-avatar {
    flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%; overflow: hidden;
    background: linear-gradient(135deg, #00bfac, #00A896);
    display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 1rem;
}
.cs-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-avatar:empty::before { content: attr(data-initial); }
.cs-name { display: block; font-size: 1.02rem; font-weight: 600; color: #0f172a; }
.cs-role { display: block; margin-top: 1px; font-size: .86rem; color: #64748b; }
.cs-logo { margin-left: auto; flex-shrink: 0; max-width: 120px; max-height: 34px; object-fit: contain; filter: grayscale(1); opacity: .7; }

/* ── avatar dots ── */
.cs-dots { display: flex; justify-content: center; gap: 10px; margin-top: 26px; }
.cs-dot {
    width: 52px; height: 52px; border-radius: 50%; padding: 3px;
    border: 2px solid transparent; background: #fff; cursor: pointer;
    box-shadow: 0 6px 16px -8px rgba(15, 23, 42, .35);
    transition: transform .15s, border-color .2s, opacity .2s;
    opacity: .7;
}
.cs-dot:hover { transform: translateY(-2px); opacity: 1; }
.cs-dot:focus-visible { outline: 3px solid #00A896; outline-offset: 2px; }
.cs-dot.is-active { border-color: #00A896; opacity: 1; transform: scale(1.08); }
.cs-dot span { display: block; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: linear-gradient(135deg, #00bfac, #00A896); color: #fff; font-weight: 700; font-size: .85rem; display: grid; place-items: center; }
.cs-dot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-dot span:empty::before { content: attr(data-initial); }

@media (max-width: 900px) {
    .cs-carousel { grid-template-columns: 1fr; gap: 0; }
    .cs-arrow { display: none; }
    .cs-card { grid-template-columns: 1fr; }
    .cs-media { margin: 16px 16px 0; min-height: 0; aspect-ratio: 16 / 10; clip-path: polygon(0 0, 100% 0, 100% 94%, 0 100%); }
    .cs-play { padding: 14px 14px 20px; }
    .cs-body { padding: 22px 22px 22px; }
    .cs-stage { min-height: 0; }
    .cs-card { position: absolute; }
    .cs-card.is-active { position: relative; }
    .cs-quote { font-size: 1rem; }
    .cs-quote.is-clamped { -webkit-line-clamp: 6; }
    .cs-logo { display: none; }
}
@media (max-width: 640px) {
    .cs-section { padding: 3rem 1.25rem 4.5rem; }   /* room under the dots for the chat orb */
    .cs-dots { padding-right: 72px; }
}
@media (prefers-reduced-motion: reduce) {
    .cs-card, .cs-arrow, .cs-dot, .cs-play span { transition: none; }
}
