.references-section {
    --card-gap: 4rem;
    background: #1c1c1c;
    padding-top: 9rem;
}

.references-section__container {
    padding-inline: 0;
}

.references-section__heading {
    color: #3dcfb6;
    font-weight: 700;
    font-size: clamp(1.5rem, 1.4rem + .5vw, 2rem);
    text-align: center;
}

.carousel__wrapper {
    position: relative;
}

.carousel__wrapper > .quotes {
    position: absolute;
    top: 0;
    height: 274px;
    width: 632px;
    left: 50%;
    transform: translate(-50%);
    z-index: 100;
    pointer-events: none;
}

.carousel__wrapper > .quotes > img {
    transform: translate(-49%, -12%);
    position: relative;
    z-index: 101;
}

.carousel__cards {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--card-gap);
    overflow-x: hidden;
    position: relative;
    z-index: 0;
}

.carousel__cards::before,
.carousel__cards::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 20%;
    pointer-events: none;
    z-index: 5;
}

.carousel__cards::before {
    left: 0;
    background: linear-gradient(
        to right,
        #141414a6,
        #14141466,
        #14141426,
        #14141400 60%
    );
}

.carousel__cards::after {
    right: 0;
    background: linear-gradient(
        to left,
        #141414a6,
        #14141466,
        #14141426,
        #14141400 60%
    );
}

.quote-card {
    background: #26524b;
    padding: 3rem 2.5rem;
    border-radius: 32px;
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    gap: 1.5rem;
    flex-direction: column;
    height: 274px;
    color: #fff;
    border: 1px solid #3dcfb6;
    flex: 0 0 632px;
}

.quote-card__text {
    font-size: clamp(1.125rem, 1.1rem + .125vw, 1.25rem);
}

.testimonial {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.testimonial__divider {
    width: 100%;
    border: none;
    border-top: 1px solid #fff;
}

.testimonial__name {
    font-size: clamp(1rem, .975rem + .125vw, 1.125rem);
    white-space: nowrap;
}


/* Keeps long testimonials inside their card. */
.quote-card {
    min-width: 0;
    overflow: hidden;
}

.quote-card__scroll {
    display: flex;
    pointer-events: auto;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 1rem;
    scrollbar-color: #3dcfb6 transparent;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.quote-card__scroll::-webkit-scrollbar {
    width: 4px;
}

.quote-card__scroll::-webkit-scrollbar-thumb {
    background: #3dcfb6;
    border-radius: 999px;
}

.quote-card__scroll::-webkit-scrollbar-track {
    margin-block: 1rem;
}

.quote-card__text {
    flex: 0 0 auto;
    margin: 0;
    width: 100%;
    min-height: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

.testimonial {
    flex: 0 0 auto;
    margin-top: auto;
    min-width: 0;
}

.testimonial__divider {
    min-width: 2rem;
}

.testimonial__name {
    max-width: 70%;
    margin: 0;
    overflow-wrap: anywhere;
    white-space: normal;
    word-break: break-word;
}

.move-left {
    animation: move-left .7s forwards;
}

.move-right {
    animation: move-right .7s forwards;
}

.navigations {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.25rem;
}

.navigations_buttons {
    background: transparent;
}

.navigations_buttons > svg {
    transition: transform .3s ease-out;
}

.navigations_buttons > svg:hover {
    transform: scale(1.2);
}

.navigations_buttons > svg:hover .navigations_buttons-color {
    fill: #3dcfb6;
}

.navigations_buttons-color {
    transition: fill .3s ease-out;
    fill: #fff;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.25rem;
}

.pagination__bullet {
    height: 8px;
    width: 8px;
    border-radius: 50%;
    background-color: #fff;
}

.pagination__bullet-active {
    background-color: #3dcfb6;
}



@keyframes move-right {
    0% {
        transform: translate(0);
    }

    100% {
        transform: translate(calc(100% + var(--card-gap)));
    }
}

@keyframes move-left {
    0% {
        transform: translate(0);
    }

    100% {
        transform: translate(calc(-100% - var(--card-gap)));
    }
}

@media (max-width: 800px) {
    .quote-card {
        height: 360px;
        flex-basis: 360px;
    }

    .carousel__wrapper > .quotes {
        width: 360px;
        height: 360px;
    }
}

@media (max-width: 768px) {
    .references-section {
        padding-top: 6.25rem;
    }

    .references-section__container {
        padding-inline: 1rem;
    }

    .carousel__cards,
    .navigations {
        margin-top: 2rem;
    }
}



@media (max-width: 600px) {
    .references-section {
        --card-gap: .5rem;
    }

    .quote-card__scroll {
        padding-right: .5rem;
    }

    .quote-card__text,
    .testimonial__name {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    .carousel__wrapper > .quotes > img {
        transform: translateY(-50%);
    }
}

@media (max-width: 450px) {
    .quote-card {
        height: 280px;
        flex-basis: 280px;
        padding: 2rem 1rem;
    }

    .carousel__wrapper > .quotes {
        width: 280px;
        height: 280px;
    }
}

@media (max-width: 400px) {
    .carousel__cards::after,
    .carousel__cards::before {
        content: none;
    }
}

@media (max-width: 600px) {
    .carousel__cards {
        display: grid;
        justify-items: center;
        overflow: hidden;
        gap: 0;
    }

    .quote-card {
        grid-area: 1 / 1;
        width: 100%;
        max-width: 360px;
        flex-basis: auto;
        opacity: 0;
        pointer-events: none;
        transform: none;
    }
    .quote-card:first-child {
        opacity: 1;
        pointer-events: auto;
        z-index: 2;
    }

    .quote-card.move-left,
    .quote-card.move-right {
        animation: none;
    }
}

@media (max-width: 450px) {
    .quote-card {
        max-width: 280px;
    }
}
@media (max-width: 450px) {
    .quote-card__scroll::-webkit-scrollbar-track {
        margin-block: .875rem;
    }
}