/* ════════════════════════════════════════════════════════════════════
   Layouts stylesheet
   Styles for the DB-driven layout components embedded in the CMS page
   body. Everything is scoped under `.cms-page` — the wrapper around the
   CMS body content (see [...slug].astro). That means these rules apply
   to ANY section/heading/grid inside the page body, but never leak into
   the surrounding shell (hero, trust bar, FAQs, CTA, nav, footer) or
   into other pages of the site.

   To re-theme: change the two master colors (--primary / --secondary)
   and the font (--font-sans) at the top of the `.cms-page` rule.

   ── Index ───────────────────────────────────────────────────────────
   .cms-page   — "Why Choose Us" + "Service Area Coverage" sections
   ════════════════════════════════════════════════════════════════════ */

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");

.cms-page {
  /* ── The only things you ever need to change ───────────────────────── */
  --primary: #0b3b2c; /* main brand color */
  --secondary: #d9a441; /* accent / highlight */
  --font-sans: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* ── Derived — no need to touch ────────────────────────────────────── */
  --wc-primary-dark: var(--primary);
  --wc-primary-tint: color-mix(in srgb, var(--primary) 12%, transparent);
  --wc-accent: var(--secondary);
  --wc-accent-dark: color-mix(in srgb, var(--secondary) 80%, black);
  --wc-accent-soft: color-mix(in srgb, var(--secondary) 60%, transparent);
  --wc-ink: var(--primary); /* headings */
  --wc-ink-muted: color-mix(in srgb, var(--primary) 68%, transparent); /* body copy */
  --wc-card-bg: #fff;
  --wc-card-border: #e2e8f0;
  --wc-card-shadow: 0 2px 8px color-mix(in srgb, var(--primary) 7%, transparent);

  font-family: var(--font-sans);
  color: var(--wc-ink);
  padding-block: clamp(40px, 8vw, 80px);
}

.cms-page *,
.cms-page *::before,
.cms-page *::after {
  box-sizing: border-box;
}

/* ── Layout ──────────────────────────────────────────────────────────── */
.cms-page .container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 1rem;
}

.cms-page header {
  max-width: 720px;
  margin: 0 auto clamp(28px, 5vw, 48px);
  text-align: center;
}

/* Vertical rhythm between stacked sub-sections (e.g. the feature grid
   followed by the "Service Area Coverage" heading) so they aren't cramped. */
.cms-page .feature-grid + header,
.cms-page .info-grid + header,
.cms-page .feature-grid + .info-grid,
.cms-page .info-grid + .feature-grid {
  margin-top: clamp(20px, 7vw, 30px);
}

/* Vertical spacing between every <section> block. */
.cms-page section {
  padding-block: clamp(20px, 8vw, 40px);
}
.cms-page section:first-child {
  padding-top: 0;
}
.cms-page section:last-child {
  padding-bottom: 0;
}

/* ── Typography ──────────────────────────────────────────────────────── */
.cms-page h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.3rem, 2.2vw, 1.85rem);
  font-weight: 600;
  line-height: 1.2;
  text-wrap: balance;
  color: var(--wc-ink);
}

.cms-page h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--wc-ink);
}

.cms-page .eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  margin: 0 0 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--wc-accent-dark);
}
.cms-page .eyebrow span {
  width: 1.5rem;
  height: 1px;
  background: var(--wc-accent-soft);
}

.cms-page .subhead {
  margin: 0;
  font-size: clamp(0.98rem, 1.2vw, 1.1rem);
  line-height: 1.65;
  color: var(--wc-ink-muted);
}

.cms-page .paragraph {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--wc-ink-muted);
}

/* ── Feature grid ────────────────────────────────────────────────────── */
.cms-page .feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.75rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cms-page .feature {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.25rem;
}

/* ── Icon badge (resting = blue tint, hover = solid blue) ────────────── */
.cms-page .icon-badge {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.375rem;
  background: var(--wc-primary-tint);
  color: var(--wc-primary-dark);
  transition: background-color 0.2s ease-out, color 0.2s ease-out, transform 0.2s ease-out;
}
.cms-page .feature:hover .icon-badge {
  background: var(--wc-primary-dark);
  color: #fff;
  transform: rotate(-3deg) scale(1.05);
}

/* ── Info card grid (centered cards w/ circular icon) ─────────────────── */
.cms-page .info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cms-page .info-card {
  height: 100%;
  padding: 1.5rem 1.25rem;
  text-align: center;
  background: var(--wc-card-bg);
  border: 1px solid var(--wc-card-border);
  border-radius: 14px;
  box-shadow: var(--wc-card-shadow);
}

.cms-page .icon-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--wc-primary-tint);
  color: var(--wc-primary-dark);
  font-size: 1.2rem;
}

.cms-page .info-card h3 {
  margin-bottom: 0.5rem;
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (min-width: 480px) {
  .cms-page .container { padding-inline: 1.25rem; }
}
@media (min-width: 768px) {
  .cms-page .container { padding-inline: 2rem; }
}
@media (max-width: 1000px) {
  .cms-page .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .cms-page .info-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .cms-page .feature-grid { grid-template-columns: 1fr; }
  .cms-page .info-grid { grid-template-columns: 1fr; }
}
