/* ==========================================================================
   Section: Reviews — Figma 69:970
   Dark band, aggregate rating, headline with a text link, then a slider of
   390x410 cards on a slightly lighter dark surface.
   ========================================================================== */

.trustav-reviews {
  padding-block: clamp(3rem, 6vw, 5.625rem) clamp(4rem, 9vw, 8.125rem);
  overflow: hidden;
}

/* --- Header -------------------------------------------------------------- */
.trustav-reviews__header {
  display: flex;
  flex-direction: column;
  gap: 35px;
  margin-block-end: clamp(2.5rem, 5vw, 4.375rem);
}

.trustav-reviews__rating {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: var(--fs-small);
  line-height: var(--lh-tight);
}

.trustav-reviews__rating-icon svg {
  width: 16px;
  height: 16px;
}

.trustav-reviews__rating-value {
  color: var(--c-white);
}

.trustav-reviews__rating-value strong {
  font-weight: var(--fw-semibold);
}

.trustav-reviews__rating-value span {
  color: var(--c-neutral-2);
}

.trustav-reviews__rating-stars svg {
  width: 79px;
  height: 13px;
}

.trustav-reviews__headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2xl);
}

/* Figma: Lora 52 in white, wrapped at 649px. */
.trustav-reviews__title {
  max-width: 40.6rem;
  margin: 0;
  color: var(--c-white);
}

/* --- Slider -------------------------------------------------------------- */
.trustav-reviews__slider {
  display: flex;
  flex-direction: column;
  gap: 60px;
}

/* Two classes deep so the reset's ul[role="list"] { padding: 0 } loses. */
.trustav-reviews .trustav-reviews__track {
  display: flex;
  gap: 35px;
  margin: 0;
  /* First card on the container's content edge — Figma 178:2380. */
  padding: 0 max(var(--gutter), calc((100% - var(--container)) / 2));
  scroll-padding-inline: max(var(--gutter), calc((100% - var(--container)) / 2));
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.trustav-reviews__track::-webkit-scrollbar {
  display: none;
}

/* --- Card ---------------------------------------------------------------- */
.trustav-review {
  display: flex;
  flex-direction: column;
  gap: 41px;
  flex: 0 0 390px;
  min-height: 410px;
  padding: 26px 30px 21px;
  scroll-snap-align: start;
  background-color: var(--c-dark-surface);
  border: var(--border-width) solid var(--c-dark-border);
}

.trustav-review__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.trustav-review__quote svg {
  width: 25px;
  height: 18px;
}

.trustav-review__grade svg {
  width: 119px;
  height: 26px;
}

/* Figma clamps the quote to a fixed 192px block. */
.trustav-review__body {
  display: -webkit-box;
  -webkit-line-clamp: 8;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  font-size: var(--fs-body-sm);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  color: var(--c-white);
}

.trustav-review__bottom {
  margin-block-start: auto;
  padding-block-start: 21px;
  border-top: var(--border-width) solid var(--c-dark-border);
}

.trustav-review__profile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.trustav-review__meta {
  min-width: 0;
}

.trustav-review__author {
  margin: 0;
  font-size: var(--fs-body-sm);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  color: var(--c-neutral-3);
}

.trustav-review__date,
.trustav-review__note {
  margin: 0;
  font-size: 0.75rem;
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  color: rgb(231 231 231 / 50%);
}

/* "Translated from Czech" — EN/DE reviews that are our translation. */
.trustav-review__note {
  font-style: italic;
}

.trustav-review__avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.trustav-review__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Fallback when a review has no avatar image. */
.trustav-review__avatar--initial {
  background-color: var(--c-accent);
  color: var(--c-primary);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
}

/* --- Controls ------------------------------------------------------------ */
.trustav-reviews__controls {
  display: flex;
  align-items: center;
  gap: 38px;
}

.trustav-reviews__progress {
  position: relative;
  flex: 1;
  height: 1px;
  background-color: var(--c-dark-border);
  overflow: hidden;
}

.trustav-reviews__progress-bar {
  position: absolute;
  inset-block: 0;
  left: 0;
  width: 25%;
  background-color: var(--c-accent);
  transition: transform var(--dur) var(--ease), width var(--dur) var(--ease);
}

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 1024px) {
  .trustav-reviews__headline {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xl);
  }

  .trustav-reviews__title {
    max-width: none;
  }
}

@media (max-width: 560px) {
  .trustav-review {
    flex-basis: 84vw;
    gap: var(--space-xl);
    padding: var(--space-lg);
  }

  .trustav-reviews__track {
    gap: var(--space-md);
  }

  .trustav-reviews__controls {
    gap: var(--space-lg);
  }
}
