/* ============================================================
   BURDS NERDS — bn-blog.css
   Styles for the blog listing page (blog.php) and individual
   blog post pages (blog/*.php).

   Load order: bn-brand.css → bn-style.css → bn-pages.css → bn-blog.css

   Two distinct layouts live here:
   1. Blog listing  — .blog-grid, .blog-card
   2. Blog post     — .blog-post, .blog-post__body (rich typography)
   ============================================================ */


/* ── FEATURED POST HERO ───────────────────────────────────────
   The latest post gets a large split-card treatment: 60% image
   left, 40% content right. When no image exists the card goes
   full-width text-only. Cinematic 21:9 image fills the left
   panel at full height on desktop.
   ─────────────────────────────────────────────────────────── */

.blog-featured {
  max-width: 1200px;
  margin: 0 auto 16px;
  padding: 0 24px;
}

.blog-featured__card {
  display: grid;
  grid-template-columns: 3fr 2fr;
  background: var(--bn-surface);
  border: 1px solid var(--bn-bdr);
  border-radius: var(--bn-radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.25s, box-shadow 0.25s;
  min-height: 360px;
}

.blog-featured__card--no-img {
  grid-template-columns: 1fr;
}

.blog-featured__card:hover {
  border-color: var(--bn-acc);
  box-shadow: 0 16px 56px rgba(0, 0, 0, 0.14);
}

/* Image panel — fills the left column at full height */
.blog-featured__img-wrap {
  overflow: hidden;
  position: relative;
}

.blog-featured__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.blog-featured__card:hover .blog-featured__img {
  transform: scale(1.04);
}

/* Content panel */
.blog-featured__content {
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.blog-featured__card--no-img .blog-featured__content {
  padding: 56px 64px;
  max-width: 760px;
}

/* "Latest" gold pill badge */
.blog-featured__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bn-bg);
  background: var(--bn-acc);
  padding: 4px 12px;
  border-radius: var(--bn-radius-full);
  width: fit-content;
  margin-bottom: 2px;
}

.blog-featured__cat {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bn-acc);
  margin: 0;
}

.blog-featured__title {
  font-family: var(--bn-font-display);
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--bn-text);
  margin: 0;
  transition: color 0.15s;
}

.blog-featured__card:hover .blog-featured__title {
  color: var(--bn-acc);
}

.blog-featured__excerpt {
  font-size: 15px;
  color: var(--bn-text-muted);
  line-height: 1.65;
  margin: 0;
}

.blog-featured__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--bn-text-faint);
  flex-wrap: wrap;
}

.blog-featured__meta-sep {
  opacity: 0.4;
}

.blog-featured__cta {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--bn-acc);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}


/* ── MORE-POSTS SECTION SEPARATOR ────────────────────────────
   Thin rule with centered label between the featured card and
   the remaining card grid.
   ─────────────────────────────────────────────────────────── */

.blog-more-head {
  max-width: 1200px;
  margin: 48px auto 0;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.blog-more-head__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bn-text-faint);
  white-space: nowrap;
}

.blog-more-head__rule {
  flex: 1;
  height: 1px;
  background: var(--bn-bdr);
}


/* ── BLOG LISTING GRID ────────────────────────────────────────
   Three-column card grid on desktop, two on tablet, one on
   mobile. Cards use consistent height via flex column layout
   with the excerpt growing to fill space.
   ─────────────────────────────────────────────────────────── */

.blog-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 24px 96px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Reduced top padding when appearing below the featured post */
.blog-grid--more {
  padding-top: 24px;
}

/* ── Single blog card ── */
.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--bn-surface);
  border: 1px solid var(--bn-bdr);
  border-radius: var(--bn-radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.blog-card:hover {
  border-color: var(--bn-acc);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* Featured image — 21:9 cinematic ratio, zoom on hover */
.blog-card__img-wrap {
  aspect-ratio: 21 / 9;
  overflow: hidden;
  background: var(--bn-surface);
}

.blog-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.blog-card:hover .blog-card__img {
  transform: scale(1.04);
}

/* Card body — grows to fill card height for even baselines */
.blog-card__body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 12px;
}

/* Category badge — gold pill */
.blog-card__cat {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bn-acc);
  background: rgba(184, 134, 11, 0.10);
  padding: 3px 10px;
  border-radius: var(--bn-radius-full);
  width: fit-content;
}

/* Post title */
.blog-card__title {
  font-family: var(--bn-font-display);
  font-size: clamp(17px, 1.5vw, 20px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--bn-text);
  margin: 0;
  transition: color 0.15s;
}

.blog-card:hover .blog-card__title {
  color: var(--bn-acc);
}

/* Excerpt — grows to push meta to the bottom */
.blog-card__excerpt {
  font-size: 14px;
  color: var(--bn-text-muted);
  line-height: 1.6;
  margin: 0;
  flex: 1;
}

/* Date + read time — pinned to card bottom */
.blog-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--bn-text-faint);
  padding-top: 8px;
  border-top: 1px solid var(--bn-bdr);
  margin-top: auto;
}

.blog-card__meta-sep {
  opacity: 0.4;
}

/* ── Empty state (no posts yet) ── */
.blog-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 24px;
  color: var(--bn-text-muted);
}

.blog-empty__title {
  font-family: var(--bn-font-display);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
}


/* ── BLOG POST — SINGLE PAGE ──────────────────────────────────
   Narrow readable column with generous side padding.
   Max-width of 720px keeps line length comfortable for reading
   (roughly 70–75 characters per line at default font size).
   ─────────────────────────────────────────────────────────── */

.blog-post {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}

/* ── Post header (above the body rule) ── */
.blog-post__header {
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--bn-bdr);
}

.blog-post__cat {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bn-acc);
  margin-bottom: 16px;
}

.blog-post__title {
  font-family: var(--bn-font-display);
  font-size: clamp(28px, 4.5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--bn-text);
  margin: 0 0 20px;
}

.blog-post__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--bn-text-faint);
  flex-wrap: wrap;
}

.blog-post__meta-sep {
  opacity: 0.4;
}

/* Featured image — 21:9 cinematic, fills the post column */
.blog-post__img-wrap {
  aspect-ratio: 21 / 9;
  overflow: hidden;
  border-radius: var(--bn-radius);
  margin-bottom: 40px;
}

.blog-post__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Podcast player — shown on posts that have an audio version.
   Appears between the post header and the body. */
.blog-post__podcast {
  padding: 20px 24px;
  background: var(--bn-surface);
  border: 1px solid var(--bn-bdr);
  border-left: 3px solid var(--bn-acc);
  border-radius: var(--bn-radius);
  margin-bottom: 40px;
}

.blog-post__podcast-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bn-acc);
  margin-bottom: 14px;
}

.blog-post__podcast-label svg {
  flex-shrink: 0;
}

.blog-post__podcast audio {
  width: 100%;
  display: block;
}


/* ── Post body — rich editorial typography ────────────────────
   All selectors are scoped to .blog-post__body so they never
   leak into nav, footer, or other page sections.
   ─────────────────────────────────────────────────────────── */

.blog-post__body {
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.75;
  color: var(--bn-text-muted);
}

/* Paragraphs */
.blog-post__body p {
  margin: 0 0 1.5em;
}

/* Headings — pull a bit of the brand display font into the body */
.blog-post__body h2 {
  font-family: var(--bn-font-display);
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--bn-text);
  margin: 2em 0 0.6em;
  padding-left: 16px;
  border-left: 3px solid var(--bn-acc);
}

.blog-post__body h3 {
  font-family: var(--bn-font-display);
  font-size: clamp(16px, 1.8vw, 20px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--bn-text);
  margin: 1.75em 0 0.5em;
}

/* Links in body */
.blog-post__body a {
  color: var(--bn-acc);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: opacity 0.15s;
}

.blog-post__body a:hover {
  opacity: 0.75;
}

/* Lists */
.blog-post__body ul,
.blog-post__body ol {
  padding-left: 1.5em;
  margin: 0 0 1.5em;
}

.blog-post__body li {
  margin-bottom: 0.5em;
}

.blog-post__body ul li::marker {
  color: var(--bn-acc);
}

/* Blockquote — pull quote styling */
.blog-post__body blockquote {
  border-left: 3px solid var(--bn-acc);
  margin: 2em 0;
  padding: 16px 24px;
  background: var(--bn-surface);
  border-radius: 0 var(--bn-radius) var(--bn-radius) 0;
}

.blog-post__body blockquote p {
  font-style: italic;
  font-size: 1.05em;
  color: var(--bn-text);
  margin: 0;
}

/* Horizontal rule — section divider */
.blog-post__body hr {
  border: none;
  border-top: 1px solid var(--bn-bdr);
  margin: 2.5em 0;
}

/* Strong + em */
.blog-post__body strong {
  font-weight: 600;
  color: var(--bn-text);
}

.blog-post__body em {
  font-style: italic;
}

/* Inline code */
.blog-post__body code {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.875em;
  background: var(--bn-surface);
  border: 1px solid var(--bn-bdr);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--bn-acc);
}


/* ── POST CTA BLOCK ───────────────────────────────────────────
   Gold-accented inline call-to-action at the end of each post.
   ─────────────────────────────────────────────────────────── */

.blog-post__cta {
  margin-top: 56px;
  padding: 36px 40px;
  background: var(--bn-surface);
  border: 1px solid var(--bn-bdr);
  border-left: 4px solid var(--bn-acc);
  border-radius: var(--bn-radius);
}

.blog-post__cta-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bn-acc);
  margin: 0 0 8px;
}

.blog-post__cta-title {
  font-family: var(--bn-font-display);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--bn-text);
  margin: 0 0 8px;
}

.blog-post__cta-sub {
  font-size: 14px;
  color: var(--bn-text-muted);
  margin: 0 0 24px;
  line-height: 1.55;
}


/* ── POST NAVIGATION (prev / next) ────────────────────────────
   Links to adjacent posts below the CTA. Optional — only render
   if prev/next posts exist.
   ─────────────────────────────────────────────────────────── */

.blog-post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--bn-bdr);
}

.blog-post-nav__link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  padding: 16px 20px;
  border: 1px solid var(--bn-bdr);
  border-radius: var(--bn-radius);
  transition: border-color 0.2s;
}

.blog-post-nav__link:hover {
  border-color: var(--bn-acc);
}

.blog-post-nav__link--next {
  text-align: right;
}

.blog-post-nav__dir {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bn-text-faint);
}

.blog-post-nav__title {
  font-size: 14px;
  font-weight: 500;
  color: var(--bn-text-muted);
  line-height: 1.4;
}


/* ── RESPONSIVE ───────────────────────────────────────────────  */

@media (max-width: 960px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 48px 24px 72px;
  }

  .blog-featured__card {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .blog-featured__img-wrap {
    aspect-ratio: 21 / 9;
    max-height: 280px;
  }

  .blog-featured__content {
    padding: 36px 32px;
  }
}

@media (max-width: 640px) {
  .blog-grid {
    grid-template-columns: 1fr;
    padding: 40px 20px 64px;
    gap: 16px;
  }

  .blog-grid--more {
    padding-top: 20px;
  }

  .blog-card__body {
    padding: 20px;
  }

  .blog-featured {
    padding: 0 16px;
  }

  .blog-featured__img-wrap {
    max-height: 220px;
  }

  .blog-featured__content {
    padding: 24px 20px;
    gap: 12px;
  }

  .blog-featured__card--no-img .blog-featured__content {
    padding: 32px 24px;
  }

  .blog-more-head {
    padding: 0 16px;
  }

  .blog-post {
    padding: 40px 20px 72px;
  }

  .blog-post__cta {
    padding: 24px;
  }

  .blog-post-nav {
    grid-template-columns: 1fr;
  }

  .blog-post-nav__link--next {
    text-align: left;
  }
}
