/* ============================================================
   Go Ahead Devotions — screen.css
   Design system carried from the client's approved sample HTML.
   Charcoal / gold, Playfair Display (serif) + Inter (sans).
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #111110;
  --surface:    #1A1916;
  --surface-2:  #222220;
  --border:     #2E2C28;
  --border-lt:  #3A3835;
  --gold:       #C49A2E;
  --gold-dim:   #8A6B1A;
  --gold-lt:    #2A2316;
  --text:       #EAE6DC;
  --text-soft:  #B0ACA2;
  --muted:      #6E6C66;
  --serif:      'Playfair Display', Georgia, serif;
  --sans:       'Inter', system-ui, sans-serif;

  /* Ghost Admin "Design & branding" custom font pickers hook into these.
     Falls back to the site's own serif/sans stack until the client
     picks something in Admin. */
  --gh-font-heading: var(--serif);
  --gh-font-body: var(--sans);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--gh-font-body), var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--gh-font-heading), var(--serif);
}

/* ── NAV ── */
nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-brand span { color: var(--gold); }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }

.nav-cta {
  background: var(--gold) !important;
  color: #0E0D0B !important;
  padding: 8px 18px;
  border-radius: 5px;
  font-weight: 600 !important;
  transition: background 0.2s !important;
  cursor: pointer;
}

.nav-cta:hover { background: #A8821F !important; }

/* ── HERO ── */
.hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 60px 24px 52px;
  text-align: center;
}

.hero--compact {
  padding: 44px 24px 40px;
}

.hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

.hero--compact h1 {
  font-size: clamp(1.75rem, 4vw, 2.6rem);
}

.page-feature-image {
  max-width: 100%;
  border-radius: 8px;
  margin-top: 24px;
}

.hero p {
  font-size: 1rem;
  color: var(--text-soft);
  max-width: 500px;
  margin: 0 auto;
  font-weight: 300;
}

/* ── MAIN LAYOUT ── */
.page-grid {
  max-width: 1160px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

.page-grid--single {
  grid-template-columns: 1fr;
  max-width: 820px;
}

/* ── DATE DIVIDER ── */
.date-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.date-label::before, .date-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.date-label span {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* ── DEVOTION CARD ── */
.devotion-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

/* Feature image — Today's devotion + single devotion page */
.devotion-feature-image-link {
  display: block;
  line-height: 0;
}

.devotion-feature-image {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  display: block;
}

.devotion-header {
  padding: 36px 44px 28px;
  border-bottom: 1px solid var(--border);
}

.devotion-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-lt);
  border: 1px solid var(--gold-dim);
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 14px;
  text-decoration: none;
}

.devotion-tag:hover { background: var(--gold-dim); color: var(--text); }

.devotion-title {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.devotion-title a { color: inherit; text-decoration: none; }
.devotion-title a:hover { color: var(--gold); }

.devotion-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ── DEVOTION BODY (raw Ghost content) ──
   Editor convention (see runbook "Devotion Authoring Standard"):
   - first blockquote  → scripture block
   - "Reflection Questions" / "Closing Prayer" as H2 + following content
   These rules style Ghost's native output generically, no HTML cards needed. */

.devotion-body,
.page-content .devotion-body {
  padding: 36px 44px;
}

.post-content-wrap > p {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--text-soft);
  margin-bottom: 20px;
}

.post-content-wrap > p:last-child { margin-bottom: 0; }

.post-content-wrap strong { font-weight: 600; color: var(--text); }

/* Scripture block — first blockquote in the content */
.post-content-wrap blockquote {
  padding: 26px 32px;
  background: var(--gold-lt);
  border-left: 3px solid var(--gold);
  margin: 0 -44px 28px;
  border-radius: 0;
}

.post-content-wrap blockquote p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 8px;
}

.post-content-wrap blockquote p:last-child { margin-bottom: 0; }

.post-content-wrap blockquote cite,
.post-content-wrap blockquote em:last-child {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  font-style: normal;
  color: var(--gold);
  letter-spacing: 0.05em;
}

/* Section labels — "Reflection Questions" / "Closing Prayer" */
.post-content-wrap h2 {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 32px 0 14px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.post-content-wrap h2:first-child { padding-top: 0; border-top: none; margin-top: 0; }

.post-content-wrap ol {
  padding-left: 18px;
  margin-bottom: 20px;
}

.post-content-wrap ol li {
  font-size: 0.94rem;
  line-height: 1.75;
  color: var(--text-soft);
  margin-bottom: 10px;
}

/* Closing prayer paragraph: italic text following the prayer heading */
.post-content-wrap h2 + p em,
.post-content-wrap h2 + p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.97rem;
  line-height: 1.9;
  color: var(--muted);
}

/* ═══════════════════════════
   SIDEBAR
═══════════════════════════ */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.sidebar-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.sidebar-card-header h3 {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--gold);
}

.sidebar-empty {
  padding: 16px 20px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Categories */
.category-list {
  list-style: none;
  padding: 10px 0;
}

.category-list li {
  border-bottom: 1px solid var(--border);
}

.category-list li:last-child { border-bottom: none; }

.category-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  text-decoration: none;
  color: var(--text-soft);
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.category-list a:hover {
  background: var(--surface-2);
  color: var(--text);
}

.category-list a:hover .cat-arrow { color: var(--gold); }

.cat-count {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-2);
  padding: 2px 8px;
  border-radius: 20px;
}

.cat-arrow {
  color: var(--border-lt);
  font-size: 0.8rem;
  margin-left: 6px;
  transition: color 0.15s;
}

/* Recent Posts */
.recent-list {
  list-style: none;
  padding: 6px 0;
}

.recent-list li {
  border-bottom: 1px solid var(--border);
}

.recent-list li:last-child { border-bottom: none; }

.recent-list a {
  display: block;
  padding: 14px 20px;
  text-decoration: none;
  transition: background 0.15s;
}

.recent-list a:hover { background: var(--surface-2); }

.recent-cat-tag {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}

.recent-title {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-soft);
  line-height: 1.45;
  margin-bottom: 4px;
  display: block;
}

.recent-list a:hover .recent-title { color: var(--text); }

.recent-date {
  font-size: 0.72rem;
  color: var(--muted);
}

/* About Blurb */
.about-blurb {
  padding: 20px;
}

.about-blurb p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-soft);
  margin-bottom: 14px;
}

.about-link {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
  border: 1px solid var(--gold-dim);
  padding: 7px 16px;
  border-radius: 5px;
  transition: background 0.2s;
}

.about-link:hover { background: var(--gold-lt); }

/* Book Promo */
.book-promo {
  padding: 20px;
  text-align: center;
}

.book-promo-cover {
  width: 100%;
  max-width: 180px;
  border-radius: 6px;
  display: block;
  margin: 0 auto 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.book-promo-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
}

.book-promo-author {
  font-size: 0.8rem;
  color: var(--text-soft);
  margin-bottom: 16px;
}

.book-promo-cta {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0E0D0B;
  background: var(--gold);
  padding: 9px 18px;
  border-radius: 5px;
  text-decoration: none;
  transition: background 0.2s;
}

.book-promo-cta:hover { background: #A8821F; }

/* ── ARCHIVE / TAG LISTING CARDS ── */
.archive-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.archive-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
}

.archive-card-image-link {
  display: block;
  line-height: 0;
}

.archive-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.archive-card-body {
  padding: 28px 32px;
}

.archive-card-title {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 8px 0 8px;
  letter-spacing: -0.01em;
}

.archive-card-title a { color: var(--text); text-decoration: none; }
.archive-card-title a:hover { color: var(--gold); }

.archive-card-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 14px;
}

.archive-card-excerpt {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-soft);
  margin-bottom: 14px;
}

.archive-card-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
}

.archive-card-link:hover { text-decoration: underline; }

/* Ghost pagination helper */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
}

.pagination a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
}

.pagination a:hover { text-decoration: underline; }

/* ── SUBSCRIBE STRIP ── */
.subscribe-strip {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 56px 24px;
  text-align: center;
}

.subscribe-strip h2 {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.subscribe-strip p {
  font-size: 0.93rem;
  color: var(--text-soft);
  margin-bottom: 28px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.subscribe-cta {
  padding: 12px 28px;
  background: var(--gold);
  color: #0E0D0B;
  border: none;
  border-radius: 5px;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: var(--sans);
  cursor: pointer;
  transition: background 0.2s;
}

.subscribe-cta:hover { background: #A8821F; }

/* ── FOOTER ── */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
}

footer p {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.7;
}

footer a { color: var(--gold); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ── KOENIG EDITOR CONTENT IMAGES (v1.1.3) ──
   Safety net that was missing: a Regular-width image card had no CSS at
   all, so a large native photo (e.g. an author headshot) rendered at its
   full source resolution instead of scaling to the content column. This
   caps it and centers it like a proper portrait; Wide/Full images below
   are unaffected — those are meant to run larger. */
.post-content-wrap img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.post-content-wrap .kg-image-card:not(.kg-width-wide):not(.kg-width-full) {
  max-width: 340px;
  margin: 0 auto 28px;
}

.post-content-wrap figcaption {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  margin-top: 8px;
}

/* ── KOENIG EDITOR WIDE / FULL-BLEED IMAGES ──
   Ghost's image card lets editors pick Wide or Full width. These break
   the image out of the normal content padding inside a devotion. */
.post-content-wrap .kg-width-wide {
  margin-left: -20px;
  margin-right: -20px;
}

.post-content-wrap .kg-width-full {
  margin-left: -44px;
  margin-right: -44px;
}

.post-content-wrap .kg-width-wide img,
.post-content-wrap .kg-width-full img {
  width: 100%;
  display: block;
}

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
  .page-grid {
    grid-template-columns: 1fr;
  }

  .sidebar { order: -1; }
}

@media (max-width: 560px) {
  .nav-links { display: none; }

  .devotion-header,
  .devotion-body,
  .archive-card-body {
    padding-left: 20px;
    padding-right: 20px;
  }

  .post-content-wrap blockquote {
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 18px;
    padding-right: 18px;
  }
}
