/* 成功案例 */
.testimonials {
    margin: 0 auto;
    padding: 80px 24px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    background: var(--white);
}
/* testimonials-header */
.testimonials-header {
    text-align: center;
}

.testimonials-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
}

/* carousel new--container */
.testimonials-carousel {
    padding: 24px 48px;
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(960px, 1fr);
    gap: 2rem;
    overflow-x: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    anchor-name: --carousel;
    position: relative;
    cursor: grab;
    user-select: none;
    touch-action: pan-y;
    
    >li {
        scroll-snap-align: center;
    }
}

.testimonials-carousel:active {
    cursor: grabbing;
    scroll-behavior: auto;
}

/* Remove scroll button styles */
/* arrow button style*/
.testimonials-carousel::scroll-button(right),
.testimonials-carousel::scroll-button(left) {
    display: none;
}

/* Dot navigation */
.testimonials-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.testimonials-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #E0E0E0;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: none;
    padding: 0;
}

.testimonials-dot.active {
    background-color: var(--primary-color);
    transform: none;
}

/* card */
.testimonials-card {
    background-color: white;
    border-radius: 16px;
    align-items: center;
    gap: 36px;
    width: 100%;
    height: auto;
    min-height: 264px;
    padding: 24px;
    display: flex;
    box-shadow: 0px 4px 6px 0px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.testimonials-card:hover {
    transform: translateY(-5px);
}

.card-content {
    flex-direction: column;
    width: 50%;
    align-items: flex-start;
}

.card-text {
    font-size: 1.125rem;
    color: var(--text-light);
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 2rem;
}

.card-text-name {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 400;
    line-height: 1.4;
}

.card-logo img {
    height: 40px;
    width: auto;
    margin-bottom: 2rem;
}

.card-image img {
    border-radius: 5px;
    flex-direction: column;
    flex: 1 0 0;
    width: 100%;
    height: auto;
    max-width: 400px;
    aspect-ratio: 441.82/216.00;
    object-fit: cover;
}

/* Desktop (1024px and above) */
@media (max-width: 1025px) {
    .testimonials {
        padding: 80px 40px;
    }
    
    .testimonials-carousel {
        grid-auto-columns: minmax(800px, 1fr);
        padding: 24px 40px;
    }

    .testimonials-card {
        width: 100%;
    }
}

/* Large screens (1400px and below) */
@media (max-width: 1400px) {
    .testimonials-carousel {
        grid-auto-columns: minmax(700px, 1fr);
    }
}

/* Tablet (768px to 1023px) */
@media (max-width: 880px){
    .testimonials {
        padding: 60px 40px;
    }
    
    .testimonials-carousel {
        grid-auto-columns: minmax(600px, 1fr);
        padding: 24px 40px;
    }
    
    .testimonials-card {
        flex-direction: column;
        gap: 24px;
        min-height: auto;
    }
    
    .card-content {
        width: 100%;
    }
    
    .card-image img {
        width: 100%;
        max-width: 100%;
    }
}

/* Mobile (below 768px) */
@media (max-width: 767px) {
    .testimonials {
        padding: 40px 16px;
    }
    
    .testimonials-title {
        font-size: 2rem;
    }
    
    .testimonials-carousel {
        padding: 24px 16px;
        grid-auto-columns: minmax(300px, 1fr);
        gap: 1rem;
    }
    
    .testimonials-card {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
        min-height: auto;
    }
    
    .card-content {
        width: 100%;
    }
    
    .card-image img {
        max-width: 100%;
        height: 200px;
    }
    
    .testimonials-dot {
        width: 8px;
        height: 8px;
    }
}