/* Testimonial Carousel Padding Fix
   This CSS file contains the fixes needed to make edge cards visible
   in the testimonial carousel while maintaining proper scrolling behavior
   and preventing horizontal scrollbars.
*/

/* Testimonials section with side padding */
.testimonials-section {
    padding: clamp(2rem, 5vw, 5rem) clamp(1rem, 5vw, 140px);
    background-color: #ffffff;
    position: relative;
}

/* Carousel container - clips the animation at its boundaries */
.testimonials-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* Ensure the track and cards work properly with the new layout */
.testimonials-track {
    display: flex;
    gap: 2rem;
    animation: scroll 60s linear infinite;
    /* Ensure smooth rendering */
    will-change: transform;
}

/* Responsive adjustments for tablet (1023px and below) */
@media (max-width: 1023px) {
    .testimonials-section {
        padding: 4rem 40px;
    }

    .testimonial-card {
        flex: 0 0 290px;
        height: 420px;
    }
}

/* Responsive adjustments for mobile (767px and below) */
@media (max-width: 767.98px) {
    .testimonials-section {
        padding: 2.5rem 16px;
    }

    .testimonials-carousel {
        padding: 1rem 0;
    }

    /* Adjust card size for mobile */
    .testimonial-card {
        flex: 0 0 clamp(260px, 75vw, 300px);
        padding: 1.5rem;
        height: auto;
        min-height: 350px;
    }

    .testimonials-track {
        gap: 1rem;
    }
}

/* Very small screens */
@media (max-width: 479px) {
    .testimonials-section {
        padding: 2rem 12px;
    }

    .testimonial-card {
        flex: 0 0 calc(100vw - 48px);
        max-width: 300px;
        min-height: 320px;
    }
}

/* Additional safety measures to prevent horizontal scroll */
html {
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    position: relative;
}

/* Ensure content wrapper doesn't cause overflow */
.content-wrapper {
    overflow-x: hidden;
    position: relative;
}

/* No fade - clean hard cut */
.testimonials-carousel::before,
.testimonials-carousel::after {
    display: none;
}

/* Keep animation running on hover */
.testimonials-track:hover {
    animation-play-state: running;
}

/* Performance optimizations */
.testimonial-card {
    /* Ensure smooth animations */
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Debug helpers (remove in production) */
.debug-testimonials .testimonials-section {
    border: 2px solid blue;
}

.debug-testimonials .testimonials-carousel {
    border: 2px solid green;
}

.debug-testimonials .testimonial-card {
    border: 1px solid red;
}