/* ==========================================================================
   TESTIMONIAL SECTION
   ========================================================================== */

.testimonial-section {
    position: relative;
    padding: 90px 20px;
    background:
        radial-gradient(
            circle at 50% 45%,
            rgba(42, 56, 72, 0.38) 0%,
            rgba(12, 17, 23, 0.15) 45%,
            transparent 75%
        ),
        linear-gradient(
            135deg,
            #090e13 0%,
            #111820 50%,
            #080d12 100%
        );

    color: #fff;
    overflow: hidden;
}


/* Background glow */

.testimonial-section::before {
    content: "";
    position: absolute;

    width: 650px;
    height: 650px;

    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);

    background:
        radial-gradient(
            circle,
            rgba(212, 163, 115, 0.08) 0%,
            transparent 70%
        );

    pointer-events: none;
}


/* ==========================================================================
   CONTAINER
   ========================================================================== */

.testimonial-container {
    position: relative;
    z-index: 2;

    max-width: 1180px;
    margin: 0 auto;
}


/* ==========================================================================
   HEADER
   ========================================================================== */

.testimonial-header {
    text-align: center;
    margin-bottom: 48px;
}


.testimonial-eyebrow {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 14px;

    margin-bottom: 12px;

    color: #dcae63;

    font-size: 0.72rem;
    font-weight: 600;

    letter-spacing: 2.5px;
    text-transform: uppercase;
}


.testimonial-eyebrow::before,
.testimonial-eyebrow::after {
    content: "";

    width: 105px;
    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(210, 164, 94, 0.75)
        );
}


.testimonial-eyebrow::after {
    background:
        linear-gradient(
            90deg,
            rgba(210, 164, 94, 0.75),
            transparent
        );
}


.testimonial-title {
    margin: 0;

    color: #f4f1eb;

    font-family: Georgia, "Times New Roman", serif;

    font-size: 2.35rem;
    font-weight: 400;

    line-height: 1.2;
}


/* ==========================================================================
   SLIDER
   ========================================================================== */

.testimonial-slider {
    position: relative;

    width: 100%;

    display: flex;
    align-items: center;
}


/*
 * IMPORTANT:
 * Do NOT use CSS grid here.
 *
 * All cards stay in one horizontal track.
 */

.testimonial-track {
    position: relative;

    width: 100%;
    height: 275px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: visible;
}


/* ==========================================================================
   TESTIMONIAL CARDS
   ========================================================================== */

.testimonial-card {
    position: absolute;

    top: 50%;
    left: 50%;

    width: 31%;
    min-height: 220px;

    padding: 28px 25px 24px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    background:
        linear-gradient(
            145deg,
            rgba(30, 38, 47, 0.90),
            rgba(20, 27, 35, 0.96)
        );

    border: 1px solid rgba(255, 255, 255, 0.035);

    border-radius: 10px;

    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.28);

    opacity: 0;

    transform:
        translate(-50%, -50%)
        scale(0.88);

    transition:
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.45s ease,
        border-color 0.45s ease,
        box-shadow 0.45s ease,
        filter 0.45s ease;

    pointer-events: none;
}


/* ==========================================================================
   LEFT CARD
   ========================================================================== */

.testimonial-card.position-left {
    opacity: 0.68;

    transform:
        translate(
            calc(-50% - 390px),
            -50%
        )
        scale(0.92);

    z-index: 1;

    pointer-events: auto;

    filter: brightness(0.82);
}


/* ==========================================================================
   CENTER CARD
   ========================================================================== */

.testimonial-card.position-center {
    opacity: 1;

    transform:
        translate(-50%, -50%)
        scale(1);

    z-index: 5;

    pointer-events: auto;

    background:
        linear-gradient(
            145deg,
            rgba(35, 44, 54, 0.98),
            rgba(25, 33, 42, 0.98)
        );

    border-color:
        rgba(211, 163, 88, 0.65);

    box-shadow:
        0 22px 50px rgba(0, 0, 0, 0.45),
        0 0 30px rgba(211, 163, 88, 0.08);

    filter: none;
}


/* ==========================================================================
   RIGHT CARD
   ========================================================================== */

.testimonial-card.position-right {
    opacity: 0.68;

    transform:
        translate(
            calc(-50% + 390px),
            -50%
        )
        scale(0.92);

    z-index: 1;

    pointer-events: auto;

    filter: brightness(0.82);
}


/* ==========================================================================
   HIDDEN CARDS
   ========================================================================== */

.testimonial-card.position-hidden {
    opacity: 0;

    transform:
        translate(-50%, -50%)
        scale(0.75);

    z-index: 0;

    pointer-events: none;
}


/* ==========================================================================
   QUOTE
   ========================================================================== */

.testimonial-quote {
    position: absolute;

    top: -19px;
    left: 50%;

    transform: translateX(-50%);

    color: #e1ab59;

    font-family: Georgia, "Times New Roman", serif;

    font-size: 62px;
    font-weight: bold;

    line-height: 1;

    text-shadow:
        0 3px 12px rgba(0, 0, 0, 0.35);
}


/* ==========================================================================
   STARS
   ========================================================================== */

.testimonial-stars {
    margin-top: 10px;
    margin-bottom: 15px;

    text-align: center;

    color: #e2ad58;

    font-size: 15px;

    letter-spacing: 2px;

    line-height: 1;
}


/* ==========================================================================
   TEXT
   ========================================================================== */

.testimonial-text {
    max-width: 285px;

    margin: 0 auto 22px;

    color: rgba(255, 255, 255, 0.88);

    font-size: 0.88rem;

    line-height: 1.65;

    text-align: center;
}


/* ==========================================================================
   CLIENT
   ========================================================================== */

.testimonial-client {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 12px;
}


.testimonial-avatar {
    width: 46px;
    height: 46px;

    flex: 0 0 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background:
        linear-gradient(
            145deg,
            #52606c,
            #202b35
        );

    border: 2px solid rgba(255, 255, 255, 0.18);

    color: #fff;

    font-family: Georgia, serif;

    font-size: 17px;

    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.35);
}


.testimonial-client-info {
    display: flex;

    flex-direction: column;

    gap: 3px;

    text-align: left;
}


.testimonial-client-info strong {
    color: #fff;

    font-size: 0.9rem;

    font-weight: 600;
}


.testimonial-client-info span {
    color: rgba(255, 255, 255, 0.58);

    font-size: 0.75rem;
}


/* ==========================================================================
   ARROWS
   ========================================================================== */

.testimonial-arrow {
    position: absolute;

    top: 50%;

    z-index: 20;

    width: 34px;
    height: 34px;

    margin: 0;
    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(211, 163, 88, 0.6);

    border-radius: 50%;

    background: rgba(8, 13, 18, 0.8);

    color: #dcae63;

    cursor: pointer;

    transform: translateY(-50%);

    transition:
        background 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease,
        border-color 0.25s ease;
}


.testimonial-arrow span {
    position: relative;

    top: -1px;

    font-size: 24px;

    line-height: 1;
}


.testimonial-prev {
    left: 0;
}


.testimonial-next {
    right: 0;
}


.testimonial-arrow:hover {
    background: #dcae63;

    color: #111820;

    border-color: #dcae63;

    transform:
        translateY(-50%)
        scale(1.08);
}


/* ==========================================================================
   DOTS
   ========================================================================== */

.testimonial-dots {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    margin-top: 30px;
}


.testimonial-dot {
    width: 8px;
    height: 8px;

    padding: 0;

    border: 0;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.2);

    cursor: pointer;

    transition:
        width 0.3s ease,
        height 0.3s ease,
        background 0.3s ease;
}


.testimonial-dot.is-active {
    width: 9px;
    height: 9px;

    background: #e2ad58;
}


/* ==========================================================================
   TABLET
   ========================================================================== */

@media (max-width: 1050px) {

    .testimonial-card {
        width: 32%;
    }

    .testimonial-card.position-left {
        transform:
            translate(
                calc(-50% - 310px),
                -50%
            )
            scale(0.90);
    }

    .testimonial-card.position-right {
        transform:
            translate(
                calc(-50% + 310px),
                -50%
            )
            scale(0.90);
    }

}


/* ==========================================================================
   MOBILE
   ========================================================================== */

@media (max-width: 700px) {

    .testimonial-section {
        padding: 70px 20px;
    }


    .testimonial-title {
        font-size: 1.85rem;
    }


    .testimonial-eyebrow::before,
    .testimonial-eyebrow::after {
        width: 45px;
    }


    .testimonial-track {
        height: 300px;
    }


    /*
     * Mobile displays only one card.
     */

    .testimonial-card {
        width: calc(100% - 70px);

        min-height: 245px;
    }


    .testimonial-card.position-center {
        transform:
            translate(-50%, -50%)
            scale(1);
    }


    .testimonial-card.position-left,
    .testimonial-card.position-right {
        opacity: 0;

        transform:
            translate(-50%, -50%)
            scale(0.85);

        pointer-events: none;
    }


    .testimonial-prev {
        left: 0;
    }


    .testimonial-next {
        right: 0;
    }

}


/* ==========================================================================
   SMALL MOBILE
   ========================================================================== */

@media (max-width: 480px) {

    .testimonial-title {
        font-size: 1.55rem;
    }


    .testimonial-eyebrow {
        font-size: 0.65rem;

        letter-spacing: 1.5px;

        gap: 8px;
    }


    .testimonial-eyebrow::before,
    .testimonial-eyebrow::after {
        width: 25px;
    }


    .testimonial-card {
        width: calc(100% - 55px);

        padding: 28px 18px 22px;
    }


    .testimonial-text {
        font-size: 0.82rem;
    }

}


/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

    .testimonial-card,
    .testimonial-arrow,
    .testimonial-dot {
        transition: none;
    }

}

/* ==========================================================================
   TESTIMONIAL ANIMATIONS
   ========================================================================== */

/*
 * Initial state before the section enters the viewport.
 */

.testimonial-header,
.testimonial-slider,
.testimonial-dots {
    opacity: 0;

    transform: translateY(35px);

    transition:
        opacity 0.8s ease,
        transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}


/*
 * Section becomes visible.
 */

.testimonial-section.is-visible .testimonial-header {
    opacity: 1;

    transform: translateY(0);
}


.testimonial-section.is-visible .testimonial-slider {
    opacity: 1;

    transform: translateY(0);

    transition-delay: 0.15s;
}


.testimonial-section.is-visible .testimonial-dots {
    opacity: 1;

    transform: translateY(0);

    transition-delay: 0.3s;
}


/* ==========================================================================
   CARD SLIDE ANIMATION
   ========================================================================== */

.testimonial-card {
    will-change: transform, opacity;
}


/*
 * Slightly more dynamic transition when changing cards.
 */

.testimonial-card.position-left,
.testimonial-card.position-center,
.testimonial-card.position-right,
.testimonial-card.position-hidden {
    transition:
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.45s ease,
        filter 0.45s ease,
        box-shadow 0.45s ease,
        border-color 0.45s ease;
}


/* ==========================================================================
   DRAG CURSOR
   ========================================================================== */

.testimonial-track {
    cursor: grab;

    user-select: none;

    -webkit-user-select: none;

    touch-action: pan-y;
}


.testimonial-track.is-dragging {
    cursor: grabbing;
}


/*
 * Prevent images/text from being selected while dragging.
 */

.testimonial-track.is-dragging .testimonial-card {
    user-select: none;

    -webkit-user-select: none;
}


/* ==========================================================================
   SLIDE DIRECTION
   ========================================================================== */

.testimonial-track.slide-next .testimonial-card {
    transition:
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.45s ease,
        filter 0.45s ease;
}


.testimonial-track.slide-prev .testimonial-card {
    transition:
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.45s ease,
        filter 0.45s ease;
}


/* ==========================================================================
   MOBILE TOUCH
   ========================================================================== */

@media (max-width: 700px) {

    .testimonial-track {
        cursor: grab;

        touch-action: pan-y;
    }

    .testimonial-track.is-dragging {
        cursor: grabbing;
    }

}


/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

    .testimonial-header,
    .testimonial-slider,
    .testimonial-dots {
        opacity: 1;

        transform: none;

        transition: none;
    }

    .testimonial-card {
        transition: none !important;
    }

}