/* =========================================================
   Block: GOOGLE REVIEWS (v0.2)
   Display only. Every Google review, newest first; we never
   pick or hide reviews (no gating). Filled in from Google when
   the site is uploaded.
   Layout: rating summary, then a sliding row of review cards.
   Phones: swipe (the next card peeks in). Computers: three
   visible, < > buttons for the rest.
   ========================================================= */

.reviews__head {
  display: grid;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}
@media (min-width: 64rem) {
  .reviews__head { grid-template-columns: 1fr auto; align-items: end; }
}
.reviews__title { font-size: var(--text-h2); max-width: 18ch; }

/* ---------- Rating summary ---------- */
.rating {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  margin-top: var(--space-4);
}
.rating__score {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 2.4rem + 3vw, 4.5rem);
  line-height: 1;
}
.rating__meta { font-size: var(--text-small); color: var(--colour-text-muted); }
.rating__meta a { font-weight: var(--weight-strong); }

.stars {
  display: inline-flex;
  gap: 2px;
  color: var(--colour-accent);            /* ochre, not Google yellow */
}
.stars svg { width: 1.1rem; height: 1.1rem; }
.stars--small svg { width: 0.95rem; height: 0.95rem; }
.stars .star--off { opacity: 0.25; }

/* ---------- < > buttons (computers only; the script shows them) ---------- */
.reviews__arrows { display: flex; gap: var(--space-2); }
.reviews__arrows[hidden] { display: none; }
.reviews__arrow {
  width: var(--tap-target-min); height: var(--tap-target-min);
  border: 1px solid var(--colour-border); border-radius: 50%;
  background: var(--colour-surface); color: var(--colour-text);
  font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.reviews__arrow:hover:not(:disabled) { border-color: var(--colour-action); color: var(--colour-action); }
.reviews__arrow:disabled { opacity: 0.35; cursor: default; }
@media (max-width: 63.99rem) { .reviews__arrows { display: none; } }   /* phones and tablets swipe */

/* ---------- The sliding row ---------- */
.reviews__list {
  list-style: none;
  margin: 0 calc(var(--space-4) * -1);   /* phones: the row runs to the screen edge */
  padding: 0 var(--space-4) var(--space-3);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 82%;                /* one card plus a peek of the next */
  gap: var(--space-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;         /* swipes stop neatly on each card */
  scroll-padding-inline: var(--space-4);
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.reviews__list::-webkit-scrollbar { display: none; }
@media (min-width: 40rem) { .reviews__list { grid-auto-columns: 46%; } }
@media (min-width: 64rem) {
  .reviews__list {
    margin-inline: 0;
    padding-inline: 0;
    grid-auto-columns: calc((100% - 2 * var(--space-4)) / 3);   /* three visible */
  }
}

/* ---------- One review ---------- */
.review {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  background: var(--colour-surface);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-large);
  padding: var(--space-5);
}
.review__text {
  margin-top: var(--space-3);
  display: -webkit-box;                   /* long reviews are cut after six lines */
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  overflow: hidden;
}
.review:first-child .review__text:not(.review__text--none) {   /* the newest review, a little larger */
  font-family: var(--font-heading);
  font-size: 1.3rem;
  line-height: 1.35;
}
.review__text--none { color: var(--colour-text-muted); font-style: italic; }
.review__who {
  margin-top: auto;                       /* names line up at the bottom of every card */
  padding-top: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-small);
  line-height: 1.4;
  color: var(--colour-text-muted);
}
.review__who strong { color: var(--colour-text); font-weight: var(--weight-strong); }
.review__avatar {
  flex: none;
  width: 2.25rem; height: 2.25rem;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--colour-tag);
  color: var(--colour-on-tag);
  font-weight: var(--weight-strong);
}

.reviews__source {
  margin-top: var(--space-5);
  font-size: var(--text-small);
  color: var(--colour-text-muted);
}
