.testimonials {
  display: flex;
  flex-direction: column;
  gap: 64px;
  width: 100%;
  max-width: 1280px;
  padding: 0 24px;
  margin: 60px auto;
  overflow: hidden;
}

@media screen and (min-width: 768px) {
  .testimonials {
    margin: 100px auto;
  }
}

.testimonials__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  text-align: center;
}

.testimonials_header_wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.testimonials__title {
  color: var(--primary);
  text-transform: uppercase;
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 600;
}

.testimonials__subtitle {
  position: relative;
  letter-spacing: 1.25px;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--black);
}

.testimonials__subtitle::after {
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translate(-50%, -50%);
  content: "";
  width: 100px;
  height: 5px;
  background-color: var(--primary-75);
}

.testimonials__intro {
  text-align: justify;
}

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

.testimonials__list {
  overflow: hidden;
  width: 100%;
  min-width: 0;
}

.testimonials__track {
  display: flex;
  width: max-content;
  gap: 24px;
  animation: marquee 90s linear infinite;
  will-change: transform;
}

.testimonials__track.is-paused {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  .testimonials__track {
    animation: none;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
  }
}

.testimonials__item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  flex: 0 0 clamp(260px, calc(100vw - 80px), 320px);
  margin: 0;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 3px;
  padding: 20px;
  background: var(--white);
  box-shadow: var(--card-shadow);
}

.testimonials__quote {
  margin: 0 0 12px;
  line-height: 1.5;
}

.testimonials__name {
  margin: 0;
  font-weight: 600;
}

.testimonials__actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
}

@media screen and (max-width: 767px) {
  .testimonials {
    gap: 40px;
  }

  .testimonials__header {
    gap: 20px;
  }

  .testimonials__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .testimonials__actions .btn {
    text-align: center;
    justify-content: center;
  }
}

@media screen and (min-width: 900px) {
  .testimonials__subtitle {
    width: 75%;
  }

  .testimonials__intro {
    max-width: 85%;
    margin: 0 auto;
  }
}
