/* =====================================================
   blog.css — public blog (new design)
   Built on the colors_and_type.css tokens (loaded via styles.css).
   Used by blogs.php (listing) and blog.php (single post).
   ===================================================== */

/* ---- Hero ---- */
.bl-hero {
  padding: 72px 0 40px;
  background: var(--surface-1);
  border-bottom: 1px solid var(--border-1);
  text-align: center;
}
.bl-hero .eyebrow { margin-bottom: 14px; display: inline-block; }
.bl-hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(34px, 5vw, 54px);
  letter-spacing: -.02em;
  color: var(--ink-1);
  margin: 0 0 14px;
}
.bl-hero p { max-width: 560px; margin: 0 auto; color: var(--ink-3); font-size: 16px; line-height: 1.6; }
.bl-crumb {
  margin-top: 20px;
  font-size: 13px; color: var(--ink-4);
  display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap;
}
.bl-crumb a { color: var(--ink-3); font-weight: 500; }
.bl-crumb a:hover { color: var(--brand-coral); text-decoration: none; }
.bl-crumb svg { width: 13px; height: 13px; opacity: .55; }
.bl-crumb .current { color: var(--brand-coral); font-weight: 600; }

/* ---- Section wrapper + 2-col layout ---- */
.bl-wrap { padding: 56px 0 88px; }
.bl-layout {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 48px;
  align-items: start;
}

/* ---- Card grid ---- */
.bl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.bl-card-link { display: block; height: 100%; }
.bl-card-link:hover { text-decoration: none; }
.bl-card {
  display: flex; flex-direction: column; height: 100%;
  background: var(--surface-0);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out), border-color 220ms var(--ease-out);
}
.bl-card-link:hover .bl-card { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border-2); }
.bl-card__media { position: relative; aspect-ratio: 16/10; background: var(--surface-2); overflow: hidden; }
.bl-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 420ms var(--ease-out); }
.bl-card-link:hover .bl-card__media img { transform: scale(1.05); }
.bl-card__ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--ink-5); }
.bl-card__ph svg { width: 40px; height: 40px; }
.bl-card__body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.bl-pill {
  align-self: flex-start;
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--brand-coral); background: var(--brand-coral-50);
  padding: 5px 10px; border-radius: 999px; margin-bottom: 14px;
}
.bl-card__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: 19px; line-height: 1.3; letter-spacing: -.01em;
  color: var(--ink-1); margin: 0 0 10px;
}
.bl-card-link:hover .bl-card__title { color: var(--brand-coral); }
.bl-card__excerpt { font-size: 14px; line-height: 1.6; color: var(--ink-3); margin: 0 0 18px; }
.bl-card__meta { margin-top: auto; display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-4); }
.bl-card__meta svg { width: 14px; height: 14px; }

/* ---- Empty state ---- */
.bl-empty {
  text-align: center; padding: 64px 24px;
  border: 1px dashed var(--border-2); border-radius: var(--radius-lg); color: var(--ink-3);
}
.bl-empty svg { width: 44px; height: 44px; color: var(--ink-5); margin-bottom: 14px; }

/* ---- Pagination ---- */
.bl-pagination { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 44px; flex-wrap: wrap; }
.bl-pagination a, .bl-pagination span {
  min-width: 40px; height: 40px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); border: 1px solid var(--border-1);
  font-size: 14px; font-weight: 600; color: var(--ink-2); background: var(--surface-0);
}
.bl-pagination a:hover { border-color: var(--brand-coral); color: var(--brand-coral); text-decoration: none; }
.bl-pagination .active { background: var(--brand-coral); border-color: var(--brand-coral); color: #fff; }
.bl-pagination .disabled { color: var(--ink-5); background: var(--surface-1); }
.bl-pagination svg { width: 16px; height: 16px; }

/* ---- Sidebar ---- */
.bl-side { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 96px; }
.bl-widget {
  background: var(--surface-0); border: 1px solid var(--border-1);
  border-radius: var(--radius-lg); padding: 22px 22px 24px;
}
.bl-widget h5 {
  font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: .01em;
  color: var(--ink-1); margin: 0 0 16px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border-1); display: flex; align-items: center; gap: 9px;
}
.bl-widget h5::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--brand-coral); }
.bl-muted { font-size: 14px; color: var(--ink-4); margin: 0; }
.bl-catlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.bl-catlist a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: var(--ink-2);
  transition: background 160ms var(--ease-out), color 160ms var(--ease-out);
}
.bl-catlist a:hover { background: var(--surface-2); color: var(--ink-1); text-decoration: none; }
.bl-catlist a.active { background: var(--brand-coral-50); color: var(--brand-coral); }
.bl-count {
  font-size: 12px; font-weight: 600; color: var(--ink-4);
  background: var(--surface-2); border-radius: 999px; padding: 2px 9px; min-width: 24px; text-align: center;
}
.bl-catlist a.active .bl-count { background: #fff; color: var(--brand-coral); }

.bl-recent { display: flex; align-items: center; gap: 13px; padding: 11px 0; border-bottom: 1px solid var(--border-1); }
.bl-recent:last-child { border-bottom: none; }
.bl-recent:hover { text-decoration: none; }
.bl-recent__thumb { width: 60px; height: 54px; flex-shrink: 0; border-radius: var(--radius-sm); object-fit: cover; background: var(--surface-2); }
.bl-recent__ph { display: flex; align-items: center; justify-content: center; color: var(--ink-5); }
.bl-recent__ph svg { width: 20px; height: 20px; }
.bl-recent__t { display: flex; flex-direction: column; gap: 3px; }
.bl-recent__t span { font-size: 13.5px; font-weight: 600; line-height: 1.35; color: var(--ink-1); transition: color 160ms var(--ease-out); }
.bl-recent:hover .bl-recent__t span { color: var(--brand-coral); }
.bl-recent__t small { font-size: 11.5px; color: var(--ink-4); }

/* ---- Single post ---- */
.bl-hero-img { width: 100%; border-radius: var(--radius-xl); overflow: hidden; margin-bottom: 36px; border: 1px solid var(--border-1); }
.bl-hero-img img { width: 100%; display: block; max-height: 460px; object-fit: cover; }
.bl-post-head { margin-bottom: 28px; }
.bl-post-head h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(28px, 4vw, 42px); line-height: 1.15; letter-spacing: -.02em;
  color: var(--ink-1); margin: 14px 0 16px;
}
.bl-post-meta { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-4); }
.bl-post-meta span { display: inline-flex; align-items: center; gap: 6px; }
.bl-post-meta svg { width: 15px; height: 15px; }
.bl-post-meta a { color: var(--ink-3); font-weight: 500; }
.bl-post-meta a:hover { color: var(--brand-coral); text-decoration: none; }

/* ---- Prose (admin-authored post HTML) ---- */
.bl-prose { font-size: 16.5px; line-height: 1.75; color: var(--ink-2); }
.bl-prose > *:first-child { margin-top: 0; }
.bl-prose p { margin: 0 0 20px; }
.bl-prose h2 { font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: 1.25; color: var(--ink-1); margin: 40px 0 16px; letter-spacing: -.01em; }
.bl-prose h3 { font-family: var(--font-display); font-weight: 700; font-size: 21px; line-height: 1.3; color: var(--ink-1); margin: 32px 0 12px; }
.bl-prose h4 { font-weight: 700; font-size: 18px; color: var(--ink-1); margin: 26px 0 10px; }
.bl-prose a { color: var(--brand-coral); text-decoration: underline; text-underline-offset: 2px; }
.bl-prose a:hover { color: var(--brand-coral-700); }
.bl-prose ul, .bl-prose ol { margin: 0 0 22px; padding-left: 24px; }
.bl-prose li { margin-bottom: 8px; }
.bl-prose img { max-width: 100%; height: auto; border-radius: var(--radius-md); margin: 8px 0 24px; }
.bl-prose blockquote {
  margin: 24px 0; padding: 10px 22px; border-left: 3px solid var(--brand-coral);
  background: var(--surface-2); border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--ink-2); font-style: italic;
}
.bl-prose code { font-family: var(--font-mono); font-size: .9em; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }
.bl-prose pre { background: var(--ink-1); color: #f3f3f3; padding: 18px 20px; border-radius: var(--radius-md); overflow: auto; margin: 0 0 24px; }
.bl-prose pre code { background: none; padding: 0; color: inherit; }
.bl-prose table { width: 100%; border-collapse: collapse; margin: 0 0 24px; font-size: 15px; }
.bl-prose th, .bl-prose td { border: 1px solid var(--border-2); padding: 10px 14px; text-align: left; }
.bl-prose th { background: var(--surface-2); font-weight: 700; color: var(--ink-1); }
.bl-prose hr { border: 0; border-top: 1px solid var(--border-1); margin: 32px 0; }

.bl-back { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--border-1); }

/* ---- Responsive ---- */
@media (max-width: 980px) {
  .bl-layout { grid-template-columns: 1fr; gap: 44px; }
  .bl-side { position: static; flex-direction: row; flex-wrap: wrap; }
  .bl-widget { flex: 1 1 280px; }
}
@media (max-width: 680px) {
  .bl-grid { grid-template-columns: 1fr; }
  .bl-hero { padding: 52px 0 32px; }
  .bl-side { flex-direction: column; }
}
