/* ========= TESTIMONIALS SECTION ========= */

.testimonials-custom-section {
    min-height: 80vh;
    padding: clamp(60px, 10vw, 100px) 0;
    position: relative;
    background-color: var(--bg-white);
    overflow: hidden;
}

.testimonials-custom-section .container-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: clamp(40px, 6vw, 80px);
    position: relative;
}

/* ========= LEFT SIDE (QUOTE CARD) ========= */

.testimonial-card {
    flex: 1.2;
    background: white;
    padding: clamp(25px, 5vw, 40px);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-medium);
    position: relative;
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.testimonial-card.active {
    opacity: 1;
    transform: translateX(0);
}

.quote-icon {
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 30px;
    color: var(--primary-color);
    opacity: 0.2;
}

.testimonial-text {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    line-height: 1.6;
    color: var(--text-sub);
    margin-bottom: 20px;
    transition: opacity .4s ease;
    text-align: right;
}

.testimonial-name {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.1rem;
    text-align: right;
}

/* ========= RIGHT SIDE ========= */

.testimonials-right {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
    --circle-radius: min(190px, 35vw);
    --avatar-size: clamp(50px, 8vw, 75px);
}

.testimonials-custom-section .title {
    text-align: center;
    position: absolute;
    top: 40%;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: var(--primary-color);
    font-weight: 800;
    margin-bottom: 40px;
    width: 100%;
    z-index: 10;
}

/* Circle Layout */
.circle-wrapper {
    position: relative;
    width: calc(var(--circle-radius) * 2);
    height: calc(var(--circle-radius) * 2);
    border: 2px dashed rgba(100, 72, 159, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: rotateTestimonial 60s linear infinite;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.circle-wrapper:hover {
    animation-play-state: paused;
}

@keyframes rotateTestimonial {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Avatar - Fixed position relative to circle */
.avatar-item {
    position: absolute;
    width: var(--avatar-size);
    height: var(--avatar-size);
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 3px solid transparent;
    animation: counterRotateTestimonial 60s linear infinite;
    animation-play-state: inherit;
    z-index: 2;
    --x: calc(cos(var(--angle)) * var(--circle-radius));
    --y: calc(sin(var(--angle)) * var(--circle-radius));
    left: calc(50% + var(--x));
    top: calc(50% + var(--y));
    transform: translate(-50%, -50%);
}

@keyframes counterRotateTestimonial {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(-360deg);
    }
}

.avatar-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.avatar-item.active {
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(100, 72, 159, 0.2);
    z-index: 5;
    transform: translate(-50%, -50%) scale(1.15);
}

/* Responsive */
@media (max-width: 992px) {
    .testimonials-custom-section {
        min-height: auto;
        padding: 60px 0;
    }

    .testimonials-custom-section .container-flex {
        flex-direction: column;
        gap: 40px;
    }

    .testimonial-card {
        width: 100%;
        max-width: 550px;
        order: 2;
        transform: translateY(30px) translateX(0);
        margin: 0 auto;
    }

    .testimonial-card.active {
        transform: translateY(0) translateX(0);
    }

    .testimonials-right {
        order: 1;
        width: 100%;
        padding: 0;
        --circle-radius: min(140px, 35vw);
    }

    .testimonial-text,
    .testimonial-name {
        text-align: center;
    }

    .quote-icon {
        left: 50%;
        transform: translateX(-50%);
        top: -10px;
    }
}

@media (max-width: 480px) {
    .testimonials-custom-section {
        padding: 40px 0;
    }

    .testimonials-right {
        --circle-radius: min(105px, 32vw);
        --avatar-size: 48px;
    }

    .testimonials-custom-section .title {
        margin-bottom: 20px;
        font-size: 1.8rem;
    }

    .testimonial-card {
        padding: 30px 20px 20px;
        border-radius: 24px;
    }

    .testimonial-text {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
}