/* ══════════════════════════════════════════════════
   SermonBuild Blog — Shared Stylesheet
   sermonbuild.com/blog
══════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: light only; }
body { font-family: 'Inter', sans-serif; background: #faf8f5; color: #1C2B39; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; margin: 0; padding: 0; }
img { max-width: 100%; height: auto; }
a { text-decoration: none; }

/* ── Reading progress bar ─────────────────────── */
#reading-progress {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #B22A2F, #D9A441);
  z-index: 9999;
  transition: width 0.08s linear;
  pointer-events: none;
}

/* ── Navigation ───────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(14, 28, 39, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.site-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.nav-logo img { height: 30px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: rgba(255,255,255,0.7); font-size: 0.875rem; font-weight: 500; text-decoration: none; transition: color 0.2s; }
.nav-links a:hover { color: #fff; }
.nav-links a.active { color: #D9A441; }
.nav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, #B22A2F, #d03237);
  color: #fff !important;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(178,42,47,0.35);
  transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
}
.nav-cta:hover { opacity: 0.9; transform: translateY(-1px); }
@media (max-width: 767px) { .nav-links { display: none; } }

/* ── Post hero (dark header area) ─────────────── */
.post-hero {
  background: linear-gradient(135deg, #0e1c27 0%, #1C2B39 50%, #1a2d3f 100%);
  padding: 4rem 1.5rem 3.5rem;
}
.post-hero-inner { max-width: 760px; margin: 0 auto; }
.post-breadcrumb {
  display: flex; align-items: center; gap: 0.4rem;
  margin-bottom: 1.25rem;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.45);
}
.post-breadcrumb a { color: rgba(255,255,255,0.45); text-decoration: none; transition: color 0.2s; }
.post-breadcrumb a:hover { color: rgba(255,255,255,0.8); }
.post-breadcrumb svg { flex-shrink: 0; opacity: 0.4; }
.post-category {
  display: inline-block;
  font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em;
  color: #D9A441;
  background: rgba(217,164,65,0.12);
  border: 1px solid rgba(217,164,65,0.25);
  border-radius: 99px;
  padding: 3px 10px;
  margin-bottom: 1rem;
}
.post-hero h1 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(1.875rem, 4vw, 2.875rem);
  font-weight: 400;
  color: #fff;
  line-height: 1.2;
  margin: 0 0 1.25rem;
}
.post-meta {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 1.25rem;
  color: rgba(255,255,255,0.5);
  font-size: 0.8125rem;
}
.post-meta span { display: flex; align-items: center; gap: 0.375rem; }

/* ── Article layout ───────────────────────────── */
.article-layout {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

/* ── Table of contents ────────────────────────── */
.toc {
  background: #f3f0eb;
  border-left: 3px solid #D9A441;
  border-radius: 0 8px 8px 0;
  padding: 1.25rem 1.5rem;
  margin: 0 0 2.5rem;
}
.toc-title {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  color: #1C2B39; margin: 0 0 0.75rem;
}
.toc ol { margin: 0; padding-left: 1.25rem; }
.toc li { margin-bottom: 0.35rem; }
.toc a { color: #4A5568; font-size: 0.9rem; text-decoration: none; }
.toc a:hover { color: #1C2B39; text-decoration: underline; }

/* ── Prose ────────────────────────────────────── */
.prose h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.625rem; font-weight: 400;
  color: #1C2B39; margin: 2.75rem 0 0.875rem; line-height: 1.3;
}
.prose h3 {
  font-size: 1.125rem; font-weight: 700;
  color: #1C2B39; margin: 2rem 0 0.75rem; line-height: 1.4;
}
.prose h4 { font-size: 1rem; font-weight: 700; color: #374151; margin: 1.5rem 0 0.5rem; }
.prose p { color: #374151; line-height: 1.85; margin: 0 0 1.25rem; font-size: 1.0625rem; }
.prose ul, .prose ol { color: #374151; line-height: 1.85; margin: 0 0 1.25rem; padding-left: 1.5rem; }
.prose li { margin-bottom: 0.5rem; font-size: 1.0625rem; }
.prose strong { color: #1C2B39; font-weight: 700; }
.prose em { font-style: italic; }
.prose a { color: #B22A2F; text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: #8C1F24; }
.prose blockquote {
  border-left: 3px solid #D9A441;
  padding: 1rem 1.25rem;
  background: #faf6ed;
  border-radius: 0 8px 8px 0;
  margin: 1.75rem 0;
  font-style: italic;
  color: #4A5568;
}
.prose blockquote p { margin-bottom: 0; color: #4A5568; }
.prose hr { border: none; border-top: 1px solid #e5e7eb; margin: 2.5rem 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 2rem 0; font-size: 0.9375rem; display: block; overflow-x: auto; }
.prose thead th { background: #1C2B39; color: white; padding: 0.75rem 1rem; text-align: left; font-weight: 600; font-size: 0.875rem; white-space: nowrap; }
.prose tbody td { padding: 0.75rem 1rem; border-bottom: 1px solid #e5e7eb; color: #374151; }
.prose tbody tr:nth-child(even) td { background: #f9f7f4; }
.prose tbody tr td:first-child { font-weight: 600; color: #1C2B39; }

/* ── Embedded CTA box ─────────────────────────── */
.cta-box {
  background: linear-gradient(135deg, #0e1c27 0%, #1C2B39 100%);
  border-radius: 12px;
  padding: 2.25rem 2rem;
  margin: 2.75rem 0;
  text-align: center;
  border: 1px solid rgba(217,164,65,0.2);
}
.cta-box h3 {
  font-family: 'DM Serif Display', Georgia, serif;
  color: white; font-size: 1.5rem; font-weight: 400; margin: 0 0 0.75rem;
}
.cta-box p { color: rgba(255,255,255,0.65); font-size: 0.9375rem; margin: 0 0 1.5rem; line-height: 1.7; }
.cta-box .cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, #B22A2F, #d03237);
  color: #fff;
  font-weight: 600; font-size: 0.9375rem;
  padding: 12px 24px; border-radius: 8px; text-decoration: none;
  box-shadow: 0 4px 16px rgba(178,42,47,0.4);
  transition: opacity 0.2s, transform 0.2s;
}
.cta-box .cta-btn:hover { opacity: 0.9; transform: translateY(-2px); }
.cta-box .cta-note { font-size: 0.8rem; color: rgba(255,255,255,0.4); margin: 0.75rem 0 0; }

/* ── Related posts ────────────────────────────── */
.related-posts { border-top: 1px solid #e5e7eb; padding-top: 2.5rem; margin-top: 0.5rem; }
.related-posts h3 {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  color: #9CA3AF; margin: 0 0 1.25rem;
}
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.related-card {
  display: block;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1.25rem;
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.2s;
}
.related-card:hover { box-shadow: 0 8px 24px rgba(28,43,57,0.1); transform: translateY(-2px); }
.related-card .r-cat { font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: #D9A441; margin-bottom: 0.5rem; }
.related-card h4 { font-size: 0.9375rem; font-weight: 700; color: #1C2B39; margin: 0; line-height: 1.4; }

/* ── Blog index ───────────────────────────────── */
.blog-hero {
  background: linear-gradient(135deg, #0e1c27 0%, #1C2B39 50%, #1a2d3f 100%);
  padding: 5rem 1.5rem 4rem;
  text-align: center;
}
.blog-hero .eyebrow { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em; color: #D9A441; margin-bottom: 1rem; }
.blog-hero h1 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  color: white; font-weight: 400; margin: 0 0 1rem; line-height: 1.2;
}
.blog-hero p { color: rgba(255,255,255,0.6); font-size: 1.0625rem; max-width: 520px; margin: 0 auto; line-height: 1.75; }

.posts-section { max-width: 1100px; margin: 0 auto; padding: 3.5rem 1.5rem 5rem; }
.section-heading { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: #9CA3AF; margin: 0 0 1.5rem; }

.featured-card {
  display: grid; grid-template-columns: 1fr 1fr;
  background: white; border-radius: 14px; border: 1px solid #e5e7eb;
  overflow: hidden; margin-bottom: 3rem;
  text-decoration: none;
  transition: box-shadow 0.25s, transform 0.25s;
}
.featured-card:hover { box-shadow: 0 20px 56px rgba(28,43,57,0.12); transform: translateY(-4px); }
.featured-card .fc-img {
  background: linear-gradient(135deg, #0e1c27 0%, #1a2d3f 100%);
  min-height: 260px;
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
}
.featured-card .fc-body { padding: 2.5rem; display: flex; flex-direction: column; justify-content: center; }
.featured-card .fc-cat { font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: #D9A441; margin-bottom: 0.75rem; }
.featured-card .fc-title { font-family: 'DM Serif Display', Georgia, serif; font-size: 1.625rem; font-weight: 400; color: #1C2B39; margin: 0 0 0.875rem; line-height: 1.3; }
.featured-card .fc-excerpt { font-size: 0.9375rem; color: #6B7280; line-height: 1.7; margin: 0 0 1.25rem; }
.featured-card .fc-meta { font-size: 0.8125rem; color: #9CA3AF; }
.read-link { display: inline-flex; align-items: center; gap: 6px; font-size: 0.875rem; font-weight: 600; color: #B22A2F; }

.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.post-card {
  display: block; background: white; border-radius: 12px; border: 1px solid #e5e7eb;
  overflow: hidden; text-decoration: none;
  transition: box-shadow 0.25s, transform 0.25s;
}
.post-card:hover { box-shadow: 0 12px 40px rgba(28,43,57,0.1); transform: translateY(-3px); }
.post-card .pc-img { height: 156px; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.post-card .pc-body { padding: 1.5rem; }
.post-card .pc-cat { font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: #D9A441; margin-bottom: 0.5rem; }
.post-card .pc-title { font-size: 1.0625rem; font-weight: 700; color: #1C2B39; margin: 0 0 0.625rem; line-height: 1.4; }
.post-card .pc-excerpt { font-size: 0.875rem; color: #6B7280; line-height: 1.65; margin: 0 0 1rem; }
.post-card .pc-meta { font-size: 0.8rem; color: #9CA3AF; }

@media (max-width: 639px) {
  .featured-card { grid-template-columns: 1fr; }
  .featured-card .fc-img { min-height: 180px; }
  .featured-card .fc-body { padding: 1.75rem; }
}

/* ── Site footer ──────────────────────────────── */
.site-footer { background: #0e1c27; color: rgba(255,255,255,0.65); padding: 3.5rem 1.5rem 2rem; }
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.footer-brand-desc { font-size: 0.875rem; line-height: 1.75; max-width: 280px; margin: 0.75rem 0 1.25rem; color: rgba(255,255,255,0.6); }
.footer-social { display: flex; gap: 0.625rem; }
.footer-social a {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.55); transition: background 0.2s, color 0.2s;
}
.footer-social a:hover { background: rgba(255,255,255,0.12); color: white; }
.footer-col h4 {
  font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em;
  color: white; margin: 0 0 1rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0.75rem; }
.footer-col a { font-size: 0.875rem; color: rgba(255,255,255,0.6); text-decoration: none; transition: color 0.2s; }
.footer-col a:hover { color: white; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.75rem;
  font-size: 0.8125rem;
}
@media (max-width: 767px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 479px) { .footer-grid { grid-template-columns: 1fr; } }
