/*
Theme Name: ScanifyPro Blog
Theme URI: https://blog.scanifypro.com
Author: ScanifyPro Team
Author URI: https://scanifypro.com
Description: Official blog theme for ScanifyPro — food scanner and nutrition app.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: Proprietary
Text Domain: scanifypro-blog
*/

/* ══════════════════════════════════════════════════════════════════════
   DESIGN TOKENS
   ══════════════════════════════════════════════════════════════════════ */
:root {
  --primary:       #2a7d4f;
  --primary-dark:  #1e5c3a;
  --primary-light: #e8f4ee;
  --accent:        #f0a500;
  --accent-dark:   #d9940a;
  --accent-light:  #fef3d0;
  --bg:            #f5f8f2;
  --surface:       #ffffff;
  --fg:            #1c3028;
  --subtext:       #567a6a;
  --dark:          #1c3028;
  --dark2:         #2a4a36;
  --border:        rgba(42,125,79,.1);
  --border-hover:  rgba(42,125,79,.22);

  --r-xs: 8px;
  --r-sm: 12px;
  --r:    18px;
  --r-lg: 24px;
  --r-xl: 32px;

  --shadow-sm: 0 2px 8px rgba(28,48,40,.07);
  --shadow:    0 6px 20px rgba(28,48,40,.1), 0 2px 6px rgba(28,48,40,.06);
  --shadow-lg: 0 16px 40px rgba(28,48,40,.14), 0 4px 12px rgba(28,48,40,.08);
  --shadow-card: 0 20px 48px rgba(42,125,79,.16), 0 4px 12px rgba(42,125,79,.08);

  --max-w:     1280px;
  --content-w: 760px;
}

/* ══════════════════════════════════════════════════════════════════════
   RESET & BASE
   ══════════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img  { max-width: 100%; height: auto; display: block; }
a    { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
ul, ol { list-style: none; }

/* ══════════════════════════════════════════════════════════════════════
   TYPOGRAPHY
   ══════════════════════════════════════════════════════════════════════ */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Fraunces', Georgia, serif;
  color: var(--fg);
  line-height: 1.12;
  font-weight: 800;
}
p { margin-bottom: 1.2rem; }
p:last-child { margin-bottom: 0; }

/* ══════════════════════════════════════════════════════════════════════
   UTILITIES
   ══════════════════════════════════════════════════════════════════════ */
.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .7rem 1.4rem;
  border-radius: var(--r-sm);
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all .22s ease;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(42,125,79,.28);
}
.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(42,125,79,.35);
}
.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(240,165,0,.3);
}
.btn-accent:hover {
  background: var(--accent-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(240,165,0,.38);
}
.btn-ghost {
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
}
.btn-ghost:hover {
  background: rgba(255,255,255,.2);
  color: #fff;
  transform: translateY(-1px);
}

/* ══════════════════════════════════════════════════════════════════════
   PING ANIMATION (amber dot)
   ══════════════════════════════════════════════════════════════════════ */
@keyframes ping-amber {
  0%   { box-shadow: 0 0 0 0 rgba(240,165,0,.7); }
  70%  { box-shadow: 0 0 0 8px rgba(240,165,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(240,165,0,0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up-1 { animation: fadeUp .7s cubic-bezier(.22,1,.36,1) .1s both; }
.fade-up-2 { animation: fadeUp .7s cubic-bezier(.22,1,.36,1) .22s both; }
.fade-up-3 { animation: fadeUp .7s cubic-bezier(.22,1,.36,1) .36s both; }
.fade-up-4 { animation: fadeUp .7s cubic-bezier(.22,1,.36,1) .5s both; }

/* ══════════════════════════════════════════════════════════════════════
   NAVBAR
   ══════════════════════════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s, box-shadow .3s;
}
.site-header.scrolled {
  background: rgba(255,255,255,.97);
  border-bottom-color: var(--border);
  box-shadow: 0 2px 16px rgba(28,48,40,.08);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo img { width: 32px; height: 32px; border-radius: 22%; transition: transform .2s; }
.site-logo:hover img { transform: scale(1.1); }
.site-logo-name {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--fg);
}

.nav-links { display: flex; align-items: center; gap: .2rem; }
.nav-links a {
  position: relative;
  padding: .5rem .8rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--subtext);
  transition: color .2s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 4px; left: .8rem; right: .8rem;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s;
}
.nav-links a:hover, .nav-links a.current { color: var(--primary); }
.nav-links a:hover::after, .nav-links a.current::after { transform: scaleX(1); }

.nav-cta {
  margin-left: .75rem;
  padding: .5rem 1.15rem !important;
  background: var(--primary) !important;
  color: #fff !important;
  border-radius: var(--r-sm) !important;
  font-weight: 700 !important;
  box-shadow: 0 3px 10px rgba(42,125,79,.22);
  transition: all .2s !important;
}
.nav-cta:hover {
  background: var(--primary-dark) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 5px 16px rgba(42,125,79,.3) !important;
}
.nav-cta::after { display: none !important; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
  border-radius: var(--r-sm);
  color: var(--subtext);
}
.nav-toggle:hover { color: var(--primary); background: var(--primary-light); }
.nav-toggle svg { width: 24px; height: 24px; display: block; }

.nav-drawer {
  display: none;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height .3s, opacity .3s;
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,.99);
}
.nav-drawer.open { max-height: 400px; opacity: 1; }
.nav-drawer-inner { padding: .75rem 1rem 1.25rem; display: flex; flex-direction: column; gap: .2rem; }
.nav-drawer a {
  display: block;
  padding: .65rem .85rem;
  border-radius: var(--r-sm);
  font-size: .9rem;
  font-weight: 600;
  color: var(--subtext);
}
.nav-drawer a:hover { color: var(--primary); background: var(--primary-light); }
.nav-drawer .nav-cta {
  display: flex !important;
  justify-content: center;
  margin-top: .5rem;
  padding: .75rem !important;
}

@media (max-width: 767px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-drawer { display: block; }
}

/* ══════════════════════════════════════════════════════════════════════
   HERO  —  dark forest green, dramatic
   ══════════════════════════════════════════════════════════════════════ */
.blog-hero {
  background: var(--dark);
  min-height: 76vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* atmospheric amber orb — top right */
.blog-hero::before {
  content: '';
  position: absolute;
  top: -120px; right: -100px;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240,165,0,.18) 0%, transparent 60%);
  pointer-events: none;
}
/* green orb — bottom left */
.blog-hero::after {
  content: '';
  position: absolute;
  bottom: -100px; left: -100px;
  width: 560px; height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(42,125,79,.35) 0%, transparent 60%);
  pointer-events: none;
}

.hero-dot-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.055) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
  pointer-events: none;
}
/* fade to dark at bottom */
.hero-fade-bottom {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--dark));
  pointer-events: none;
}

.blog-hero-inner {
  position: relative;
  z-index: 2;
  padding: 5rem 1rem 6rem;
  max-width: 860px;
  width: 100%;
}

/* Live badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .4rem 1rem .4rem .7rem;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  color: rgba(255,255,255,.8);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}
.hero-badge-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  animation: ping-amber 1.5s ease-out infinite;
  flex-shrink: 0;
}

/* Giant headline */
.blog-hero h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(3rem, 7.5vw, 6rem);
  font-weight: 900;
  font-style: italic;
  color: #fff;
  line-height: 1.04;
  letter-spacing: -.025em;
  margin-bottom: 1.5rem;
}
.blog-hero h1 .word-accent {
  color: var(--accent);
  position: relative;
  display: inline-block;
}
/* wavy SVG underline — same as main site's "eating" */
.blog-hero h1 .word-accent svg {
  position: absolute;
  bottom: -6px; left: 0;
  width: 100%;
  overflow: visible;
}

.blog-hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,.58);
  line-height: 1.7;
  max-width: 500px;
  margin: 0 auto 2.5rem;
}

/* Search bar on dark bg */
.hero-search {
  display: flex;
  gap: .5rem;
  max-width: 480px;
  margin: 0 auto 2.5rem;
}
.hero-search input {
  flex: 1;
  padding: .9rem 1.25rem;
  background: rgba(255,255,255,.1);
  border: 2px solid rgba(255,255,255,.15);
  border-radius: var(--r);
  color: #fff;
  font-family: inherit;
  font-size: .95rem;
  outline: none;
  transition: border-color .2s, background .2s;
}
.hero-search input::placeholder { color: rgba(255,255,255,.38); }
.hero-search input:focus {
  border-color: rgba(240,165,0,.55);
  background: rgba(255,255,255,.14);
}
.hero-search button {
  padding: .9rem 1.3rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--r);
  cursor: pointer;
  font-weight: 700;
  font-size: .9rem;
  display: flex;
  align-items: center;
  gap: .35rem;
  transition: background .2s, transform .2s;
  white-space: nowrap;
}
.hero-search button:hover { background: var(--accent-dark); transform: translateY(-1px); }
.hero-search button svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Category pills */
.hero-cats {
  display: flex;
  gap: .5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-cat {
  padding: .4rem 1rem;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  color: rgba(255,255,255,.65);
  font-size: .78rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s;
}
.hero-cat:hover {
  background: rgba(240,165,0,.18);
  border-color: rgba(240,165,0,.4);
  color: var(--accent);
}

/* ══════════════════════════════════════════════════════════════════════
   POSTS SECTION
   ══════════════════════════════════════════════════════════════════════ */
.site-main { flex: 1; padding: 4rem 0 6rem; }

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}
.section-label {
  display: inline-block;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid rgba(240,165,0,.22);
  border-radius: 999px;
  padding: .28rem .8rem;
  margin-bottom: .6rem;
}
.section-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--fg);
  line-height: 1.1;
}
.section-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .82rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  transition: gap .15s;
}
.section-link:hover { gap: .55rem; color: var(--primary-dark); }
.section-link svg { width: 14px; height: 14px; }

/* ── Layout: 2-col (content + sidebar) ── */
.layout-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 1023px) { .layout-grid { grid-template-columns: 1fr; } }

/* ── Posts grid ── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
}

/* ── Per-category section block ── */
.section-category-block {
  margin-top: 3.5rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

/* ══════════════════════════════════════════════════════════════════════
   FEATURED POST  —  full-width horizontal card
   ══════════════════════════════════════════════════════════════════════ */
.post-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface);
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
  margin-bottom: 1rem;
}
.post-featured:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card);
}
@media (max-width: 640px) { .post-featured { grid-template-columns: 1fr; } }

.post-featured .pf-thumb {
  position: relative;
  overflow: hidden;
  min-height: 300px;
}
.post-featured .pf-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.post-featured:hover .pf-thumb img { transform: scale(1.04); }

/* "Featured" label on image */
.pf-thumb-badge {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 3;
  padding: .3rem .85rem;
  background: var(--dark);
  color: var(--accent);
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.post-featured .pf-body {
  padding: clamp(1.75rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

.pf-meta {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}
.pf-cat {
  display: inline-flex;
  align-items: center;
  padding: .25rem .75rem;
  background: var(--accent-light);
  color: var(--accent-dark);
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .15s;
}
.pf-cat:hover { background: var(--accent); color: #fff; }
.pf-date { font-size: .78rem; color: var(--subtext); font-weight: 500; }
.pf-read-time {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .72rem;
  font-weight: 700;
  color: var(--subtext);
  background: var(--bg);
  padding: .2rem .65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.pf-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--fg);
  text-decoration: none;
  display: block;
  transition: color .15s;
}
.pf-title:hover { color: var(--primary); }

.pf-excerpt {
  font-size: .95rem;
  color: var(--subtext);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.pf-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: .5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.pf-author {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: .82rem;
  font-weight: 700;
  color: var(--subtext);
}
.pf-author-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--primary-light);
}
.pf-author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pf-read-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.1rem;
  background: var(--primary);
  color: #fff;
  border-radius: var(--r-sm);
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
  transition: all .2s;
}
.pf-read-btn:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); }
.pf-read-btn svg { width: 14px; height: 14px; }

/* ══════════════════════════════════════════════════════════════════════
   REGULAR POST CARDS  —  vertical with category overlay on image
   ══════════════════════════════════════════════════════════════════════ */
.post-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.post-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow-card);
  border-color: rgba(42,125,79,.18);
}

/* Image with category badge OVERLAID */
.pc-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--primary-light);
  flex-shrink: 0;
}
.pc-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}
.post-card:hover .pc-thumb img { transform: scale(1.06); }

.pc-thumb-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-light), #e0f0e6);
}
.pc-thumb-placeholder svg { width: 44px; height: 44px; color: var(--primary); opacity: .3; }

/* Amber category badge — bottom-left on image */
.pc-cat-overlay {
  position: absolute;
  bottom: 12px; left: 12px;
  z-index: 3;
  padding: .28rem .8rem;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.22);
  transition: background .15s;
}
.pc-cat-overlay:hover { background: var(--accent-dark); color: #fff; }

/* Gradient fade on image bottom */
.pc-thumb::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: linear-gradient(transparent, rgba(0,0,0,.18));
  pointer-events: none;
}

/* Card body */
.pc-body {
  padding: 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: .55rem;
}

.pc-meta-top {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.pc-date { font-size: .73rem; color: var(--subtext); }
.pc-read-time {
  font-size: .68rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: .18rem .55rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}

.pc-title {
  font-family: 'Fraunces', serif;
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pc-title a { color: var(--fg); text-decoration: none; transition: color .15s; }
.pc-title a:hover { color: var(--primary); }

.pc-excerpt {
  font-size: .84rem;
  color: var(--subtext);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  flex: 1;
}

.pc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: .85rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.pc-author {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .77rem;
  font-weight: 700;
  color: var(--subtext);
}
.pc-author-avatar { width: 26px; height: 26px; border-radius: 50%; overflow: hidden; background: var(--primary-light); }
.pc-author-avatar img { width: 100%; height: 100%; object-fit: cover; }

.pc-arrow {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--subtext);
  transition: all .2s;
  flex-shrink: 0;
}
.post-card:hover .pc-arrow {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateX(2px);
}
.pc-arrow svg { width: 14px; height: 14px; }

/* ══════════════════════════════════════════════════════════════════════
   PAGINATION
   ══════════════════════════════════════════════════════════════════════ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .4rem;
  margin-top: 3.5rem;
}
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; height: 42px; padding: 0 .8rem;
  border-radius: var(--r-sm);
  font-size: .875rem; font-weight: 600;
  transition: all .15s;
}
.pagination a { color: var(--subtext); border: 1px solid var(--border); text-decoration: none; }
.pagination a:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-light); }
.pagination .current { background: var(--primary); color: #fff; border: 1px solid var(--primary); }
.pagination .dots { border: none; color: var(--subtext); }

/* ══════════════════════════════════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════════════════════════════════ */
.sidebar {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* App CTA — flagship widget */
.widget-cta {
  background: var(--dark);
  border-radius: var(--r-lg);
  padding: 2rem 1.6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.widget-cta::before {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240,165,0,.2) 0%, transparent 65%);
}
.widget-cta::after {
  content: '';
  position: absolute;
  bottom: -40px; left: -40px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(42,125,79,.4) 0%, transparent 65%);
}
.widget-cta-emoji {
  font-size: 2.2rem;
  margin-bottom: .75rem;
  position: relative;
  z-index: 1;
  display: block;
}
.widget-cta-title {
  font-family: 'Fraunces', serif;
  font-size: 1.25rem;
  font-weight: 800;
  font-style: italic;
  color: #fff;
  margin-bottom: .45rem;
  position: relative;
  z-index: 1;
  line-height: 1.2;
}
.widget-cta-sub {
  font-size: .82rem;
  color: rgba(255,255,255,.55);
  margin-bottom: 1.4rem;
  position: relative;
  z-index: 1;
  line-height: 1.55;
}
.widget-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .75rem 1.25rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-sm);
  font-weight: 800;
  font-size: .88rem;
  text-decoration: none;
  position: relative;
  z-index: 1;
  transition: background .2s, transform .2s;
}
.widget-cta-btn:hover { background: var(--accent-dark); color: #fff; transform: translateY(-1px); }

/* Generic widget card */
.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.4rem 1.5rem;
}
.widget-title {
  font-family: 'Fraunces', serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--fg);
  margin-bottom: 1rem;
  padding-bottom: .65rem;
  border-bottom: 2px solid var(--primary-light);
}

/* Recent posts */
.widget-posts { display: flex; flex-direction: column; gap: .9rem; }
.widget-post { display: flex; gap: .85rem; align-items: flex-start; text-decoration: none; }
.widget-post:hover .widget-post-title { color: var(--primary); }
.widget-post-thumb {
  width: 64px; height: 64px;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--primary-light);
}
.widget-post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.widget-post-title {
  font-family: 'Fraunces', serif;
  font-size: .87rem;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .15s;
  margin-bottom: .25rem;
}
.widget-post-date { font-size: .7rem; color: var(--subtext); }

/* Categories */
.widget-cats { display: flex; flex-direction: column; gap: .35rem; }
.widget-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .55rem .8rem;
  border-radius: var(--r-sm);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 600;
  color: var(--subtext);
  transition: all .15s;
}
.widget-cat:hover { background: var(--primary-light); color: var(--primary); }
.widget-cat-count {
  font-size: .7rem;
  font-weight: 700;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: .12rem .5rem;
  border-radius: 999px;
}
.widget-cats-more {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: .6rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  padding: .3rem .5rem;
  border-radius: var(--r-sm);
  transition: gap .15s;
}
.widget-cats-more:hover { gap: .55rem; }

/* ══════════════════════════════════════════════════════════════════════
   ARCHIVE / SEARCH HEADER
   ══════════════════════════════════════════════════════════════════════ */
.archive-header {
  padding: 3.5rem 0 2.5rem;
  background: var(--dark);
  position: relative;
  overflow: hidden;
}
.archive-header::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 60px;
  background: linear-gradient(transparent, var(--bg));
}
.archive-header-inner {
  position: relative; z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}
.archive-label {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
  background: rgba(240,165,0,.15);
  border: 1px solid rgba(240,165,0,.25);
  border-radius: 999px;
  padding: .3rem .9rem;
  margin-bottom: 1rem;
}
.archive-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  font-style: italic;
  color: #fff;
  margin-bottom: .75rem;
}
.archive-desc { font-size: 1rem; color: rgba(255,255,255,.55); max-width: 520px; }

/* ══════════════════════════════════════════════════════════════════════
   SINGLE POST
   ══════════════════════════════════════════════════════════════════════ */
.single-hero {
  background: var(--dark);
  padding: 4rem 0 3rem;
  position: relative;
  overflow: hidden;
}
.single-hero::before {
  content: '';
  position: absolute;
  bottom: -80px; right: -80px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240,165,0,.12) 0%, transparent 65%);
}
.single-hero::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(transparent, var(--bg));
  pointer-events: none;
}
.single-hero-inner {
  position: relative; z-index: 1;
  max-width: var(--content-w);
  margin: 0 auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}
.single-hero-meta {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.single-cat {
  padding: .28rem .8rem;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
}
.single-date { font-size: .78rem; color: rgba(255,255,255,.5); }
.single-read-time {
  font-size: .72rem; font-weight: 700;
  color: rgba(255,255,255,.55);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  padding: .2rem .65rem;
  border-radius: 999px;
}

.single-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.8rem, 4.5vw, 3.25rem);
  font-weight: 900;
  font-style: italic;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}
.single-excerpt {
  font-size: 1.1rem;
  color: rgba(255,255,255,.58);
  line-height: 1.65;
  max-width: 680px;
  margin-bottom: 2rem;
}
.single-author-row {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: 1rem 1.25rem;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r);
}
.single-author-avatar { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.single-author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.single-author-name { font-weight: 700; font-size: .9rem; color: #fff; }
.single-author-date { font-size: .75rem; color: rgba(255,255,255,.45); }

.single-featured-img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: var(--r-xl);
  margin: 2.5rem auto;
  box-shadow: var(--shadow-lg);
}

/* Post content */
.entry-content { max-width: var(--content-w); margin: 0 auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.entry-content h2 { font-size: 1.75rem; margin: 2.5rem 0 1rem; }
.entry-content h3 { font-size: 1.35rem; margin: 2rem 0 .75rem; }
.entry-content h4 { font-size: 1.15rem; margin: 1.75rem 0 .6rem; }
.entry-content p  { font-size: 1.05rem; line-height: 1.82; margin-bottom: 1.5rem; color: #2a3d34; }
.entry-content a  { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.entry-content a:hover { color: var(--primary-dark); }
.entry-content ul, .entry-content ol { margin: 1.25rem 0 1.25rem 1.5rem; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: .5rem; font-size: 1.05rem; line-height: 1.75; }
.entry-content blockquote {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--primary);
  background: var(--primary-light);
  border-radius: 0 var(--r) var(--r) 0;
}
.entry-content blockquote p {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--primary-dark);
  margin: 0;
}
.entry-content pre {
  background: var(--fg);
  color: #a3e4b5;
  padding: 1.25rem 1.5rem;
  border-radius: var(--r);
  overflow-x: auto;
  font-size: .875rem;
  line-height: 1.6;
  margin: 1.5rem 0;
}
.entry-content code {
  font-family: 'Courier New', monospace;
  background: rgba(42,125,79,.1);
  color: var(--primary-dark);
  padding: .15em .4em;
  border-radius: 4px;
  font-size: .9em;
}
.entry-content pre code { background: none; color: inherit; padding: 0; }
.entry-content img { border-radius: var(--r); box-shadow: var(--shadow); margin: 1.5rem auto; }

/* In-post CTA banner */
.post-cta-banner {
  margin: 3rem 0;
  padding: 2.25rem;
  background: var(--dark);
  border-radius: var(--r-xl);
  position: relative;
  overflow: hidden;
}
.post-cta-banner::before {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240,165,0,.18) 0%, transparent 65%);
  z-index: 0;
}
.post-cta-banner::after {
  content: '';
  position: absolute;
  bottom: -40px; left: -40px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(42,125,79,.35) 0%, transparent 65%);
  z-index: 0;
}
.post-cta-banner .cta-banner-text {
  font-family: 'Fraunces', serif;
  font-size: 1.4rem;
  font-weight: 800;
  font-style: italic;
  color: #fff;
  position: relative; z-index: 1;
  margin-bottom: .45rem;
}
.post-cta-banner .cta-banner-sub {
  font-size: .9rem;
  color: rgba(255,255,255,.82);
  position: relative; z-index: 1;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
.post-cta-banner .btn-accent {
  position: relative;
  z-index: 1;
}

/* Post tags */
.post-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: 2.5rem 0 1.5rem; }
.post-tag {
  padding: .3rem .85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--subtext);
  text-decoration: none;
  transition: all .15s;
}
.post-tag:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }

/* Post navigation */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 3rem 0;
  max-width: var(--content-w);
  padding-inline: clamp(1rem, 4vw, 2rem);
}
.post-nav-item {
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s;
}
.post-nav-item:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.post-nav-item:last-child { text-align: right; }
.post-nav-label {
  display: block;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--subtext);
  margin-bottom: .3rem;
}
.post-nav-title {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: .95rem;
  color: var(--fg);
  line-height: 1.3;
}
@media (max-width: 640px) { .post-nav { grid-template-columns: 1fr; } .post-nav-item:last-child { text-align: left; } }

/* ══════════════════════════════════════════════════════════════════════
   SEARCH RESULTS
   ══════════════════════════════════════════════════════════════════════ */
.search-header {
  background: var(--dark);
  padding: 3rem 0 2.5rem;
  position: relative;
  overflow: hidden;
}
.search-header::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 60px;
  background: linear-gradient(transparent, var(--bg));
}
.search-header-inner {
  position: relative; z-index: 1;
  max-width: var(--max-w); margin: 0 auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}
.search-header h1 { color: #fff; font-style: italic; margin-bottom: .4rem; }
.search-header h1 em { color: var(--accent); font-style: italic; }
.search-header p { color: rgba(255,255,255,.5); font-size: .9rem; margin-bottom: 1.5rem; }
.search-bar {
  display: flex; gap: .5rem; max-width: 520px;
}
.search-bar input {
  flex: 1;
  padding: .8rem 1.1rem;
  background: rgba(255,255,255,.1);
  border: 2px solid rgba(255,255,255,.15);
  border-radius: var(--r);
  color: #fff; font-family: inherit; font-size: .95rem; outline: none;
}
.search-bar input::placeholder { color: rgba(255,255,255,.4); }
.search-bar input:focus { border-color: rgba(240,165,0,.5); }
.search-bar button {
  padding: .8rem 1.25rem;
  background: var(--accent); color: #fff; border: none; border-radius: var(--r);
  font-weight: 700; cursor: pointer; transition: background .2s;
}
.search-bar button:hover { background: var(--accent-dark); }

/* ══════════════════════════════════════════════════════════════════════
   404
   ══════════════════════════════════════════════════════════════════════ */
.not-found {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center;
  min-height: 60vh; padding: 4rem 1rem;
}
.not-found-num {
  font-family: 'Fraunces', serif;
  font-size: clamp(6rem, 20vw, 12rem);
  font-weight: 900;
  color: var(--primary-light);
  line-height: 1;
  letter-spacing: -.04em;
  margin-bottom: .25rem;
}
.not-found h1 { font-size: 1.75rem; margin-bottom: .75rem; }
.not-found p { color: var(--subtext); max-width: 400px; margin: 0 auto 2rem; }

/* ══════════════════════════════════════════════════════════════════════
   COMMENTS
   ══════════════════════════════════════════════════════════════════════ */
.comments-section {
  max-width: var(--content-w);
  margin: 3rem auto 0;
  padding: 2.5rem clamp(1rem, 4vw, 2rem) 0;
  border-top: 1px solid var(--border);
}
.comments-title { font-size: 1.4rem; margin-bottom: 1.75rem; }
.comment-list { display: flex; flex-direction: column; gap: 1.25rem; }
.comment-item {
  display: flex; gap: .9rem; padding: 1.25rem;
  background: var(--surface); border-radius: var(--r); border: 1px solid var(--border);
}
.comment-avatar { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-meta { display: flex; align-items: center; gap: .5rem; margin-bottom: .45rem; }
.comment-author { font-weight: 700; font-size: .88rem; color: var(--fg); }
.comment-date { font-size: .73rem; color: var(--subtext); }
.comment-text { font-size: .9rem; color: #2a3d34; line-height: 1.65; }

.comment-form-wrap {
  margin-top: 2rem; padding: 1.75rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
}
.comment-form-title { font-size: 1.1rem; margin-bottom: 1.25rem; }
.comment-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 520px) { .comment-form-grid { grid-template-columns: 1fr; } }
.form-field { display: flex; flex-direction: column; gap: .38rem; }
.form-field label { font-size: .78rem; font-weight: 700; color: var(--fg); }
.form-field input, .form-field textarea {
  padding: .7rem 1rem;
  border: 2px solid var(--border); border-radius: var(--r-sm);
  font-family: inherit; font-size: .9rem; color: var(--fg); background: var(--bg); outline: none;
  transition: border-color .2s, background .2s;
}
.form-field input:focus, .form-field textarea:focus { border-color: var(--primary); background: #fff; }
.form-field textarea { min-height: 120px; resize: vertical; }

/* ══════════════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.footer-grid {
  padding: 3.5rem 0 2rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; gap: 2rem; } }
.footer-brand-desc {
  font-size: .875rem; color: var(--subtext); line-height: 1.65;
  max-width: 300px; margin: .85rem 0 1.25rem;
}
.footer-socials { display: flex; align-items: center; gap: .55rem; margin-top: .5rem; }
.footer-socials a {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm);
  color: var(--subtext);
  background: var(--bg);
  border: 1px solid var(--border);
  transition: all .15s;
}
.footer-socials a:hover { color: var(--primary); background: var(--primary-light); border-color: var(--primary); }
.footer-socials svg { width: 16px; height: 16px; }
.footer-col-title {
  font-size: .7rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .09em; color: var(--fg); margin-bottom: 1rem;
}
.footer-links { display: flex; flex-direction: column; gap: .65rem; }
.footer-links a { font-size: .875rem; color: var(--subtext); text-decoration: none; transition: color .15s; }
.footer-links a:hover { color: var(--primary); }
.footer-bottom {
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
}
.footer-copy { font-size: .75rem; color: var(--subtext); opacity: .7; }
.footer-powered { display: flex; align-items: center; gap: .4rem; font-size: .72rem; color: var(--subtext); opacity: .55; }
.footer-powered::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); opacity: .6; }

/* ══════════════════════════════════════════════════════════════════════
   HOMEPAGE HERO  —  featured post full-bleed image
   ══════════════════════════════════════════════════════════════════════ */
.homepage-hero {
  position: relative;
  min-height: 80vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--dark);
  display: flex;
  flex-direction: column;
}
.homepage-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,22,16,.35) 0%,
    rgba(10,22,16,.55) 40%,
    rgba(10,22,16,.88) 80%,
    rgba(10,22,16,.97) 100%
  );
  display: flex;
  align-items: flex-end;
}
.homepage-hero-inner {
  padding-bottom: clamp(2.5rem, 6vw, 5rem);
  padding-top: 8rem;
  width: 100%;
  max-width: 860px;
}
.homepage-hero .hero-cat {
  display: inline-flex;
  align-items: center;
  padding: .3rem .9rem;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  text-decoration: none;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.homepage-hero-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(2rem, 5.5vw, 4rem);
  font-weight: 900;
  font-style: italic;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 1rem;
  text-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.homepage-hero-excerpt {
  font-size: 1rem;
  color: rgba(255,255,255,.7);
  line-height: 1.65;
  max-width: 540px;
  margin-bottom: 1.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.homepage-hero-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}
.homepage-hero-author {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .82rem;
  font-weight: 700;
  color: rgba(255,255,255,.75);
}
.homepage-hero-author-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,.35);
  background: var(--primary-light);
}
.homepage-hero-author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.homepage-hero-date,
.homepage-hero-rt {
  font-size: .78rem;
  color: rgba(255,255,255,.55);
}
.homepage-hero-dot { color: rgba(255,255,255,.3); }

/* ── Categories bar ── */
.categories-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 64px;
  z-index: 50;
}
.categories-bar-inner {
  display: flex;
  align-items: center;
  gap: .35rem;
  overflow-x: auto;
  padding: .85rem 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.categories-bar-inner::-webkit-scrollbar { display: none; }
.cat-pill {
  display: inline-flex;
  align-items: center;
  padding: .4rem 1rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  border: 2px solid var(--border);
  color: var(--subtext);
  background: transparent;
  transition: all .18s;
  flex-shrink: 0;
}
.cat-pill:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.cat-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ══════════════════════════════════════════════════════════════════════
   READING PROGRESS BAR
   ══════════════════════════════════════════════════════════════════════ */
.reading-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 9999;
  background: rgba(42,125,79,.12);
}
.reading-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  width: 0%;
  transition: width .1s linear;
  border-radius: 0 2px 2px 0;
}

/* ══════════════════════════════════════════════════════════════════════
   SINGLE POST — HERO  (full-bleed image + title overlay)
   ══════════════════════════════════════════════════════════════════════ */
.post-hero {
  position: relative;
  min-height: 70vh;
  background-size: cover;
  background-position: center;
  background-color: var(--dark);
  display: flex;
  align-items: flex-end;
}
.post-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,22,16,.25) 0%,
    rgba(10,22,16,.7) 55%,
    rgba(10,22,16,.96) 100%
  );
}
.post-hero-inner {
  position: relative;
  z-index: 2;
  padding-bottom: clamp(2.5rem, 5vw, 4.5rem);
  padding-top: 6rem;
  max-width: var(--content-w);
  margin: 0 auto;
  width: 100%;
  padding-inline: clamp(1rem, 4vw, 2rem);
}
.post-hero-meta {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.post-hero-cat {
  display: inline-flex;
  padding: .28rem .85rem;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  text-decoration: none;
}
.post-hero-date, .post-hero-rt {
  font-size: .78rem;
  color: rgba(255,255,255,.55);
}
.post-hero-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.75rem, 4.5vw, 3.25rem);
  font-weight: 900;
  font-style: italic;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}
.post-hero-author {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .85rem 1.1rem;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--r);
  backdrop-filter: blur(8px);
  max-width: fit-content;
}
.post-hero-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,.3);
}
.post-hero-avatar img { width: 100%; height: 100%; object-fit: cover; }
.post-hero-author-name { font-weight: 700; font-size: .88rem; color: #fff; }
.post-hero-author-meta { font-size: .73rem; color: rgba(255,255,255,.5); }

/* ══════════════════════════════════════════════════════════════════════
   ARTICLE LAYOUT  —  share column + content
   ══════════════════════════════════════════════════════════════════════ */
.article-wrap {
  max-width: calc(var(--content-w) + 120px);
  margin: 0 auto;
  padding: 3rem clamp(1rem, 4vw, 2rem);
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 860px) {
  .article-wrap {
    grid-template-columns: 1fr;
    padding-top: 2rem;
  }
  .share-col { display: none; }
}

/* Share column — sticky */
.share-col {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
}
.share-label {
  font-size: .65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--subtext);
  margin-bottom: .2rem;
}
.share-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.share-btn:hover { transform: scale(1.12); }
.share-btn svg { width: 18px; height: 18px; }
.share-twitter  { background: #000; color: #fff; }
.share-facebook { background: #1877f2; color: #fff; }
.share-whatsapp { background: #25d366; color: #fff; }
.share-copy { background: var(--bg); border: 2px solid var(--border); color: var(--subtext); }
.share-copy.copied { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.share-divider {
  width: 1px; height: 24px;
  background: var(--border);
  margin: .1rem 0;
}

/* ══════════════════════════════════════════════════════════════════════
   AUTHOR BIO
   ══════════════════════════════════════════════════════════════════════ */
.author-bio {
  max-width: var(--content-w);
  margin: 2rem auto 0;
  padding-inline: clamp(1rem, 4vw, 2rem);
}
.author-bio-inner {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.75rem 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  border-left: 4px solid var(--primary);
}
@media (max-width: 540px) { .author-bio-inner { flex-direction: column; } }
.author-bio-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--primary-light);
  box-shadow: 0 0 0 4px var(--primary-light);
}
.author-bio-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-bio-label {
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--primary);
  margin-bottom: .35rem;
}
.author-bio-name {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--fg);
  margin-bottom: .5rem;
}
.author-bio-desc { font-size: .9rem; color: var(--subtext); line-height: 1.65; margin: 0; }

/* ══════════════════════════════════════════════════════════════════════
   RELATED POSTS
   ══════════════════════════════════════════════════════════════════════ */
.related-posts {
  padding: 4rem 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}
.related-posts-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.related-posts-title {
  font-family: 'Fraunces', serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--fg);
}
.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 768px) { .related-posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .related-posts-grid { grid-template-columns: 1fr; } }

/* ══════════════════════════════════════════════════════════════════════
   MID-PAGE APP CTA BANNER
   ══════════════════════════════════════════════════════════════════════ */
.mid-cta {
  padding: 4rem 0;
  background: var(--dark);
  position: relative;
  overflow: hidden;
  margin: 4rem 0;
  border-radius: var(--r-xl);
}
.mid-cta::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240,165,0,.15) 0%, transparent 60%);
}
.mid-cta::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.05) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
}
.mid-cta-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}
.mid-cta-label {
  display: inline-block;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
  background: rgba(240,165,0,.12);
  border: 1px solid rgba(240,165,0,.25);
  border-radius: 999px;
  padding: .3rem .9rem;
  margin-bottom: 1.25rem;
}
.mid-cta-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 900;
  font-style: italic;
  color: #fff;
  margin-bottom: .75rem;
  line-height: 1.12;
}
.mid-cta-sub {
  color: rgba(255,255,255,.58);
  font-size: .95rem;
  margin-bottom: 2rem;
  line-height: 1.65;
}
.mid-cta-btns { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

/* ══════════════════════════════════════════════════════════════════════
   SCROLLBAR / MISC
   ══════════════════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(42,125,79,.22); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(42,125,79,.38); }

/* ══════════════════════════════════════════════════════════════════════
   SIDEBAR — NEW WIDGETS
   ══════════════════════════════════════════════════════════════════════ */

/* Popular Articles */
.widget-popular {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  list-style: none;
  counter-reset: none;
}
.widget-popular-item {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
}
.widget-popular-rank {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-size: .72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.widget-popular-item:first-child .widget-popular-rank {
  background: var(--primary);
  color: #fff;
}
.widget-popular-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: 'Fraunces', serif;
  font-size: .88rem;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
  line-height: 1.3;
  transition: color .15s;
}
.widget-popular-title:hover { color: var(--primary); }
.widget-popular-meta {
  font-size: .7rem;
  color: var(--subtext);
  margin-top: .2rem;
}

/* Nutri-Score guide */
.widget-nutriscore-intro {
  font-size: .82rem;
  color: var(--subtext);
  line-height: 1.55;
  margin-bottom: 1rem;
}
.nutriscore-list { display: flex; flex-direction: column; gap: .45rem; margin-bottom: 1.1rem; }
.nutriscore-row {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.nutriscore-badge {
  width: 34px;
  height: 34px;
  border-radius: var(--r-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-size: 1rem;
  font-weight: 900;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.nutriscore-label {
  font-size: .82rem;
  color: var(--subtext);
}
.widget-nutriscore-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .82rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  transition: gap .15s;
}
.widget-nutriscore-link:hover { gap: .55rem; color: var(--primary-dark); }

/* Social follow */
.widget-social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
}
.widget-social-btn {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem .85rem;
  border-radius: var(--r-sm);
  font-size: .8rem;
  font-weight: 700;
  text-decoration: none;
  transition: opacity .15s, transform .15s;
  color: #fff;
}
.widget-social-btn:hover { opacity: .88; transform: translateY(-1px); color: #fff; }
.widget-social-ig { background: linear-gradient(135deg, #f09433, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888); }
.widget-social-tt { background: #000; }
.widget-social-fb { background: #1877f2; }
.widget-social-pi { background: #e60023; }

/* Override default WP search widget */
.widget_search .search-form { display: flex; gap: .4rem; }
.widget_search input[type="search"] {
  flex: 1; padding: .6rem .9rem; border: 2px solid var(--border);
  border-radius: var(--r-sm); font-family: inherit; font-size: .88rem; outline: none; background: var(--bg);
}
.widget_search input[type="search"]:focus { border-color: var(--primary); }
.widget_search button, .widget_search input[type="submit"] {
  padding: .6rem 1rem; background: var(--primary); color: #fff;
  border: none; border-radius: var(--r-sm); font-weight: 700; cursor: pointer;
}
.widget_search button:hover { background: var(--primary-dark); }

@media (max-width: 640px) {
  .posts-grid { grid-template-columns: 1fr; }
  .post-featured { grid-template-columns: 1fr; }
  .footer-grid  { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════════════════
   COOKIE CONSENT — vanilla-cookieconsent theme overrides
   ══════════════════════════════════════════════════════════════════════ */
:root {
  --cc-btn-primary-bg:          var(--primary);
  --cc-btn-primary-hover-bg:    var(--primary-dark);
  --cc-btn-secondary-bg:        transparent;
  --cc-btn-secondary-color:     var(--fg);
  --cc-btn-secondary-border-color: var(--border-hover);
  --cc-btn-secondary-hover-bg:  var(--primary-light);
  --cc-btn-secondary-hover-color: var(--primary);
  --cc-btn-secondary-hover-border-color: var(--primary);
  --cc-toggle-on-bg:            var(--primary);
  --cc-toggle-readonly-bg:      var(--primary);
  --cc-separator-border-color:  var(--border);
  --cc-overlay-bg:              rgba(28,48,40,.5);
  --cc-modal-border-radius:     var(--r-lg);
  --cc-pm-border-radius:        var(--r-lg);
  --cc-font-family:             'Plus Jakarta Sans', system-ui, sans-serif;
}

#cc-main .cm__title,
#cc-main .pm__title { font-family: 'Fraunces', Georgia, serif; font-weight: 800; }

/* ── Cookie settings footer link ──────────────────────────────────────── */
.footer-cookie-link {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--subtext);
  font-size: .8rem;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0;
  transition: color .15s;
}
.footer-cookie-link:hover { color: var(--primary); }
