.reviews-section {
  position: relative;
  overflow: hidden;
  padding: clamp(52px, 4.5vw, 84px) var(--page-gap) clamp(56px, 4.5vw, 84px);
  background: #fbf9fd;
  color: #3d2d56;
}

.reviews-section__inner {
  width: min(100%, 2200px);
  margin: 0 auto;
}

.reviews-section__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: clamp(32px, 3.5vw, 66px);
}

.reviews-section__heading h2 {
  margin: 0;
  font-family: "Oswald Local", "Arial Narrow", sans-serif;
  font-size: clamp(48px, 4vw, 78px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  text-transform: uppercase;
}

.reviews-section__controls {
  display: flex;
  gap: 14px;
}

.reviews-section__controls button {
  display: grid;
  width: clamp(48px, 3.4vw, 64px);
  aspect-ratio: 1;
  place-items: center;
  border: 2px solid #9f7ec6;
  border-radius: 50%;
  background: transparent;
  color: #8d62b7;
  font: 300 clamp(28px, 2vw, 38px)/1 Arial, sans-serif;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.reviews-section__controls button:hover,
.reviews-section__controls button:focus-visible {
  background: #9f7ec6;
  color: #fff;
  transform: translateY(-2px);
}

.reviews-track {
  display: flex;
  gap: clamp(18px, 1.5vw, 30px);
  overflow-x: auto;
  padding: 2px 2px 12px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
}

.reviews-track::-webkit-scrollbar {
  display: none;
}

.reviews-summary,
.review-card {
  min-height: clamp(490px, 35vw, 650px);
  border-radius: clamp(22px, 1.7vw, 32px);
  scroll-snap-align: start;
}

.reviews-summary {
  display: flex;
  flex: 0 0 clamp(360px, 27vw, 540px);
  flex-direction: column;
  padding: clamp(28px, 2.4vw, 46px);
  background: #9f7ec6;
  color: #fff;
}

.reviews-summary > strong {
  font-family: "Oswald Local", "Arial Narrow", sans-serif;
  font-size: clamp(58px, 4.4vw, 84px);
  font-weight: 600;
  line-height: 0.95;
}

.reviews-summary > p {
  margin: 18px 0 0;
  font-size: clamp(17px, 1.25vw, 24px);
  line-height: 1.35;
}

.reviews-summary__bottom {
  margin-top: auto;
}

.review-stars {
  color: #ff9fa4;
  font-size: clamp(25px, 1.8vw, 35px);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  white-space: nowrap;
}

.review-stars--white {
  color: #fff;
}

.reviews-summary__people {
  display: flex;
  align-items: center;
  margin-top: 18px;
  padding-left: 5px;
}

.reviews-summary__people img,
.reviews-summary__people span {
  width: clamp(48px, 3.6vw, 68px);
  aspect-ratio: 1;
  margin-left: -10px;
  border: 2px solid #9f7ec6;
  border-radius: 50%;
}

.reviews-summary__people img {
  object-fit: cover;
  object-position: center 22%;
  background: #fff;
}

.reviews-summary__people span {
  display: grid;
  place-items: center;
  background: #ff9fa4;
  color: #fff;
  font-size: clamp(16px, 1.15vw, 22px);
  font-weight: 600;
}

.reviews-summary > a {
  display: flex;
  min-height: clamp(64px, 4.8vw, 90px);
  align-items: center;
  justify-content: center;
  margin-top: 26px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  color: #fff;
  font-size: clamp(19px, 1.4vw, 27px);
  font-weight: 600;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.reviews-summary > a:hover,
.reviews-summary > a:focus-visible {
  background: #fff;
  color: #8d62b7;
  transform: translateY(-2px);
}

.review-card {
  display: flex;
  flex: 0 0 clamp(330px, 22vw, 450px);
  flex-direction: column;
  padding: clamp(24px, 2vw, 38px);
  background: #fff;
  box-shadow: none;
  transition: transform 220ms ease;
}

.review-card:hover {
  box-shadow: none;
  transform: translateY(-7px);
}

.review-author {
  display: flex;
  align-items: center;
  gap: 16px;
}

.review-author > img {
  flex: 0 0 auto;
  width: clamp(60px, 4.6vw, 82px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #f0edf4;
  object-fit: cover;
  object-position: center 20%;
}

.review-author h3,
.review-author p,
.review-card__text {
  margin: 0;
}

.review-author h3 {
  font-size: clamp(18px, 1.3vw, 25px);
  font-weight: 650;
  line-height: 1.15;
}

.review-author p {
  margin-top: 4px;
  color: #806f94;
  font-size: clamp(13px, 0.9vw, 17px);
  line-height: 1.25;
}

.review-card > .review-stars {
  margin-top: clamp(22px, 2vw, 36px);
}

.review-card__text {
  margin-top: auto;
  color: #715e88;
  font-size: clamp(16px, 1.12vw, 22px);
  line-height: 1.34;
}

.review-card--reverse .review-card__text {
  margin-top: 0;
}

.review-card--reverse > .review-stars {
  margin-top: auto;
}

.review-card--reverse .review-author {
  margin-top: 20px;
}

@media (min-width: 3000px) {
  .reviews-section__inner {
    width: min(100%, 3400px);
  }

  .reviews-summary,
  .review-card {
    min-height: 900px;
  }

  .reviews-summary {
    flex-basis: 820px;
  }

  .review-card {
    flex-basis: 680px;
  }
}

@media (max-width: 820px) {
  .reviews-section {
    padding: 44px 12px 50px;
  }

  .reviews-section__heading {
    margin-bottom: 28px;
  }

  .reviews-section__heading h2 {
    font-size: 46px;
  }

  .reviews-section__controls {
    gap: 8px;
  }

  .reviews-section__controls button {
    width: 42px;
  }

  .reviews-track {
    gap: 14px;
  }

  .reviews-summary,
  .review-card {
    flex-basis: min(88vw, 430px);
    min-height: 500px;
  }

  .reviews-summary,
  .review-card {
    padding: 25px;
  }

  .review-card__text {
    font-size: 17px;
  }
}

@media (max-width: 480px) {
  .reviews-section__heading h2 {
    font-size: 40px;
  }

  .reviews-section__controls button {
    width: 38px;
  }

  .reviews-summary,
  .review-card {
    flex-basis: calc(100vw - 42px);
    min-height: 490px;
    padding: 22px;
  }

  .review-card__text br {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reviews-track {
    scroll-behavior: auto;
  }
}
