.reviews {
    width: 100%;
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
    padding: 110px 0 110px;
    overflow: hidden;
    /* Important to hide overflowing edges */
    background-color: var(--bg-light);
}

/* --- SCROLLER CONTAINERS --- */
.scroller-wrapper {
    width: 100%;
    max-width: fit-content;
    margin: 0 auto 50px;
    position: relative;
    overflow: hidden;
}

.track {
    display: flex;
    width: calc(340px * 10);
    /* Width of Card * Total Items count */
    animation-duration: 25s;
    /* Speed of scroll */
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

/* Pause on hover for better UX */
.track:hover {
    animation-play-state: paused;
}

/* --- CARD DESIGN --- */
.card {
    width: 320px;
    height: 280px;
    background: #fff;
    border: 1px solid #f0f0f0;
    /* Very subtle border */
    border-radius: 16px;
    padding: 30px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin: 0 10px;
    /* Spacing between cards */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    /* Soft shadow */
    flex-shrink: 0;
    /* Prevents squishing */
}

.quote-icon {
    width: 30px;
    height: 30px;
    opacity: 0.4;
    margin-bottom: 5px;
    align-self: center;
}

.review-text {
    color: #333;
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 400;
    margin-top: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.user-img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    background: #eee;
}

.details {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #111;
}

.role {
    font-size: 0.75rem;
    color: #888;
}


/* --- ANIMATIONS (THE MAGIC PART) --- */

/* 1. TOP TRACK: Moves Left (Standard) */
@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-320px * 5));
    }

    /* -5 Cards width */
}

/* 2. BOTTOM TRACK: Moves Right (Reverse) */
@keyframes scroll-right {
    0% {
        transform: translateX(calc(-320px * 5));
    }

    /* Start shifted left */
    100% {
        transform: translateX(0);
    }

    /* Move to 0 */
}

/* Applying animations */
.track.left-scroll {
    animation-name: scroll-left;
}

.track.right-scroll {
    animation-name: scroll-right;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    h2.main-title {
        font-size: 1.8rem;
        line-height: 40px;  
    }

    .card {
        width: 280px;
        height: auto;
    }

    .track {
        width: calc(280px * 10);
    }

    @keyframes scroll-left {
        0% {
            transform: translateX(0);
        }

        100% {
            transform: translateX(calc(-280px * 5));
        }
    }

    @keyframes scroll-right {
        0% {
            transform: translateX(calc(-280px * 5));
        }

        100% {
            transform: translateX(0);
        }
    }
}