/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* ─────────────────────────────────────────────────────────────
   Testimonial marquee
   Seamless infinite scroll. The track contains the list of cards
   duplicated once; translating it by -50% lands the second set on
   the starting position, producing a loop with no visible seam.
   ───────────────────────────────────────────────────────────── */
.testimonial-marquee {
  position: relative;
  overflow: hidden;
  /* Soft fade at both edges so cards slide in/out gracefully. */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
}

.testimonial-marquee-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  animation: testimonial-scroll 70s linear infinite;
  will-change: transform;
}

/* Pause on hover or keyboard focus so readers can finish a quote. */
.testimonial-marquee:hover .testimonial-marquee-track,
.testimonial-marquee:focus-within .testimonial-marquee-track {
  animation-play-state: paused;
}

@keyframes testimonial-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Accessibility: users who prefer reduced motion get a wrapped grid
   with no animation and no edge masking. */
@media (prefers-reduced-motion: reduce) {
  .testimonial-marquee {
    -webkit-mask-image: none;
            mask-image: none;
  }
  .testimonial-marquee-track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
  }
  /* Hide the duplicated second set since we're no longer scrolling. */
  .testimonial-marquee-track [data-marquee-clone="true"] {
    display: none;
  }
}

