/*
 * Havelritter.de — Main Stylesheet
 * CSS Architecture: Custom Properties
 * Layout: Sidebar-Classic (Flexbox)
 * Mockup: Variante C "Stegperspektive"
 *
 * Table of Contents:
 * 1. Design Tokens (Custom Properties)
 * 2. Reset & Base
 * 3. Typography
 * 4. Layout
 * 5. Header (Dual-Nav)
 * 6. Hero Sections
 * 7. Article Content
 * 8. Sidebar
 * 9. Components
 * 10. Footer
 * 11. Utility Classes
 * 12. Print
 * 13. Responsive
 */


/* ==========================================================================
   1. DESIGN TOKENS
   ========================================================================== */

:root {
  /* Colors */
  --color-primary: #5B7B5D;
  --color-primary-light: #7A9A7C;
  --color-primary-dark: #3D5A3F;
  --color-secondary: #8B6F47;
  --color-secondary-light: #A68B6B;
  --color-accent: #C17817;
  --color-accent-light: #D4943F;
  --color-bg: #F7F5F0;
  --color-surface: #FFFFFF;
  --color-surface-alt: #EDE9E0;
  --color-text: #2A2A1F;
  --color-text-muted: #5E5E4F;
  --color-text-inverse: #F7F5F0;
  --color-border: #D8D3C7;
  --color-border-light: #E8E4DA;
  --color-success: #4A8C4A;
  --color-warning: #C4956A;
  --color-error: #A65D57;
  --color-info: #5B7B8D;

  /* Typography */
  --font-heading: 'Merriweather', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-xs: 0.694rem;
  --font-sm: 0.833rem;
  --font-base: 1rem;
  --font-lg: 1.2rem;
  --font-xl: 1.44rem;
  --font-2xl: 1.728rem;
  --font-3xl: 2.074rem;
  --font-4xl: 2.488rem;
  --line-height-heading: 1.25;
  --line-height-body: 1.65;
  --line-height-tight: 1.3;
  --line-height-table: 1.4;
  --paragraph-max-width: 68ch;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Layout */
  --container-max: 1080px;
  --container-padding: 2rem;
  --content-width: 70%;
  --sidebar-width: 26%;
  --layout-gap: 4%;
  --article-padding: 2rem;
  --border-radius: 4px;

  /* Header */
  --category-bar-height: 44px;
  --header-height: 56px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 2px 6px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.08);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
}


/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */

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

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

body {
  font-family: var(--font-body);
  font-size: var(--font-base);
  line-height: var(--line-height-body);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-primary);
  text-decoration-color: var(--color-primary-light);
  text-underline-offset: 2px;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--color-primary-dark);
}

::selection {
  background: var(--color-primary-light);
  color: var(--color-text-inverse);
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}


/* ==========================================================================
   3. TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: var(--line-height-heading);
  color: var(--color-text);
}

h1 { font-size: var(--font-4xl); }
h2 { font-size: var(--font-3xl); }
h3 { font-size: var(--font-2xl); }
h4 { font-size: var(--font-xl); }
h5 { font-size: var(--font-lg); }
h6 { font-size: var(--font-base); }

p {
  margin-bottom: 1.25rem;
  max-width: var(--paragraph-max-width);
}

blockquote {
  border-left: 4px solid var(--color-accent);
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-lg) 0;
  background: var(--color-surface-alt);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  font-style: italic;
  color: var(--color-text-muted);
}

code {
  background: var(--color-surface-alt);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
}

pre {
  background: var(--color-text);
  color: var(--color-text-inverse);
  padding: var(--space-lg);
  border-radius: var(--border-radius);
  overflow-x: auto;
  margin: var(--space-lg) 0;
}
pre code {
  background: none;
  padding: 0;
  color: inherit;
}


/* ==========================================================================
   4. LAYOUT
   ========================================================================== */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.site-content {
  max-width: var(--container-max);
  margin: var(--space-xl) auto;
  padding: 0 var(--container-padding);
  display: flex;
  gap: var(--layout-gap);
}

.content-main {
  flex: 0 0 var(--content-width);
  min-width: 0;
}

.content-sidebar {
  flex: 0 0 var(--sidebar-width);
}


/* ==========================================================================
   5. HEADER (Dual-Nav: Category-Bar + Main Header)
   ========================================================================== */

.category-bar {
  background: var(--color-primary-dark);
  height: var(--category-bar-height);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.category-bar::-webkit-scrollbar { display: none; }

.category-bar a {
  color: rgba(247,245,240,0.75);
  text-decoration: none;
  font-size: var(--font-sm);
  font-weight: 600;
  padding: 0 1.25rem;
  height: var(--category-bar-height);
  display: flex;
  align-items: center;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-base);
}
.category-bar a:hover,
.category-bar a[aria-current="page"] {
  color: var(--color-text-inverse);
  background: rgba(255,255,255,0.05);
  border-bottom-color: var(--color-accent);
}

.category-bar .divider {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.15);
  flex-shrink: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--container-padding);
}

.site-logo {
  font-family: var(--font-heading);
  font-size: var(--font-xl);
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.site-logo .accent { color: var(--color-accent); }

.header-nav {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
  align-items: center;
}
.header-nav a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: var(--font-sm);
  font-weight: 600;
}
.header-nav a:hover { color: var(--color-primary); }

.search-toggle {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: var(--space-xs) var(--space-md);
  color: var(--color-text-muted);
  font-size: var(--font-sm);
  cursor: pointer;
  font-family: var(--font-body);
  transition: all var(--transition-fast);
}
.search-toggle:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Mobile hamburger */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  margin: 5px 0;
  transition: all var(--transition-base);
}


/* ==========================================================================
   6. HERO SECTIONS
   ========================================================================== */

/* Split Hero (Test-Artikel, Front-Page) */
.hero-split {
  display: flex;
  min-height: 400px;
  overflow: hidden;
}
.hero-split__text {
  flex: 0 0 55%;
  padding: var(--space-3xl) var(--container-padding);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--color-bg);
}
.hero-split__text-inner {
  max-width: 560px;
  margin-left: auto;
  padding-right: var(--space-2xl);
}
.hero-split__image {
  flex: 0 0 45%;
  position: relative;
  overflow: hidden;
  clip-path: polygon(8% 0, 100% 0, 100% 100%, 0% 100%);
}
.hero-split__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Full-Image Hero (Guide-Artikel) */
.hero-full {
  position: relative;
  height: 50vh;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  padding: var(--space-2xl) var(--container-padding);
  overflow: hidden;
}
.hero-full__image {
  position: absolute;
  inset: 0;
}
.hero-full__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-full__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(42,42,31,0.75) 0%, rgba(42,42,31,0.2) 60%, transparent);
}
.hero-full__content {
  position: relative;
  z-index: 1;
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
}
.hero-full h1 {
  color: var(--color-text-inverse);
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
  max-width: 700px;
}

/* Shared hero elements */
.hero-breadcrumb {
  color: var(--color-text-muted);
  font-size: var(--font-sm);
  margin-bottom: var(--space-md);
}
.hero-breadcrumb a {
  color: inherit;
  text-decoration: none;
}
.hero-breadcrumb a:hover { color: var(--color-primary); }

.hero-full .hero-breadcrumb {
  color: rgba(247,245,240,0.7);
}
.hero-full .hero-breadcrumb a:hover {
  color: var(--color-accent-light);
}

.hero-subtitle {
  font-size: var(--font-lg);
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-top: var(--space-sm);
}

.hero-meta {
  font-size: var(--font-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-md);
  display: flex;
  gap: var(--space-md);
  align-items: center;
  flex-wrap: wrap;
}

.hero-cta {
  display: inline-block;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  padding: 0.6rem 1.5rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--font-sm);
  margin-top: var(--space-md);
  transition: background var(--transition-fast);
}
.hero-cta:hover {
  background: var(--color-primary-dark);
  color: var(--color-text-inverse);
}


/* ==========================================================================
   7. ARTICLE CONTENT
   ========================================================================== */

.article-body {
  background: var(--color-surface);
  padding: var(--article-padding);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.article-body h2 {
  margin-top: var(--space-2xl);
  margin-bottom: 0.75rem;
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-border-light);
}
.article-body h2:first-child { margin-top: 0; }

.article-body h3 {
  color: var(--color-primary-dark);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
}

.article-body ul,
.article-body ol {
  margin-bottom: 1.25rem;
  padding-left: var(--space-lg);
}
.article-body li { margin-bottom: 0.4rem; }

.article-body figure {
  margin: var(--space-lg) 0;
}
.article-body figcaption {
  font-size: var(--font-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-sm);
  text-align: center;
}

/* Author bio (after article) */
.author-bio-full {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-xl);
  background: var(--color-surface);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  margin-top: var(--space-xl);
  border-top: 3px solid var(--color-primary);
}
.author-bio-full__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.author-bio-full__name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--font-lg);
}
.author-bio-full__role {
  color: var(--color-text-muted);
  font-size: var(--font-sm);
}
.author-bio-full__text {
  margin-top: var(--space-sm);
  font-size: var(--font-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}


/* ==========================================================================
   8. SIDEBAR
   ========================================================================== */

.widget {
  background: var(--color-surface);
  border-radius: var(--border-radius);
  border-top: 2px solid var(--color-primary);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-family: var(--font-heading);
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

/* Table of Contents */
.widget-toc {
  position: sticky;
  top: calc(var(--header-height) + var(--space-md));
}
.toc-list {
  list-style: none;
}
.toc-list li {
  padding: 0.35rem 0;
}
.toc-list li + li {
  border-top: 1px solid var(--color-border-light);
}
.toc-list a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: var(--font-sm);
  transition: color var(--transition-fast);
}
.toc-list a:hover { color: var(--color-primary); }
.toc-list .is-active a {
  color: var(--color-primary);
  font-weight: 600;
}

/* Author mini */
.author-mini {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.author-mini__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.author-mini__name {
  font-weight: 700;
  font-size: var(--font-sm);
}
.author-mini__role {
  font-size: var(--font-xs);
  color: var(--color-text-muted);
}

/* Category badges */
.cat-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  font-size: var(--font-xs);
  font-weight: 600;
  text-decoration: none;
  color: var(--color-text-inverse);
  margin: 0.2rem;
  transition: opacity var(--transition-fast);
}
.cat-badge:hover { opacity: 0.85; color: var(--color-text-inverse); }
.cat-badge--primary { background: var(--color-primary); }
.cat-badge--secondary { background: var(--color-secondary); }
.cat-badge--accent { background: var(--color-accent); }
.cat-badge--info { background: var(--color-info); }
.cat-badge--dark { background: var(--color-primary-dark); }

/* Newsletter CTA */
.newsletter-cta {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  color: var(--color-text-inverse);
  padding: var(--space-lg);
  border-radius: var(--border-radius);
  border-top: none;
}
.newsletter-cta h4 {
  font-family: var(--font-heading);
  font-size: var(--font-lg);
  color: var(--color-text-inverse);
  margin-bottom: var(--space-sm);
}
.newsletter-cta p {
  font-size: var(--font-sm);
  opacity: 0.85;
  margin-bottom: 0.75rem;
}
.newsletter-form {
  display: flex;
  gap: 0;
}
.newsletter-form input {
  flex: 1;
  padding: var(--space-sm) 0.75rem;
  border: none;
  border-radius: var(--border-radius) 0 0 var(--border-radius);
  font-size: var(--font-sm);
  font-family: var(--font-body);
}
.newsletter-form button {
  background: var(--color-accent);
  color: var(--color-text-inverse);
  border: none;
  padding: var(--space-sm) var(--space-md);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  font-weight: 700;
  font-size: var(--font-sm);
  cursor: pointer;
  font-family: var(--font-body);
  transition: background var(--transition-fast);
}
.newsletter-form button:hover { background: var(--color-accent-light); }


/* ==========================================================================
   9. COMPONENTS
   ========================================================================== */

/* --- Info Box --- */
.info-box {
  background: var(--color-surface-alt);
  border-left: 4px solid var(--color-info);
  padding: var(--space-md) 1.25rem;
  margin: var(--space-lg) 0;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  font-size: var(--font-sm);
}
.info-box strong { color: var(--color-info); }

.info-box--warning { border-left-color: var(--color-warning); }
.info-box--warning strong { color: var(--color-warning); }
.info-box--success { border-left-color: var(--color-success); }
.info-box--success strong { color: var(--color-success); }

/* --- Comparison Table --- */
.table-wrapper {
  overflow-x: auto;
  margin: var(--space-lg) 0;
  border: 1px solid var(--color-border-light);
  border-radius: var(--border-radius);
  -webkit-overflow-scrolling: touch;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-sm);
  line-height: var(--line-height-table);
}
.comparison-table thead th {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  padding: 0.75rem var(--space-md);
  text-align: left;
  font-weight: 600;
  position: sticky;
  top: var(--header-height);
  z-index: 5;
}
.comparison-table tbody td {
  padding: 0.6rem var(--space-md);
  border-bottom: 1px solid var(--color-border-light);
  vertical-align: middle;
}
.comparison-table tbody tr:hover {
  background: rgba(91,123,93,0.04);
}
.comparison-table .is-testsieger td {
  background: rgba(74,140,74,0.06);
}
.comparison-table .is-testsieger td:first-child {
  font-weight: 700;
}

.check-mark { color: var(--color-success); font-weight: 700; }
.cross-mark { color: var(--color-error); }

.rating-inline {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.rating-number {
  font-weight: 700;
  color: var(--color-accent);
}
.rating-bar {
  width: 60px;
  height: 6px;
  background: var(--color-border-light);
  border-radius: 3px;
  overflow: hidden;
}
.rating-bar__fill {
  height: 100%;
  background: var(--color-accent);
  border-radius: 3px;
}

/* --- FAQ Accordion --- */
.faq-section {
  margin: var(--space-xl) 0;
}
.faq-item {
  margin-bottom: var(--space-sm);
}
.faq-question {
  width: 100%;
  padding: 0.9rem 1.25rem;
  background: var(--color-surface);
  border: none;
  border-left: 3px solid var(--color-accent);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  font-size: var(--font-base);
  font-weight: 600;
  color: var(--color-text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  transition: all var(--transition-base);
}
.faq-question:hover { background: var(--color-surface-alt); }
.faq-question[aria-expanded="true"] { color: var(--color-accent); }
.faq-question__icon {
  color: var(--color-accent);
  transition: transform var(--transition-base);
  flex-shrink: 0;
  margin-left: var(--space-md);
}
.faq-question[aria-expanded="true"] .faq-question__icon {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0.75rem 1.25rem 0.75rem var(--space-lg);
  margin-left: 1.25rem;
  color: var(--color-text-muted);
  font-size: var(--font-sm);
  line-height: 1.7;
  border-left: 1px solid var(--color-border-light);
}
.faq-answer[hidden] { display: none; }

/* --- FAQ Definition List (inline content) --- */
.faq-list {
  margin: var(--space-xl) 0;
}
.faq-list dt {
  padding: 0.9rem 1.25rem;
  background: var(--color-surface);
  border-left: 3px solid var(--color-accent);
  font-family: var(--font-heading);
  font-size: var(--font-base);
  font-weight: 700;
  color: var(--color-text);
  cursor: default;
  box-shadow: var(--shadow-sm);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  margin-bottom: 0;
}
.faq-list dt:not(:first-child) {
  margin-top: var(--space-sm);
}
.faq-list dd {
  padding: 0.75rem 1.25rem 0.75rem var(--space-lg);
  margin-left: 1.25rem;
  color: var(--color-text-muted);
  font-size: var(--font-sm);
  line-height: 1.7;
  border-left: 1px solid var(--color-border-light);
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  font-size: var(--font-sm);
  color: var(--color-text-muted);
  padding: var(--space-md) 0;
}
.breadcrumbs a {
  color: var(--color-text-muted);
  text-decoration: none;
}
.breadcrumbs a:hover { color: var(--color-primary); }
.breadcrumbs .separator { margin: 0 var(--space-xs); }

/* --- CTA Inline --- */
.cta-inline {
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
  text-align: center;
}
.cta-inline__title {
  font-family: var(--font-heading);
  font-size: var(--font-xl);
  margin-bottom: var(--space-sm);
}
.cta-inline__button {
  display: inline-block;
  background: var(--color-accent);
  color: var(--color-text-inverse);
  padding: 0.6rem 1.5rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 700;
  font-size: var(--font-sm);
  margin-top: var(--space-sm);
  transition: background var(--transition-fast);
}
.cta-inline__button:hover {
  background: var(--color-accent-light);
  color: var(--color-text-inverse);
}

/* --- Image Gallery Grid --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}
.gallery-grid__item {
  border-radius: var(--border-radius);
  overflow: hidden;
}
.gallery-grid__item img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  transition: transform var(--transition-base);
}
.gallery-grid__item:hover img {
  transform: scale(1.03);
}

/* --- Pagination --- */
.pagination {
  display: flex;
  justify-content: center;
  gap: var(--space-xs);
  margin: var(--space-2xl) 0;
  list-style: none;
}
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--space-sm);
  border-radius: var(--border-radius);
  font-size: var(--font-sm);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}
.pagination a {
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}
.pagination a:hover {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-color: var(--color-primary);
}
.pagination .current {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

/* --- Topic Clusters (Front Page) --- */
.topic-cluster {
  margin-bottom: var(--space-2xl);
}
.topic-cluster__title {
  font-family: var(--font-heading);
  font-size: var(--font-2xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-accent);
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
}
.topic-cluster__count {
  font-family: var(--font-body);
  font-size: var(--font-sm);
  font-weight: 400;
  color: var(--color-text-muted);
}

/* --- Related Posts --- */
.related-posts {
  margin-top: var(--space-xl);
}
.related-posts__title {
  font-family: var(--font-heading);
  font-size: var(--font-2xl);
  margin-bottom: var(--space-lg);
}
.related-posts__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}
.related-card {
  background: var(--color-surface);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--color-text);
  transition: box-shadow var(--transition-base);
}
.related-card:hover {
  box-shadow: var(--shadow-md);
  color: var(--color-text);
}
.related-card__image {
  height: 160px;
  overflow: hidden;
}
.related-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.related-card__content {
  padding: var(--space-md);
}
.related-card__title {
  font-family: var(--font-heading);
  font-size: var(--font-base);
  font-weight: 700;
  line-height: var(--line-height-tight);
}
.related-card__meta {
  font-size: var(--font-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}


/* ==========================================================================
   10. FOOTER
   ========================================================================== */

.site-footer {
  background: #2A2A1F;
  color: #D8D3C7;
  margin-top: var(--space-3xl);
}

.footer-newsletter {
  background: #33332A;
  padding: var(--space-xl);
  text-align: center;
}
.footer-newsletter h3 {
  font-family: var(--font-heading);
  color: var(--color-text-inverse);
  font-size: var(--font-xl);
  margin-bottom: var(--space-sm);
}
.footer-newsletter p {
  color: #A6A094;
  font-size: var(--font-sm);
  margin-bottom: var(--space-md);
}
.footer-newsletter__form {
  display: flex;
  justify-content: center;
  max-width: 400px;
  margin: 0 auto;
}
.footer-newsletter__form input {
  flex: 1;
  padding: 0.6rem var(--space-md);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--border-radius) 0 0 var(--border-radius);
  background: #2A2A1F;
  color: #D8D3C7;
  font-size: var(--font-sm);
  font-family: var(--font-body);
}
.footer-newsletter__form button {
  background: var(--color-accent);
  color: var(--color-text-inverse);
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  font-weight: 700;
  cursor: pointer;
  font-size: var(--font-sm);
  font-family: var(--font-body);
}

.footer-grid {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-2xl) var(--container-padding) var(--space-lg);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
}
.footer-col h4 {
  font-family: var(--font-heading);
  font-size: var(--font-base);
  color: var(--color-text-inverse);
  margin-bottom: 0.75rem;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.35rem; }
.footer-col a {
  color: #A6A094;
  text-decoration: none;
  font-size: var(--font-sm);
  transition: color var(--transition-fast);
}
.footer-col a:hover { color: var(--color-accent); }

.footer-bottom {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-md) var(--container-padding);
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: var(--font-xs);
  color: #7A7568;
  text-align: center;
}


/* ==========================================================================
   11. UTILITY CLASSES
   ========================================================================== */

.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;
}
.sr-only:focus {
  position: fixed;
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  padding: var(--space-sm) var(--space-md);
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: var(--font-base);
  font-weight: 700;
  z-index: 999;
}

.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.text-sm { font-size: var(--font-sm); }
.text-xs { font-size: var(--font-xs); }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }


/* ==========================================================================
   12. PRINT
   ========================================================================== */

@media print {
  .category-bar,
  .site-header,
  .content-sidebar,
  .site-footer,
  .hero-cta,
  .newsletter-cta,
  .related-posts { display: none; }

  body { background: white; color: black; font-size: 11pt; }
  .article-body { box-shadow: none; padding: 0; }
  a { color: black; text-decoration: underline; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}


/* ==========================================================================
   13. RESPONSIVE
   ========================================================================== */

@media (max-width: 1023px) {
  :root {
    --container-padding: 1.5rem;
    --article-padding: 1.5rem;
  }

  /* Single-column layout on tablet */
  .site-content {
    flex-direction: column;
  }
  .content-main,
  .content-sidebar {
    flex: 1 1 100%;
  }

  /* Header: hamburger on tablet */
  .header-nav { display: none; }
  .menu-toggle { display: block; }

  /* Hero split stacked on tablet */
  .hero-split { flex-direction: column; min-height: auto; }
  .hero-split__text { flex: 1 1 auto; padding: var(--space-xl) var(--container-padding); }
  .hero-split__text-inner { padding-right: 0; margin: 0; max-width: none; }
  .hero-split__image { min-height: 240px; clip-path: none; }

  /* Footer 2 columns on tablet */
  .footer-grid { grid-template-columns: 1fr 1fr; }

  /* Sidebar de-sticky on tablet */
  .widget-toc { position: static; }
}

@media (max-width: 767px) {
  :root {
    --container-padding: 1rem;
    --article-padding: 1.25rem;
    --font-4xl: 2rem;
    --font-3xl: 1.728rem;
    --font-2xl: 1.44rem;
  }

  /* Category bar hidden on mobile */
  .category-bar { display: none; }

  /* Hero split shorter image on mobile */
  .hero-split__image { min-height: 200px; }

  /* Hero full shorter */
  .hero-full { height: 40vh; min-height: 280px; }

  /* Footer single column on mobile */
  .footer-grid { grid-template-columns: 1fr; }

  /* Table horizontal scroll — no sticky header */
  .comparison-table thead th { position: static; }

  /* Author bio stacked */
  .author-bio-full { flex-direction: column; align-items: center; text-align: center; }
}

@media (max-width: 480px) {
  .hero-full h1 { font-size: var(--font-2xl); }
}


/* ==========================================================================
   14. MOBILE MENU OVERLAY
   ========================================================================== */

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-surface);
  z-index: 200;
  padding: calc(var(--header-height) + var(--space-xl)) var(--container-padding) var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  transform: translateX(100%);
  transition: transform var(--transition-base);
  overflow-y: auto;
}

.menu-open .mobile-menu {
  transform: translateX(0);
}

.mobile-menu a {
  display: block;
  padding: var(--space-md) 0;
  color: var(--color-text);
  text-decoration: none;
  font-size: var(--font-lg);
  font-weight: 600;
  border-bottom: 1px solid var(--color-border-light);
}
.mobile-menu a:hover { color: var(--color-primary); }

.mobile-menu__section-title {
  font-family: var(--font-heading);
  font-size: var(--font-sm);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-caps, 0.05em);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-xs);
}

/* Hamburger animation when open */
.menu-open .menu-toggle span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}
.menu-open .menu-toggle span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Prevent body scroll when menu is open */
body.menu-open {
  overflow: hidden;
}
