/* Animated Testimonials Section */
.testimonials-animated-section {
    padding: 80px 0;
    background: var(--black-color);
    overflow: hidden;
    position: relative;
    max-height: 900px;
    /* Optimize for mobile performance */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.testimonials-animated-section .section-title {
    text-align: center;
    margin-bottom: 60px;
}

.testimonials-animated-section .section-title .sub____title {
    margin-bottom: 15px;
}

.testimonials-animated-section .section-title .main____title h1 {
    color: var(--higer-secondary-color);
}

.testimonials-animated-section .section-title .main____title h1 span {
    color: var(--theme-color);
}

.testimonials-columns-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 750px;
}

.testimonials-column {
    flex: 0 0 auto;
    width: 280px;
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
    mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
    /* Hardware acceleration for smooth performance */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
}

.testimonials-track {
    display: flex;
    flex-direction: column;
    gap: 24px;
    animation: scrollUp var(--duration, 40s) linear infinite;
    /* Hardware acceleration and performance optimization */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Only enable hover pause on non-touch devices */
@media (hover: hover) and (pointer: fine) {
    .testimonials-track:hover {
        animation-play-state: paused;
    }
}

.testimonial-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    /* Use transform for better performance */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Only enable hover effects on non-touch devices */
@media (hover: hover) and (pointer: fine) {
    .testimonial-card {
        transition: all 0.3s ease;
    }
    
    .testimonial-card:hover {
        background: #f9f9f9;
        border-color: var(--theme-color);
        transform: translateY(-5px) translateZ(0);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
}

.testimonial-text {
    color: #333333;
    font-size: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
}

.testimonial-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--theme-color);
}

.testimonial-info {
    display: flex;
    flex-direction: column;
}

.testimonial-name {
    color: #1a1a1a;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.3;
}

.testimonial-date {
    color: var(--theme-color);
    font-size: 12px;
    opacity: 0.8;
}

@keyframes scrollUp {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .testimonials-columns-container {
        gap: 18px;
        height: 700px;
    }
    
    .testimonials-column {
        width: 270px;
    }
}

@media (max-width: 991px) {
    .testimonials-animated-section {
        max-height: 900px;
    }
    
    .testimonials-columns-container {
        gap: 16px;
        height: 650px;
    }
    
    .testimonials-column:nth-child(3) {
        display: none;
    }
}

@media (max-width: 767px) {
    .testimonials-animated-section {
        padding: 60px 0;
        max-height: 850px;
    }
    
    .testimonials-columns-container {
        gap: 16px;
        padding: 0 15px;
        height: 580px;
    }
    
    .testimonials-column {
        width: 260px;
        /* Reduce animation complexity on mobile */
        will-change: auto;
    }
    
    .testimonials-column:nth-child(2) {
        display: none;
    }
    
    /* Smoother animations on mobile */
    .testimonials-track {
        animation-duration: 45s !important;
    }
}

@media (max-width: 575px) {
    .testimonials-animated-section {
        max-height: 800px;
    }
    
    .testimonials-columns-container {
        height: 550px;
    }
    
    .testimonials-column {
        width: 100%;
        max-width: 320px;
    }
    
    /* Further optimize for small mobile screens */
    .testimonials-track {
        animation-duration: 50s !important;
    }
}