.testimony-slider {
    --testimony-background: #1b2945;
    --testimony-accent: #3db166;
    background-color: var(--testimony-background);
    background-image:
        linear-gradient(115deg, rgb(5 12 24 / 88%), rgb(8 18 35 / 68%)),
        url("../img/testimony.webp");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    color: #fff;
    overflow: hidden;
    padding: clamp(2.5rem, 5vw, 4.25rem) 0;
    position: relative;
}

.testimony-slider,
.testimony-slider * {
    box-sizing: border-box;
}

.testimony-slider::before {
    background: radial-gradient(circle, color-mix(in srgb, var(--testimony-accent) 22%, transparent), transparent 68%);
    content: "";
    height: 28rem;
    pointer-events: none;
    position: absolute;
    right: -10rem;
    top: -15rem;
    width: 28rem;
}

.testimony-slider__wrap {
    margin: 0 auto;
    max-width: 82rem;
    padding: 0 clamp(4.25rem, 7vw, 5.5rem);
    position: relative;
}

.testimony-slider__heading {
    color: #fff;
    font-size: clamp(1.65rem, 4vw, 2.5rem);
    font-weight: 750;
    letter-spacing: -0.025em;
    line-height: 1.15;
    margin: 0 auto clamp(1.4rem, 3vw, 2rem);
    max-width: 42rem;
    text-align: center;
}

.testimony-slider__heading::after {
    background: var(--testimony-accent);
    border-radius: 999px;
    content: "";
    display: block;
    height: 0.2rem;
    margin: 0.8rem auto 0;
    width: 3.25rem;
}

.testimony-slider__slides {
    display: grid;
    min-height: 17rem;
}

.testimony-slider__slide {
    align-self: center;
    background: rgb(8 19 36 / 86%);
    border: 1px solid rgb(255 255 255 / 14%);
    border-radius: 1.25rem;
    box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 32%);
    display: grid;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    grid-area: 1 / 1;
    grid-template-columns: minmax(13rem, 15rem) minmax(0, 1fr);
    margin: 0 auto;
    max-width: 66rem;
    opacity: 0;
    padding: clamp(1.5rem, 3vw, 2.15rem) clamp(1.6rem, 4vw, 2.6rem);
    pointer-events: none;
    text-align: left;
    transform: translateX(1.25rem) scale(0.985);
    transition: border-color 180ms ease, box-shadow 180ms ease, opacity 280ms ease, transform 280ms ease, visibility 280ms;
    visibility: hidden;
    width: 100%;
}

@supports (backdrop-filter: blur(1rem)) {
    .testimony-slider__slide {
        backdrop-filter: blur(0.85rem);
        background: rgb(8 19 36 / 72%);
    }
}

.testimony-slider__slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0) scale(1);
    visibility: visible;
}

.testimony-slider__slide.is-active:hover {
    border-color: color-mix(in srgb, var(--testimony-accent) 55%, white 10%);
    box-shadow: 0 1.75rem 4.5rem rgb(0 0 0 / 40%);
    transform: translateY(-0.2rem);
}

.testimony-slider__identity {
    align-items: center;
    align-self: stretch;
    border-right: 1px solid rgb(255 255 255 / 13%);
    display: flex;
    gap: 0.85rem;
    padding-right: clamp(1.25rem, 3vw, 2rem);
}

.testimony-slider__content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    position: relative;
}

.testimony-slider__quote {
    background: transparent;
    border: 0;
    color: #fff;
    margin: 0;
    padding: 0 0 0 2.25rem;
    position: relative;
}

.testimony-slider__quote::before {
    color: var(--testimony-accent);
    content: "\201C";
    font-family: Georgia, serif;
    font-size: 4rem;
    font-weight: 700;
    left: -0.1rem;
    line-height: 1;
    opacity: 0.95;
    position: absolute;
    top: -0.5rem;
}

.testimony-slider__quote p {
    color: inherit;
    font-size: clamp(1.05rem, 2.4vw, 1.3rem);
    font-style: normal;
    font-weight: 450;
    letter-spacing: 0;
    line-height: 1.65;
    margin: 0;
    text-wrap: pretty;
    white-space: pre-line;
}

.testimony-slider__monogram {
    border: 2px solid color-mix(in srgb, var(--testimony-accent) 75%, white);
    border-radius: 50%;
    display: grid;
    flex: 0 0 3.5rem;
    height: 3.5rem;
    place-items: center;
    width: 3.5rem;
}

.testimony-slider__monogram {
    background: color-mix(in srgb, var(--testimony-accent) 18%, rgb(8 19 36));
    color: #fff;
    font-size: 1.15rem;
    font-weight: 800;
    text-transform: uppercase;
}

.testimony-slider__person-copy {
    min-width: 0;
}

.testimony-slider__author {
    color: #fff;
    font-size: 1rem;
    font-weight: 750;
    line-height: 1.25;
    margin: 0;
    overflow-wrap: anywhere;
}

.testimony-slider__date {
    color: rgb(255 255 255 / 66%);
    font-size: 0.82rem;
    line-height: 1.4;
    margin: 0.18rem 0 0;
}

.testimony-slider__rating {
    display: flex;
    flex: 0 0 auto;
    gap: 0.2rem;
    justify-content: flex-end;
    letter-spacing: 0;
    margin: auto 0 0;
    padding-top: 1.4rem;
}

.testimony-slider__rating span {
    align-items: center;
    background: rgb(255 255 255 / 8%);
    border: 1px solid rgb(255 255 255 / 8%);
    border-radius: 0.2rem;
    color: rgb(255 255 255 / 24%);
    display: flex;
    font-size: 0.9rem;
    height: 1.85rem;
    justify-content: center;
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
    width: 1.85rem;
}

.testimony-slider__rating .is-filled {
    background: color-mix(in srgb, var(--testimony-accent) 62%, #17446f);
    border-color: color-mix(in srgb, var(--testimony-accent) 55%, white 12%);
    color: #fff;
}

.testimony-slider__slide.is-active:hover .testimony-slider__rating .is-filled {
    background: #ff8a00;
    border-color: #ffad4d;
    transform: translateY(-0.15rem);
}

.testimony-slider__featured {
    align-items: center;
    background: #ff8a00;
    border-radius: 0 1.1rem 0.25rem 1rem;
    box-shadow: 0 0.5rem 1.25rem rgb(0 0 0 / 24%);
    color: #fff;
    display: flex;
    font-size: 1rem;
    height: 2.35rem;
    justify-content: center;
    position: absolute;
    right: calc(clamp(1.6rem, 4vw, 2.6rem) * -1);
    top: calc(clamp(1.5rem, 3vw, 2.15rem) * -1);
    width: 2.65rem;
}

.testimony-slider__arrow {
    align-items: center;
    background: rgb(8 19 36 / 72%);
    border: 1px solid rgb(255 255 255 / 18%);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    font-size: 2rem;
    height: 3rem;
    justify-content: center;
    padding: 0 0 0.15rem;
    position: absolute;
    top: 57%;
    transform: translateY(-50%);
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
    width: 3rem;
    z-index: 2;
}

.testimony-slider__arrow:hover,
.testimony-slider__arrow:focus-visible {
    background: var(--testimony-accent);
    border-color: var(--testimony-accent);
    color: #07121f;
    outline: none;
    transform: translateY(-50%) scale(1.06);
}

.testimony-slider__arrow--previous {
    left: 0.5rem;
}

.testimony-slider__arrow--next {
    right: 0.5rem;
}

.testimony-slider__controls {
    align-items: center;
    display: flex;
    gap: 0.9rem;
    justify-content: center;
    margin-top: 1.1rem;
}

.testimony-slider__dots {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
}

.testimony-slider__toggle {
    background: rgb(8 19 36 / 60%);
    border: 1px solid rgb(255 255 255 / 28%);
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.48rem 0.75rem;
}

.testimony-slider__toggle:hover,
.testimony-slider__toggle:focus-visible {
    border-color: var(--testimony-accent);
    color: var(--testimony-accent);
    outline: none;
}

.testimony-slider__dot {
    background: rgb(255 255 255 / 22%);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    height: 0.5rem;
    padding: 0;
    transition: background-color 150ms ease, transform 150ms ease, width 150ms ease;
    width: 0.5rem;
}

.testimony-slider__dot:hover,
.testimony-slider__dot:focus-visible,
.testimony-slider__dot.is-active {
    background-color: var(--testimony-accent);
    outline: none;
    transform: scale(1.08);
}

.testimony-slider__dot.is-active {
    width: 1.5rem;
}

@media (max-width: 42rem) {
    .testimony-slider {
        padding: 2.75rem 0;
    }

    .testimony-slider__wrap {
        padding-inline: 1rem;
    }

    .testimony-slider__heading {
        margin-bottom: 1.5rem;
    }

    .testimony-slider__slides {
        min-height: 24rem;
    }

    .testimony-slider__slide {
        border-radius: 1rem;
        padding: 1.5rem 1.25rem;
    }

    .testimony-slider__quote {
        padding-left: 1.8rem;
    }

    .testimony-slider__quote::before {
        font-size: 3.25rem;
    }

    .testimony-slider__slide {
        display: block;
    }

    .testimony-slider__identity {
        border-bottom: 1px solid rgb(255 255 255 / 13%);
        border-right: 0;
        margin-bottom: 1.35rem;
        padding: 0 0 1.1rem;
    }

    .testimony-slider__featured {
        right: -1.25rem;
        top: -1.5rem;
    }

    .testimony-slider__arrow {
        height: 2.5rem;
        top: auto;
        width: 2.5rem;
    }

    .testimony-slider__arrow--previous {
        bottom: -0.25rem;
        left: 1rem;
    }

    .testimony-slider__arrow--next {
        bottom: -0.25rem;
        right: 1rem;
    }

    .testimony-slider__controls {
        min-height: 2.5rem;
        padding-inline: 3rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .testimony-slider__slide,
    .testimony-slider__arrow,
    .testimony-slider__dot {
        transition: none;
    }
}
