/* ==========================================================================
   Testimonials Section Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   Section Container
   -------------------------------------------------------------------------- */

.testimonials-section {
  background-color: var(--color-white);
  padding-top: var(--space-20);
  padding-bottom: var(--space-20);
  text-align: center;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Section Header
   -------------------------------------------------------------------------- */

.testimonials-section .section-title {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--color-dark);
  margin-bottom: var(--space-4);
}

.testimonials-section .section-subtitle {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--color-gray-500);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-12);
}

/* --------------------------------------------------------------------------
   Testimonials Wrapper (Fade Effect)
   -------------------------------------------------------------------------- */

.testimonials-wrapper {
  width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

/* --------------------------------------------------------------------------
   Testimonials Track (Animated Scroll)
   -------------------------------------------------------------------------- */

.testimonials-track {
  display: flex;
  gap: var(--space-6);
  width: max-content;
  padding: var(--space-4) 0;
  animation: scroll-testimonials 40s linear infinite;
}

/* Keyframes for infinite scroll */
@keyframes scroll-testimonials {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Pause on hover */
.testimonials-section:hover .testimonials-track {
  animation-play-state: paused;
}

/* --------------------------------------------------------------------------
   Testimonial Card
   -------------------------------------------------------------------------- */

.testimonial-card {
  flex: 0 0 350px;
  min-width: 350px;
  background-color: var(--color-white);
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  text-align: left;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.testimonial-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   Star Rating
   -------------------------------------------------------------------------- */

.testimonial-card .stars {
  font-size: var(--text-lg);
  color: #fbbf24;
  margin-bottom: var(--space-4);
  letter-spacing: 0.1em;
}

/* --------------------------------------------------------------------------
   Quote Text
   -------------------------------------------------------------------------- */

.testimonial-card p {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-gray-600);
}

/* --------------------------------------------------------------------------
   Responsive - Tablet Breakpoint (1024px)
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .testimonials-section {
    padding-top: var(--space-16);
    padding-bottom: var(--space-16);
  }

  .testimonials-section .section-title {
    font-size: var(--text-4xl);
  }

  .testimonials-section .section-subtitle {
    font-size: var(--text-base);
    margin-bottom: var(--space-10);
  }

  .testimonial-card {
    flex: 0 0 320px;
    min-width: 320px;
  }
}

/* --------------------------------------------------------------------------
   Responsive - Mobile Breakpoint (768px)
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
  .testimonials-section {
    padding-top: var(--space-12);
    padding-bottom: var(--space-12);
  }

  .testimonials-section .section-title {
    font-size: var(--text-3xl);
  }

  .testimonials-section .section-subtitle {
    font-size: var(--text-sm);
    margin-bottom: var(--space-8);
  }

  .testimonials-track {
    gap: var(--space-4);
    padding: var(--space-3) 0;
    animation-duration: 30s;
  }

  .testimonial-card {
    flex: 0 0 280px;
    min-width: 280px;
    padding: var(--space-5);
  }

  .testimonial-card .stars {
    font-size: var(--text-base);
    margin-bottom: var(--space-3);
  }

  .testimonial-card p {
    font-size: var(--text-sm);
  }
}

/* --------------------------------------------------------------------------
   Responsive - Small Mobile (480px)
   -------------------------------------------------------------------------- */

@media (max-width: 480px) {
  .testimonial-card {
    flex: 0 0 260px;
    min-width: 260px;
    padding: var(--space-4);
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .testimonials-track {
    animation: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .testimonials-track::-webkit-scrollbar {
    display: none;
  }

  .testimonial-card {
    scroll-snap-align: start;
  }
}
