/* =========================================================
   TESTIMONIAL SECTION
========================================================= */

.testimonial-section {
    position: relative;

    padding: 90px 0 50px;
    /* background: #f7f8fa; */

    overflow: hidden;
}


/* =========================================================
   CONTAINER
========================================================= */

.testimonial-container {
    position: relative;

    width: 100%;
    max-width: 1400px;

    margin: 0 auto;

    z-index: 2;
}


/* =========================================================
   BACKGROUND GLOW
========================================================= */

.testimonial-section::before {
    content: "";

    position: absolute;

    width: 460px;
    height: 460px;

    top: -240px;
    left: -190px;

    border-radius: 50%;

    background: rgba(144, 51, 28, 0.055);

    filter: blur(85px);

    pointer-events: none;
}


.testimonial-section::after {
    content: "";

    position: absolute;

    width: 430px;
    height: 430px;

    right: -210px;
    bottom: -230px;

    border-radius: 50%;

    background: rgba(144, 51, 28, 0.045);

    filter: blur(85px);

    pointer-events: none;
}


/* =========================================================
   SECTION HEADING
========================================================= */

.section-heading {
    position: relative;

    max-width: 720px;

    margin: 0 auto 60px;

    padding: 0 20px;

    text-align: center;

    z-index: 5;
}


.section-heading h2 {
    position: relative;

    display: inline-block;

    margin: 0;

    color: #171a21;

    font-size: 42px;

    font-weight: 700;

    line-height: 1.2;

    letter-spacing: -0.7px;
}

/* Heading span */

.section-heading h2 span {
    color: #90331c;
}


/* =========================================================
   TESTIMONIAL SLIDER
========================================================= */

.testimonial-slider {
    position: relative;

    width: 100%;

    margin-bottom: 30px;

    overflow: hidden;

    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 6%,
        black 94%,
        transparent 100%
    );

    mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 6%,
        black 94%,
        transparent 100%
    );
}


/* =========================================================
   TESTIMONIAL TRACK
========================================================= */

.testimonial-track {
    display: flex;

    width: max-content;

    align-items: stretch;

    gap: 30px;

    animation: testimonialMoveLeft 35s linear infinite;

    will-change: transform;
}


/* Reverse slider */

.testimonial-slider.reverse .testimonial-track {
    animation: testimonialMoveRight 35s linear infinite;
}


/* Pause on hover */

.testimonial-slider:hover .testimonial-track {
    animation-play-state: paused;
}


/* =========================================================
   TESTIMONIAL CARD
========================================================= */

.testimonial-card {
    position: relative;

    width: 350px;

    flex: 0 0 350px;

    height: 350px;
    /* min-height: 320px; */
    /* max-height: 285px; */

    padding: 27px 28px;

    margin: 25px 0;

    box-sizing: border-box;

    display: flex;

    flex-direction: column;

    background: #ffffff;

    border: 1px solid #e5e7eb;

    border-radius: 20px;

    overflow: hidden;

    transition:
        transform .4s ease,
        box-shadow .4s ease,
        border-color .4s ease;
}


/* =========================================================
   CARD TOP ACCENT
========================================================= */

.testimonial-card::before {
    content: "";

    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 3px;

    background: #90331c;

    transform: scaleX(0);

    transform-origin: left;

    transition:
        transform .45s ease;
}


.testimonial-card:hover::before {
    transform: scaleX(1);
}


/* =========================================================
   CARD DECORATIVE GLOW
========================================================= */

.testimonial-card::after {
    content: "";

    position: absolute;

    width: 150px;
    height: 150px;

    top: -75px;
    right: -75px;

    border-radius: 50%;

    background: rgba(144, 51, 28, 0.065);

    filter: blur(20px);

    opacity: .8;

    pointer-events: none;

    transition:
        transform .5s ease,
        opacity .5s ease;
}


.testimonial-card:hover::after {
    transform: scale(1.5);

    opacity: 1;
}


/* =========================================================
   CARD HOVER
========================================================= */

.testimonial-card:hover {
    transform: translateY(-9px);

    border-color: rgba(144, 51, 28, 0.25);

    box-shadow:
        0 15px 40px rgba(17, 24, 39, 0.11);
}


/* =========================================================
   QUOTE WRAPPER
========================================================= */

.testimonial-top {
    position: relative;

    z-index: 3;

    flex-shrink: 0;
}


/* =========================================================
   QUOTE ICON
========================================================= */

.quote {
    position: relative;

    width: 46px;
    height: 46px;

    display: flex;

    align-items: center;
    justify-content: center;

    margin-bottom: 16px;

    color: #90331c;

    font-size: 17px;

    background: rgba(144, 51, 28, 0.08);

    border: 1px solid rgba(144, 51, 28, 0.13);

    border-radius: 14px;

    transition:
        transform .35s ease,
        background .35s ease,
        color .35s ease,
        box-shadow .35s ease;
}


.testimonial-card:hover .quote {
    color: #ffffff;

    background: #90331c;

    transform: translateY(-2px) rotate(-4deg);

    box-shadow:
        0 8px 18px rgba(144, 51, 28, 0.22);
}


/* =========================================================
   LARGE DECORATIVE QUOTE
========================================================= */

.quote::after {
    content: "”";

    position: absolute;

    top: -20px;
    right: -260px;

    color: rgba(144, 51, 28, 0.045);

    font-family: Georgia, serif;

    font-size: 155px;

    font-weight: 700;

    line-height: 1;

    pointer-events: none;
}


/* =========================================================
   TESTIMONIAL TEXT
========================================================= */

.testimonial-card p {
    position: relative;

    z-index: 3;

    flex: 0 0 auto;

    margin: 0;

    height: 150px;

    overflow: hidden;

    color: #4b5563;

    font-size: 14px;

    font-weight: 400;

    line-height: 1.75;
}

/* =========================================================
   CLIENT INFORMATION
========================================================= */

.testimonial-bottom {
    position: relative;

    z-index: 5;

    display: flex;

    align-items: center;

    width: 100%;

    margin-top: auto;

    padding-top: 15px;

    gap: 12px;

    border-top: 1px solid #eef0f2;

    transition:
        border-color .35s ease;
}


.testimonial-card:hover .testimonial-bottom {
    border-color: rgba(144, 51, 28, 0.15);
}


/* =========================================================
   CLIENT AVATAR
========================================================= */

.testimonial-avatar {
    position: relative;

    width: 42px;
    height: 42px;

    flex: 0 0 42px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: linear-gradient(
        135deg,
        #90331c,
        #b94a2d
    );

    color: #ffffff;

    font-size: 12px;

    font-weight: 700;

    letter-spacing: .5px;

    box-shadow:
        0 6px 16px rgba(144, 51, 28, 0.18);

    transition:
        transform .35s ease,
        box-shadow .35s ease;
}


/* Avatar outer ring */

.testimonial-avatar::before {
    content: "";

    position: absolute;

    inset: -4px;

    border: 1px solid rgba(144, 51, 28, 0.15);

    border-radius: 50%;

    transition:
        transform .35s ease,
        border-color .35s ease;
}


/* Avatar hover */

.testimonial-card:hover .testimonial-avatar {
    transform: translateY(-3px) scale(1.04);

    box-shadow:
        0 9px 22px rgba(144, 51, 28, 0.25);
}


.testimonial-card:hover .testimonial-avatar::before {
    transform: scale(1.12);

    border-color: rgba(144, 51, 28, 0.30);
}


/* =========================================================
   CLIENT DETAILS
========================================================= */

.testimonial-client {
    min-width: 0;

    display: flex;

    flex-direction: column;

    justify-content: center;

    gap: 3px;
}


.testimonial-client h4 {
    margin: 0;
    color: #20242b;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition:        color .3s ease;
    -webkit-transition:        color .3s ease;
    -moz-transition:        color .3s ease;
    -ms-transition:        color .3s ease;
    -o-transition:        color .3s ease;
}


.testimonial-card:hover .testimonial-client h4 {
    color: #90331c;
}


.testimonial-client span {
    display: block;

    color: #8a9099;

    font-size: 13px;

    font-weight: 500;

    line-height: 1.3;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


/* =========================================================
   VERIFIED ICON
========================================================= */

.client-check {
    margin-left: auto;

    width: 25px;
    height: 25px;

    flex: 0 0 25px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: rgba(144, 51, 28, 0.07);

    color: #90331c;

    font-size: 10px;

    transition:
        transform .35s ease,
        background .35s ease,
        color .35s ease;
}


.testimonial-card:hover .client-check {
    transform: scale(1.08) rotate(8deg);

    background: #90331c;

    color: #ffffff;
}


/* =========================================================
   REMOVE OLD LINE
========================================================= */

.testimonial-line {
    display: none;
}


/* =========================================================
   CONTINUOUS SLIDER ANIMATION
========================================================= */

@keyframes testimonialMoveLeft {

    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-50% - 15px));
    }
}


@keyframes testimonialMoveRight {

    0% {
        transform: translateX(calc(-50% - 15px));
    }

    100% {
        transform: translateX(0);
    }
}


/* =========================================================
   LARGE LAPTOP
========================================================= */

@media (max-width: 1200px) {

    .testimonial-section {
        padding: 80px 0 90px;
    }


    .section-heading {
        margin-bottom: 55px;
    }


    .section-heading h2 {
        font-size: 38px;
    }


    .testimonial-track {
        gap: 26px;
    }


    .testimonial-card {
        width: 330px;

        flex-basis: 330px;

        height: 275px;

        min-height: 275px;
        max-height: 275px;

        padding: 26px 25px;
    }


    .testimonial-card p {
        height: 98px;

        font-size: 13.5px;
    }


    .testimonial-bottom {
        padding-top: 14px;
    }
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 991px) {

    .testimonial-section {
        padding: 75px 0 85px;
    }


    .section-heading {
        padding: 0 20px;

        margin-bottom: 50px;
    }


    .section-heading h2 {
        font-size: 34px;
    }


    .testimonial-track {
        gap: 22px;

        animation-duration: 32s;
    }


    .testimonial-slider.reverse .testimonial-track {
        animation-duration: 32s;
    }


    .testimonial-card {
        width: 315px;

        flex-basis: 315px;

        height: 265px;

        min-height: 265px;
        max-height: 265px;

        padding: 25px 23px;

        border-radius: 19px;
    }


    .quote {
        width: 44px;
        height: 44px;

        margin-bottom: 15px;
    }


    .testimonial-card p {
        height: 94px;

        font-size: 13px;

        line-height: 1.75;
    }


    .testimonial-avatar {
        width: 40px;
        height: 40px;

        flex-basis: 40px;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {

    .testimonial-section {
        padding: 65px 0 75px;
    }


    .section-heading {
        margin-bottom: 42px;
    }


    .section-heading h2 {
        font-size: 29px;

        letter-spacing: -.4px;
    }


    .section-heading h2::after {
        width: 45px;

        margin-top: 12px;
    }


    .testimonial-slider {
        margin-bottom: 22px;

        -webkit-mask-image: linear-gradient(
            to right,
            transparent 0%,
            black 3%,
            black 97%,
            transparent 100%
        );

        mask-image: linear-gradient(
            to right,
            transparent 0%,
            black 3%,
            black 97%,
            transparent 100%
        );
    }


    .testimonial-track {
        gap: 19px;

        animation-duration: 29s;
    }


    .testimonial-slider.reverse .testimonial-track {
        animation-duration: 29s;
    }


    .testimonial-card {
        width: 295px;

        flex-basis: 295px;

        height: 255px;

        min-height: 255px;
        max-height: 255px;

        padding: 23px 21px;

        border-radius: 17px;
    }


    .quote {
        width: 43px;
        height: 43px;

        margin-bottom: 15px;

        font-size: 16px;

        border-radius: 12px;
    }


    .testimonial-card p {
        height: 91px;

        font-size: 13px;

        line-height: 1.7;
    }


    .testimonial-card p::after {
        margin-top: 12px;
    }


    .testimonial-bottom {
        padding-top: 13px;

        gap: 10px;
    }


    .testimonial-avatar {
        width: 38px;
        height: 38px;

        flex-basis: 38px;

        font-size: 11px;
    }


    .testimonial-client h4 {
        font-size: 12px;
    }


    .testimonial-client span {
        font-size: 10px;
    }


    .client-check {
        width: 22px;
        height: 22px;

        flex-basis: 22px;

        font-size: 9px;
    }
}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

    .testimonial-section {
        padding: 55px 0 65px;
    }


    .section-heading {
        padding: 0 15px;

        margin-bottom: 35px;
    }


    .section-heading h2 {
        font-size: 25px;
    }


    .section-heading h2::after {
        width: 38px;

        height: 2px;

        margin-top: 10px;
    }


    .testimonial-slider {
        margin-bottom: 18px;
    }


    .testimonial-track {
        gap: 16px;

        animation-duration: 26s;
    }


    .testimonial-slider.reverse .testimonial-track {
        animation-duration: 26s;
    }


    .testimonial-card {
        width: 280px;

        flex-basis: 280px;

        height: 245px;

        min-height: 245px;
        max-height: 245px;

        padding: 21px 19px;

        border-radius: 15px;
    }


    .quote {
        width: 40px;
        height: 40px;

        margin-bottom: 14px;

        font-size: 15px;
    }


    .testimonial-card p {
        height: 87px;

        font-size: 12.5px;

        line-height: 1.7;
    }


    .testimonial-card p::after {
        width: 28px;

        margin-top: 11px;
    }


    .testimonial-card:hover p::after {
        width: 50px;
    }


    .testimonial-bottom {
        margin-top: auto;

        padding-top: 11px;

        gap: 9px;
    }


    .testimonial-avatar {
        width: 35px;
        height: 35px;

        flex-basis: 35px;

        font-size: 10px;
    }


    .testimonial-avatar::before {
        inset: -3px;
    }


    .testimonial-client {
        gap: 2px;
    }


    .testimonial-client h4 {
        font-size: 11.5px;
    }


    .testimonial-client span {
        font-size: 9.5px;
    }


    .client-check {
        width: 20px;
        height: 20px;

        flex-basis: 20px;

        font-size: 8px;
    }
}


/* =========================================================
   EXTRA SMALL DEVICES
========================================================= */

@media (max-width: 360px) {

    .testimonial-section {
        padding: 50px 0 60px;
    }


    .section-heading h2 {
        font-size: 23px;
    }


    .testimonial-card {
        width: 265px;

        flex-basis: 265px;

        height: 235px;

        min-height: 235px;
        max-height: 235px;

        padding: 20px 17px;
    }


    .testimonial-card p {
        height: 84px;

        font-size: 12px;
    }


    .testimonial-avatar {
        width: 33px;
        height: 33px;

        flex-basis: 33px;
    }


    .testimonial-client h4 {
        font-size: 11px;
    }


    .testimonial-client span {
        font-size: 9px;
    }
}


/* =========================================================
   ACCESSIBILITY / REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .testimonial-track {
        animation: none !important;
    }


    .testimonial-card,
    .testimonial-card::before,
    .testimonial-card::after,
    .quote,
    .testimonial-avatar,
    .testimonial-avatar::before,
    .client-check,
    .testimonial-card p::after,
    .testimonial-client h4 {
        transition: none !important;
    }
}