/* lib/styles/sections/testimonials_section.css */

.testimonials-section {
  padding: var(--spacing-xl, 64px) 0;
}

.testimonials-section__header {
  text-align: center;
  margin-bottom: var(--spacing-xl, 48px);
  max-width: 800px;
  margin-inline: auto;
}

.testimonials-section__title {
  font-family: var(--font-heading, 'Inter', sans-serif);
  font-size: 36px;
  font-weight: 700;
  color: var(--color-trust-navy, #0F294A);
  line-height: 1.2;
  margin: 0;
}

@media (max-width: 768px) {
  .testimonials-section__header {
    margin-bottom: var(--spacing-lg, 32px);
  }
  
  .testimonials-section__title {
    font-size: 28px;
  }
}

/* =========================================================================
   Choreographed Load Sequence (ScrollReveal Integration)
   ========================================================================= */

@media (prefers-reduced-motion: no-preference) {
  /* Set initial hidden states */
  .testimonials-section__header,
  .testimonials-section__grid-wrapper > div > * {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--motion-duration-medium, 400ms) var(--motion-ease-out, ease-out),
                transform var(--motion-duration-medium, 400ms) var(--motion-ease-out, ease-out);
  }

  /* Reveal sequence when ScrollAnimationWrapper attaches .is-visible */
  .is-visible .testimonials-section__header {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.1s;
  }

  /* Stagger the testimonial cards */
  .is-visible .testimonials-section__grid-wrapper > div > * {
    opacity: 1;
    transform: translateY(0);
  }

  .is-visible .testimonials-section__grid-wrapper > div > :nth-child(1) { transition-delay: 0.25s; }
  .is-visible .testimonials-section__grid-wrapper > div > :nth-child(2) { transition-delay: 0.4s; }
  .is-visible .testimonials-section__grid-wrapper > div > :nth-child(3) { transition-delay: 0.55s; }
  .is-visible .testimonials-section__grid-wrapper > div > :nth-child(n+4) { transition-delay: 0.7s; } /* Fallback */
}