/* ─────────────────────────────────────────────────────────
   blog.css — layered on top of the main site's styles.css.
   Reuses its tokens (--brand, --card, --line, --radius…) so
   the blog reads as the same brand, not a lookalike.
   ───────────────────────────────────────────────────────── */

.container.narrow { max-width: 760px; }

/* Holds the exact width of the main site's "Pricing info" button, which the
   blog deliberately omits — keeps the logo, nav and demo button in identical
   positions on both sites so nothing shifts when you move between them. */
.cta-spacer { visibility: hidden; pointer-events: none; }

/* ─── Blog hero ──────────────────────────────────────── */
.blog-hero {
  padding: 64px 0 40px;
  background:
    radial-gradient(1100px 380px at 50% -140px, rgba(0,151,217,.14), transparent 70%),
    var(--bg);
  text-align: center;
}
.blog-hero h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 60px);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.05;
  color: var(--charcoal);
}
.blog-hero h1 em { font-style: normal; color: var(--brand); }
.blog-hero p {
  margin: 16px auto 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.topic-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}
.topic-chips a {
  padding: 7px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  transition: color .18s, border-color .18s, transform .18s;
}
.topic-chips a:hover {
  color: var(--brand);
  border-color: var(--brand);
  transform: translateY(-1px);
}

/* ─── Section headings ───────────────────────────────── */
.page-heading {
  margin: 0 0 32px;
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -.015em;
  color: var(--charcoal);
}
.page-heading span { color: var(--muted); font-weight: 600; }

/* ─── Post grid + cards ──────────────────────────────── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 28px;
}
.post-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius2);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.post-card-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg); }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.post-card:hover .post-card-img img { transform: scale(1.035); }

.post-card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.post-card h2 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.32;
  font-weight: 800;
  letter-spacing: -.01em;
}
.post-card h2 a { transition: color .18s; }
.post-card h2 a:hover { color: var(--brand); }

.post-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.post-cats a {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--brand-dark);
}
.post-cats a:hover { color: var(--brand); text-decoration: underline; }
.post-cats a + a::before { content: '·'; margin-right: 6px; color: var(--muted); }

.post-excerpt { margin: 0 0 18px; color: var(--muted); font-size: 15px; line-height: 1.62; }
.post-meta {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

/* ─── Pagination ─────────────────────────────────────── */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.pager-count { color: var(--muted); font-size: 13px; font-weight: 700; }

.back-link { margin-top: 40px; }
.back-link a { color: var(--brand-dark); font-weight: 700; }
.back-link a:hover { text-decoration: underline; }

/* ─── Single post ────────────────────────────────────── */
.post { padding: 48px 0 24px; }
.post-head { text-align: center; margin-bottom: 32px; }
.post-head .post-cats { justify-content: center; }
.post-head h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4.6vw, 46px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--charcoal);
}
.post-head .post-meta { border-top: 0; padding-top: 0; }

.post-hero {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  margin-bottom: 44px;
}

/* ─── Post body — the WordPress HTML lands in here ───── */
.post-body { font-size: 17.5px; line-height: 1.75; color: var(--text); }
.post-body > *:first-child { margin-top: 0; }
.post-body p { margin: 0 0 1.35em; }
.post-body h2,
.post-body h3,
.post-body h4 {
  margin: 2em 0 .6em;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.25;
  color: var(--charcoal);
}
.post-body h2 { font-size: 27px; }
.post-body h3 { font-size: 22px; }
.post-body h4 { font-size: 18px; }
.post-body a { color: var(--brand-dark); text-decoration: underline; text-underline-offset: 2px; }
.post-body a:hover { color: var(--brand); }
.post-body strong { font-weight: 800; }
.post-body ul, .post-body ol { margin: 0 0 1.35em; padding-left: 1.4em; }
.post-body li { margin-bottom: .5em; }
.post-body img {
  height: auto;
  border-radius: var(--radius);
  margin: 1.8em auto;
  box-shadow: var(--shadow-sm);
}
.post-body figure { margin: 1.8em 0; }
.post-body figcaption {
  margin-top: .7em;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}
.post-body blockquote {
  margin: 1.8em 0;
  padding: 4px 0 4px 24px;
  border-left: 4px solid var(--brand);
  color: var(--muted);
  font-size: 19px;
  font-style: italic;
  line-height: 1.6;
}
.post-body blockquote p:last-child { margin-bottom: 0; }
.post-body hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.8em 0;
  font-size: 15px;
}
.post-body th, .post-body td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; }
.post-body th { background: rgba(0,151,217,.06); font-weight: 800; }
.post-body iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--radius); margin: 1.8em 0; }
/* long URLs and code shouldn't blow out the column */
.post-body pre { overflow-x: auto; }
.post-body :is(p, li) { overflow-wrap: anywhere; }

/* ─── Prev / next ────────────────────────────────────── */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.post-nav-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.4;
  transition: border-color .18s, transform .18s;
}
.post-nav-item:hover { border-color: var(--brand); transform: translateY(-2px); }
.post-nav-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.post-nav-item.align-end { text-align: right; align-items: flex-end; }

/* ─── End-of-post CTA ────────────────────────────────── */
.post-cta {
  margin: 48px 0 16px;
  padding: 34px 32px;
  text-align: center;
  border-radius: var(--radius2);
  background: linear-gradient(135deg, var(--brand-deep), var(--brand));
  color: #fff;
  box-shadow: var(--shadow);
}
.post-cta h3 { margin: 0 0 8px; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.post-cta p { margin: 0 0 20px; color: rgba(255,255,255,.88); font-size: 15.5px; line-height: 1.6; }
.post-cta .btn.primary { background: #fff; color: var(--brand-deep); border-color: #fff; }
.post-cta .btn.primary:hover { background: rgba(255,255,255,.9); }

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 720px) {
  .post-grid   { grid-template-columns: 1fr; gap: 22px; }
  .post-nav    { grid-template-columns: 1fr; }
  .post-nav-item.align-end { text-align: left; align-items: flex-start; }
  .post        { padding-top: 32px; }
  .post-hero   { margin-bottom: 32px; }
  .post-body   { font-size: 16.5px; }
  .pager       { flex-wrap: wrap; justify-content: center; }
  .post-cta    { padding: 28px 22px; }
}
