/* ===================================================
   RunEasy — Testimonials Marquee Section
   Infinite smooth scroll, two rows, RunEasy design system
   =================================================== */

/* ---- Section ---- */
.testimonials-section {
  padding: 120px 0 100px;
  background: transparent;
  position: relative;
  overflow: hidden;
}

/* ---- Marquee Animations ---- */
@keyframes marquee-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes marquee-right {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

.testimonials-marquee-left {
  animation: marquee-left 50s linear infinite;
}

.testimonials-marquee-right {
  animation: marquee-right 55s linear infinite;
}

/* Pause on hover */
.testimonials-section:hover .testimonials-marquee-left,
.testimonials-section:hover .testimonials-marquee-right {
  animation-play-state: paused;
}

/* ---- Marquee container with edge fade ---- */
.testimonials-marquee-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.testimonials-marquee-row {
  display: flex;
  width: max-content;
}

.testimonials-marquee-row + .testimonials-marquee-row {
  margin-top: 20px;
}

/* ---- Duplicate group ---- */
.testimonials-group {
  display: flex;
  gap: 20px;
  padding-right: 20px;
}

/* ---- Testimonial Card ---- */
.testimonial-card {
  width: 360px;
  flex-shrink: 0;
  position: relative;
  border-radius: 24px;
  background: rgba(17, 30, 51, 0.55);
  border: 1px solid rgba(240, 242, 248, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  cursor: default;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

/* Top highlight line */
.testimonial-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(0, 212, 255, 0.25), transparent);
  opacity: 0.6;
}

/* Subtle inner grid texture */
.testimonial-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.4;
  pointer-events: none;
  border-radius: inherit;
}

.testimonial-card:hover {
  border-color: rgba(0, 212, 255, 0.2);
  background: rgba(17, 30, 51, 0.7);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.08);
  transform: translateY(-3px);
}

/* ---- Stars ---- */
.testimonial-stars {
  display: flex;
  align-items: center;
  gap: 3px;
  color: #fbbf24;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.4));
}

.testimonial-stars svg {
  width: 16px;
  height: 16px;
}

/* ---- Quote ---- */
.testimonial-quote {
  position: relative;
  z-index: 1;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--white-80, rgba(240, 242, 248, 0.8));
  font-weight: 400;
}

/* ---- Author row ---- */
.testimonial-author {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(240, 242, 248, 0.05);
  margin-top: auto;
}

.testimonial-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Manrope', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cyan, #00d4ff);
  letter-spacing: 0.05em;
  flex-shrink: 0;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.testimonial-avatar-img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(0, 212, 255, 0.15);
  flex-shrink: 0;
  object-fit: cover;
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.08);
}

.testimonial-author-info {
  display: flex;
  flex-direction: column;
}

.testimonial-author-name {
  font-family: 'Manrope', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white, #f0f2f8);
  letter-spacing: 0.01em;
}

.testimonial-author-role {
  font-size: 0.78rem;
  color: rgba(0, 212, 255, 0.55);
  font-weight: 400;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .testimonials-section {
    padding: 80px 0 60px;
  }

  .testimonial-card {
    width: 300px;
    padding: 22px 20px;
  }

  .testimonials-marquee-left {
    animation-duration: 35s;
  }

  .testimonials-marquee-right {
    animation-duration: 40s;
  }
}

@media (max-width: 480px) {
  .testimonial-card {
    width: 280px;
    padding: 20px 16px;
  }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .testimonials-marquee-left,
  .testimonials-marquee-right {
    animation: none;
  }
}
