/*
 * HGI - Reviews
 * 09-reviews.css
 *
 * CSS auto-scroll marquee carousel.
 * Card design differentiated from LPVI:
 *   - No per-card star icons (redundant with header summary)
 *   - Decorative open-quote mark in sage
 *   - Serif italic quote text (Lora)
 *   - Clean card with subtle lift on hover
 *   - Wider cards (380px) with generous padding
 */


/* ── Section ── */

.reviews-section {
  background: var(--color-bg-white);
}

.reviews-section__header {
  text-align: center;
  margin-bottom: var(--space-10);
}


/* ── Rating summary pill ── */

.reviews-summary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-8);
  background: none;
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-full);
  margin-top: var(--space-4);
}

.reviews-summary__score {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  line-height: 1;
}

.reviews-summary__detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.reviews-summary__stars {
  display: flex;
  gap: 2px;
}

.reviews-summary__star {
  width: 18px;
  height: 18px;
  fill: var(--color-star);
}

.reviews-summary__star--empty {
  fill: var(--color-border-strong);
}

.reviews-summary__count {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
}


/* ── Marquee carousel ── */

.reviews-track-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: var(--space-3) 0;
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 6%,
    black 94%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 6%,
    black 94%,
    transparent 100%
  );
}

.reviews-track {
  display: flex;
  gap: var(--space-5);
  width: max-content;
  list-style: none;
  padding: 0;
  margin: 0;
  animation: reviews-scroll 50s linear infinite;
}

.reviews-track:hover,
.reviews-track.is-paused {
  animation-play-state: paused;
}

@keyframes reviews-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}


/* ── Review card - premium editorial style ── */

.review-card {
  background: #FFFFFF;
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-6) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: 380px;
  flex-shrink: 0;
  position: relative;
  transition:
    border-color 400ms var(--ease-out),
    box-shadow   400ms var(--ease-out),
    transform    400ms var(--ease-out);
}

.review-card:hover {
  border-color: var(--color-sage);
  box-shadow: 0 4px 16px rgba(22, 37, 11, 0.06);
  transform: translateY(-2px);
}

/* Decorative open-quote mark */
.review-card__mark {
  font-family: var(--font-heading);
  font-size: 5.25rem;
  font-weight: var(--weight-light);
  font-style: normal;
  color: var(--color-sage);
  line-height: 0.5;
  display: block;
  margin-bottom: var(--space-2);
  pointer-events: none;
}

/* Quote text - serif italic */
.review-card__quote {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-style: italic;
  font-weight: var(--weight-regular);
  color: var(--color-text-primary);
  line-height: var(--leading-normal);
  flex: 1;
}

/* Author footer */
.review-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-4);
  border-top: 0.5px solid var(--color-border);
}

.review-card__author {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-navy);
}

.review-card__source {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.review-card__source {
  font-style: normal;
  white-space: nowrap;
}

/* ── Google reviews link ── */

.reviews-google-link {
  text-align: center;
  margin-top: var(--space-8);
}


/* ─────────────────────────────────────────
   REVIEWS GRID, Patient Reviews page
   Same card as the homepage carousel, laid out as a grid.
   The carousel pins the card to 380px because the track is
   a flex row of fixed widths. In a grid the column decides
   the width, so that has to be released.
───────────────────────────────────────── */

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-5);
  list-style: none;
  margin: 0;
  padding: 0;
}

.review-card--grid {
  width: auto;
  flex-shrink: 1;
}

/* The global p rule caps paragraphs at --container-text with no auto
   margin, so a centred paragraph inside a full-width container is
   centred within an off-centre box. margin-inline fixes the box. */
.reviews-grid__note {
  margin-top: var(--space-8);
  margin-inline: auto;
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.reviews-page-summary {
  padding-bottom: 0;
}

@media (max-width: 480px) {
  .reviews-grid {
    grid-template-columns: 1fr;
  }
}


/* ── Reduced motion ── */

@media (prefers-reduced-motion: reduce) {
  .reviews-track {
    animation: none;
  }
}


/* ── Responsive ── */

@media (max-width: 768px) {
  .review-card {
    width: 320px;
    padding: var(--space-6) var(--space-5) var(--space-5);
  }

  .review-card__mark {
    font-size: 3.75rem;
  }

  .reviews-section__header {
    margin-bottom: var(--space-8);
  }
}