.testimonials {
    position: relative;
    padding: 80px 0;
    color: var(--color-white);
    isolation: isolate;
    overflow: hidden;
}
.testimonials__bg {
    position: absolute; inset: 0; z-index: -1;
    background: var(--color-blue-dark);
}
.testimonials__bg::after {
    content: ''; position: absolute; inset: 0;
    background: url('../../img/testi-bg.jpg') center/cover;
    mix-blend-mode: overlay;
    opacity: 0.4;
}
.testimonials__carousel {
    display: flex; align-items: center; gap: 24px;
    position: relative;
}
.testimonials__viewport {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.testimonials__list {
    display: flex;
    gap: 24px;
    width: 100%;
    align-items: stretch;
    transition: transform .4s ease;
}
.testimonial {
    flex: 0 0 calc((100% - 48px) / 3);
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 32px;
    color: var(--color-black);
    display: flex;
    flex-direction: column;
}
.testimonial__inner {
    display: flex; flex-direction: column; align-items: center; gap: 32px;
    flex: 1;
    width: 100%;
}
.testimonial__content {
    display: flex; flex-direction: column; align-items: center;
    flex: 1;
    width: 100%;
}
.testimonial__photo {
    width: 180px; height: 180px;
    border-radius: 50%;
    background: var(--color-grey-light-2) center/cover;
    flex-shrink: 0;
    margin-bottom: 24px;
}
.testimonial__title {
    font-size: 24px; line-height: 34px; font-weight: 600;
    color: var(--color-headings);
    text-align: center;
    margin: 0 0 16px;
    height: 68px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}
.testimonial__divider {
    width: 100px; height: 2px; background: rgba(158, 158, 158, 0.5);
    margin-bottom: 12px;
    flex-shrink: 0;
}
.testimonial__name { font-size: 20px; line-height: 30px; font-weight: 600; margin: 0; font-family: var(--font-heading); }
.testimonial__role { font-size: 18px; line-height: 28px; text-align: center; color: var(--color-black); margin: 6px 0 0; max-width: 320px; }
.testimonial .btn { flex-shrink: 0; }

.testimonials--quote { color: var(--color-black); }
.testimonials--quote .testimonials__bg { background: var(--color-grey-light-1); }
.testimonials--quote .testimonials__bg::after { display: none; }
.testimonials--quote .testimonial { flex: 0 0 calc((100% - 24px) / 2); }
@media (max-width: 980px) {
    .testimonial,
    .testimonials--quote .testimonial { flex-basis: calc((100% - 24px) / 2); }
}
@media (max-width: 600px) {
    .testimonial,
    .testimonials--quote .testimonial { flex-basis: 100%; }
}
.testimonials--quote .carousel-arrow {
    border: 1px solid var(--color-black);
    color: var(--color-black);
}
.testimonials--quote .carousel-arrow:hover { background: var(--color-black); color: var(--color-white); }

.testimonials--quote .testimonial { padding: 32px; }
.testimonials--quote .testimonial__inner { align-items: stretch; gap: 0; }
.testimonials--quote .testimonial__content { align-items: flex-start; text-align: left; flex: 1; }
.testimonials--quote .testimonial__heading {
    font-size: 20px; line-height: 28px; font-weight: 600;
    color: var(--color-black);
    margin: 0 0 16px;
}
.testimonials--quote .testimonial__quote {
    font-size: 16px; line-height: 24px; color: var(--color-black-soft);
    margin: 0 0 24px;
    flex: 1;
}
.testimonials--quote .testimonial__name {
    font-size: 18px; line-height: 26px; font-weight: 600;
    color: var(--color-black);
}
.testimonials--quote .testimonial__role {
    text-align: left; font-size: 14px; line-height: 22px; color: var(--color-grey-dark);
    margin: 4px 0 0;
}

.carousel-arrow {
    width: 60px; height: 60px;
    border-radius: 50%;
    border: 3px solid var(--color-white);
    color: var(--color-white);
    background: transparent;
    flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background-color .2s, color .2s;
    cursor: pointer;
}
.carousel-arrow:hover { background: var(--color-white); color: var(--color-blue-dark); }

.testimonials__dots { display: none; }

.testimonials__cta { display: flex; justify-content: center; margin-top: 40px; }
.testimonials:not(.testimonials--quote) .testimonials__cta .btn { background: var(--color-white); color: var(--color-blue-dark); border-color: var(--color-white); }
.testimonials:not(.testimonials--quote) .testimonials__cta .btn:hover { background: transparent; color: var(--color-white); }

@media (min-width: 1280px) {
    .testimonials__carousel { display: block; gap: 0; }
    .testimonials__list { flex: none; }
    .carousel-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 2;
    }
    .carousel-arrow:first-child {
        right: 100%;
        margin-right: 24px;
    }
    .carousel-arrow:last-child {
        left: 100%;
        margin-left: 24px;
    }
}

@media (max-width: 1199px) {
    .testimonials__list { grid-template-columns: 1fr; }
    .testimonials:not(.testimonials--quote) .testimonials__list .testimonial:nth-child(n+2) { display: none; }
}

@media (max-width: 767px) {
    .testimonials { padding: 48px 0; }
    .testimonials__carousel { gap: 12px; }
    .carousel-arrow { width: 44px; height: 44px; }
    .testimonials .carousel-arrow { display: none; }
    .testimonials__list { grid-template-columns: 1fr; gap: 12px; }
    .testimonial { padding: 24px; }
    .testimonial__photo { width: 140px; height: 140px; }
    .testimonial,
    .testimonials--quote .testimonial { flex-basis: 86%; }
    .testimonials:not(.testimonials--quote) .testimonials__carousel[data-testi-carousel] .testimonials__list .testimonial:nth-child(n+2) { display: flex; }
    .testimonials__dots {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: 24px;
    }
    .testimonials__dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.4);
        transition: background-color .2s;
    }
    .testimonials__dot.is-active { background: var(--color-green); }
    .testimonials--quote .testimonials__dot { background: rgba(22, 22, 22, 0.2); }
    .testimonials--quote .testimonials__dot.is-active { background: var(--color-green); }
    .testimonials__cta .btn { width: 100%; }
}
