/* ===================================================================
   MetroWide Mobile Mechanics — blog.css
   Blog-specific styles. Reuses tokens & components from styles.css.
   Load AFTER styles.css so the header/footer/buttons stay native.
   =================================================================== */

/* ---------- Token bridge ----------
   blog.css was authored against generic token names that styles.css
   doesn't define (--bg-alt, --bg-dark, --radius, --radius-sm, --shadow,
   --shadow-lg). Undefined vars made whole declarations invalid — most
   visibly, the in-article CTA card lost its background. Map them to the
   real design tokens here so every blog reference resolves. */
:root {
  --bg-alt:    var(--surface);
  --bg-dark:   var(--ink);
  --radius:    var(--r-lg);
  --radius-sm: var(--r-md);
  --shadow:    var(--shadow-2);
  --shadow-lg: var(--shadow-3);
}

/* ---------- Blog landing hero ---------- */
.blog-hero {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
  padding: 3.5rem 0 3rem;
}
.blog-hero .container { max-width: 760px; text-align: center; }
.blog-hero h1 { font-size: 2.6rem; margin-bottom: 0.8rem; }
.blog-hero p { color: var(--ink-soft); font-size: 1.1rem; }

/* ---------- Card grid (blog index) ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.blog-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.blog-card .card-tag {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 0.6rem;
}
.blog-card h2 { font-size: 1.22rem; line-height: 1.3; margin-bottom: 0.6rem; }
.blog-card p { color: var(--ink-soft); font-size: 0.97rem; flex-grow: 1; }
.blog-card .card-meta {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--ink-faint);
  font-weight: 600;
}
.blog-card .card-meta::after {
  content: " →";
  color: var(--brand);
}

/* ---------- Article layout ---------- */
.article-wrap { padding: 3rem 0 4rem; }
.article-wrap .container { max-width: 760px; }

.article-breadcrumb {
  font-size: 0.88rem;
  color: var(--ink-faint);
  margin-bottom: 1.4rem;
}
.article-breadcrumb a { color: var(--ink-faint); text-decoration: none; }
.article-breadcrumb a:hover { color: var(--brand); }

.article-header { margin-bottom: 2rem; }
.article-header .eyebrow { margin-bottom: 0.7rem; }
.article-header h1 {
  font-size: 2.4rem;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  font-size: 0.9rem;
  color: var(--ink-faint);
  font-weight: 600;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0.9rem 0;
}

/* ---------- Article body typography ---------- */
.article-body { font-size: 1.08rem; color: var(--ink); }
.article-body h2 {
  font-size: 1.6rem;
  margin: 2.2rem 0 0.9rem;
  letter-spacing: -0.01em;
}
.article-body h3 { font-size: 1.2rem; margin: 1.6rem 0 0.6rem; }
.article-body p { margin-bottom: 1.1rem; color: var(--ink-soft); }
.article-body ul, .article-body ol { margin: 0 0 1.2rem 1.3rem; }
.article-body li { margin-bottom: 0.5rem; color: var(--ink-soft); }
.article-body a { color: var(--brand); }
.article-body a:hover { color: var(--brand-dark); }
.article-body strong { color: var(--ink); }

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.4rem;
  font-size: 0.98rem;
}
.article-body th, .article-body td {
  border: 1px solid var(--line);
  padding: 0.7rem 0.9rem;
  text-align: left;
  vertical-align: top;
}
.article-body th { background: var(--bg-alt); font-weight: 700; color: var(--ink); }

/* Callout / note box (used for ACCC + source notes) */
.article-note {
  background: var(--bg-alt);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.3rem;
  margin: 1.6rem 0;
  font-size: 0.98rem;
}
.article-note p { margin-bottom: 0.5rem; }
.article-note p:last-child { margin-bottom: 0; }

/* Source / citation line */
.article-source {
  font-size: 0.86rem;
  color: var(--ink-faint);
  border-top: 1px solid var(--line);
  padding-top: 0.7rem;
}

/* ---------- In-article CTA block ---------- */
.article-cta {
  background:
    radial-gradient(900px 400px at 80% 0%, rgba(255,255,255,.05), transparent 60%),
    linear-gradient(180deg, #062263 0%, #001340 100%);
  color: #fff;
  border-radius: var(--r-lg);
  padding: 2.25rem 1.75rem;
  margin: 2.5rem 0;
  text-align: center;
  box-shadow: var(--shadow-2);
}
.article-cta h3 { color: #fff; font-size: 1.4rem; margin: 0 0 0.55rem; }
.article-cta p {
  color: rgba(255,255,255,.82);
  max-width: 44ch;
  margin: 0 auto 1.5rem;
}
.article-cta .cta-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
/* On the navy card, render the primary button white (matches the homepage
   navy contact section, where a blue button would blend into the background). */
.article-cta .btn-primary { background: #fff; color: var(--blue); box-shadow: 0 8px 20px rgba(0,0,0,.18); }
.article-cta .btn-primary:hover { background: var(--blue-50); color: var(--blue-700); transform: translateY(-1px); }
.article-cta .btn-ghost { color: #fff; border-color: rgba(255,255,255,0.4); }
.article-cta .btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,0.08); }

/* ---------- Read-next / back-to-blog ---------- */
.article-foot {
  margin-top: 2.5rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}
.article-foot a { color: var(--brand); text-decoration: none; font-weight: 600; }
.article-foot a:hover { color: var(--brand-dark); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-hero h1 { font-size: 2rem; }
  .article-header h1 { font-size: 1.9rem; }
  .article-body h2 { font-size: 1.35rem; }
}
