/* TESTIMONIALS SECTION */
.testimonials-section {
  background-color: var(--color-bg);
  padding-block: 70px 80px;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .testimonials-section {
    padding-block: 100px 120px;
  }
}

.testimonials-section__header {
  text-align: center;
  padding-inline: 20px;
  margin-bottom: 32px;
}
@media (min-width: 1024px) {
  .testimonials-section__header {
    margin-bottom: 48px;
  }
}

.testimonials-section__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.15;
  margin: 0;
}

/* MARQUEE OUTER (Faders) */
.testimonials-marquee-outer {
  position: relative;
  width: 100%;
}

.testimonials-marquee-outer::before,
.testimonials-marquee-outer::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 6%;
  z-index: 2;
  pointer-events: none;
}

@media (min-width: 1024px) {
  .testimonials-marquee-outer::before,
  .testimonials-marquee-outer::after {
    width: 8%;
  }
}

.testimonials-marquee-outer::before {
  left: 0;
  background: linear-gradient(to right, var(--color-bg) 0%, rgba(251, 248, 243, 0) 100%);
}
.testimonials-marquee-outer::after {
  right: 0;
  background: linear-gradient(to left, var(--color-bg) 0%, rgba(251, 248, 243, 0) 100%);
}

/* MARQUEE WRAPPER */
.testimonials-marquee-wrapper {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  user-select: none;
  scrollbar-width: none;
}
.testimonials-marquee-wrapper::-webkit-scrollbar {
  display: none;
}

@media (min-width: 1024px) {
  .testimonials-marquee-wrapper {
    gap: 20px;
    overflow-x: hidden; /* Hide scrollbar on desktop if they use mouse, but we allow JS to scroll */
  }
}

/* MARQUEE GROUP */
.testimonials-marquee-group {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
  min-width: 100%;
}

@media (min-width: 1024px) {
  .testimonials-marquee-group {
    gap: 20px;
  }
}

/* CARD */
.testimonial-card {
  width: 85vw;
  max-width: 340px;
  min-height: 260px;
  background: linear-gradient(145deg, #FFFDFC 0%, #F8F3EC 100%);
  border: 1px solid rgba(139, 110, 79, 0.18);
  border-radius: 24px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 14px 35px rgba(40, 35, 31, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

@media (min-width: 1024px) {
  .testimonial-card {
    width: 380px;
    max-width: none;
    min-height: 280px;
    padding: 32px;
    border-radius: 28px;
    box-shadow: 0 18px 45px rgba(40, 35, 31, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  }
  .testimonial-card:hover {
    box-shadow: 0 22px 55px rgba(40, 35, 31, 0.10), inset 0 1px 0 rgba(255, 255, 255, 1);
    border-color: rgba(139, 110, 79, 0.28);
  }
}

.testimonial-card__name {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  color: var(--color-primary-dark, #4A3B32);
  margin-bottom: 14px;
}

.testimonial-card__text {
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.68;
  color: var(--color-text-muted);
  flex: 1; /* Pushes stars to bottom */
  margin-bottom: 24px;
}

.testimonial-card__stars {
  display: flex;
  gap: 3px;
  color: #F9AB00; /* Refined gold */
  border-top: 1px solid rgba(139, 110, 79, 0.12);
  padding-top: 20px;
}

.testimonial-card__stars svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

@media (min-width: 1024px) {
  .testimonial-card__stars svg {
    width: 17px;
    height: 17px;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* REDUCED MOTION SUPPORT */
@media (prefers-reduced-motion: reduce) {
  .testimonials-marquee-group {
    animation: none !important;
  }
  .testimonials-marquee-wrapper {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 20px; /* space for scrollbar */
  }
  .testimonial-card {
    scroll-snap-align: start;
  }
  .testimonials-marquee-group[aria-hidden="true"] {
    display: none;
  }
}
