/*
 * Client Success Stories carousel (replaces bxSlider for .testimonial-carousel).
 * Native horizontal scroll with scroll-snap: the layout is final before any JS runs, every card has
 * the same size (no height changes between slides), and the active card is emphasised with a
 * uniform scale on its neighbours (never scaleX, so text is never stretched).
 */
.testimonial-carousel {
    position: relative; /* offsetParent for the JS position maths */
    display: flex;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 16px 4px 20px; /* room for card shadows inside the scroll box */
}
.testimonial-carousel::-webkit-scrollbar { display: none; }
/* Mouse drag (see the JS); touch swiping is native. */
.testimonial-carousel { cursor: grab; }
.testimonial-carousel.la-tc-dragging { cursor: grabbing; user-select: none; }
.testimonial-carousel.la-tc-dragging * { cursor: grabbing !important; }
.testimonial-carousel img { -webkit-user-drag: none; user-select: none; }
.testimonial-carousel:focus-visible { outline: 2px solid #1676e3; outline-offset: 4px; border-radius: 12px; }

.testimonial-carousel > .testimonial-item {
    flex: 0 0 min(560px, calc(100% - 40px));
    margin-top: 0;
    scroll-snap-align: center;
    transform: scale(.92);
    opacity: .75;
    transition: transform .45s ease, opacity .45s ease;
}
.testimonial-carousel > .testimonial-item > .row { height: 100%; }
.testimonial-carousel > .testimonial-item.is-active { transform: none; opacity: 1; }

/* Before the script runs, match its first state: the first card is active. */
.testimonial-carousel:not(.la-tc-ready) > .testimonial-item:first-child { transform: none; opacity: 1; }
@media (max-width: 767px) {
    .testimonial-carousel > .testimonial-item { flex-basis: calc(100% - 32px); }
}
/* No transitions while the loop jumps between a copy and the real card. */
.testimonial-carousel.la-tc-jumping > .testimonial-item { transition: none; }

/* Controls: arrows and dots, styled like the previous carousel. */
.la-tc-controls { display: flex; align-items: center; justify-content: center; gap: 24px; margin-top: 1.5rem; }
.la-tc-arrow { border: 0; background: none; padding: 6px; line-height: 0; cursor: pointer; }
.la-tc-arrow img { width: 16px; height: auto; transition: transform .3s ease; }
.la-tc-arrow:hover img, .la-tc-arrow:focus-visible img { transform: scale(1.15); }
.la-tc-dots { display: flex; gap: 6px; }
.la-tc-dot { width: 15px; height: 15px; border-radius: 50%; border: 0; padding: 0; margin: 0 2px; background: #fff; cursor: pointer; transition: background-color .3s ease; }
.la-tc-dot.active { background: #000; }
.la-tc-dot:focus-visible, .la-tc-arrow:focus-visible { outline: 2px solid #1676e3; outline-offset: 2px; }
@media (max-width: 767px) {
    .la-tc-controls { gap: 14px; }
    .la-tc-arrow img { width: 12px; }
    .la-tc-dots { gap: 2px; }
    .la-tc-dot { width: 13px; height: 13px; }
}

@media (prefers-reduced-motion: reduce) {
    .testimonial-carousel { scroll-behavior: auto; }
    .testimonial-carousel > .testimonial-item { transition: none; }
}

/* Video testimonials: the photo opens the video too. */
.clients-testimonial-img-box:has(.play-btn[data-bs-toggle]) img,
.testimonial-img-box:has(.play-btn[data-bs-toggle]) img { cursor: pointer; }
