/* =================================================================
   ThatBibleGuy.ca — Main Stylesheet
   Aesthetic: Refined Scholarly — deep navy, gold, cream, serif type
   ================================================================= */

/* ── Variables ─────────────────────────────────────────────────── */
:root {
  --navy:        #0D1B2A;
  --navy-mid:    #152232;
  --navy-light:  #1E2E42;
  --gold:        #C9A84C;
  --gold-light:  #E8C97A;
  --gold-dark:   #8B6A14;
  --cream:       #F8F3EA;
  --cream-mid:   #EEE5D2;
  --cream-dark:  #DDD0B8;
  --white:       #FFFFFF;
  --text:        #1A1208;
  --text-mid:    #3D2E14;
  --text-light:  #6B5A3E;
  --text-muted:  #9A8B75;
  --red:         #C0392B;
  --green:       #1E8A4A;
  --border:      rgba(201,168,76,0.22);
  --border-soft: rgba(0,0,0,0.08);
  --shadow-sm:   0 2px 8px rgba(13,27,42,0.10);
  --shadow:      0 4px 20px rgba(13,27,42,0.14);
  --shadow-lg:   0 12px 48px rgba(13,27,42,0.20);
  --radius:      6px;
  --radius-lg:   12px;
  --radius-xl:   20px;
  --font-display:'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:   'Source Serif 4', Georgia, serif;
  --font-ui:     'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
  --nav-h:       72px;
  --topbar-h:    38px;
  --content-w:   1200px;
  --prose-w:     780px;
  --transition:  all 0.28s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--cream);
  line-height: 1.75;
  overflow-x: hidden;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-dark); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--gold); }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
button { cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }

/* ── Skip Link ──────────────────────────────────────────────────── */
.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 9999;
  background: var(--navy); color: var(--gold); padding: 8px 16px;
  border-radius: var(--radius); font-family: var(--font-ui); font-size: .875rem;
}
.skip-link:focus { left: 8px; }

/* ── Container ──────────────────────────────────────────────────── */
.container {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Topbar ─────────────────────────────────────────────────────── */
.topbar {
  background: var(--navy);
  height: var(--topbar-h);
  display: flex;
  align-items: center;
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
}
.topbar-verse {
  font-family: var(--font-body);
  font-style: italic;
  color: rgba(255,255,255,0.55);
  font-size: .78rem;
  letter-spacing: .01em;
}
.topbar-social {
  display: flex;
  gap: 16px;
  align-items: center;
}
.social-link {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--gold-light);
  font-family: var(--font-ui);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: var(--transition);
}
.social-link:hover { color: var(--white); }

/* ── Site Header ────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  height: var(--nav-h);
  display: flex;
  align-items: center;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 100%;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--navy);
  flex-shrink: 0;
}
.site-logo:hover { color: var(--navy); opacity: .85; }
.logo-icon {
  font-size: 2rem;
  color: var(--gold);
  line-height: 1;
  display: flex;
  align-items: center;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -.02em;
}
.logo-tagline {
  font-family: var(--font-ui);
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--gold-dark);
}

/* Main Nav */
.main-nav { flex: 1; }
.main-nav > ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  height: 100%;
}
.main-nav > ul > li {
  position: relative;
  height: var(--nav-h);
  display: flex;
  align-items: center;
}
.main-nav > ul > li > a {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 12px;
  height: 100%;
  font-family: var(--font-ui);
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-mid);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li > a[aria-current="page"] {
  color: var(--navy);
  border-bottom-color: var(--gold);
}
.main-nav .arrow { font-size: .65em; transition: var(--transition); }
.main-nav li.has-dropdown:hover .arrow { transform: rotate(180deg); }

/* Dropdown */
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 12px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--transition);
  z-index: 200;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown a {
  display: block;
  padding: 8px 20px;
  font-family: var(--font-ui);
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-mid);
  white-space: nowrap;
}
.dropdown a:hover { background: var(--cream); color: var(--navy); padding-left: 28px; }
.dropdown-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px 16px;
  min-width: 320px;
}
.dropdown-cols strong {
  display: block;
  font-family: var(--font-ui);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.dropdown-cols a { padding: 5px 0; }
.dropdown-cols a:hover { padding-left: 8px; background: none; }

/* Header search */
.header-search form {
  display: flex;
  align-items: center;
  background: var(--cream);
  border: 1px solid var(--border-soft);
  border-radius: 24px;
  overflow: hidden;
  transition: var(--transition);
}
.header-search form:focus-within {
  border-color: var(--gold);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}
.header-search input {
  background: none;
  border: none;
  outline: none;
  padding: 7px 14px;
  font-family: var(--font-ui);
  font-size: .82rem;
  color: var(--text);
  width: 180px;
}
.header-search button {
  padding: 7px 12px;
  color: var(--text-light);
  display: flex;
  align-items: center;
}
.header-search button:hover { color: var(--gold-dark); }

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: var(--transition);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ── Hero Section ────────────────────────────────────────────────── */
.hero {
  background: var(--navy);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(201,168,76,.12) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(201,168,76,.08) 0%, transparent 50%);
  color: var(--white);
  padding: 100px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23C9A84C' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-eyebrow {
  font-family: var(--font-ui);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--gold);
  margin-bottom: 20px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -.03em;
  margin-bottom: 20px;
}
.hero h1 em { font-style: italic; color: var(--gold-light); }
.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: rgba(255,255,255,.75);
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.65;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: var(--transition);
  border: 2px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}
.btn-primary:hover {
  background: var(--gold-light);
  color: var(--navy);
  border-color: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201,168,76,.35);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.4);
}
.btn-outline:hover {
  background: rgba(255,255,255,.1);
  border-color: var(--white);
  color: var(--white);
}
.btn-navy {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn-navy:hover { background: var(--navy-light); border-color: var(--navy-light); transform: translateY(-2px); }
.btn-sm { padding: 8px 18px; font-size: .78rem; }
.btn-lg { padding: 15px 36px; font-size: .92rem; }

/* ── Sections ───────────────────────────────────────────────────── */
.section { padding: 72px 0; }
.section-alt { background: var(--white); }
.section-dark { background: var(--navy); color: var(--white); }
.section-header { text-align: center; margin-bottom: 48px; }
.section-eyebrow {
  font-family: var(--font-ui);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--gold-dark);
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--navy);
}
.section-dark .section-title { color: var(--white); }
.section-title span { color: var(--gold); }
.section-subtitle {
  margin-top: 12px;
  font-size: 1.05rem;
  color: var(--text-light);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Divider */
.divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  margin: 20px auto;
  border-radius: 2px;
}

/* ── Cards ──────────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  gap: 28px;
}
.card-grid-2 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card-grid-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card-grid-4 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.card {
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border);
}
.card-img {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--cream-mid);
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.card:hover .card-img img { transform: scale(1.04); }
.card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; gap: 12px; }
.card-tag {
  display: inline-flex;
  align-items: center;
  background: var(--cream);
  color: var(--gold-dark);
  font-family: var(--font-ui);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  width: fit-content;
}
.card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--navy);
}
.card-title a { color: inherit; }
.card-title a:hover { color: var(--gold-dark); }
.card-excerpt { font-size: .9rem; color: var(--text-light); line-height: 1.65; flex: 1; }
.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-ui);
  font-size: .75rem;
  color: var(--text-muted);
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}
.card-meta svg { flex-shrink: 0; }

/* ── Featured Article ────────────────────────────────────────────── */
.featured-article {
  background: var(--navy);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 420px;
  margin-bottom: 48px;
}
.featured-article-img {
  overflow: hidden;
  background: var(--navy-mid);
}
.featured-article-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .75;
}
.featured-article-body {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  color: var(--white);
}
.featured-article-body .card-tag { background: rgba(201,168,76,.15); border-color: rgba(201,168,76,.3); color: var(--gold-light); }
.featured-article-body .card-title { font-size: 1.8rem; color: var(--white); }
.featured-article-body .card-excerpt { color: rgba(255,255,255,.75); }

/* ── Sidebar Layout ──────────────────────────────────────────────── */
.layout-sidebar {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
}
.sidebar { display: flex; flex-direction: column; gap: 32px; }
.sidebar-widget {
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.sidebar-widget h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gold);
}
.sidebar-list li { border-bottom: 1px solid var(--border-soft); }
.sidebar-list li:last-child { border-bottom: none; }
.sidebar-list a { display: block; padding: 10px 0; font-size: .9rem; color: var(--text-mid); }
.sidebar-list a:hover { color: var(--gold-dark); padding-left: 6px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-pill {
  background: var(--cream);
  color: var(--text-mid);
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-family: var(--font-ui);
  font-size: .75rem;
  font-weight: 600;
  transition: var(--transition);
}
.tag-pill:hover { background: var(--gold); color: var(--navy); border-color: var(--gold); color: var(--white); }

/* ── Single Article ──────────────────────────────────────────────── */
.article-header { padding: 60px 0 40px; background: var(--navy); color: var(--white); }
.article-header .breadcrumb ol { justify-content: flex-start; }
.article-header .breadcrumb a { color: rgba(255,255,255,.7); }
.article-header .breadcrumb a:hover { color: var(--gold-light); }
.article-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin: 20px 0 16px;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-family: var(--font-ui);
  font-size: .8rem;
  color: rgba(255,255,255,.7);
  align-items: center;
}
.article-meta span { display: flex; align-items: center; gap: 6px; }

/* Prose content */
.prose {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text);
}
.prose h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy);
  margin: 2.5em 0 .75em;
  letter-spacing: -.02em;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}
.prose h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
  margin: 2em 0 .6em;
}
.prose h4 {
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--gold-dark);
  margin: 1.8em 0 .5em;
}
.prose p { margin-bottom: 1.4em; }
.prose a { color: var(--gold-dark); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--navy); }
.prose ul, .prose ol { margin: 1.2em 0 1.4em 1.8em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: .5em; }
.prose blockquote {
  margin: 2em 0;
  padding: 24px 28px 24px 32px;
  background: var(--cream);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text-mid);
}
.prose blockquote cite {
  display: block;
  margin-top: 10px;
  font-style: normal;
  font-family: var(--font-ui);
  font-size: .8rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.prose .scripture {
  background: var(--navy);
  color: var(--white);
  padding: 20px 24px;
  border-radius: var(--radius);
  margin: 1.5em 0;
  font-style: italic;
  position: relative;
}
.prose .scripture::before {
  content: '✟';
  position: absolute;
  top: 12px;
  right: 16px;
  color: var(--gold);
  font-style: normal;
  font-size: 1.1rem;
}
.prose .scripture cite {
  display: block;
  margin-top: 8px;
  font-style: normal;
  font-family: var(--font-ui);
  font-size: .75rem;
  color: var(--gold-light);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .9rem; }
.prose th { background: var(--navy); color: var(--white); padding: 10px 14px; text-align: left; font-family: var(--font-ui); font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.prose td { padding: 10px 14px; border-bottom: 1px solid var(--border-soft); }
.prose tr:nth-child(even) td { background: var(--cream); }
.prose img { border-radius: var(--radius-lg); margin: 1.5em 0; box-shadow: var(--shadow); }
.prose code { background: var(--cream); padding: 2px 6px; border-radius: 3px; font-family: monospace; font-size: .88em; color: var(--navy); }
.prose pre { background: var(--navy); color: var(--white); padding: 20px; border-radius: var(--radius); overflow-x: auto; margin: 1.5em 0; }
.prose pre code { background: none; color: inherit; padding: 0; }

/* Featured image */
.article-featured-img {
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 40px;
  max-height: 500px;
}
.article-featured-img img { width: 100%; height: 100%; object-fit: cover; }

/* ── Verse Commentary ────────────────────────────────────────────── */
.verse-block {
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: 24px 28px;
  margin-bottom: 24px;
}
.verse-number {
  display: inline-block;
  background: var(--navy);
  color: var(--gold-light);
  font-family: var(--font-ui);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.verse-text {
  font-style: italic;
  font-size: 1.05rem;
  color: var(--navy);
  line-height: 1.7;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-soft);
}
.verse-commentary { font-size: .95rem; color: var(--text); line-height: 1.8; }
.verse-cross-refs {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
  font-family: var(--font-ui);
  font-size: .78rem;
  color: var(--text-muted);
}
.verse-cross-refs strong { color: var(--gold-dark); }

/* ── Bible Book Listing ───────────────────────────────────────────── */
.bible-testament-header {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  padding: 20px 0 12px;
  border-bottom: 3px solid var(--gold);
  margin-bottom: 24px;
}
.bible-books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 48px;
}
.book-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px 12px;
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  transition: var(--transition);
  gap: 6px;
}
.book-tile:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.book-tile:hover .book-abbr { color: var(--gold-light); }
.book-abbr {
  font-family: var(--font-ui);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--gold-dark);
}
.book-name {
  font-family: var(--font-display);
  font-size: .88rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.3;
}
.book-tile:hover .book-name { color: var(--white); }
.book-chapters {
  font-family: var(--font-ui);
  font-size: .68rem;
  color: var(--text-muted);
}
.book-tile:hover .book-chapters { color: rgba(255,255,255,.6); }

/* ── Breadcrumb ──────────────────────────────────────────────────── */
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-family: var(--font-ui);
  font-size: .78rem;
}
.breadcrumb li + li::before { content: '›'; margin-right: 6px; color: var(--text-muted); }
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--gold-dark); }

/* ── Pagination ──────────────────────────────────────────────────── */
.pagination { margin: 48px 0 0; }
.pagination ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-mid);
  background: var(--white);
  transition: var(--transition);
}
.pagination a:hover, .pagination a.active {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.pagination a[aria-current="page"] {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}

/* ── Topics A-Z ──────────────────────────────────────────────────── */
.alpha-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
  padding: 20px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
}
.alpha-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: .85rem;
  font-weight: 700;
  color: var(--navy);
  transition: var(--transition);
}
.alpha-link:hover, .alpha-link.active {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.topics-letter-group { margin-bottom: 40px; }
.topics-letter-heading {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: var(--gold);
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.topics-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.topic-item {
  padding: 14px 20px;
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: var(--transition);
}
.topic-item:hover { border-color: var(--border); box-shadow: var(--shadow-sm); transform: translateX(4px); }
.topic-item a {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
}
.topic-item a:hover { color: var(--gold-dark); }
.topic-excerpt { font-size: .82rem; color: var(--text-light); line-height: 1.5; }

/* ── Q&A ─────────────────────────────────────────────────────────── */
.qa-item {
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
  transition: var(--transition);
}
.qa-item:hover { box-shadow: var(--shadow); }
.qa-question {
  padding: 20px 24px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
  border-left: 4px solid var(--gold);
}
.qa-question::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--gold);
  flex-shrink: 0;
  font-weight: 300;
  transition: var(--transition);
}
.qa-item.open .qa-question::after { content: '−'; }
.qa-answer {
  display: none;
  padding: 0 24px 24px;
  font-size: .95rem;
  color: var(--text);
  line-height: 1.8;
}
.qa-item.open .qa-answer { display: block; }

/* ── Contact Form ────────────────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.contact-info h2 { font-family: var(--font-display); font-size: 1.8rem; color: var(--navy); margin-bottom: 16px; }
.contact-info p { color: var(--text-light); line-height: 1.8; margin-bottom: 24px; }
.contact-social-links { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.contact-social-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  color: var(--text-mid);
  font-family: var(--font-ui);
  font-size: .85rem;
  font-weight: 600;
  transition: var(--transition);
}
.contact-social-link:hover { border-color: var(--gold); color: var(--navy); background: var(--cream); }
.contact-social-link svg { flex-shrink: 0; color: var(--gold-dark); }

/* Form elements */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-family: var(--font-ui);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-mid);
  margin-bottom: 6px;
}
.form-group label .req { color: var(--red); margin-left: 2px; }
.form-control {
  width: 100%;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--text);
  transition: var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,.15);
}
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 140px; }
select.form-control { cursor: pointer; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-error { color: var(--red); font-size: .8rem; margin-top: 4px; font-family: var(--font-ui); }
.form-success {
  background: #d4edda;
  color: #155724;
  padding: 16px 20px;
  border-radius: var(--radius);
  border: 1px solid #c3e6cb;
  margin-bottom: 20px;
  font-family: var(--font-ui);
}
.form-error-box {
  background: #f8d7da;
  color: #721c24;
  padding: 16px 20px;
  border-radius: var(--radius);
  border: 1px solid #f5c6cb;
  margin-bottom: 20px;
  font-family: var(--font-ui);
}

/* ── Tags ────────────────────────────────────────────────────────── */
.tags-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tags-list a, .tag-badge {
  background: var(--cream);
  color: var(--text-mid);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-family: var(--font-ui);
  font-size: .75rem;
  font-weight: 600;
  transition: var(--transition);
}
.tags-list a:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* ── Page Header ─────────────────────────────────────────────────── */
.page-header {
  background: var(--navy);
  padding: 60px 0 50px;
  color: var(--white);
  text-align: center;
}
.page-header-eyebrow {
  font-family: var(--font-ui);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  letter-spacing: -.03em;
  margin-bottom: 14px;
}
.page-header p {
  color: rgba(255,255,255,.7);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ── Notice boxes ────────────────────────────────────────────────── */
.notice {
  padding: 16px 20px;
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: .88rem;
  margin-bottom: 20px;
}
.notice-info { background: #cfe2ff; color: #0a58ca; border: 1px solid #b6d4fe; }
.notice-success { background: #d1e7dd; color: #0f5132; border: 1px solid #badbcc; }
.notice-warning { background: #fff3cd; color: #664d03; border: 1px solid #ffecb5; }
.notice-error { background: #f8d7da; color: #842029; border: 1px solid #f5c6cb; }

/* ── Footer ──────────────────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,.7);
  padding-top: 64px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}
.footer-brand p { font-size: .9rem; line-height: 1.7; margin-top: 12px; color: rgba(255,255,255,.6); }
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -.02em;
}
.footer-logo:hover { color: var(--gold-light); }
.footer-social { display: flex; gap: 10px; margin-top: 20px; }
.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.7);
  transition: var(--transition);
}
.social-btn:hover { transform: translateY(-2px); }
.social-btn.yt:hover { background: #FF0000; border-color: #FF0000; color: var(--white); }
.social-btn.ig:hover { background: #E1306C; border-color: #E1306C; color: var(--white); }
.social-btn.dc:hover { background: #5865F2; border-color: #5865F2; color: var(--white); }
.footer-nav h3 {
  font-family: var(--font-ui);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--gold);
  margin-bottom: 16px;
}
.footer-nav ul { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a { font-size: .88rem; color: rgba(255,255,255,.65); transition: var(--transition); }
.footer-nav a:hover { color: var(--white); padding-left: 4px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-ui);
  font-size: .78rem;
  color: rgba(255,255,255,.4);
  flex-wrap: wrap;
  gap: 10px;
}
.footer-seo-links a { color: rgba(255,255,255,.4); margin: 0 2px; }
.footer-seo-links a:hover { color: rgba(255,255,255,.8); }

/* ── Search ──────────────────────────────────────────────────────── */
.search-result {
  padding: 24px 0;
  border-bottom: 1px solid var(--border-soft);
}
.search-result:last-child { border-bottom: none; }
.search-result-type {
  font-family: var(--font-ui);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--gold-dark);
  margin-bottom: 6px;
}
.search-result-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}
.search-result-title a { color: inherit; }
.search-result-title a:hover { color: var(--gold-dark); }
.search-result-excerpt { font-size: .9rem; color: var(--text-light); line-height: 1.65; }
.search-result-excerpt mark { background: rgba(201,168,76,.25); color: var(--text); border-radius: 2px; }

/* ── Utility ─────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }
.pt-4 { padding-top: 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .layout-sidebar { grid-template-columns: 1fr 280px; gap: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}

@media (max-width: 900px) {
  .layout-sidebar { grid-template-columns: 1fr; }
  .sidebar { order: -1; }
  .featured-article { grid-template-columns: 1fr; }
  .featured-article-img { max-height: 240px; }
  .featured-article-body { padding: 28px; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .form-row { grid-template-columns: 1fr; }
  .topbar-verse { display: none; }
}

@media (max-width: 768px) {
  :root { --nav-h: 60px; --topbar-h: 0px; }

  /* Prevent horizontal overflow */
  html, body { overflow-x: hidden; max-width: 100vw; }

  /* Header */
  .topbar { display: none; }
  .site-header { height: var(--nav-h); overflow: hidden; }
  .header-inner { gap: 8px; }
  .header-search { display: none; }

  /* Logo — shrink on mobile */
  .logo-name { font-size: 1.05rem; }
  .logo-tagline { display: none; }
  .logo-icon { font-size: 1.5rem; }

  /* Mobile nav toggle */
  .nav-toggle { display: flex; margin-left: auto; flex-shrink: 0; }

  /* Fullscreen mobile nav */
  .main-nav {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    background: var(--white);
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    transform: translateX(100%);
    transition: transform .3s ease;
    z-index: 99;
    border-top: 1px solid var(--border-soft);
  }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav > ul { flex-direction: column; gap: 0; height: auto; width: 100%; }
  .main-nav > ul > li { height: auto; flex-direction: column; align-items: flex-start; width: 100%; }
  .main-nav > ul > li > a { height: auto; padding: 14px 4px; font-size: .9rem; border-bottom: 1px solid var(--border-soft); width: 100%; }
  .main-nav > ul > li > a[aria-current="page"] { color: var(--gold-dark); border-bottom-color: var(--gold); }
  .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; border-radius: 0; padding: 0 0 0 16px; background: var(--cream); margin-bottom: 8px; display: none; width: 100%; min-width: unset; }
  .has-dropdown.dd-open .dropdown { display: block; }
  .dropdown a { font-size: .85rem; padding: 10px 0; border-bottom: 1px solid var(--border-soft); white-space: normal; }
  .dropdown-cols { grid-template-columns: 1fr; min-width: auto; padding: 8px 0; }

  /* Hero */
  .hero { padding: 52px 0 44px; overflow: hidden; }
  .hero-sub { font-size: .95rem; padding: 0 8px; }
  .hero-actions { flex-direction: column; align-items: stretch; padding: 0 20px; gap: 12px; }
  .hero-actions .btn { text-align: center; justify-content: center; width: 100%; }

  /* General layout */
  .section { padding: 40px 0; }
  .container { padding: 0 16px; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr 1fr; }

  /* Bible */
  .bible-books-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }

  /* Topics */
  .alpha-nav { padding: 14px; }
  .alpha-link { width: 32px; height: 32px; font-size: .78rem; }

  /* Tables — scroll horizontally rather than overflow */
  .tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 520px) {
  :root { --nav-h: 56px; }
  .footer-grid { grid-template-columns: 1fr; }
  .card-grid-4 { grid-template-columns: 1fr 1fr; }
  .bible-books-grid { grid-template-columns: repeat(3, 1fr); }
  .hero h1 { font-size: clamp(1.7rem, 7vw, 2.2rem); letter-spacing: -.02em; }
  .article-meta { flex-direction: column; gap: 8px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .layout-sidebar { gap: 24px; }
  /* Ensure nothing bleeds out on small phones */
  .verse-block, .sidebar-widget, .card { max-width: 100%; }
}

/* ── Print ────────────────────────────────────────────────────────── */
@media print {
  .site-header, .site-footer, .topbar, .sidebar, .pagination, .nav-toggle { display: none; }
  .layout-sidebar { grid-template-columns: 1fr; }
  .prose { font-size: 11pt; }
  a { text-decoration: underline; }
}