/* ================================================================
   Blog section - supplemental stylesheet.
   Loaded AFTER styles.css on blog pages only. Every rule here reuses the
   custom properties styles.css already defines (--pink, --navy-deep,
   --card, --line, --ease, etc.) so a new tenant's own styles.css repaints
   these classes automatically. No new fonts, no new colors invented here -
   this file only adds the handful of classes forms.html's .forms-grid/
   .form-card pattern didn't already cover (date/tag meta, prev/next pager,
   placeholder badge).
   ================================================================ */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 2.5vw, 1.75rem);
}
/* Rows always fill: match columns to post count so no card sits alone. */
.blog-grid:has(> :only-child) { grid-template-columns: minmax(0, 720px); justify-content: center; }
.blog-grid:has(> :nth-child(2):last-child),
.blog-grid:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, 1fr); }

.blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid transparent;
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: 0 14px 34px rgba(15, 36, 87, 0.06);
  transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease), border-left-color 0.35s var(--ease);
}
.blog-card:hover, .blog-card:focus-visible {
  border-left-color: var(--pink);
  box-shadow: 0 24px 54px rgba(15, 36, 87, 0.12);
  transform: translateY(-4px);
}
.blog-card-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.blog-card-date {
  font-family: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: rgba(229, 97, 168, 0.7);
}
.blog-card-badge, .blog-tags li {
  display: inline-block;
  font-family: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
  background: rgba(24, 59, 143, 0.08);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
}
.blog-card-title {
  margin-top: 1rem;
  font-family: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy-deep);
  line-height: 1.35;
}
.blog-card-excerpt {
  margin-top: 0.5rem;
  flex-grow: 1;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.blog-card-read {
  margin-top: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--pink);
}
.blog-card-read span { transition: transform 0.2s var(--ease); }
.blog-card:hover .blog-card-read span, .blog-card:focus-visible .blog-card-read span { transform: translateX(3px); }
.blog-empty { color: var(--ink-soft); }

.eyebrow-back { color: inherit; }
.eyebrow-back:hover, .eyebrow-back:focus-visible { text-decoration: underline; }

.blog-tags {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  list-style: none;
  padding: 0;
}

/* Post body: reuses .detail-body's 68ch reading column + .detail-body p's
   existing color/line-height (see about.html) - this block only fills the
   gaps a bulleted list inside a post needs that .detail-list doesn't
   already define at the site level. */
.detail-body .detail-list {
  margin-top: 1rem;
  padding-left: 1.25rem;
  list-style: disc;
  color: var(--ink-soft);
}
.detail-body .detail-list li { margin-top: 0.5rem; line-height: 1.6; }
.detail-body .detail-list li:first-child { margin-top: 0; }
.detail-body code {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 0.88em;
  background: rgba(24, 59, 143, 0.08);
  color: var(--navy-deep);
  padding: 0.1em 0.4em;
  border-radius: 4px;
}

.blog-pager-section { padding-top: 0; }
.blog-pager {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}
.blog-pager-link {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  max-width: 45%;
  font-weight: 600;
  color: var(--navy-deep);
}
.blog-pager-next { text-align: right; margin-left: auto; }
.blog-pager-label {
  font-family: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--pink);
}

@media (max-width: 1020px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-pager { flex-direction: column; }
  .blog-pager-link { max-width: 100%; }
  .blog-pager-next { text-align: left; margin-left: 0; }
}
