/* ============================================================
   REVIEWS  .reviews
   "6. Reviews": three client quotes plus links to the
   Trustpilot profile underneath.
   Equal cards: every card spans four rows of the grid (meta /
   title / quote / author) through `subgrid`, so titles, quotes and authors
   line up across cards. Quotes are clamped to --review-lines lines
   (set on .reviews__grid in index.html); js/modules/reviews.js adds
   the "Read more" toggle. Without JS the full quotes are shown.
   ============================================================ */

.reviews__header {
  padding-bottom: 4rem;
}

.reviews__grid {
  --review-lines: 7;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.review {
  display: grid;
  grid-row: span 4;
  grid-template-rows: subgrid;
  row-gap: 0;
  margin: 0;
}

/* "★★★★★  Trustpilot · Feb 2026": source + date, as Trustpilot's guidelines ask */
.review__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.6rem;
  padding-bottom: 0.75rem;
  color: var(--color-gray);
  font-size: 0.8rem;
  font-weight: var(--fw-light);
}

.review__stars {
  color: var(--color-primary);
  font-size: 1rem;
  letter-spacing: 0.1em;
}

.review__title {
  padding-bottom: 0.5rem;
  color: var(--color-text);
  font-weight: var(--fw-regular);
}

.review__quote {
  margin: 0;
}

.review__quote p {
  color: var(--color-text);
  font-size: 1rem;
  font-weight: var(--fw-light);
  line-height: var(--lh-l);
  letter-spacing: 0.01rem;
}

/* clamped: ends in "…" after --review-lines lines */
.js .review:not(.is-expanded) .review__quote p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--review-lines);
  line-clamp: var(--review-lines);
  overflow: hidden;
}

/* "Read more / Read less": same underline style as "Visit site" */
.review__more {
  margin-top: 0.75rem;
  padding: 0 0 3px;
  border: 0;
  border-bottom: 1px solid var(--color-primary);
  background: none;
  color: var(--color-text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: var(--fw-medium);
  cursor: pointer;
  transition: color var(--duration) ease;
}

.review__more:hover,
.review__more:focus-visible {
  color: var(--color-primary-ink);
}

.review__more[hidden] {
  display: none;
}

.review__author {
  display: flex;
  align-self: end;   /* authors sit on the same line at the bottom of every card */
  gap: 10px;
  padding-top: 1rem;
}

.review__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
}

/* for reviewers without a photo: a circle with their initial */
.review__avatar--initials {
  display: grid;
  flex: none;
  place-items: center;
  background-color: var(--color-primary-tint);
  color: var(--color-primary-ink);
  font-size: 1.3rem;
  font-weight: var(--fw-semibold);
}

.review__name {
  color: var(--color-text);
  font-style: normal;
  font-weight: var(--fw-medium);
}

.review__role {
  margin-top: 4px;
  color: var(--color-gray);
}

/* ---- Links under the cards ---- */
.reviews__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
}

.reviews__leave {
  color: var(--color-gray);
  font-size: 0.9rem;
  font-weight: var(--fw-light);
}

.reviews__leave-link {
  padding-bottom: 2px;
  border-bottom: 1px solid var(--color-primary);
  color: var(--color-text);
  font-weight: var(--fw-medium);
  transition: color var(--duration) ease;
}

.reviews__leave-link:hover,
.reviews__leave-link:focus-visible {
  color: var(--color-primary-ink);
}

@media (max-width: 991px) {
  .reviews__header {
    padding-bottom: 2rem;
  }

  .reviews__grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
}

@media (max-width: 767px) {
  .reviews__grid {
    grid-template-columns: 1fr;
    gap: 2rem;   /* stacked cards need more air between them than side-by-side ones */
  }

  .review__title {
    font-weight: var(--fw-medium);
  }

  .review__quote p {
    line-height: 145%;
  }

  .review__role {
    font-size: 0.9rem;
    line-height: 130%;
  }
}

