/* =========================================================
   Ijambo Blog: design inspired by doledev.space
   ========================================================= */

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --footer-bg: #ffffff;
  --text: #0f172a;
  --text-soft: #475569;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --primary: #0066cc;
  --primary-hover: #0052a3;
  --primary-soft: #eaf3fc;
  --on-primary: #ffffff;
  --grad: linear-gradient(135deg, #3b9bff 0%, #8b7cf6 100%);
  --grad-text: linear-gradient(135deg, #0066cc 0%, #8b5cf6 100%);
  --grad-soft: linear-gradient(135deg, #eef5fd 0%, #f4effd 100%);
  --on-grad: #ffffff;
  --grid-line: rgba(100, 116, 139, 0.11);
  --glow: rgba(139, 92, 246, 0.16);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 16px 36px -16px rgba(15, 23, 42, 0.18);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-btn: 8px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

[data-theme="dark"] {
  --bg: #0a1628;
  --surface: #0f1f3c;
  --surface-2: #132647;
  --footer-bg: #0e1d38;
  --text: #d3dcf7;
  --text-soft: #a9b5d3;
  --muted: #8794b3;
  --border: #1d3055;
  --border-strong: #2b4372;
  --primary: #64ffda;
  --primary-hover: #4de8c3;
  --primary-soft: rgba(100, 255, 218, 0.1);
  --on-primary: #0a1628;
  --grad: linear-gradient(135deg, #64ffda 0%, #7c8cf8 100%);
  --grad-text: linear-gradient(135deg, #64ffda 0%, #7c8cf8 100%);
  --grad-soft: linear-gradient(135deg, rgba(100, 255, 218, 0.08) 0%, rgba(124, 140, 248, 0.1) 100%);
  --on-grad: #0a1628;
  --grid-line: rgba(130, 160, 230, 0.07);
  --glow: rgba(120, 90, 255, 0.2);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 16px 36px -16px rgba(0, 0, 0, 0.6);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

/* Subtle grid over the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
}

main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: none; }
h1, h2, h3, h4 {
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  color: var(--text);
}
p { margin: 0 0 1em; }
ul { margin: 0; }
.muted { color: var(--muted); }
.container { width: min(1120px, 100% - 40px); margin-inline: auto; }
.narrow { max-width: 820px; margin-inline: auto; }

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--surface); padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip-link:focus { left: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: 60px; gap: 16px;
}

/* Logo: cross in a rounded square + "Ijambo Blog" */
.brand {
  justify-self: start; display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body); font-weight: 800; font-size: 1.15rem;
  letter-spacing: -0.02em; color: var(--text); white-space: nowrap;
}
.brand:hover { opacity: 0.88; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--grad); color: var(--on-grad);
  display: grid; place-items: center; box-shadow: 0 6px 14px -6px rgba(99, 102, 241, 0.6);
}
.brand-mark svg { width: 18px; height: 18px; }
.brand-accent { color: var(--primary); }

.nav { display: flex; align-items: center; gap: 26px; }
.nav a {
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 500; color: var(--muted);
  padding: 6px 2px; border-bottom: 2px solid transparent; transition: color 0.2s, border-color 0.2s;
}
.nav a:hover { color: var(--primary); }
.nav a.active { color: var(--primary); border-bottom-color: var(--primary); }

.header-actions { justify-self: end; display: flex; align-items: center; gap: 4px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 8px; border: 0; background: transparent;
  color: var(--text-soft); cursor: pointer; display: grid; place-items: center;
  transition: background 0.2s, color 0.2s;
}
.icon-btn:hover { background: var(--primary-soft); color: var(--primary); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-sun { display: none; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
.nav-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius-btn); font-weight: 600; font-size: 0.92rem;
  font-family: var(--font-body); border: 1px solid transparent; cursor: pointer;
  transition: transform 0.2s, background 0.2s, border-color 0.2s, color 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-ghost:hover { background: var(--primary-soft); }
.btn-whatsapp { background: #25d366; color: #fff; }
.btn-whatsapp:hover { background: #1fb858; }
.btn-amazon { background: #ffb020; color: #1a1200; }
.btn-amazon:hover { background: #ffa000; }
.btn-sm { padding: 9px 16px; font-size: 0.85rem; }
.btn-block { width: 100%; }

.link-arrow { font-family: var(--font-mono); font-weight: 600; font-size: 0.82rem; color: var(--primary); }
.link-arrow:hover { opacity: 0.8; }
.center-cta { display: flex; justify-content: center; margin-top: 40px; }

/* ---------- Small labels ---------- */
.eyebrow {
  display: inline-block; font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--primary); margin-bottom: 12px;
}
.eyebrow .dot { display: none; }
.grad-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  min-height: calc(100vh - 60px); display: flex; align-items: center; padding: 56px 0 110px;
}
.hero::before {
  content: ""; position: absolute; left: 4%; top: 50%; width: 620px; height: 520px;
  transform: translateY(-50%); pointer-events: none;
  background: radial-gradient(circle, var(--glow), transparent 65%);
}
.hero .container { position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center; }
.hello { font-family: var(--font-mono); color: var(--primary); font-size: 1rem; margin: 0 0 6px; }
.hero-name { font-weight: 700; font-size: 0.95rem; margin: 0 0 10px; color: var(--text); }
.hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.2rem); font-weight: 700; color: var(--text-soft);
  margin-bottom: 20px; letter-spacing: -0.03em;
}
.typed { font-family: var(--font-mono); font-weight: 700; color: var(--primary); }
.cursor {
  display: inline-block; width: 2px; height: 0.95em; background: var(--primary);
  margin-left: 4px; vertical-align: -0.1em; animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.lead-text { font-size: 1.05rem; color: var(--muted); max-width: 520px; margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-stats { display: flex; gap: 28px; margin-top: 44px; }
.stat + .stat { border-left: 1px solid var(--border-strong); padding-left: 28px; }
.stat-num { font-size: 2rem; font-weight: 800; line-height: 1; color: var(--text); }
.stat-label { margin-top: 8px; font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); }

/* Verse card with offset frame and dots (like the photo on doledev.space) */
.hero-visual { position: relative; margin: 0 24px 24px 0; }
.hero-visual::before {
  content: ""; position: absolute; inset: 28px -24px -24px 28px;
  border: 1.5px solid var(--primary); border-radius: var(--radius);
}
.hero-visual::after {
  content: ""; position: absolute; right: -16px; bottom: -16px; width: 76px; height: 76px;
  background-image: radial-gradient(var(--primary) 1.6px, transparent 1.7px);
  background-size: 10px 10px; opacity: 0.85;
}
.verse-card {
  position: relative; z-index: 1; padding: 32px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-md); overflow: hidden;
}
.verse-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad); }
.verse-card::after {
  content: "“"; position: absolute; right: 22px; top: -14px;
  font-family: Georgia, serif; font-size: 8rem; line-height: 1; color: var(--primary); opacity: 0.1;
}
.verse-label {
  display: inline-block; font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--primary);
  background: var(--primary-soft); padding: 5px 12px; border-radius: 999px; margin-bottom: 18px;
}
.verse-text { margin: 0 0 16px; font-size: 1.15rem; font-weight: 500; line-height: 1.65; color: var(--text); }
.verse-ref { font-family: var(--font-mono); font-weight: 700; font-size: 0.9rem; color: var(--primary); }
.verse-reflection { margin: 14px 0 0; padding-top: 14px; border-top: 1px dashed var(--border-strong); color: var(--muted); font-size: 0.95rem; }

.scroll-hint {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
}
.mouse { width: 22px; height: 34px; border: 2px solid var(--border-strong); border-radius: 12px; display: flex; justify-content: center; padding-top: 6px; }
.wheel { width: 3px; height: 7px; border-radius: 2px; background: var(--primary); animation: wheel 1.6s ease-in-out infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(9px); opacity: 0; } }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-head { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; margin: 0 0 8px; }
.section-head p { margin: 0; max-width: 560px; }

.page-head { padding: 64px 0 8px; text-align: center; }
.page-head h1 { font-size: clamp(2rem, 4.2vw, 2.9rem); font-weight: 800; margin-bottom: 10px; }
.page-head .lead-text { margin-inline: auto; }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--grad-soft); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.card:hover .card-media img { transform: scale(1.04); }
.card-placeholder { width: 100%; height: 100%; display: grid; place-items: center; background: var(--grad-soft); color: var(--primary); }
.card-placeholder svg { width: 44px; height: 44px; opacity: 0.55; }
.card-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); margin-bottom: 12px; }
.card-title { font-size: 1.12rem; font-weight: 700; margin-bottom: 8px; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--primary); }
.card-excerpt { color: var(--muted); font-size: 0.92rem; margin-bottom: 18px; }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); }

.post-card--lead { display: grid; grid-template-columns: 1.1fr 1fr; margin-bottom: 24px; }
.post-card--lead .card-media { aspect-ratio: auto; min-height: 280px; }
.post-card--lead .card-body { padding: 36px; justify-content: center; }
.post-card--lead .card-title { font-size: 1.6rem; }

.badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--primary-soft);
  border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
  color: var(--primary); font-family: var(--font-mono); font-weight: 600;
  font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase;
}
a.badge:hover { box-shadow: 0 0 0 3px var(--primary-soft); }

.empty {
  text-align: center; padding: 56px 24px; border: 1px dashed var(--border-strong);
  border-radius: var(--radius); color: var(--muted); background: var(--surface);
}

/* ---------- Pagination ---------- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 40px; color: var(--muted); font-family: var(--font-mono); font-size: 0.82rem; }

/* ---------- Post page ---------- */
.post-hero { padding: 48px 0 8px; text-align: center; }
.post-hero .container { max-width: 820px; }
.breadcrumb { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .current { color: var(--primary); }
.post-hero h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); font-weight: 800; margin: 18px 0 14px; }
.post-lead { font-size: 1.1rem; color: var(--muted); max-width: 640px; margin-inline: auto; }
.post-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 18px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); }
.post-meta span { display: inline-flex; align-items: center; gap: 6px; }
.post-meta svg { width: 14px; height: 14px; }
.post-cover { max-width: 1000px; margin: 28px auto 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-md); }
.post-cover img { width: 100%; }
.scripture-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; margin-top: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  font-family: var(--font-mono); font-weight: 600; font-size: 0.8rem; color: var(--text);
}

.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 56px; max-width: 1000px; margin: 40px auto 0; align-items: start; }
.post-layout.no-toc { grid-template-columns: minmax(0, 720px); justify-content: center; }

.toc-box { position: sticky; top: 84px; padding: 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.toc-box h4 { margin: 0 0 12px; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.toc-box ul { list-style: none; padding: 0; margin: 0; }
.toc-box ul ul { padding-left: 12px; }
.toc-box a { display: block; padding: 6px 0 6px 12px; border-left: 2px solid var(--border); color: var(--muted); font-size: 0.85rem; }
.toc-box a:hover { color: var(--primary); border-left-color: var(--primary); }

.prose { font-size: 1.05rem; line-height: 1.85; color: var(--text-soft); }
.prose h2 { font-size: 1.55rem; margin: 2em 0 0.7em; padding-top: 1.2em; border-top: 1px solid var(--border); color: var(--text); }
.prose h3 { font-size: 1.25rem; margin: 1.6em 0 0.5em; color: var(--text); }
.prose > h2:first-child, .prose > h3:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.prose strong { color: var(--text); }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.5em; }
.prose li::marker { color: var(--primary); }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose img { border-radius: var(--radius-sm); margin: 1.5em 0; }
.prose blockquote {
  margin: 1.8em 0; padding: 20px 24px; background: var(--grad-soft);
  border-left: 3px solid var(--primary); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 1.15rem; font-weight: 500; color: var(--text);
}
.prose blockquote p:last-child { margin-bottom: 0; }

.series-box { margin: 0 0 28px; padding: 14px 18px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); font-size: 0.92rem; color: var(--muted); }
.series-box strong { color: var(--text); }

.share { margin: 40px 0 0; padding: 20px 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.share-label { font-weight: 600; margin-right: 6px; }
.share--inline { margin: 36px 0 0; }

/* ---------- Messages, inputs ---------- */
.messages { padding-top: 16px; }
.message { padding: 14px 18px; margin-bottom: 8px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); font-weight: 500; }
.message-success { border-color: #86d9a8; background: color-mix(in srgb, #22c55e 12%, var(--surface)); }
.message-error { border-color: #f4a1a1; background: color-mix(in srgb, #ef4444 12%, var(--surface)); }
.message-info { border-color: var(--border-strong); background: var(--primary-soft); }

.input {
  width: 100%; padding: 12px 16px; border-radius: var(--radius-btn); border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text); font: inherit; font-size: 0.92rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input::placeholder { color: var(--muted); }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
textarea.input { min-height: 160px; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.search-form { display: flex; gap: 10px; max-width: 640px; margin: 22px auto 0; }
.search-meta { margin: 0 0 24px; color: var(--muted); text-align: center; }

/* ---------- Topic cards (categories, about) ---------- */
.topic-card {
  display: flex; flex-direction: column; gap: 8px; padding: 26px; color: inherit;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
a.topic-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.topic-card h3 { margin: 0; font-size: 1.15rem; }
.topic-card p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.topic-count { margin-top: auto; padding-top: 12px; font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600; color: var(--primary); }
.value-card { cursor: default; }
.value-card p a { font-weight: 600; }

/* ---------- Series / numbered lists ---------- */
.series-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.series-item {
  display: flex; gap: 18px; align-items: flex-start; padding: 22px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.series-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.series-num {
  flex: none; width: 42px; height: 42px; border-radius: 10px; background: var(--grad); color: var(--on-grad);
  display: grid; place-items: center; font-family: var(--font-mono); font-weight: 700;
}
.series-item h3 { font-size: 1.1rem; margin: 0 0 4px; }
.series-item h3 a { color: var(--text); }
.series-item h3 a:hover { color: var(--primary); }
.series-item p { margin: 0 0 8px; color: var(--muted); font-size: 0.92rem; }
.series-item small { color: var(--muted); font-family: var(--font-mono); font-size: 0.75rem; }

/* ---------- Books ---------- */
.stars { display: inline-flex; gap: 2px; font-size: 1.1rem; line-height: 1; }
.stars .on { color: #f5a524; }
.stars .off { color: var(--border-strong); }
.affiliate-note { margin: 12px 0 0; font-size: 0.8rem; color: var(--muted); }

.book-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.book-card { flex-direction: row; align-items: flex-start; gap: 20px; padding: 20px; }
.book-cover {
  flex: none; display: block; width: 128px; aspect-ratio: 2 / 3; overflow: hidden;
  border-radius: 10px; background: var(--grad-soft); box-shadow: var(--shadow-md);
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.book-info .stars { margin-bottom: 8px; }
.book-info .card-title { margin-bottom: 4px; }
.book-author { margin: 0 0 10px; color: var(--muted); font-size: 0.9rem; }
.book-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }

.book-page { padding-top: 40px; }
.book-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 56px; align-items: start; margin-top: 28px; }
.book-side { position: sticky; top: 84px; display: flex; flex-direction: column; }
.book-cover--lg { width: 100%; border-radius: 12px; margin-bottom: 20px; }
.book-main { max-width: 720px; }
.book-title { font-size: clamp(2rem, 4vw, 2.7rem); font-weight: 800; margin: 14px 0 6px; }
.book-main .book-author { font-size: 1.05rem; margin-bottom: 14px; }
.book-rating { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; }
.book-main .prose { margin-top: 24px; }
.book-main .post-lead { margin-inline: 0; max-width: none; }

/* ---------- About / contact ---------- */
.check-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 12px; }
.check-list li {
  position: relative; padding: 14px 18px 14px 50px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-soft);
}
.check-list li::before {
  content: "✓"; position: absolute; left: 16px; top: 13px; width: 22px; height: 22px;
  border-radius: 50%; background: var(--grad); color: var(--on-grad); font-size: 0.8rem; font-weight: 700;
  display: grid; place-items: center;
}
.contact-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 32px; align-items: start; }
.contact-info { display: grid; gap: 16px; }
.form-card { padding: 32px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-md); }
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.9rem; }
.field-error { margin: 6px 0 0; color: #ef4444; font-size: 0.85rem; }

/* =========================================================
   Footer (modelled on doledev.space)
   ========================================================= */
.site-footer { margin-top: 80px; background: var(--footer-bg); border-top: 1px solid var(--border); }

/* Newsletter bar */
.footer-news { border-bottom: 1px solid var(--border); }
.footer-news-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px 48px; padding: 44px 0;
}
.footer-news h3 { font-size: 1.25rem; margin: 0 0 6px; }
.footer-news p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.newsletter-form { display: flex; gap: 10px; width: min(100%, 440px); flex: none; }
.newsletter-form .input { flex: 1; min-width: 0; }
.newsletter-form .btn { flex: none; }

/* Four columns */
.footer-grid {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.3fr;
  gap: 48px; padding: 56px 0 52px; align-items: start;
}
.footer-text { margin: 18px 0 0; max-width: 300px; color: var(--muted); font-size: 0.88rem; line-height: 1.7; }

.footer-social { display: flex; gap: 10px; margin-top: 22px; }
.footer-social a {
  width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center;
  color: var(--muted); background: var(--surface-2); border: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s;
}
.footer-social a:hover { color: var(--primary); border-color: var(--primary); }
.footer-social svg { width: 16px; height: 16px; }

.footer-col h4 {
  position: relative; margin: 0 0 20px; padding-bottom: 10px;
  font-size: 0.95rem; font-weight: 700;
}
.footer-col h4::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 26px; height: 2px; border-radius: 2px; background: var(--grad);
}

.footer-links { display: flex; flex-direction: column; }
.footer-links a {
  display: block; padding: 9px 0 9px 9px; color: var(--muted); font-size: 0.88rem;
  transition: color 0.2s, padding-left 0.2s;
}
.footer-links a:hover { color: var(--primary); padding-left: 14px; }

.footer-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.footer-contact li { display: flex; align-items: flex-start; gap: 14px; color: var(--muted); font-size: 0.85rem; line-height: 1.55; }
.footer-contact .ico {
  flex: none; width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary);
}
.footer-contact .ico svg { width: 16px; height: 16px; }
.footer-contact .txt { padding-top: 6px; }
.footer-contact a { color: var(--muted); }
.footer-contact a:hover { color: var(--primary); }

/* Bottom bar */
.footer-bottom { border-top: 1px solid var(--border); }
.footer-bottom-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 24px; padding: 22px 0; font-size: 0.82rem; color: var(--muted);
}
.footer-bottom-inner strong { color: var(--primary); font-weight: 600; }
.footer-bottom-links { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.footer-bottom-links a { color: var(--muted); }
.footer-bottom-links a:hover { color: var(--primary); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .header-inner { display: flex; justify-content: space-between; }
  .nav-toggle { display: grid; }
  .nav {
    display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    gap: 0; padding: 10px 20px 16px; background: var(--bg); border-bottom: 1px solid var(--border);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 6px; border-bottom: 0; }
}

@media (max-width: 900px) {
  .hero { min-height: auto; padding: 48px 0 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { margin: 0 14px 14px 0; }
  .hero-visual::before { inset: 16px -12px -12px 16px; }
  .hero-visual::after { right: -8px; bottom: -8px; width: 56px; height: 56px; }
  .scroll-hint { display: none; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .post-card--lead { grid-template-columns: 1fr; }
  .post-card--lead .card-media { min-height: 220px; aspect-ratio: 16 / 9; }
  .post-card--lead .card-body { padding: 24px; }
  .book-grid, .contact-grid { grid-template-columns: 1fr; }
  .post-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .toc-box { order: -1; position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 800px) {
  .book-layout { grid-template-columns: 1fr; gap: 28px; }
  .book-side { position: static; max-width: 260px; }
  .footer-news-inner { flex-direction: column; align-items: stretch; }
  .newsletter-form { width: 100%; }
}

@media (max-width: 600px) {
  .card-grid { grid-template-columns: 1fr; }
  .verse-card { padding: 24px; }
  .share .btn { flex: 1 1 100%; }
  .newsletter-form, .search-form { flex-direction: column; }
  .hero-stats { gap: 18px; }
  .stat + .stat { padding-left: 18px; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-bottom-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .book-card { flex-direction: column; }
  .book-cover { width: 140px; }
  .form-card { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* =========================================================
   Ads: quiet, labelled, never sticky or overlaying content
   ========================================================= */
.ad-slot { margin: 44px auto; max-width: 760px; text-align: center; clear: both; }
.ad-label {
  display: block; margin-bottom: 6px; font-family: var(--font-mono); font-size: 0.65rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.ad-body { display: block; min-height: 90px; overflow: hidden; border-radius: var(--radius-sm); }
.ad-body ins { width: 100%; }
.ad-body img { max-width: 100%; height: auto; margin-inline: auto; border-radius: var(--radius-sm); }
/* If no ad is served, the empty box disappears */
.ad-slot:has(ins[data-ad-status="unfilled"]) { display: none; }
/* What only you (logged in) see */
.ad-body--preview {
  display: grid; place-items: center; padding: 22px; min-height: 90px; line-height: 1.5;
  border: 1.5px dashed var(--border-strong); color: var(--muted); font-size: 0.9rem;
}

/* 404 page */
.page-head .notfound-code { font-size: clamp(5rem, 18vw, 9rem); font-weight: 800; line-height: 1; margin: 0 0 12px; }
.notfound .search-form { margin-top: 32px; }