/* ============================================
   Testimonials Section - Carousel
   ============================================ */

.testimonials-section {
    padding: 80px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.testimonials-section .section-header {
    text-align: center;
    margin-bottom: 40px;
}

.testimonials-section h2 {
    font-size: 32px;
    color: #2d3748;
    margin-bottom: 8px;
}

.testimonials-section p {
    color: #718096;
    font-size: 16px;
}

/* Wrapper to center and constrain width */
.testimonials-carousel-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    position: relative; /* for nav buttons */
}

/* Horizontal carousel using scroll snap */
.testimonials-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 10px 5px 20px 5px;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Hide ugly scrollbar but keep scrollable */
.testimonials-carousel::-webkit-scrollbar {
    height: 6px;
}
.testimonials-carousel::-webkit-scrollbar-track {
    background: transparent;
}
.testimonials-carousel::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.7);
    border-radius: 999px;
}

/* Individual slides */
.testimonial-slide {
    scroll-snap-align: start;
    flex: 0 0 calc((100% - 40px) / 3); /* 3 cards minus gaps on desktop */
    background: #ffffff;
    border-radius: 12px;
    padding: 24px 20px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 210px;
}

/* Rating (stars) */
.testimonial-rating {
    color: #f6ad55;
    font-size: 18px;
    margin-bottom: 10px;
}

/* Review text */
.testimonial-text {
    font-size: 15px;
    line-height: 1.6;
    color: #4a5568;
    margin-bottom: 16px;
    flex-grow: 1;
}

/* Footer with name + avatar */
.testimonial-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.testimonial-avatar-placeholder {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
}

.testimonial-meta {
    display: flex;
    flex-direction: column;
}

.testimonial-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

.testimonial-date {
    font-size: 12px;
    color: #a0aec0;
}

/* Scroll hint text */
.testimonial-scroll-hint {
    text-align: right;
    margin-top: 8px;
    font-size: 12px;
    color: #a0aec0;
}

/* ============================================
   Responsive
   ============================================ */

/* Tablets: 2 cards visible */
@media (max-width: 1024px) {
    .testimonial-slide {
        flex: 0 0 calc((100% - 20px) / 2); /* 2 cards with one gap */
    }
}

/* Mobile: 1 card visible */
@media (max-width: 640px) {
    .testimonials-section {
        padding: 60px 15px;
    }

    .testimonials-section h2 {
        font-size: 24px;
    }

    .testimonial-slide {
        flex: 0 0 100%; /* full width per slide */
        padding: 20px 18px;
    }

    .testimonials-carousel {
        gap: 16px;
    }

    .testimonial-text {
        font-size: 14px;
    }
}

.testimonial-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #4a5568;
    font-size: 24px;
    font-weight: 600;
    z-index: 2;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.testimonial-nav-btn:hover {
    background: #667eea;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
    transform: translateY(-50%) scale(1.03);
}

.testimonial-nav-prev {
    left: -18px;
}

.testimonial-nav-next {
    right: -18px;
}

/* Hide buttons on small screens */
@media (max-width: 1024px) {
    .testimonial-nav-btn {
        display: none;
    }
}
