/* =========================================================
   Reviews page (/reviews/) — on top of css/pages/design-system.css.
   Every rule is scoped to .page-reviews.
   ========================================================= */

/* ---------- Stars: grey row with a gold row clipped to the rating ---------- */
.page-reviews .rev-stars {
  position: relative; display: inline-block;
  width: 104px; height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23dbe3ea' d='M12 2.5l2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3 6.1 20.6l1.3-6.6L2.5 9.4l6.6-.8z'/%3E%3C/svg%3E") left center / 20.8px 20px repeat-x;
}
.page-reviews .rev-stars-fill {
  position: absolute; inset: 0 auto 0 0; overflow: hidden;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fbbc04' d='M12 2.5l2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3 6.1 20.6l1.3-6.6L2.5 9.4l6.6-.8z'/%3E%3C/svg%3E") left center / 20.8px 20px repeat-x;
}
.page-reviews .rev-stars--lg { width: 170px; height: 32px; background-size: 34px 32px; }
.page-reviews .rev-stars--lg .rev-stars-fill { background-size: 34px 32px; }

/* small multicolour "G" for Google attribution */
.page-reviews .rev-g {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 1px var(--ds-line);
  font-family: Arial, sans-serif; font-weight: 700; font-size: 13px; line-height: 1;
  background-image: conic-gradient(from -45deg, #ea4335 0 25%, #4285f4 0 50%, #34a853 0 75%, #fbbc04 0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.page-reviews .rev-g--sm { width: 26px; height: 26px; font-size: 15px; }

/* ---------- Hero + rating summary ---------- */
.page-reviews .rev-hero .ds-lead { max-width: 600px; }
.page-reviews .rev-summary {
  justify-self: end;
  width: min(380px, 100%);
  padding: clamp(28px, 3vw, 40px);
  border-radius: calc(var(--ds-radius) + 8px);
  background: #fff;
  box-shadow: var(--ds-shadow-lg);
  text-align: center;
}
.page-reviews .rev-summary-label { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ds-brand-600); }
.page-reviews .rev-score {
  margin: 12px 0 10px;
  font-family: var(--ds-font-head); font-weight: 800; font-size: clamp(60px, 6vw, 84px); line-height: 1;
  letter-spacing: -0.04em; color: var(--ds-navy);
}
.page-reviews .rev-score span { font-size: 0.32em; font-weight: 600; letter-spacing: 0; color: var(--ds-muted); }
.page-reviews .rev-summary .rev-stars { margin-top: 6px; }
.page-reviews .rev-summary-count { margin: 12px 0 0; font-size: 15px; color: var(--ds-muted); }
.page-reviews .rev-summary-actions { margin-top: 24px; }
.page-reviews .rev-powered { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 18px 0 0; font-size: 13px; color: var(--ds-muted); }

/* ---------- Review grid (masonry columns, so long and short reviews pack neatly) ---------- */
.page-reviews .rev-grid { columns: 3; column-gap: var(--ds-gap); margin: 0; padding: 0; list-style: none; }
.page-reviews .rev-card { break-inside: avoid; margin: 0 0 var(--ds-gap); }
.page-reviews .rev-card > article {
  padding: 26px 26px 24px;
  border: 1px solid var(--ds-line); border-radius: var(--ds-radius);
  background: #fff; box-shadow: var(--ds-shadow-sm);
  transition: transform .3s var(--ds-ease), box-shadow .3s var(--ds-ease), border-color .3s;
}
.page-reviews .rev-card > article:hover { transform: translateY(-4px); box-shadow: var(--ds-shadow); border-color: transparent; }

.page-reviews .rev-card-head { display: flex; align-items: center; gap: 14px; }
.page-reviews .rev-avatar { flex: none; width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.page-reviews .rev-avatar--initials {
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--ds-brand) 0%, var(--ds-navy-2) 100%); color: #fff;
  font-family: var(--ds-font-head); font-weight: 700; font-size: 16px; letter-spacing: 0.02em;
}
.page-reviews .rev-who { flex: 1; min-width: 0; }
.page-reviews .rev-name { margin: 0; font-family: var(--ds-font-head); font-weight: 700; font-size: 16px; line-height: 1.3; color: var(--ds-navy); overflow-wrap: anywhere; }
.page-reviews .rev-name a { color: inherit; text-decoration: none; }
.page-reviews .rev-name a:hover { color: var(--ds-brand-600); }
.page-reviews .rev-time { margin: 2px 0 0; font-size: 13.5px; color: var(--ds-muted); }
.page-reviews .rev-badge { flex: none; padding: 4px 10px; border-radius: var(--ds-radius-pill); background: #fff4d6; color: #8a5a00; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }

.page-reviews .rev-card .rev-stars { margin-top: 18px; }
.page-reviews .rev-text { margin-top: 12px; font-size: 15.5px; line-height: 1.7; color: var(--ds-text); overflow-wrap: anywhere; }
.page-reviews .rev-text--long {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden;
}
.page-reviews .rev-text--long.is-clamped {
  display: block; -webkit-line-clamp: unset; line-clamp: unset; overflow: visible;
}
.page-reviews .rev-more {
  margin-top: 10px; padding: 0; border: 0; background: none; cursor: pointer;
  font-family: var(--ds-font-body); font-weight: 600; font-size: 14.5px; color: var(--ds-brand-600);
}
.page-reviews .rev-more:hover { text-decoration: underline; }
.page-reviews .rev-more:focus-visible { outline: 2px solid var(--ds-brand); outline-offset: 3px; border-radius: 4px; }

.page-reviews .rev-sample-note {
  max-width: 820px; margin: -16px auto clamp(28px, 3vw, 40px);
  padding: 14px 18px; border-radius: var(--ds-radius-sm);
  background: #fff8e5; border: 1px solid #f3dfa7; color: #6b4c00;
  font-size: 14px; line-height: 1.55; text-align: center;
}

/* no feed configured on the live server: one centred card pointing to Google */
.page-reviews .rev-none { max-width: 760px; margin-inline: auto; text-align: center; padding: clamp(32px, 5vw, 56px); }
.page-reviews .rev-none .ds-title { margin-top: 18px; }

.rev-text.rev-text--long.is-clamped {
    overflow: auto !important;
    -webkit-line-clamp: 4 !important;
    display: -webkit-box;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .page-reviews .rev-grid { columns: 2; }
}
@media (max-width: 991px) {
  .page-reviews .rev-summary { justify-self: start; }
}
@media (max-width: 767px) {
  .page-reviews .rev-grid { columns: 1; }
  .page-reviews .rev-summary { justify-self: stretch; width: 100%; }
  .page-reviews .rev-card > article { padding: 22px 20px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .page-reviews .rev-card > article:hover { transform: none; }
}
