/* =============================================================
   Spartan Agency — Reviews (2026)

   Two things live here:

   1. `.tx-reviews-page` — the page shell seeded by
      spartan_traxx_reviews_page_content() (inc/seed-pages.php) and
      rendered through the thin page-reviews.php wrapper. Same
      rhythm as the info pages in sections/info-pages.css:
      intro → Site Reviews aggregate + list → curated testimonials →
      submission form.

   2. `.tx-home-reviews` — the [spartan_home_reviews] shortcode
      markup (inc/company-info.php). Rendered on the front page
      ledger AND the Reviews page, so it is styled here (site-wide)
      rather than in blocks-home.css (front page only).

   Site Reviews plugin internals (.glsr-*) are skinned in
   plugins/site-reviews.css.
   ============================================================= */

/* -- Page shell ------------------------------------------------------ */
.tx-reviews-page {
  background: var(--surface-content);
  color: var(--text);
  padding: clamp(2rem, 5vw, 4rem) var(--gutter);
}

.tx-reviews-page > .wp-block-group {
  max-width: var(--max-w, 1100px);
  margin-inline: auto;
}

.tx-reviews-page__intro {
  padding-block: clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--rule-soft);
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.tx-reviews-page__intro h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.1;
  color: var(--charcoal-2);
  margin: 0.5rem 0 1rem;
}

.tx-reviews-page__intro p:not(.tx-eyebrow) {
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.55;
  max-width: 64ch;
  margin: 0 0 1.25rem;
}

.tx-reviews-page__aggregate,
.tx-reviews-page__curated,
.tx-reviews-page__form {
  padding-block: clamp(2rem, 4vw, 3rem);
}

.tx-reviews-page__curated h2,
.tx-reviews-page__form h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  color: var(--charcoal-2);
  margin: 0 0 clamp(1rem, 2vw, 1.5rem);
}

.tx-reviews-page__form > p {
  max-width: 64ch;
}

.tx-reviews-page__form {
  background: var(--bone);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border-radius: var(--r-md, 6px);
  margin-block: clamp(2rem, 4vw, 3rem);
}

/* The curated block renders only when an editor has hand-entered
   testimonials (`[spartan_home_reviews empty="0"]`); collapse the
   wrapper's padding when the shortcode returned nothing. */
.tx-reviews-page__curated:not(:has(.tx-home-reviews)) {
  display: none;
}

/* Inside the page the shortcode's H3 acts as the section heading, so
   size it like the sibling H2s and drop the card chrome. */
.tx-reviews-page__curated .tx-home-reviews {
  background: transparent;
  border: 0;
  padding: 0;
}

.tx-reviews-page__curated .tx-home-reviews__heading {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
}

/* -- [spartan_home_reviews] card ---------------------------------- */
.tx-home-reviews {
  background: var(--surface-content, #fff);
  padding: var(--s-5, 24px);
  border: 1px solid var(--rule-light, rgba(0, 0, 0, 0.1));
  border-radius: var(--r-sm, 2px);
}

.tx-home-reviews__heading {
  font-family: var(--font-display, "Oswald", sans-serif);
  font-weight: 600;
  font-size: clamp(1.35rem, 1.9vw, 1.5625rem);
  color: var(--charcoal-2);
  margin: 0 0 var(--s-4, 16px);
}

.tx-home-reviews__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-5, 24px);
}

.tx-reviews-page__curated .tx-home-reviews__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: var(--s-5, 24px);
}

.tx-home-reviews__item {
  padding-bottom: var(--s-4, 16px);
  border-bottom: 1px solid var(--rule-light, rgba(0, 0, 0, 0.1));
}

.tx-home-reviews__item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.tx-reviews-page__curated .tx-home-reviews__item {
  border-bottom: 0;
  padding: var(--s-4, 16px);
  background: var(--bone);
  border-left: 4px solid var(--brand-primary);
  border-radius: var(--r-sm, 2px);
}

/* Decorative star glyphs: aria-label on the wrapper carries the
   count, so the gold fill only needs to read as a graphic. */
.tx-home-reviews__stars {
  color: var(--accent, #cfa326);
  font-size: 1.1rem;
  line-height: 1;
  letter-spacing: 2px;
  margin-bottom: var(--s-2, 8px);
}

.tx-home-reviews__quote {
  margin: 0 0 var(--s-2, 8px);
  font-family: var(--font-prose, "Source Sans Pro", sans-serif);
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-muted, #464646);
  font-style: italic;
  border: 0;
  padding: 0;
}

.tx-home-reviews__attribution {
  margin: 0;
  font-family: var(--font-body, "Titillium Web", sans-serif);
  font-size: 0.875rem;
  color: var(--ink, #000);
}

.tx-home-reviews__name {
  font-weight: 700;
  margin-right: 6px;
}

.tx-home-reviews__meta {
  color: var(--text-muted, #464646);
}

.tx-home-reviews__cta {
  margin: var(--s-5, 24px) 0 0;
  text-align: center;
}

/* Empty state: no approved reviews yet. Honest copy + a route to the
   moderated form rather than placeholder testimonials. */
.tx-home-reviews--empty {
  background: var(--bone);
  border-left: 4px solid var(--brand-primary);
  border-radius: var(--r-sm, 2px);
  max-width: 40rem;
  margin-inline: auto;
}

.tx-home-reviews__empty {
  margin: 0;
  font-family: var(--font-prose, "Source Sans Pro", sans-serif);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text-muted, #464646);
}

.tx-home-reviews--empty .tx-home-reviews__cta {
  text-align: left;
  margin-top: var(--s-4, 16px);
}
