/* Testimonial Rotator - Slow Infinite Left-to-Right Movement */
.testimonial-rotator {
    padding: 40px 0;
    background: hsl(var(--background));
    overflow: hidden;
}

.testimonial-heading {
    text-align: center;
    margin-bottom: 32px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 2.5rem;
    line-height: 1.1;
    color: hsl(var(--foreground));
}

.testimonial-marquee {
    overflow: hidden;
    width: 100%;
    position: relative;
}

.testimonial-track {
    display: flex;
    align-items: flex-start;
    /* Prevent items from stretching to tallest height */
    animation: scroll-left 60s linear infinite;
    width: max-content;
}

.testimonial-item {
    flex: 0 0 auto;
    white-space: normal;
    margin-right: 80px;
    font-style: italic;
    font-size: 18px;
    line-height: 1.6;
    color: hsl(var(--card-foreground));
    background: hsl(var(--card));
    opacity: 1;
    min-width: 600px;
    max-width: 600px;
    text-align: center;
    font-family: var(--font-body);
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid hsl(var(--border) / 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: auto;
}

/* Pause animation on hover */
.testimonial-marquee:hover .testimonial-track {
    animation-play-state: paused;
}

/* Slow continuous scroll animation */
@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .testimonial-rotator {
        padding: 30px 0;
        overflow: hidden;
        width: 100%;
        max-width: 100vw;
    }

    .testimonial-heading {
        font-size: 2rem;
        margin-bottom: 24px;
    }

    .testimonial-item {
        font-size: 16px;
        margin-right: 40px;
        min-width: 300px;
        max-width: 300px;
        padding: 15px;
    }

    .testimonial-track {
        animation: scroll-left 40s linear infinite;
    }
}

@media (max-width: 480px) {
    .testimonial-item {
        font-size: 14px;
        margin-right: 30px;
        /* Increase width to reduce wrapping height */
        min-width: 75vw;
        max-width: 75vw;
        /* Prevent excessive height */
        max-height: 300px;
        overflow-y: auto;
        padding: 24px;
    }

    .testimonial-track {
        animation: scroll-left 30s linear infinite;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .testimonial-track {
        animation: none;
        transform: translateX(0);
    }
}