/* Base testimonials styles */
.client-testimonials {
    background-color: #fffef3;
    width: 100%;
    padding: var(--section-padding-block, 40px) 0;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.client-testimonials-heading {
    text-align: center;
    margin-bottom: 24px;
    font-size: 16px;
    color: #716f60;
    letter-spacing: 2px;
    /* font-weight: 700; */
}

/* Infinite scroll container */
.infinite-scroll-container {
    position: relative;
    max-width: 100%;
    overflow: hidden;
    /* Gradient mask for fade effect */
    mask-image: linear-gradient(to right, 
        transparent, 
        white 20%, 
        white 80%, 
        transparent
    );
    -webkit-mask-image: linear-gradient(to right, 
        transparent, 
        white 20%, 
        white 80%, 
        transparent
    );
}

/* Infinite scroll track */
.infinite-scroll-track {
    display: flex;
    gap: 20px;
    width: max-content;
    animation: scrollLeft 60s linear infinite;
    padding: 20px 0;
}

/* Pause animation on hover */
.infinite-scroll-container:hover .infinite-scroll-track {
    animation-play-state: paused;
}

/* Testimonial card styles */
.testimonial-card {
    background: #FCFAEB;
    border: 1px solid #e4e4e7;
    border-radius: 16px;
    padding: 24px;
    width: 350px;
    min-width: 350px;
    height: auto;
    min-height: 200px;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.testimonial-quote {
    font-size: 48px;
    color: #e0dfd6;
    position: absolute;
    top: 10px;
    left: 20px;
    font-family: serif;
    line-height: 1;
}

.testimonial-card h4 {
    font-size: 18px;
    font-weight: 600;
    color: #18181b;
    margin: 30px 0 12px 0;
    line-height: 1.4;
}

.testimonial-card p {
    font-size: 14px;
    line-height: 1.6;
    color: #52525b;
    margin-bottom: 20px;
    flex-grow: 1;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: auto;
}

.testimonial-author span:first-child {
    font-size: 14px;
    font-weight: 500;
    color: #71717a;
}

.author-title {
    font-size: 12px;
    color: #a1a1aa;
    font-weight: 400;
}

/* Animation keyframes */
@keyframes scrollLeft {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes scrollRight {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}

/* Speed variations */
.speed-fast {
    animation-duration: 30s !important;
}

.speed-normal {
    animation-duration: 60s !important;
}

.speed-slow {
    animation-duration: 120s !important;
}

.direction-right {
    animation-name: scrollRight;
}

/* Speed control buttons */
.speed-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.speed-btn {
    padding: 8px 16px;
    background-color: transparent;
    border: 1px solid #d7d6cc;
    border-radius: 20px;
    color: #716f60;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.speed-btn:hover {
    background-color: #f0efe6;
    border-color: #ffa163;
}

.speed-btn.active {
    background: linear-gradient(90deg, #ffa163, #fca66f);
    color: #242929;
    border-color: #ffa163;
    box-shadow: 0 2px 8px rgba(255, 161, 99, 0.3);
}
/* Responsive design */
@media (max-width: 768px) {
    .testimonial-card {
        width: 300px;
        min-width: 300px;
        padding: 20px;
    }
    
    .speed-controls {
        margin-top: 20px;
    }
    
    .speed-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .testimonial-card {
        width: 280px;
        min-width: 280px;
    }
    
    .testimonial-card h4 {
        font-size: 16px;
    }
    
    .testimonial-card p {
        font-size: 13px;
    }
}

/* Animation performance optimizations */
.infinite-scroll-track {
    will-change: transform;
    backface-visibility: hidden;
    perspective: 1000px;
}

.testimonial-card {
    will-change: transform;
    backface-visibility: hidden;
}
@media (max-width: 320px) {
  .client-testimonials-heading {
    font-size: 16px;
    margin-bottom: 40px; /* optional: slightly reduced for small screens */
    letter-spacing: 1.5px; /* optional: tighter spacing for readability */
  }
}
