.testimonial-carousel {
    --testimonial-gap: 1rem;
    position: relative;
    margin-top: -.5rem;
}

.testimonial-carousel-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.testimonial-count {
    display: flex;
    align-items: center;
    gap: .7rem;
    color: #7a8e9d;
    font: 700 .68rem "Manrope", sans-serif;
}

.testimonial-count strong {
    color: var(--navy);
    font-size: .82rem;
}

.testimonial-count span {
    width: 42px;
    height: 1px;
    overflow: hidden;
    background: #dbe5eb;
}

.testimonial-count span::after {
    display: block;
    width: 50%;
    height: 100%;
    background: var(--orange);
    content: "";
}

.testimonial-controls {
    display: flex;
    gap: .55rem;
}

.testimonial-controls button {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid #dbe5eb;
    border-radius: 50%;
    background: #fff;
    color: var(--navy);
    box-shadow: 0 6px 18px rgba(6, 43, 82, .06);
    transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}

.testimonial-controls button:hover,
.testimonial-controls button:focus-visible {
    border-color: var(--blue);
    background: var(--blue);
    color: #fff;
    outline: none;
    transform: translateY(-2px);
}

.testimonial-viewport {
    overflow-x: auto;
    padding: .3rem .2rem 1.35rem;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
}

.testimonial-viewport::-webkit-scrollbar {
    display: none;
}

.testimonial-viewport:focus-visible {
    border-radius: .85rem;
    outline: 3px solid rgba(10, 103, 176, .2);
    outline-offset: 3px;
}

.testimonial-track {
    display: flex;
    gap: var(--testimonial-gap);
}

.testimonial-slide {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 300px;
    flex: 0 0 calc((100% - (var(--testimonial-gap) * 2)) / 3);
    flex-direction: column;
    padding: 1.55rem;
    border: 1px solid #dfe8ed;
    border-radius: .85rem;
    background:
        radial-gradient(circle at 100% 0, rgba(10, 103, 176, .055), transparent 34%),
        #fff;
    box-shadow: 0 10px 30px rgba(6, 43, 82, .055);
    scroll-snap-align: start;
    transition: border-color .28s ease, box-shadow .28s ease, transform .28s ease;
}

.testimonial-slide::after {
    position: absolute;
    right: 1.5rem;
    bottom: 0;
    left: 1.5rem;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: linear-gradient(90deg, var(--orange), #fbc766);
    content: "";
    opacity: 0;
    transform: scaleX(.2);
    transform-origin: left;
    transition: opacity .28s ease, transform .28s ease;
}

.testimonial-slide.is-current {
    border-color: rgba(10, 103, 176, .28);
    box-shadow: 0 18px 42px rgba(6, 43, 82, .11);
    transform: translateY(-3px);
}

.testimonial-slide.is-current::after {
    opacity: 1;
    transform: scaleX(1);
}

.testimonial-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.testimonial-quote {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: .65rem;
    background: #eaf4fb;
    color: var(--blue);
    font-size: 1.25rem;
}

.testimonial-stars {
    display: flex;
    gap: .18rem;
    color: #f6a11a;
    font-size: .7rem;
}

.testimonial-slide blockquote {
    flex: 1;
    margin: 0 0 1.5rem;
    color: #38566c;
    font-size: .78rem;
    font-weight: 500;
    line-height: 1.75;
}

.testimonial-person {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: .75rem;
    padding-top: 1rem;
    border-top: 1px solid #edf2f5;
}

.testimonial-avatar {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    font: 800 .7rem "Manrope", sans-serif;
    letter-spacing: .04em;
}

.testimonial-identity {
    display: block;
    min-width: 0;
}

.testimonial-identity strong,
.testimonial-identity small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.testimonial-identity strong {
    color: var(--navy);
    font: 700 .74rem "Manrope", sans-serif;
}

.testimonial-identity small {
    margin-top: .15rem;
    color: #7d909e;
    font-size: .6rem;
}

.testimonial-verified {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .32rem .5rem;
    border-radius: 999px;
    background: #edf8f2;
    color: #278453;
    font-size: .55rem;
    font-weight: 800;
    white-space: nowrap;
}

.testimonial-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
}

.testimonial-dots button {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 99px;
    background: #cad6de;
    transition: width .22s ease, background .22s ease;
}

.testimonial-dots button[aria-current="true"] {
    width: 25px;
    background: var(--orange);
}

.testimonial-dots button:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}

.testimonial-carousel.is-static .testimonial-controls,
.testimonial-carousel.is-static .testimonial-dots,
.testimonial-dots button[hidden] {
    display: none;
}

@media (max-width: 900px) {
    .testimonial-slide {
        flex-basis: calc((100% - var(--testimonial-gap)) / 2);
    }
}

@media (max-width: 560px) {
    .testimonial-carousel {
        margin-top: 0;
    }

    .testimonial-carousel-bar {
        margin-bottom: .65rem;
    }

    .testimonial-controls button {
        width: 38px;
        height: 38px;
    }

    .testimonial-slide {
        min-height: 285px;
        flex-basis: 100%;
        padding: 1.3rem;
    }

    .testimonial-slide blockquote {
        font-size: .75rem;
    }

    .testimonial-verified {
        padding: .3rem .42rem;
        font-size: .51rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .testimonial-viewport {
        scroll-behavior: auto;
    }

    .testimonial-slide {
        transition: none;
    }
}
