/* Container for breathing room */
#testimonials .container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 20px; /* Vertical spacing for the whole section */
}

#testimonials {
    min-height: auto !important;
    padding: 60px 0;
    background-color: #fcfcfc;
}

.testimonial-grid {
    display: grid;
    /* Reduced min-width to allow 3 columns on most screens */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px; /* Tighter gap */
}

.testimonial-card {
    background: #ffffff;
    padding: 25px; /* Slightly reduced padding */
    border-radius: 10px;
    border: 1px solid #eee;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.quote {
    font-size: 0.95rem; /* Slightly smaller text for better fit */
    line-height: 1.6;
    color: #444;
    margin-bottom: 20px;
    flex-grow: 1;
}

.stars {
    color: var(--brand-gold);
    margin-bottom: 15px;
    font-size: 1rem; /* Smaller stars to match text */
}

.client-info {
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
    font-size: 0.85rem; /* Compact name tag */
}

.section-title {
    text-align: center;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    /* 1. Target the correct class: .testimonial-grid (singular) */
    .testimonial-grid {
        display: flex !important;           /* Kill the grid logic */
        flex-direction: row !important;      /* Side-by-side */
        flex-wrap: nowrap !important;        /* No stacking */

        overflow-x: auto !important;         /* Enable swipe */
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch;

        gap: 20px !important;
        padding: 20px !important;
        margin: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        scrollbar-width: none;               /* Hide scrollbar */
    }

    .testimonial-grid::-webkit-scrollbar {
        display: none;
    }

    /* 2. Fix the Card widths */
    .testimonial-card {
        flex: 0 0 85% !important;            /* 85% width creates the 'peek' */
        min-width: 85% !important;
        max-width: 85% !important;
        scroll-snap-align: center !important;

        /* Ensure cards don't stretch vertically to weird heights */
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
    }

    /* 3. Small fix for the container to prevent clipping */
    #testimonials .container {
        padding: 0 !important;
        max-width: 100% !important;
        overflow: hidden;
    }
}