/* ==========================================================================
   REVIEWS PAGE  (reviews.php)
   --------------------------------------------------------------------------
   Every rule in this file is scoped under `.reviews-page`, the wrapper on
   reviews.php's <main>. No other page carries that class, so nothing here can
   reach the home page, the tour pages or the blog - the same isolation
   convention the `.hp-*` homepage block and the `.blog-*` blog block already
   use in this project.

   No colour, radius, shadow or font is re-invented here: the values come from
   the --rkt-* / --font-* tokens declared once in css/style.css, so a change to
   the site palette carries into this page automatically.
   ========================================================================== */

.reviews-page {
  background: var(--rkt-cream);
  padding-bottom: 64px;
}

/* --------------------------------------------------------------- Hero ---- */

.reviews-page .reviews-hero {
  padding: 46px 0 30px;
}

.reviews-page .reviews-page-header {
  text-align: center !important;
  max-width: 560px;
  margin: 0 auto 28px;
}

/* ------------------------------------------------------------ Summary ---- */
/* Score block and distribution bars are one card, mirroring .rating-summary
   on the home page (same surface, border, radius and shadow) so a visitor
   arriving from the hero badge lands on something familiar. */

.reviews-page .reviews-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 32px;
  background: #fff;
  border: 1px solid var(--rkt-border);
  border-radius: var(--rkt-radius-lg);
  box-shadow: 0 14px 30px rgba(28, 21, 18, .07);
  padding: 30px 32px;
}

.reviews-page .reviews-summary-score {
  flex: 0 0 auto;
  width: 190px;
  text-align: center;
  padding: 20px 14px;
  background: rgba(199, 154, 63, .1);
  border: 1px solid var(--rkt-gold);
  border-radius: var(--rkt-radius-md);
}

.reviews-page .reviews-summary-number {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 700;
  line-height: 1;
  color: var(--rkt-maroon);
}

.reviews-page .reviews-summary-stars {
  font-size: 15px;
  letter-spacing: .08em;
  margin: 10px 0 6px;
}

.reviews-page .reviews-summary-stars i {
  color: var(--rkt-gold) !important;
}

.reviews-page .reviews-summary-count {
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--rkt-muted);
}

/* Each bar is a link that toggles that star filter, so the distribution is
   also the fastest way to filter - the behaviour Google's review panel has. */
.reviews-page .reviews-summary-bars {
  flex: 1 1 280px;
  min-width: 0;
}

.reviews-page .reviews-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 5px 8px;
  border-radius: var(--rkt-radius-sm);
  text-decoration: none;
  color: inherit;
  transition: background-color .2s ease;
}

.reviews-page .reviews-bar-row:hover,
.reviews-page .reviews-bar-row:focus-visible {
  background: var(--rkt-maroon-tint);
}

.reviews-page .reviews-bar-row.is-active {
  background: rgba(199, 154, 63, .16);
}

.reviews-page .reviews-bar-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: 34px;
  flex-shrink: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--rkt-muted);
}

.reviews-page .reviews-bar-label i {
  font-size: 10px;
  color: var(--rkt-gold);
}

.reviews-page .reviews-bar-track {
  flex: 1 1 auto;
  height: 7px;
  border-radius: 999px;
  background: var(--rkt-maroon-tint);
  overflow: hidden;
}

.reviews-page .reviews-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--rkt-gold);
}

.reviews-page .reviews-bar-count {
  width: 42px;
  flex-shrink: 0;
  text-align: right;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--rkt-charcoal);
}

/* ------------------------------------------------------------ Filters ---- */

.reviews-page .reviews-body {
  padding-top: 36px;
}

.reviews-page .reviews-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 40px;
  align-items: flex-start;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid var(--rkt-border);
  border-radius: var(--rkt-radius-md);
  box-shadow: 0 10px 24px rgba(28, 21, 18, .05);
}

.reviews-page .reviews-filter-group {
  min-width: 0;
}

.reviews-page .reviews-filter-label {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--rkt-muted);
}

/* Chips wrap on narrow screens instead of scrolling sideways, so a phone
   never gets a horizontally clipped filter row. */
.reviews-page .reviews-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reviews-page .reviews-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--rkt-border);
  border-radius: 999px;
  background: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--rkt-ink);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.reviews-page .reviews-chip:hover,
.reviews-page .reviews-chip:focus-visible {
  border-color: var(--rkt-gold);
  color: var(--rkt-maroon);
}

.reviews-page .reviews-chip.is-active {
  background: linear-gradient(135deg, var(--rkt-maroon), var(--rkt-maroon-dark));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 18px rgba(109, 19, 48, .25);
}

.reviews-page .reviews-chip-stars {
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--rkt-gold);
}

.reviews-page .reviews-chip.is-active .reviews-chip-stars {
  color: var(--rkt-gold-light);
}

.reviews-page .reviews-chip-num {
  font-size: 12px;
  font-weight: 700;
}

.reviews-page .reviews-result-count {
  margin: 22px 0 18px;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--rkt-muted);
}

/* --------------------------------------------------------------- Grid ---- */
/* auto-fill + minmax gives a fluid 1/2/3-column grid without a media query
   per breakpoint, so 1366, 1440, 1536, 1600 and 1920 all land on a sensible
   column count. `align-items: start` deliberately lets each card size to its
   own text - the brief asks for consistent card DESIGN, not forced equal
   height. */
.reviews-page .reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  align-items: start;
  gap: 22px;
}

.reviews-page .review-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--rkt-border);
  border-radius: var(--rkt-radius-lg);
  box-shadow: 0 14px 30px rgba(28, 21, 18, .07);
  padding: 24px 24px 26px;
  transition: transform .2s ease, box-shadow .2s ease;
}

.reviews-page .review-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(28, 21, 18, .11);
}

.reviews-page .review-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.reviews-page .review-card-avatar {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rkt-gold), #a97f2f);
  color: #fff;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
}

.reviews-page .review-card-identity {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.reviews-page .review-card-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--rkt-maroon);
  /* Long single-token names must not push the card wider than its grid cell. */
  overflow-wrap: anywhere;
}

.reviews-page .review-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.reviews-page .review-card-rating {
  font-size: 12px;
  letter-spacing: .06em;
}

.reviews-page .review-card-rating i {
  color: var(--rkt-gold) !important;
}

.reviews-page .review-card-date {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--rkt-muted);
}

/* No line clamp: on a dedicated reviews page the whole review should be
   readable. `overflow-wrap: anywhere` stops a pasted URL or an unbroken
   string from overflowing the card on mobile. */
.reviews-page .review-card-content {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.75;
  color: var(--rkt-charcoal);
  overflow-wrap: anywhere;
}

/* --------------------------------------------------- Pagination + CTA ---- */

.reviews-page .reviews-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 38px;
}

.reviews-page .reviews-page-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 42px;
  justify-content: center;
  padding: 9px 16px;
  border: 1px solid var(--rkt-border);
  border-radius: var(--rkt-radius-sm);
  background: #fff;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--rkt-ink);
  text-decoration: none;
  transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}

.reviews-page .reviews-page-link:hover,
.reviews-page .reviews-page-link:focus-visible {
  border-color: var(--rkt-gold);
  color: var(--rkt-maroon);
}

.reviews-page .reviews-page-link.is-active {
  background: linear-gradient(135deg, var(--rkt-maroon), var(--rkt-maroon-dark));
  border-color: transparent;
  color: #fff;
}

.reviews-page .reviews-page-link.is-disabled {
  opacity: .45;
  pointer-events: none;
}

.reviews-page .reviews-empty {
  margin: 8px 0 0;
  padding: 30px 24px;
  background: #fff;
  border: 1px dashed var(--rkt-border);
  border-radius: var(--rkt-radius-md);
  text-align: center;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--rkt-muted);
}

.reviews-page .reviews-empty a {
  color: var(--rkt-maroon);
  font-weight: 600;
}

.reviews-page .reviews-cta {
  margin-top: 44px;
  padding: 30px 24px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--rkt-border);
  border-radius: var(--rkt-radius-lg);
  box-shadow: 0 14px 30px rgba(28, 21, 18, .07);
}

.reviews-page .reviews-cta p {
  margin: 0 0 16px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--rkt-ink);
}

/* Matches the site's primary button treatment (maroon gradient, 5px radius,
   700 weight) rather than introducing a new button style. */
.reviews-page .reviews-cta-btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 5px;
  background: linear-gradient(135deg, var(--rkt-maroon), var(--rkt-maroon-dark));
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: box-shadow .2s ease, transform .2s ease;
}

.reviews-page .reviews-cta-btn:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(109, 19, 48, .3);
}

/* ---------------------------------------------------------- Responsive --- */

@media (max-width: 991.98px) {
  .reviews-page .reviews-summary {
    gap: 24px;
    padding: 24px;
  }

  .reviews-page .reviews-summary-score {
    width: 100%;
  }
}

@media (max-width: 767.98px) {
  .reviews-page .reviews-hero {
    padding: 32px 0 22px;
  }

  /* Single column below 768px. The auto-fill track above would already do
     this, but pinning it removes any dependence on the 320px minimum when the
     viewport is narrower than that plus container padding. */
  .reviews-page .reviews-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .reviews-page .reviews-filters {
    gap: 16px;
    padding: 16px;
  }

  .reviews-page .reviews-summary-number {
    font-size: 42px;
  }
}

@media (max-width: 480px) {
  .reviews-page .reviews-summary,
  .reviews-page .review-card {
    padding: 18px 16px;
  }

  .reviews-page .reviews-chip {
    padding: 7px 12px;
    font-size: 12.5px;
  }

  .reviews-page .reviews-page-link {
    padding: 8px 12px;
    min-width: 38px;
    font-size: 12.5px;
  }

  .reviews-page .review-card-avatar {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}

/* Respect the OS "reduce motion" setting - the hover lifts are decoration. */
@media (prefers-reduced-motion: reduce) {
  .reviews-page .review-card,
  .reviews-page .reviews-cta-btn {
    transition: none;
  }

  .reviews-page .review-card:hover,
  .reviews-page .reviews-cta-btn:hover {
    transform: none;
  }
}
