/*
Theme Name: Sleep Secure Nights
Theme URI: https://sleepsecurenights.com
Author: Will Samuels
Description: Warm, trustworthy theme for caregivers navigating childhood incontinence and sleep challenges.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: ssn
*/

/* ===================================
   DESIGN TOKENS
=================================== */
:root {
  --bg-primary:    #faf8f4;
  --bg-secondary:  #f2ece3;
  --bg-tertiary:   #ede6da;

  --text-primary:   #2c2825;
  --text-secondary: #6b6258;
  --text-muted:     #9c9088;

  --teal:       #4d8fa3;
  --teal-dark:  #3a7088;
  --teal-light: #e6f2f6;
  --teal-mid:   #b8d8e3;

  --sage:       #6b9e7a;
  --sage-dark:  #527860;
  --sage-light: #e8f4ec;

  --honey:       #c97b5a;
  --honey-dark:  #a86040;
  --honey-light: #fdf0eb;

  --border:       #ddd5c8;
  --border-light: #ede9e3;

  --shadow-sm: 0 2px 8px rgba(44,40,37,0.06);
  --shadow-md: 0 4px 16px rgba(44,40,37,0.10);
  --shadow-lg: 0 8px 32px rgba(44,40,37,0.14);

  --radius:    12px;
  --radius-sm: 6px;
  --radius-lg: 20px;

  --font-heading: 'Merriweather', Georgia, serif;
  --font-body:    'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max-width:     1200px;
  --content-width: 740px;
  --sidebar-width: 300px;
}

/* ===================================
   RESET & BASE
=================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.75;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--teal); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--teal-dark); }

/* ===================================
   TYPOGRAPHY
=================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}
h1 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); }
h2 { font-size: clamp(1.35rem, 3vw, 2rem); }
h3 { font-size: clamp(1.05rem, 2.5vw, 1.35rem); }
h4 { font-size: 1rem; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ===================================
   LAYOUT
=================================== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 600px) { .container { padding: 0 16px; } }

.section { padding: 64px 0; }
@media (max-width: 768px) { .section { padding: 48px 0; } }

/* ===================================
   HEADER
=================================== */
.site-header {
  background: white;
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow 0.3s;
}
.site-header.scrolled { box-shadow: var(--shadow-md); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}
@media (max-width: 768px) { .header-inner { height: 60px; } }

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-mark {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--teal) 0%, var(--sage) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo-mark svg { width: 18px; height: 18px; fill: white; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text .site-name {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}
.logo-text .site-tagline {
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Nav */
.header-actions { display: flex; align-items: center; gap: 4px; }

.site-nav { display: flex; align-items: center; }
.nav-menu {
  display: flex;
  list-style: none;
  gap: 2px;
  align-items: center;
}
.nav-menu > li > a {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
  letter-spacing: 0.01em;
  display: block;
}
.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a,
.nav-menu > li.current-menu-ancestor > a {
  color: var(--teal);
  background: var(--teal-light);
}

.header-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.header-icon-btn:hover { color: var(--teal); background: var(--teal-light); }
.header-icon-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-menu-btn { display: none; }

@media (max-width: 768px) {
  .mobile-menu-btn { display: flex; }
  .site-nav {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 2px solid var(--border-light);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 20px;
    transform: translateY(-110%);
    transition: transform 0.3s ease;
    z-index: 99;
    box-shadow: var(--shadow-lg);
  }
  .site-nav.open { transform: translateY(0); }
  .nav-menu { flex-direction: column; gap: 2px; }
  .nav-menu > li > a { padding: 12px 14px; font-size: 1rem; }
}

/* Search overlay */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44,40,37,0.55);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  padding-top: 80px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  backdrop-filter: blur(3px);
}
.search-overlay.open { opacity: 1; pointer-events: all; }
.search-overlay-box {
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  padding: 0 16px;
}
.search-overlay-box .search-form {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  gap: 10px;
}
.search-overlay-box .search-field {
  flex: 1;
  border: none;
  border-bottom: 2px solid var(--border);
  outline: none;
  font-size: 1.15rem;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: none;
  padding: 6px 0;
  transition: border-color 0.2s;
}
.search-overlay-box .search-field:focus { border-color: var(--teal); }
.search-overlay-box .search-submit {
  background: var(--teal);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.search-overlay-box .search-submit:hover { background: var(--teal-dark); }

/* ===================================
   HERO
=================================== */
.site-hero {
  background: linear-gradient(155deg, var(--bg-primary) 0%, #deedf5 55%, #d5e9f0 100%);
  padding: 80px 0 64px;
  position: relative;
  overflow: hidden;
}
.site-hero::before {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(77,143,163,0.13) 0%, transparent 65%);
  pointer-events: none;
}
.site-hero::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -80px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(107,158,122,0.09) 0%, transparent 65%);
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 740px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.hero-badge::before { content: '✦'; font-size: 0.65rem; }

.hero-headline {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.2;
  margin-bottom: 20px;
}
.hero-headline em {
  font-style: normal;
  color: var(--teal);
}
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0 auto 36px;
  max-width: 580px;
}

/* Hero search */
.hero-search { max-width: 540px; margin: 0 auto; }
.hero-search .search-form {
  display: flex;
  background: white;
  border: 2px solid var(--border);
  border-radius: 100px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.hero-search .search-form:focus-within {
  border-color: var(--teal);
  box-shadow: var(--shadow-lg), 0 0 0 4px var(--teal-light);
}
.hero-search .search-field {
  flex: 1;
  border: none;
  outline: none;
  padding: 14px 22px;
  font-size: 0.95rem;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: transparent;
  min-width: 0;
}
.hero-search .search-field::placeholder { color: var(--text-muted); }
.hero-search .search-submit {
  background: var(--teal);
  color: white;
  border: none;
  padding: 12px 26px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.hero-search .search-submit:hover { background: var(--teal-dark); }

/* ===================================
   EMPATHY STRIP
=================================== */
.empathy-strip {
  background: var(--teal);
  padding: 36px 0;
  text-align: center;
}
.empathy-strip .strip-inner { max-width: 680px; margin: 0 auto; }
.empathy-strip .strip-icon { font-size: 2rem; margin-bottom: 10px; line-height: 1; }
.empathy-strip .strip-text {
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  font-weight: 400;
  line-height: 1.65;
  color: white;
  opacity: 0.96;
}
.empathy-strip .strip-text strong { font-weight: 700; }

/* ===================================
   ABOUT SECTION
=================================== */
.about-section { background: white; padding: 64px 0; }
.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 860px) {
  .about-inner { grid-template-columns: 1fr; gap: 40px; }
}
.section-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--honey);
  margin-bottom: 10px;
}
.about-text h2 { margin-bottom: 16px; }
.about-text p { color: var(--text-secondary); }
.about-visual {
  background: linear-gradient(140deg, var(--teal-light), var(--sage-light));
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.trust-item { display: flex; gap: 14px; align-items: flex-start; }
.trust-icon {
  width: 42px; height: 42px;
  background: white;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.trust-item h4 { font-size: 0.9rem; margin-bottom: 3px; }
.trust-item p { font-size: 0.82rem; color: var(--text-secondary); margin: 0; line-height: 1.5; }

/* ===================================
   SECTION HEADER
=================================== */
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { margin-bottom: 10px; }
.section-header p { color: var(--text-secondary); font-size: 1rem; max-width: 540px; margin: 0 auto; }

/* ===================================
   CATEGORIES
=================================== */
.categories-section { background: var(--bg-secondary); padding: 64px 0; }
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}
@media (max-width: 480px) {
  .categories-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
}
.category-card {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border-light);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.category-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--teal-mid);
  color: inherit;
}
.category-card .cat-icon { font-size: 1.8rem; line-height: 1; margin-bottom: 4px; }
.category-card .cat-name {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}
.category-card .cat-desc { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.5; }
.category-card .cat-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--teal);
  margin-top: auto;
  padding-top: 8px;
}

/* ===================================
   POSTS GRID
=================================== */
.posts-section { padding: 64px 0; background: var(--bg-primary); }
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .posts-grid { grid-template-columns: 1fr; } }

/* Article card */
.article-card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.article-card.featured { grid-column: span 2; }
@media (max-width: 900px) { .article-card.featured { grid-column: span 2; } }
@media (max-width: 540px) { .article-card.featured { grid-column: span 1; } }

.card-image {
  aspect-ratio: 16/9;
  background: linear-gradient(140deg, var(--teal-light) 0%, var(--bg-secondary) 100%);
  overflow: hidden;
  position: relative;
}
.article-card.featured .card-image { aspect-ratio: 21/9; }
.card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.article-card:hover .card-image img { transform: scale(1.04); }
.card-image-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.8rem;
  opacity: 0.3;
}

.card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.card-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }

.cat-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--teal);
  background: var(--teal-light);
  padding: 3px 9px;
  border-radius: 100px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.cat-tag:hover { background: var(--teal); color: white; }

.read-time { font-size: 0.75rem; color: var(--text-muted); }
.card-title { font-size: 1rem; line-height: 1.4; margin-bottom: 8px; }
.article-card.featured .card-title { font-size: 1.25rem; }
.card-title a { color: var(--text-primary); text-decoration: none; }
.card-title a:hover { color: var(--teal); }
.card-excerpt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--teal);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s, color 0.2s;
}
.card-link:hover { color: var(--teal-dark); gap: 8px; }

/* ===================================
   SEARCH FORM (base)
=================================== */
.search-form { display: flex; gap: 8px; }
.search-field {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: white;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
  min-width: 0;
}
.search-field:focus { border-color: var(--teal); }
.search-field::placeholder { color: var(--text-muted); }
.search-submit {
  background: var(--teal);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.search-submit:hover { background: var(--teal-dark); }

/* ===================================
   PAGINATION
=================================== */
.nav-links {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 48px;
  flex-wrap: wrap;
}
.nav-links .page-numbers,
.nav-links a.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 700;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s;
}
.nav-links a.page-numbers:hover {
  background: var(--teal-light);
  border-color: var(--teal);
  color: var(--teal);
}
.nav-links .page-numbers.current {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
}
.nav-links .prev, .nav-links .next { padding: 0 16px; }

/* ===================================
   SIDEBAR
=================================== */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: 48px;
  align-items: start;
}
@media (max-width: 1024px) { .content-with-sidebar { grid-template-columns: 1fr; } }

.sidebar { display: flex; flex-direction: column; gap: 24px; }

.widget {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  overflow: hidden;
}
.widget-title {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 13px 18px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-secondary);
  margin: 0;
}
.widget-body { padding: 16px 18px; }

/* Widget: search */
.widget-search .search-form { flex-direction: column; }
.widget-search .search-field { width: 100%; }

/* Widget: posts list */
.widget-posts-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.widget-posts-list li {
  display: flex;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}
.widget-posts-list li:last-child { border-bottom: none; padding-bottom: 0; }
.widget-post-thumb {
  width: 56px; height: 56px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--teal-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; opacity: 0.5;
}
.widget-post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.widget-post-info .cat-tag { margin-bottom: 4px; display: inline-block; }
.widget-post-info a {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  display: block;
  text-decoration: none;
}
.widget-post-info a:hover { color: var(--teal); }

/* Widget: categories */
.widget-cats-list { list-style: none; display: flex; flex-direction: column; gap: 1px; }
.widget-cats-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}
.widget-cats-list a:hover { background: var(--teal-light); color: var(--teal); }
.widget-cats-list .count {
  font-size: 0.72rem;
  background: var(--bg-secondary);
  padding: 2px 8px;
  border-radius: 100px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ===================================
   POST HERO
=================================== */
.post-hero {
  background: linear-gradient(160deg, var(--teal-light) 0%, var(--bg-primary) 100%);
  padding: 56px 0 40px;
}
.post-hero-inner { max-width: var(--content-width); margin: 0 auto; }

.post-breadcrumb {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.post-breadcrumb a { color: var(--teal); text-decoration: none; }
.post-breadcrumb a:hover { color: var(--teal-dark); }
.post-breadcrumb .sep { color: var(--border); }

.post-hero .cat-tag { margin-bottom: 12px; display: inline-block; }
.post-hero h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.25; margin-bottom: 16px; }
.post-hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

/* ===================================
   ENTRY CONTENT
=================================== */
.post-section { padding: 56px 0; }
.entry-content { font-size: 1rem; line-height: 1.82; }
.entry-content h2 { margin: 48px 0 16px; padding-top: 40px; border-top: 2px solid var(--border-light); }
.entry-content h3 { margin: 32px 0 12px; color: var(--teal-dark); }
.entry-content p { margin-bottom: 1.2rem; }
.entry-content ul, .entry-content ol { padding-left: 1.5rem; margin-bottom: 1.2rem; }
.entry-content li { margin-bottom: 0.4rem; }
.entry-content a { color: var(--teal); text-decoration: underline; text-underline-offset: 2px; }
.entry-content a:hover { color: var(--teal-dark); }

.entry-content blockquote,
.entry-content .wp-block-quote {
  border-left: 4px solid var(--teal);
  padding: 16px 20px;
  background: var(--teal-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 28px 0;
  font-style: italic;
  color: var(--text-secondary);
}
.entry-content .wp-block-image { margin: 28px 0; }
.entry-content .wp-block-table table { width: 100%; border-collapse: collapse; margin: 28px 0; }
.entry-content .wp-block-table th,
.entry-content .wp-block-table td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  font-size: 0.9rem;
  text-align: left;
}
.entry-content .wp-block-table th { background: var(--bg-secondary); font-weight: 700; }

/* Post tags */
.post-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 28px; }
.post-tag {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 100px;
  text-decoration: none;
  transition: all 0.2s;
}
.post-tag:hover { background: var(--teal-light); color: var(--teal); border-color: var(--teal-mid); }

/* Related posts */
.related-section {
  background: var(--bg-secondary);
  padding: 56px 0;
  border-top: 1px solid var(--border-light);
}
.related-section h2 { text-align: center; margin-bottom: 32px; font-size: 1.4rem; }

/* ===================================
   ARCHIVE HERO
=================================== */
.archive-hero {
  background: linear-gradient(140deg, var(--bg-secondary) 0%, var(--teal-light) 100%);
  padding: 56px 0 40px;
  text-align: center;
}
.archive-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  display: block;
  margin-bottom: 10px;
}
.archive-hero h1 { margin-bottom: 10px; }
.archive-desc { color: var(--text-secondary); max-width: 580px; margin: 0 auto; font-size: 1rem; }
.archive-section { padding: 56px 0; }

/* ===================================
   SEARCH RESULTS
=================================== */
.search-hero { background: var(--bg-secondary); padding: 40px 0; text-align: center; }
.search-hero h1 { font-size: 1.4rem; margin-bottom: 20px; }
.search-hero .search-form { max-width: 480px; margin: 0 auto; }
.search-results-section { padding: 56px 0; }
.search-count { margin-bottom: 28px; color: var(--text-muted); font-size: 0.9rem; }

.no-results { text-align: center; padding: 64px 0; color: var(--text-secondary); }
.no-results-icon { font-size: 3.5rem; margin-bottom: 16px; line-height: 1; }
.no-results h2 { margin-bottom: 8px; }
.no-results p { margin-bottom: 24px; }

/* ===================================
   BUTTONS
=================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 26px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1;
}
.btn-primary { background: var(--teal); color: white; }
.btn-primary:hover { background: var(--teal-dark); color: white; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--teal); border: 2px solid var(--teal); }
.btn-outline:hover { background: var(--teal); color: white; }

/* ===================================
   CTA BLOCK (sidebar)
=================================== */
.cta-block {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  color: white;
}
.cta-block h3 { color: white; font-size: 1rem; margin-bottom: 8px; }
.cta-block p { opacity: 0.85; font-size: 0.85rem; margin-bottom: 14px; }
.cta-block .search-form { flex-direction: column; }
.cta-block .search-field {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.2);
  color: white;
}
.cta-block .search-field::placeholder { color: rgba(255,255,255,0.5); }

/* ===================================
   FOOTER
=================================== */
.site-footer {
  background: #2c2825;
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  margin-bottom: 48px;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } }

.footer-brand .footer-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; margin-bottom: 16px;
}
.footer-brand .site-name { color: white; }
.footer-brand .site-tagline { color: rgba(250,248,244,0.45); }
.footer-brand > p {
  font-size: 0.875rem;
  line-height: 1.7;
  color: rgba(250,248,244,0.55);
}
.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(250,248,244,0.35);
  margin-bottom: 16px;
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links a {
  font-size: 0.875rem;
  color: rgba(250,248,244,0.65);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--teal-mid); }

.footer-search .search-form { flex-direction: column; gap: 8px; }
.footer-search .search-field {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.14);
  color: white;
}
.footer-search .search-field::placeholder { color: rgba(255,255,255,0.28); }
.footer-search .search-submit { font-size: 0.82rem; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-bottom p { font-size: 0.78rem; color: rgba(250,248,244,0.35); }
.footer-bottom-links { display: flex; gap: 20px; list-style: none; }
.footer-bottom-links a { font-size: 0.78rem; color: rgba(250,248,244,0.35); text-decoration: none; transition: color 0.2s; }
.footer-bottom-links a:hover { color: rgba(250,248,244,0.65); }

/* ===================================
   ACCESSIBILITY
=================================== */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 2px;
}
