/* ═════════════════════════════════════════════════════════════════════
   5.5 · TESTIMONIALS (.bgo-testimonials)
   Self-contained design tokens + carousel styles (extracted from homepage.html)
   ═════════════════════════════════════════════════════════════════════ */
.bgo-testimonials {
    /* Colour + Typography tokens (self-contained so shortcode works on any page) */
    --bgo-ink: #2C2420;
    --bgo-ink-2: #5A4D46;
    --bgo-ink-3: #8A7F78;
    --bgo-ink-muted: #6E625B;
    --bgo-cream: #FAF6F3;
    --bgo-cream-2: #F3ECE5;
    --bgo-rose: #F6D5CF;
    --bgo-rose-2: #EFB8B0;
    --bgo-rose-ink: #C94A6B;
    --bgo-rose-deep: #B53A5B;
    --bgo-sky: #CFDDE8;
    --bgo-sky-2: #A8C0D3;
    --bgo-sky-ink: #4A6B85;
    --bgo-line: rgba(44, 36, 32, .12);
    --bgo-line-2: rgba(44, 36, 32, .06);
    --bgo-font-serif: "DM Serif Display", Georgia, "Times New Roman", serif;
    --bgo-font-sans: "Outfit", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --bgo-font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;

    background: var(--bgo-cream);
    color: var(--bgo-ink);
    font: 400 16px/1.55 var(--bgo-font-sans);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    padding: 120px 0;
    border-bottom: 1px solid var(--bgo-line-2);
    position: relative;
    overflow: hidden;
}

.bgo-testimonials *,
.bgo-testimonials *::before,
.bgo-testimonials *::after {
    box-sizing: border-box
}

.bgo-testimonials .bgo-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 48px
}

.bgo-testimonials .eyebrow {
    font: 500 11px/1 var(--bgo-font-mono);
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--bgo-ink-2);
    display: inline-block
}

.bgo-testimonials .sec-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 56px
}

.bgo-testimonials .sec-head h2 {
    font-family: var(--bgo-font-serif);
    font-weight: 400;
    font-size: 56px;
    line-height: 1.02;
    letter-spacing: -.015em;
    margin: 12px 0 0;
    max-width: 16ch;
    color: var(--bgo-ink)
}

.bgo-testimonials .sec-head h2 em {
    color: var(--bgo-rose-ink);
    font-style: italic
}

.bgo-testimonials .sec-head p {
    max-width: 380px;
    color: var(--bgo-ink-2);
    font-size: 16px;
    margin: 0;
    line-height: 1.55
}

/* Carousel track + slides */
/* Native CSS scroll-snap carousel — swipeable on touch, no JS transform */
.bgo-testimonials .tst-viewport {
    /* Vertical padding gives room inside the scrollport for the spotlight
       card's scale and drop shadow without clipping; the negative margin
       returns that breathing room to the layout so controls stay put. */
    overflow-x: auto;
    overflow-y: hidden;
    padding: 16px 0 42px;
    margin-bottom: -36px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.bgo-testimonials .tst-viewport::-webkit-scrollbar {
    display: none
}

.bgo-testimonials .tst-viewport:focus-visible {
    outline: 2px solid var(--bgo-rose-ink);
    outline-offset: 4px;
    border-radius: 14px;
}

.bgo-testimonials .tst-track {
    display: flex;
    gap: 24px
}

.bgo-testimonials .tst-track::before,
.bgo-testimonials .tst-track::after {
    content: '';
    display: none
}

.bgo-testimonials .tst-slide {
    flex: 0 0 calc((100% - 48px) / 3);
    min-width: 0;
    margin: 0;
    scroll-snap-align: start
}

/* Desktop: flat, equal-size cards. Mobile/tablet spotlight is applied in breakpoints below. */
.bgo-testimonials .tst-card {
    position: relative;
    z-index: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    border: 1px solid var(--bgo-line);
    border-radius: 22px;
    padding: 34px 30px;
    transition: transform .45s ease, border-color .45s ease, box-shadow .45s ease;
}

@media (hover: hover) and (min-width: 993px) {
    .bgo-testimonials .tst-card:hover {
        border-color: var(--bgo-rose-2);
        box-shadow: 0 18px 40px -30px rgba(44, 36, 32, .18);
    }
}

.bgo-testimonials .tst-carousel.is-static .tst-clone,
.bgo-testimonials .tst-carousel.is-static .tst-controls {
    display: none;
}

.bgo-testimonials .tst-carousel.is-static .tst-track {
    justify-content: center;
}

.bgo-testimonials .tst-carousel.is-static .tst-track::before,
.bgo-testimonials .tst-carousel.is-static .tst-track::after {
    display: none;
}

.bgo-testimonials .tst-stars {
    color: var(--bgo-rose-ink);
    font-size: 15px;
    letter-spacing: .18em;
    margin-bottom: 16px
}

.bgo-testimonials .tst-stars-empty {
    opacity: .4;
}

.bgo-testimonials .tst-quote {
    font: 400 15px/1.62 var(--bgo-font-sans);
    color: var(--bgo-ink-2);
    margin: 0 0 18px;
    /* Do not combine flex:1 with line-clamp; footer stays pinned via margin-top:auto on .tst-meta. */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 9;
    line-clamp: 9;
    overflow: hidden;
}

.bgo-testimonials .tst-card.is-expanded .tst-quote {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow: visible;
}

.bgo-testimonials .tst-more {
    appearance: none;
    background: none;
    border: 0;
    padding: 4px 0;
    min-height: 24px;
    margin: -10px 0 16px;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    font: 500 13px/1.2 var(--bgo-font-sans);
    color: var(--bgo-rose-deep);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(181, 58, 91, .35);
    touch-action: manipulation;
    transition: color .15s ease, text-decoration-color .15s ease;
}

.bgo-testimonials .tst-more[hidden] {
    display: none;
}

.bgo-testimonials .tst-more:hover {
    color: #922845;
    text-decoration-color: currentColor;
}

.bgo-testimonials .tst-more:focus-visible {
    outline: 2px solid var(--bgo-rose-ink);
    outline-offset: 3px;
    border-radius: 4px;
}

.bgo-testimonials .tst-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    border-top: 1px solid var(--bgo-line-2);
    padding-top: 16px;
    margin-top: auto;
}

.bgo-testimonials .tst-id {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0
}

.bgo-testimonials .tst-name {
    font-family: var(--bgo-font-serif);
    font-size: 18px;
    line-height: 1;
    color: var(--bgo-ink)
}

.bgo-testimonials .tst-age {
    font: 500 11.5px/1.35 var(--bgo-font-mono);
    letter-spacing: .04em;
    color: var(--bgo-ink-muted)
}

/* Country flag — inline SVG sprite (Twemoji), referenced per card via <use> */
.bgo-testimonials .tst-flag-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden
}

.bgo-testimonials .tst-flag {
    width: 30px;
    height: 30px;
    flex: none;
    margin-left: auto;
    filter: drop-shadow(0 1px 2px rgba(44, 36, 32, .22))
}

/* Controls — chevron buttons + dots or compact counter */
.bgo-testimonials .tst-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 44px
}

.bgo-testimonials .tst-btn {
    appearance: none;
    border: 1px solid rgba(44, 36, 32, .24);
    background: #fff;
    color: var(--bgo-ink);
    width: 46px;
    height: 46px;
    flex: none;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation;
    transition: transform .15s ease, border-color .2s ease, background .2s ease
}

.bgo-testimonials .tst-btn:hover {
    border-color: var(--bgo-rose-2);
    background: var(--bgo-rose)
}

.bgo-testimonials .tst-btn:active {
    transform: scale(.95)
}

.bgo-testimonials .tst-btn:focus-visible {
    outline: 2px solid var(--bgo-rose-ink);
    outline-offset: 3px
}

.bgo-testimonials .chev {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor
}

.bgo-testimonials .chev--left {
    transform: rotate(135deg);
    margin-left: 3px
}

.bgo-testimonials .chev--right {
    transform: rotate(-45deg);
    margin-right: 3px
}

.bgo-testimonials .tst-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px
}

/* 24px WCAG 2.5.8 hit target, 8px visual dot with >=3:1 contrast */
.bgo-testimonials .tst-dot {
    appearance: none;
    border: 0;
    width: 24px;
    height: 24px;
    flex: none;
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
    padding: 0;
    touch-action: manipulation;
    display: inline-flex;
    align-items: center;
    justify-content: center
}

.bgo-testimonials .tst-dot::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--bgo-ink-3);
    transition: transform .2s ease, background-color .2s ease
}

.bgo-testimonials .tst-dot[aria-current="true"]::before {
    background: var(--bgo-rose-ink);
    transform: scale(1.5)
}

.bgo-testimonials .tst-dot:focus-visible {
    outline: 2px solid var(--bgo-rose-ink);
    outline-offset: 2px
}

/* Compact editorial counter + progress bar (replaces dots when > 7 pages) */
.bgo-testimonials .tst-counter {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    min-width: 76px;
}

.bgo-testimonials .tst-counter-text {
    font: 500 12.5px/1 var(--bgo-font-mono);
    font-variant-numeric: tabular-nums;
    letter-spacing: .08em;
    color: var(--bgo-ink-2);
}

.bgo-testimonials .tst-counter-cur {
    font-weight: 600;
    color: var(--bgo-ink);
}

.bgo-testimonials .tst-counter-sep {
    margin: 0 5px;
    color: var(--bgo-ink-3);
}

.bgo-testimonials .tst-progress {
    width: 72px;
    height: 3px;
    border-radius: 999px;
    background: rgba(44, 36, 32, .16);
    overflow: hidden;
}

.bgo-testimonials .tst-progress-fill {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background: var(--bgo-rose-ink);
    transform-origin: left center;
    transform: scaleX(0);
    transition: transform .25s ease;
}

.bgo-testimonials .visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0
}

@media (max-width:992px) {

    /* Tablet/mobile: centre-snap spotlight (1-2 up) with real flex gap + edge spacers */
    .bgo-testimonials .tst-track {
        gap: 16px
    }

    .bgo-testimonials .tst-slide {
        flex-basis: 50%;
        scroll-snap-align: center
    }

    .bgo-testimonials .tst-track::before,
    .bgo-testimonials .tst-track::after {
        display: block;
        flex: 0 0 calc(25% - 16px)
    }

    .bgo-testimonials .tst-card {
        transform: scale(.97)
    }

    .bgo-testimonials .tst-slide.is-selected.tst-card {
        transform: scale(1.02);
        z-index: 1;
        border-color: var(--bgo-rose-2);
        box-shadow: 0 24px 48px -28px rgba(44, 36, 32, .26);
    }

    .bgo-testimonials .sec-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px
    }

    .bgo-testimonials .sec-head h2 {
        font-size: 44px
    }
}

@media (max-width:640px) {
    .bgo-testimonials {
        padding: 80px 0
    }

    .bgo-testimonials .bgo-wrap {
        padding: 0 20px
    }

    .bgo-testimonials .tst-track {
        gap: 12px
    }

    .bgo-testimonials .tst-slide {
        flex-basis: 84%
    }

    .bgo-testimonials .tst-track::before,
    .bgo-testimonials .tst-track::after {
        flex-basis: max(0px, calc(8% - 12px))
    }

    .bgo-testimonials .sec-head {
        margin-bottom: 40px
    }

    .bgo-testimonials .sec-head h2 {
        font-size: 34px
    }

    .bgo-testimonials .tst-card {
        padding: 28px 24px
    }

    .bgo-testimonials .tst-controls {
        gap: 14px;
        margin-top: 36px
    }
}

@media (prefers-reduced-motion:reduce) {
    .bgo-testimonials .tst-card,
    .bgo-testimonials .tst-btn,
    .bgo-testimonials .tst-dot::before,
    .bgo-testimonials .tst-more,
    .bgo-testimonials .tst-progress-fill {
        transition: none
    }
}
