/* ============================================
   TEMPLATE STYLES — blog-post.html + success-story.html
   Depends on tokens.css + global.css.
   ============================================ */

/* ============================================================
   .prose — readable body text
   ============================================================ */
.prose {
  font-family: var(--serif-body);
  font-size: 19px;
  line-height: 1.7;
  color: var(--ink);
  max-width: 72ch;
}
.prose > * + * { margin-top: 1.2em; }
.prose p { margin: 0 0 1.2em; }
.prose h2 {
  font-family: var(--slab);
  font-weight: 800;
  font-size: clamp(26px, 3.2vw, 34px);
  line-height: 1.15;
  color: var(--green-d);
  letter-spacing: -0.015em;
  margin: 2em 0 0.5em;
  scroll-margin-top: 80px;
}
.prose h3 {
  font-family: var(--slab);
  font-weight: 700;
  font-size: clamp(20px, 2.4vw, 24px);
  color: var(--green-d);
  margin: 1.6em 0 0.4em;
  scroll-margin-top: 80px;
}
.prose a {
  color: var(--green);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
  transition: text-decoration-color .15s ease;
}
.prose a:hover { text-decoration-color: var(--gold-d); }
.prose strong { color: var(--green-d); font-weight: 700; }
.prose em { font-style: italic; }
.prose img {
  width: 100%;
  height: auto;
  max-height: 460px;
  object-fit: cover;
  border-radius: var(--r-md);
  margin: 1.4em 0;
  box-shadow: var(--shadow);
}
.prose blockquote {
  margin: 1.6em 0;
  padding: 0 0 0 22px;
  border-left: 3px solid var(--gold);
  font-family: var(--serif-accent);
  font-style: italic;
  font-size: 22px;
  line-height: 1.45;
  color: var(--green-d);
}
.prose ul, .prose ol { margin: 1em 0 1.2em 1.4em; padding: 0; }
.prose li { margin: 0.4em 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

/* ============================================================
   BLOG POST — full-bleed hero
   ============================================================ */
.blog-post { position: relative; z-index: 1; }
.blog-post-hero {
  position: relative;
  min-height: clamp(520px, 72vh, 740px);
  display: flex;
  align-items: center;
  overflow: hidden;
}
.blog-post-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.blog-post-hero-bg img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
}
.blog-post-hero::before {
  content: "";
  position: absolute; inset: 0;
  /* Bottom-weighted gradient — image visible at top, text contrast preserved below */
  background: linear-gradient(180deg,
    rgba(31, 43, 29, 0) 0%,
    rgba(31, 43, 29, 0.15) 30%,
    rgba(31, 43, 29, 0.55) 75%,
    rgba(31, 43, 29, 0.78) 100%);
  z-index: 1;
}
.blog-post-hero-content {
  position: relative; z-index: 2;
  color: #fbf6e7;
  padding-block: 60px;
  max-width: 980px;
  margin-inline: auto;
  text-align: center;
}
.blog-post-hero-content .eyebrow.on-dark { color: var(--gold-l); }
.blog-post-hero-content .eyebrow.on-dark::before { background: var(--gold-l); }

.blog-post-meta {
  display: flex; flex-wrap: wrap; gap: 14px;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  font-family: var(--sans);
  font-size: 14px;
}
.blog-post-meta.on-dark { color: rgba(251, 246, 231, 0.85); }
.blog-post-meta .eyebrow { margin: 0; }
.blog-post-date, .blog-post-author { font-weight: 500; }

.blog-post-title {
  font-family: var(--slab);
  font-weight: 800;
  font-size: clamp(48px, 7.6vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.028em;
  color: #fbf6e7;
  margin: 0 0 26px;
  text-wrap: balance;
}
.blog-post-lede {
  font-family: var(--serif-accent);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(22px, 2.8vw, 30px);
  line-height: 1.38;
  color: rgba(251, 246, 231, 0.95);
  margin: 0 auto;
  max-width: 60ch;
  text-wrap: balance;
}

.blog-post-header {
  padding-block: clamp(56px, 8vw, 96px) 0;
  max-width: 800px; margin-inline: auto;
}
.blog-post-header .blog-post-title { color: var(--green-d); }
.blog-post-header .blog-post-lede { color: var(--ink-2); }

/* ============================================================
   3-COLUMN LAYOUT — TOC rail (left) + content + sidebar (right)
   ============================================================ */
.blog-post-layout,
.success-story-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 56px;
  align-items: start;
  padding-block: clamp(48px, 6vw, 72px);
}

.blog-post-main,
.success-story-main { min-width: 0; }

.blog-post-section,
.success-story-section { margin-bottom: 32px; }

.blog-post-figure,
.success-story-figure {
  margin: 32px 0;
  max-width: 100%;
}
.blog-post-figure img,
.success-story-figure img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--r-md);
  box-shadow: var(--shadow);
  display: block;
}
.blog-post-figure figcaption,
.success-story-figure figcaption {
  margin-top: 10px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
}

/* ============================================================
   TOC RAIL (left, embedded — no card)
   ============================================================ */
/* TOC — embedded inside the right sidebar, no card chrome, slim accent line */
.blog-post-toc-rail {
  width: 100%;
}
.blog-post-toc {
  border-left: 2px solid var(--line);
  padding: 4px 0 8px 20px;
}
.blog-post-toc-title {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 16px;
}
.blog-post-toc ul { list-style: none; margin: 0; padding: 0; }
.blog-post-toc li { margin: 0; }
.blog-post-toc a {
  display: block;
  padding: 9px 0;
  font-family: var(--slab);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.008em;
  color: var(--ink-2);
  text-decoration: none;
  transition: color .15s ease;
}
.blog-post-toc a:hover { color: var(--gold-d); }

/* ============================================================
   SIDEBAR — sticky right column (donate + adopt)
   ============================================================ */
.blog-post-sidebar,
.success-story-sidebar {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-self: start;
}

.sidebar-card {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: 20px 22px 22px;
  box-shadow: 0 2px 8px rgba(42, 51, 38, 0.05);
}
.sidebar-card-title {
  font-family: var(--slab);
  font-weight: 700;
  font-size: 16px;
  color: var(--green-d);
  margin: 0 0 10px;
  letter-spacing: -0.005em;
}
.sidebar-card p {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 16px;
}
.sidebar-card .btn {
  padding: 12px 20px;
  font-size: 12px;
  width: 100%;
  justify-content: center;
}
.sidebar-link {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  padding-bottom: 1px;
  transition: color .15s ease;
}
.sidebar-card.sidebar-adopt .sidebar-link {
  color: var(--green);
  border-bottom: 1px solid var(--line);
}
.sidebar-card.sidebar-adopt .sidebar-link:hover { color: var(--gold-d); }
.sidebar-card.sidebar-donate .sidebar-link {
  color: var(--gold-l);
  border-bottom: 1px solid rgba(244, 211, 94, 0.4);
}
.sidebar-card.sidebar-donate .sidebar-link:hover { color: var(--paper); }

/* Donate sidebar — dark green panel */
.sidebar-donate {
  background: var(--green-d);
  color: var(--paper);
  border-color: var(--green-d);
  position: relative;
  overflow: hidden;
  padding: 24px 22px 26px;
}
.sidebar-donate::before {
  content: "";
  position: absolute;
  top: -40px; right: -30px;
  width: 130px; height: 130px;
  background: var(--gold);
  opacity: 0.18;
  border-radius: 50%;
  filter: blur(8px);
  pointer-events: none;
}
.sidebar-donate .sidebar-card-title {
  color: var(--gold-l);
  font-size: 18px;
  position: relative;
  z-index: 1;
}
.sidebar-donate-amount {
  font-family: var(--slab);
  font-weight: 800;
  font-size: 44px;
  line-height: 1;
  color: var(--paper);
  margin: 4px 0 8px;
  letter-spacing: -0.025em;
  position: relative;
  z-index: 1;
}
.sidebar-donate-amount small {
  font-size: 14px;
  font-weight: 600;
  color: var(--gold-l);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-left: 6px;
}
.sidebar-donate p {
  color: rgba(244, 236, 214, 0.85);
  font-size: 14px;
  position: relative;
  z-index: 1;
}
.sidebar-donate .btn-primary {
  background: var(--gold);
  color: var(--green-d);
  position: relative;
  z-index: 1;
}
.sidebar-donate .btn-primary:hover { background: var(--gold-l); }

.sidebar-adopt { border-top: 3px solid var(--green-l); }

/* ============================================================
   INLINE CTAs — newsletter (blog), foster (success story)
   ============================================================ */
.inline-cta {
  margin: 48px 0;
  border-radius: var(--r-md);
  overflow: hidden;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}
/* Full-width .btn inside CTAs that aren't the newsletter form (newsletter input + button sits side-by-side) */
.inline-cta-foster .btn,
.inline-cta:not(.inline-cta-newsletter) .btn {
  width: 100%;
  justify-content: center;
}

/* Inline newsletter — overrides for the homepage .newsletter when placed inside an article column */
.blog-post-main > .newsletter {
  margin: 48px 0;
  padding: 0;
  background: transparent;
  isolation: auto;
  width: 100%;
  box-sizing: border-box;
}
.blog-post-main > .newsletter::before { display: none; }
.blog-post-main > .newsletter .container {
  max-width: 100%;
  width: 100%;
  padding: clamp(32px, 4vw, 56px);
  margin: 0;
  box-sizing: border-box;
}
.blog-post-main > .newsletter .newsletter-grid {
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 4vw, 48px);
  align-items: center;
}
@media (max-width: 720px) {
  .blog-post-main > .newsletter .newsletter-grid {
    grid-template-columns: 1fr;
  }
}
.blog-post-main > .newsletter h2 {
  font-size: clamp(26px, 3.2vw, 34px);
  max-width: 16ch;
}
.blog-post-main > .newsletter form {
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 8px;
  border-radius: var(--r-md);
  width: 100%;
  box-sizing: border-box;
}
.blog-post-main > .newsletter input {
  background: var(--paper);
  border-radius: var(--r-md);
  width: 100%;
}
.blog-post-main > .newsletter button[type="submit"] {
  width: 100%;
  justify-content: center;
}
.inline-cta-inner {
  padding: 36px 36px 38px;
}
.inline-cta .eyebrow { margin-bottom: 10px; }
.inline-cta h3 {
  font-family: var(--slab);
  font-weight: 800;
  font-size: clamp(22px, 2.8vw, 30px);
  line-height: 1.15;
  color: var(--green-d);
  margin: 0 0 10px;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.inline-cta p {
  font-family: var(--serif-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 20px;
  max-width: 56ch;
}

/* Inline newsletter (blog) — paper-2 panel with form */
.inline-cta-newsletter {
  background: var(--paper-2);
  border: 1px solid var(--line-soft);
}
.inline-newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 480px;
}
.inline-newsletter-form input {
  flex: 1 1 240px;
  padding: 14px 18px;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--green-d);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  outline: 0;
  transition: border-color .15s ease;
}
.inline-newsletter-form input::placeholder { color: var(--muted); }
.inline-newsletter-form input:focus { border-color: var(--green); }
.inline-newsletter-form .btn { flex: 0 0 auto; padding: 14px 26px; }

/* Inline foster (success story) — green-dark band with gold accent */
.inline-cta-foster {
  background: var(--green-d);
  color: var(--paper);
  position: relative;
}
.inline-cta-foster::before {
  content: "";
  position: absolute;
  top: -60px; right: -40px;
  width: 200px; height: 200px;
  background: var(--gold);
  opacity: 0.14;
  border-radius: 50%;
  filter: blur(15mm);
  pointer-events: none;
}
.inline-cta-foster .inline-cta-inner { position: relative; z-index: 1; }
.inline-cta-foster .eyebrow {
  color: var(--gold-l);
}
.inline-cta-foster .eyebrow::before { background: var(--gold-l); }
.inline-cta-foster h3 { color: #fbf6e7; }
.inline-cta-foster p { color: rgba(244, 236, 214, 0.88); }
.inline-cta-foster .btn-primary {
  background: var(--gold);
  color: var(--green-d);
}
.inline-cta-foster .btn-primary:hover { background: var(--gold-l); }

/* ============================================================
   GALLERY + LIGHTBOX (close returns to gallery item, not top)
   ============================================================ */
.blog-post-gallery,
.success-story-gallery {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--line-soft);
}
.gallery-heading {
  font-family: var(--slab);
  font-weight: 800;
  font-size: 24px;
  color: var(--green-d);
  margin: 0 0 20px;
  letter-spacing: -0.015em;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.gallery-item { margin: 0; scroll-margin-top: 100px; }
.gallery-item-link {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: var(--r-sm);
  cursor: zoom-in;
}
.gallery-item-link img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.gallery-item-link:hover img { transform: scale(1.04); }
.gallery-item-link::after {
  content: "⤢";
  position: absolute;
  bottom: 10px; right: 10px;
  width: 32px; height: 32px;
  background: rgba(31, 43, 29, 0.7);
  color: var(--gold-l);
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 14px;
  opacity: 0;
  transition: opacity .2s ease;
}
.gallery-item-link:hover::after { opacity: 1; }
.gallery-item figcaption {
  margin-top: 6px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
}

/* CSS-only lightbox via :target — clicking background or × returns to gallery anchor (no scroll-to-top) */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
}
.lightbox:target {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox-bg-close {
  position: absolute;
  inset: 0;
  background: rgba(31, 43, 29, 0.94);
  z-index: 0;
  cursor: zoom-out;
}
.lightbox-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 95vw;
}
.lightbox-content img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--r-md);
}
.lightbox-caption {
  color: var(--paper);
  font-family: var(--sans);
  font-size: 14px;
  margin: 0;
  text-align: center;
  max-width: 60ch;
}
.lightbox-close {
  position: absolute;
  top: 24px; right: 32px;
  width: 44px; height: 44px;
  background: rgba(244, 236, 214, 0.12);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 30px;
  line-height: 1;
  text-decoration: none;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: background .15s ease;
  z-index: 2;
}
.lightbox-close:hover { background: rgba(244, 236, 214, 0.25); }

/* ============================================================
   SUCCESS STORY header + before/after
   ============================================================ */
.success-story-header {
  padding-block: clamp(56px, 9vw, 96px) 28px;
  max-width: 720px;
  text-align: center;
  position: relative;
}
.success-story-header::before {
  content: "";
  position: absolute;
  top: 20px; left: 50%;
  transform: translateX(-50%);
  width: 60px; height: 4px;
  background: var(--gold);
  border-radius: 2px;
}
.success-story-name {
  font-family: var(--slab);
  font-weight: 800;
  font-size: clamp(48px, 8vw, 96px);
  line-height: 1;
  letter-spacing: -0.028em;
  color: var(--green-d);
  margin: 16px 0 8px;
  text-wrap: balance;
}
.success-story-tagline {
  font-family: var(--serif-accent);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(18px, 2.4vw, 24px);
  color: var(--gold-d);
  margin: 0 0 12px;
}
.success-story-meta {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

.success-story-baf {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding-block: 32px;
}
.success-story-baf figure { margin: 0; }
.success-story-baf img {
  width: 100%;
  height: clamp(280px, 36vw, 460px);
  object-fit: cover;
  border-radius: var(--r-md);
  box-shadow: var(--shadow);
  display: block;
}
.success-story-baf figcaption {
  margin-top: 10px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
}
.baf-label {
  display: inline-block;
  font-family: var(--slab);
  font-weight: 700;
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-d);
  background: rgba(232, 176, 74, 0.18);
  padding: 3px 9px;
  border-radius: 999px;
  margin-right: 8px;
  vertical-align: middle;
}

.success-story-quote {
  margin: 40px 0;
  padding: 30px 32px;
  background: var(--paper-2);
  border-radius: var(--r-md);
  border-left: 4px solid var(--gold);
  font-family: var(--serif-accent);
  font-style: italic;
}
.success-story-quote p {
  font-size: clamp(20px, 2.6vw, 26px);
  line-height: 1.4;
  color: var(--green-d);
  margin: 0 0 12px;
  text-wrap: balance;
}
.success-story-quote cite {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============================================================
   RELATED POSTS / STORIES BAND
   ============================================================ */
.blog-related,
.success-related {
  background: var(--paper);
  padding-block: clamp(56px, 8vw, 96px);
}
.blog-related-head,
.success-related-head { margin-bottom: 36px; }
.blog-related-head h2,
.success-related-head h2 {
  font-family: var(--slab);
  font-weight: 800;
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1.1;
  color: var(--green-d);
  margin: 8px 0 0;
  letter-spacing: -0.02em;
}
.blog-related-grid,
.success-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  align-items: stretch;
}
.blog-related-card,
.success-related-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 10px rgba(42, 51, 38, 0.05);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  min-height: 540px;
  height: 100%;
}
.blog-related-card:hover,
.success-related-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(42, 51, 38, 0.14);
  border-color: var(--gold);
}
.blog-related-card img,
.success-related-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}
.blog-related-card-body,
.success-related-card-body {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.blog-related-card-date {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.blog-related-card h3,
.success-related-card h3 {
  font-family: var(--slab);
  font-weight: 700;
  font-size: 21px;
  line-height: 1.22;
  color: var(--green-d);
  margin: 10px 0 12px;
  letter-spacing: -0.012em;
}
.blog-related-card-excerpt,
.success-related-card-excerpt {
  font-family: var(--serif-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 18px;
}
.blog-related-card-read,
.success-related-card-read {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-top: auto;
  padding: 10px 18px;
  background: var(--yellow);
  color: var(--green-d);
  font-family: var(--slab);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(244, 211, 94, 0.32);
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.blog-related-card-read::after,
.success-related-card-read::after {
  content: " →";
  margin-left: 6px;
  transition: transform .2s ease;
  display: inline-block;
}
.blog-related-card:hover .blog-related-card-read,
.success-related-card:hover .success-related-card-read {
  background: var(--gold);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(232, 176, 74, 0.42);
}
.blog-related-card:hover .blog-related-card-read::after,
.success-related-card:hover .success-related-card-read::after {
  transform: translateX(3px);
}

/* ============================================================
   FOOTER STRIP — back + final CTA (high-contrast both)
   Overrides the global `footer { background: var(--green-d) }` rule
   in global.css. Uses the mid forest green (--green) for a softer
   visual than the dark green of the site footer. No top border —
   visually flows from the related-posts cream above.
   ============================================================ */
.blog-post-footer,
.success-story-footer {
  background: var(--green) !important;
  padding: 28px var(--gutter) 32px !important;
  border-top: 0 !important;
  color: var(--paper-w);
  position: relative;
  z-index: 1;
}
.blog-post-footer .container,
.success-story-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
}
.blog-post-footer .btn-back,
.success-story-footer .btn-back {
  background: transparent;
  color: var(--paper-w);
  border: 1.5px solid rgba(251, 246, 231, 0.4);
  padding: 12px 24px;
  font-family: var(--slab);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: 999px;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.blog-post-footer .btn-back:hover,
.success-story-footer .btn-back:hover {
  background: rgba(251, 246, 231, 0.08);
  border-color: var(--paper-w);
  transform: translateY(-1px);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .blog-post-layout,
  .success-story-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .blog-post-sidebar,
  .success-story-sidebar { position: static; }
}

@media (max-width: 720px) {
  .blog-post-hero { min-height: 360px; }
  .blog-post-hero-content { padding-block: 40px 32px; }
  .blog-post-title { font-size: 32px; }
  .blog-post-lede { font-size: 17px; }
  .success-story-baf { grid-template-columns: 1fr; }
  .success-story-name { font-size: 56px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .inline-cta-inner { padding: 28px 22px 30px; }
  .inline-cta h3 { font-size: 22px; }
  .inline-newsletter-form { flex-direction: column; }
  .inline-newsletter-form .btn { width: 100%; }
  .blog-post-footer .container,
  .success-story-footer .container {
    flex-direction: column;
    align-items: stretch;
  }
  .blog-post-footer .btn,
  .success-story-footer .btn {
    width: 100%;
    justify-content: center;
  }
  .lightbox-close { top: 14px; right: 14px; }
}

/* ============================================================
   BLOG ARCHIVE — /blog/ index page (home.php)
   Filter tabs + responsive card grid.
   ============================================================ */
.blog-archive {
  padding-block: clamp(56px, 8vw, 96px);
  background: var(--paper);
}
.blog-archive-head {
  max-width: 720px;
  margin: 0 auto 36px;
  text-align: center;
}
.blog-archive-head .eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-d);
}
.blog-archive-head h1 {
  font-family: var(--slab);
  font-weight: 800;
  font-size: clamp(40px, 5.6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.024em;
  color: var(--green-d);
  margin: 0 0 16px;
  text-wrap: balance;
}
.blog-archive-head .lede {
  font-family: var(--serif-accent);
  font-style: italic;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.42;
  color: var(--ink-2);
  margin: 0 auto;
  max-width: 60ch;
  text-wrap: balance;
}

.blog-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 12px;
  max-width: 920px;
  margin: 0 auto 48px;
  padding: 0;
}
.blog-filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.blog-filter-tab:hover {
  border-color: var(--gold);
  color: var(--green-d);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(42, 51, 38, 0.08);
}
.blog-filter-tab.is-active {
  background: var(--green-d);
  border-color: var(--green-d);
  color: var(--paper-w);
  box-shadow: 0 4px 14px rgba(31, 43, 29, 0.22);
}
.blog-filter-tab.is-active:hover {
  background: var(--green);
  border-color: var(--green);
  color: var(--paper-w);
}
.blog-filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  padding: 2px 7px;
  background: rgba(42, 51, 38, 0.08);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
.blog-filter-tab.is-active .blog-filter-count {
  background: rgba(251, 246, 231, 0.18);
  color: var(--paper-w);
}

.blog-archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
  max-width: 1180px;
  margin: 0 auto;
}
.blog-archive-grid .blog-related-card {
  min-height: 0;
}
/* JS filter hides cards by setting [hidden]; the card's own
   `display: flex` would otherwise override the UA default. */
.blog-archive-grid .blog-related-card[hidden] {
  display: none !important;
}
.blog-archive-grid .blog-related-card img {
  height: 200px;
}
.blog-archive-grid .blog-related-card-body {
  padding: 20px 22px 22px;
}
.blog-archive-grid .blog-related-card h3 {
  font-size: 20px;
  margin: 8px 0 10px;
}

.blog-related-card-tag {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 10px;
  margin-bottom: 8px;
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.blog-related-card-tag.tag-rescue    { background: var(--red);      color: var(--paper-w); }
.blog-related-card-tag.tag-sanctuary { background: var(--green);    color: var(--paper-w); }
.blog-related-card-tag.tag-education { background: var(--gold-d);   color: var(--paper-w); }
.blog-related-card-tag.tag-memoriam  { background: var(--ink);      color: var(--paper-w); }

.blog-archive-empty {
  text-align: center;
  font-family: var(--serif-accent);
  font-style: italic;
  font-size: 18px;
  color: var(--ink-2);
  padding: 48px 16px;
}

@media (max-width: 640px) {
  /* Wrap + centre the category pills instead of a clipped horizontal
     scroll strip (the old overflow-x row cut tabs off mid-word with no
     affordance that it scrolled). With ~5 categories this is 2 tidy rows. */
  .blog-filter {
    justify-content: center;
    flex-wrap: wrap;
    overflow-x: visible;
    gap: 8px;
    padding: 0 8px;
    margin-bottom: 36px;
  }
  .blog-filter-tab {
    padding: 9px 14px;
    font-size: 12.5px;
  }
  .blog-archive-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ============================================================
   Single success story — twin of .single-animal-* (dogs.css:168+).
   Big photo left, stats + CTA right; story body below the hero;
   prev/next dog cards; latest blog strip. Added 2026-05-28.
   ============================================================ */
.single-success-hero{max-width:var(--maxw);margin:0 auto;padding:clamp(20px,3vw,40px) var(--gutter) clamp(40px,6vw,60px);position:relative}
.single-success-back{display:inline-flex;align-items:center;gap:8px;font:700 12px/1 var(--sans);letter-spacing:.16em;text-transform:uppercase;color:var(--green-d);text-decoration:none;padding:10px 14px;border-radius:999px;background:var(--paper-2);transition:all .2s ease;margin-bottom:clamp(20px,3vw,32px)}
.single-success-back:hover{background:var(--gold);color:var(--green-d)}
.single-success-hero-inner{display:grid;grid-template-columns:1.05fr 1fr;gap:clamp(28px,4vw,64px);align-items:start}
@media (max-width:880px){.single-success-hero-inner{grid-template-columns:1fr}}
.single-success-photo{position:relative;aspect-ratio:4/5;background:var(--paper-3);border-radius:var(--r-xl);overflow:hidden}
.single-success-photo img{width:100%;height:100%;object-fit:cover;object-position:center 28%;display:block}
.single-success-photo .tag{position:absolute;top:14px;left:14px;padding:8px 14px;font:700 11px/1 var(--sans);letter-spacing:.18em;text-transform:uppercase;border-radius:999px;background:rgba(42,51,38,0.85);color:#fbf6e7;backdrop-filter:blur(6px)}
.single-success-photo .tag.pending{background:var(--gold);color:var(--green-d)}

.single-success-meta{padding-top:clamp(12px,2vw,28px)}
.single-success-eyebrow{display:inline-block;font:700 11px/1 var(--sans);letter-spacing:.28em;text-transform:uppercase;color:var(--gold-d,#946d12);padding:8px 14px;background:var(--paper-2);border-radius:999px;margin-bottom:18px}
.single-success-meta h1{font-family:var(--slab);font-weight:800;font-size:clamp(46px,6.6vw,84px);line-height:0.98;letter-spacing:-0.025em;color:var(--green-d);margin:0 0 18px}
.single-success-stats{list-style:none;padding:0;margin:0 0 22px;display:flex;flex-wrap:wrap;gap:8px}
.single-success-stats li{font:600 13px/1 var(--sans);color:var(--ink-2);background:var(--paper-2);padding:9px 14px;border-radius:999px}
.single-success-lede{font-size:clamp(17px,1.6vw,20px);line-height:1.55;color:var(--ink);max-width:46ch;margin:0 0 28px;font-family:var(--slab);font-weight:500}

.single-success-cta{background:var(--paper-2);border:1px solid rgba(52,74,48,0.12);border-radius:var(--r-lg);padding:24px 26px}
.single-success-cta .label{font:700 11px/1 var(--sans);letter-spacing:.28em;text-transform:uppercase;color:var(--green-d);margin-bottom:6px;display:block}
.single-success-cta h3{font-family:var(--slab);font-weight:800;font-size:22px;color:var(--green-d);margin:0 0 14px;letter-spacing:-0.015em;line-height:1.2}
.single-success-cta h3 .accent{font-family:'Fraunces',Georgia,serif;font-style:italic;font-weight:600;color:var(--gold-d)}
.single-success-cta .actions{display:flex;flex-direction:column;gap:10px}
.single-success-cta .actions .btn{justify-content:center}
/* Foster button: dark-green outline + hover fill (NOT the standard green). */
.single-success-cta .btn-ghost{color:var(--green-d);border-color:var(--green-d)}
.single-success-cta .btn-ghost:hover{background:var(--green-d);color:#fbf6e7;border-color:var(--green-d)}

.single-success-body{max-width:780px;margin:0 auto;padding:0 var(--gutter) clamp(48px,6vw,72px)}
.single-success-body p{font-size:18px;line-height:1.7;color:var(--ink-2);margin:0 0 18px}

.single-success-nav{max-width:var(--maxw);margin:0 auto;padding:clamp(40px,5vw,72px) var(--gutter)}
.single-success-nav .label{display:block;font:700 11px/1 var(--sans);letter-spacing:.28em;text-transform:uppercase;color:var(--muted);margin-bottom:18px}
.single-success-nav-grid{display:grid;grid-template-columns:1fr 1fr;gap:clamp(16px,2vw,28px)}
@media (max-width:680px){.single-success-nav-grid{grid-template-columns:1fr}}
.single-success-nav-card{display:flex;gap:16px;align-items:center;background:var(--paper-2);border:1px solid transparent;border-radius:var(--r-lg);padding:14px;text-decoration:none;color:inherit;transition:all .25s ease}
.single-success-nav-card:hover{transform:translateY(-2px);box-shadow:var(--shadow);border-color:var(--gold);background:var(--paper)}
.single-success-nav-card .arrow-icon{flex:0 0 auto;width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;color:var(--green-d);background:var(--paper);border-radius:999px;flex-shrink:0}
.single-success-nav-card.is-next{justify-content:flex-end;text-align:right;flex-direction:row-reverse}
.single-success-nav-thumb{flex:0 0 auto;width:80px;height:100px;border-radius:var(--r-md);overflow:hidden;background:var(--paper-3)}
.single-success-nav-thumb img{width:100%;height:100%;object-fit:cover;object-position:center 28%;display:block}
.single-success-nav-text{flex:1;min-width:0}
.single-success-nav-text .dir{font:700 10px/1 var(--sans);letter-spacing:.22em;text-transform:uppercase;color:var(--muted);margin-bottom:6px;display:block}
.single-success-nav-text .name{font-family:var(--slab);font-weight:800;font-size:22px;color:var(--green-d);letter-spacing:-0.015em;line-height:1.05;margin-bottom:4px}
.single-success-nav-text .status{font:600 11px/1.2 var(--sans);color:var(--ink-2);letter-spacing:.06em}

/* Line break sits between prev/next nav and the blog strip below. */
.single-success-blogs{max-width:var(--maxw);margin:0 auto;padding:clamp(40px,5vw,72px) var(--gutter) clamp(60px,8vw,100px);border-top:1px solid rgba(52,74,48,0.10)}
.single-success-blogs .label{display:block;font:700 11px/1 var(--sans);letter-spacing:.28em;text-transform:uppercase;color:var(--muted);margin-bottom:18px}
.single-success-blogs .blog-related-card{min-height:0}
