/* ==========================================================================
   Gesund & Wertvoll — Blog Stylesheet
   Orientiert an der Optik des Flenski-Blogs (App gesund-und-wertvoll.info):
   helles Cream-Grün, weiße Content-Karten, runde Kategorie-Pills,
   Autor-Zeile mit Avatar, große Hero-Bilder mit Titel-Overlay.
   ========================================================================== */

:root {
  /* Markenfarben aus dem Canva Brand Kit "Insta-Profil - Gesund und wertvoll" (kAFw9BpNjgw) */
  --color-primary: #4a8830;       /* mittleres Markengrün — Haupt-Akzent */
  --color-primary-dark: #2c6a1f;  /* dunkles Markengrün — sparsam, nur Hover/Kontrast */
  --color-primary-light: #8fee90; /* frisches Hellgrün — Akzent-Wäsche, aktive Pills */
  --color-bg: #eef0f7;            /* helles Lavendel-Grau wie im App-Blog */
  --color-card: #ffffff;
  --color-accent: #c98a3e;        /* warmes Gold/Terracotta, passend zum Bannertext */
  --color-accent-dark: #a86f2c;
  --color-text: #2c332c;
  --color-text-muted: #6b6f7a;
  --color-border: #e2e4ee;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-pill: 999px;
  --shadow-card: 0 4px 18px rgba(40, 44, 70, 0.07);
  --shadow-card-hover: 0 10px 28px rgba(40, 44, 70, 0.12);
  --max-width: 1180px;
  font-size: 16px;
}

.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;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Nunito Sans", "Roboto", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* Ganz normale Text-Links im Fließtext (z.B. CTA als Satz statt Button) —
   bewusst dezent, nur farbig + Unterstreichung, kein Button-Look. Buttons
   (.btn-cta, .btn-widget, .btn-open, .btn) bleiben davon unberührt. */
.article-main p a:not([class]) {
  color: var(--color-primary-dark);
  text-decoration: underline;
  text-decoration-color: var(--color-primary-light);
  text-underline-offset: 2px;
}
.article-main p a:not([class]):hover { color: var(--color-accent-dark); }

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

/* ---------- Header: schlanke Leiste über dem Banner ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 10px 24px;
  font-size: 13px;
}
.site-nav a {
  margin-left: 20px;
  font-weight: 600;
  color: var(--color-text-muted);
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--color-primary-dark); }

/* ---------- Banner (echtes Bild aus Flenski, mobil/Desktop) ---------- */
.site-banner {
  display: block;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  margin-bottom: 8px;
}
.site-banner img {
  width: 100%;
  height: auto;
  display: block;
}
.banner-back-link {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.18);
}
.banner-back-link:hover { background: var(--color-primary-dark); }

.blog-intro {
  max-width: 640px;
  margin: 28px auto 8px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 16px;
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  font-size: 13px;
  color: var(--color-text-muted);
  padding: 16px 0 0;
}
.breadcrumbs a { color: var(--color-text-muted); }
.breadcrumbs a:hover { color: var(--color-primary-dark); }
.breadcrumbs .sep { margin: 0 6px; opacity: 0.6; }
.breadcrumbs [aria-current="page"] { color: var(--color-text); font-weight: 600; }

/* ---------- Hero (Blog-Übersicht) ---------- */
.blog-hero {
  text-align: center;
  padding: 56px 24px 40px;
}
.blog-hero h1 {
  font-size: clamp(28px, 4vw, 42px);
  margin: 0 0 12px;
  color: var(--color-primary-dark);
}
.blog-hero p {
  max-width: 620px;
  margin: 0 auto;
  color: var(--color-text-muted);
  font-size: 17px;
}

/* ---------- Kategorie-Filter: schlichte Pills, nur belegte Kategorien ---------- */
.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 36px;
}

.category-pill {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.category-pill:hover { border-color: var(--color-primary); color: var(--color-primary-dark); }
.pill-icon { margin-right: 2px; }
.category-pill.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/*
  Neue Kategorie sichtbar machen: sobald sie einen Artikel hat, hier eine
  weitere .category-pill mit passendem data-category ergänzen (siehe HTML-
  Kommentar unten) — Kategorien ohne Artikel bewusst NICHT anzeigen.
*/

/* ---------- Artikel-Grid ---------- */
.filter-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  font-size: 14px;
  color: var(--color-text-muted);
}
.filter-status button {
  background: none;
  border: none;
  color: var(--color-primary-dark);
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 26px;
  margin-bottom: 60px;
}

.article-card {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}
.article-card .card-image {
  background: linear-gradient(135deg, var(--color-primary-light), #eadfc7);
  position: relative;
  overflow: hidden;
}
.article-card .card-image img {
  /* Bewusst KEIN object-fit:cover / feste aspect-ratio: die Titelbilder
     tragen den Titel-Text schon im Bild (Canva-Design) — ein harter Crop
     würde Wörter abschneiden. Bild zeigt sich in voller Breite, natürliches
     Seitenverhältnis. Für ein einheitlicheres Karten-Raster künftig am
     besten gleich im passenden Karten-Format (z. B. 800×450) exportieren. */
  width: 100%;
  height: auto;
  display: block;
}
.btn-open {
  display: inline-block;
  margin-top: 14px;
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 9px 20px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--color-primary-dark);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.article-card:hover .btn-open {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.article-card .card-body {
  padding: 18px 18px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.pill {
  display: inline-block;
  background: #eaf3ea;
  color: var(--color-primary-dark);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 10px;
  align-self: flex-start;
}
.article-card h3 {
  font-size: 18px;
  margin: 0 0 8px;
  color: var(--color-text);
}
.article-card p.excerpt {
  font-size: 14px;
  color: var(--color-text-muted);
  margin: 0 0 16px;
  flex: 1;
}
.meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}
.card-body .btn-open { margin-top: 14px; }
.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.meta-text { font-size: 12.5px; color: var(--color-text-muted); line-height: 1.3; }
.meta-text .author-name { color: var(--color-text); font-weight: 600; }

/* ---------- Artikel-Seite ----------
   Das Titelbild trägt den Titel-Schriftzug bereits im Bild selbst
   (Sabines Canva-Design) — deshalb hier bewusst KEIN zusätzliches
   Text-Overlay/Verlauf, nur das Bild plus Zurück-Button. Die echte,
   semantische H1 folgt direkt darunter im Fließtext-Bereich. */
.article-hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 8px 0 28px;
}
.article-hero img.hero-image {
  width: 100%;
  height: auto;
  display: block;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 44px;
  align-items: start;
  padding-bottom: 60px;
}

.article-main {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  padding: 8px 36px 36px;
  box-shadow: var(--shadow-card);
}

.article-meta-line {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 12px 0 0;
}
.article-byline {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--color-border);
}

.article-main h1 {
  font-size: clamp(24px, 3.2vw, 32px);
  color: var(--color-text);
  margin: 10px 0 20px;
  line-height: 1.25;
}
.article-main .pill { margin-top: 4px; }
.intro-lead {
  font-size: 17px;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 20px;
  margin-bottom: 8px !important;
}
.article-main h2 {
  font-size: 22px;
  color: var(--color-primary-dark);
  margin: 36px 0 14px;
  scroll-margin-top: 90px;
}
.article-main h2:first-of-type { margin-top: 8px; }
.article-main p { font-size: 15.5px; margin: 0 0 16px; }
.article-main ul, .article-main ol { font-size: 15.5px; margin: 0 0 16px; padding-left: 22px; }
.article-main li { margin-bottom: 6px; }
/* Bilder im Artikeltext: bewusst OHNE sichtbare Bildunterschrift (Sabines
   Vorgabe 18.08.2026) — die Bildbeschreibung kommt stattdessen ins alt-
   Attribut des <img> (gut für Screenreader + Bildersuche, unterbricht aber
   nicht den Lesefluss). .figcaption-Regeln bleiben unten für den Fall, dass
   irgendwo doch mal ein <figcaption> auftaucht, werden aber aktuell nirgends
   im HTML verwendet. */
.article-main figure {
  margin: 28px 0;
}
.article-main figure img {
  width: 100%;
  border-radius: var(--radius-md);
}
.article-main figcaption {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 8px;
  text-align: center;
}

/* Bild links, Text fließt rechts daneben (wie im FunnelCockpit-Stress-Blog) */
.article-main figure.figure-inline-left,
.article-main figure.figure-inline-right {
  width: 42%;
  margin: 6px 0 16px;
}
.article-main figure.figure-inline-left {
  float: left;
  margin-right: 24px;
}
.article-main figure.figure-inline-right {
  float: right;
  margin-left: 24px;
}
.article-main figure.figure-inline-left figcaption,
.article-main figure.figure-inline-right figcaption {
  text-align: left;
}
/* Sorgt dafür, dass eine nachfolgende Überschrift nicht neben dem Bild klemmt */
.article-main h2 { clear: both; }
@media (max-width: 600px) {
  .article-main figure.figure-inline-left,
  .article-main figure.figure-inline-right {
    float: none;
    width: 100%;
    margin: 16px 0;
  }
  /* Bilder auf dem Handy nicht auf volle Spaltenbreite ziehen — wirkt sonst
     erschlagend. Etwas schmaler + zentriert wirkt luftiger (Sabines Vorgabe
     18.08.2026), betrifft ganzseitige Figuren genauso wie die gerade zu
     "float:none" gewordenen Inline-Bilder. */
  .article-main figure img {
    width: 82%;
    display: block;
    margin: 0 auto;
  }
}
.article-main blockquote {
  border-left: 4px solid var(--color-primary);
  margin: 24px 0;
  padding: 4px 20px;
  color: var(--color-primary-dark);
  font-style: italic;
  background: #f4f9f4;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.cta-box {
  background: #f4ede1;
  border-radius: var(--radius-md);
  padding: 26px 28px;
  margin: 32px 0;
  text-align: center;
}
.cta-box h3 { margin: 0 0 8px; color: var(--color-primary-dark); font-size: 19px; }
.cta-box p { color: var(--color-text-muted); margin: 0 0 18px; font-size: 14.5px; }
.btn-cta {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  font-weight: 700;
  font-size: 14.5px;
  padding: 13px 28px;
  border-radius: var(--radius-pill);
  transition: background 0.15s ease;
}
.btn-cta:hover { background: var(--color-accent-dark); }

.faq-block { margin-top: 8px; }
.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: 16px 0;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 15.5px;
  color: var(--color-text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 20px;
  color: var(--color-primary);
  margin-left: 12px;
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { margin: 12px 0 0; color: var(--color-text-muted); }

/* ---------- Sidebar: Inhaltsverzeichnis ---------- */
.article-sidebar { position: sticky; top: 90px; }
.toc-box {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  padding: 22px 22px 24px;
  box-shadow: var(--shadow-card);
  margin-bottom: 22px;
}
.toc-box h4 {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin: 0 0 14px;
}
/* <summary>-Zeile: gleiche Optik wie das frühere h4-Label, aber klickbar
   (natives Auf-/Zuklappen, auch ohne JS bedienbar). */
.toc-summary {
  cursor: pointer;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.toc-summary::-webkit-details-marker { display: none; }
.toc-summary::after {
  content: "▾";
  font-size: 12px;
  color: var(--color-primary);
  margin-left: 10px;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.toc-box[open] .toc-summary::after { transform: rotate(180deg); }
.toc-box[open] .toc-summary { margin-bottom: 14px; }
.toc-list { list-style: none; margin: 0; padding: 0; }
.toc-list li { margin-bottom: 4px; }
.toc-list a {
  display: block;
  font-size: 14px;
  color: var(--color-text-muted);
  padding: 7px 10px;
  border-radius: 8px;
  border-left: 2px solid transparent;
  transition: background 0.12s ease, color 0.12s ease;
}
.toc-list a:hover { background: #f4f9f4; color: var(--color-primary-dark); }
.toc-list a.is-active {
  color: var(--color-primary-dark);
  font-weight: 700;
  border-left-color: var(--color-primary);
  background: #f1f7f1;
}

.share-box {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
  font-size: 13.5px;
  color: var(--color-text-muted);
}

/* ---------- Werbe-/Freebie-Widget (im Fließtext, nicht in der Sidebar) ----------
   Für Lead-Magnete, Kurs-Hinweise o.ä. — bewusst NICHT fest in der Sidebar
   verankert, sondern als Baustein zum manuellen Platzieren mitten im
   Artikeltext (z.B. zwischen zwei Absätzen), analog zur .cta-box. Grund:
   nicht jeder Artikel bekommt ein Widget, und die Sidebar rutscht auf dem
   Handy vor den Artikeltext — ein Widget dort würde vor dem Lesen
   erscheinen statt im Lesefluss (Sabines Feedback 18.08.2026). Einfach pro
   Artikel an der passenden Stelle einfügen, Bild/Text/Link austauschen.
   Nicht mit Fake-Daten live schalten, siehe landingpage-conversion-qa-guw §2a. */
.widget-box {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  padding: 18px 18px 20px;
  box-shadow: var(--shadow-card);
  margin: 28px auto;
  max-width: 340px;
  text-align: center;
}
.widget-box img {
  width: 100%;
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  display: block;
}
.widget-box p {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0 0 14px;
}
.widget-box .btn-widget {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 11px 24px;
  border-radius: var(--radius-pill);
  transition: background 0.15s ease;
}
.widget-box .btn-widget:hover { background: var(--color-accent-dark); }

/* ---------- Related Articles ---------- */
.related-section { margin: 20px 0 60px; }
.related-section h2 {
  font-size: 22px;
  color: var(--color-primary-dark);
  margin-bottom: 20px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255,255,255,0.85);
  padding: 40px 24px;
  margin-top: 40px;
  font-size: 13.5px;
  text-align: center;
}
.site-footer a { color: #fff; font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; order: -1; }
  .toc-box { margin-bottom: 24px; }
  .article-main { padding: 8px 20px 28px; }
  .site-nav { display: none; }
}

/* ---------- Cookie-Banner — Consent Mode v2 (Pflicht seit März 2024, EWR) ---------- */
.guw-cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999;
  background: #fff; border-top: 1px solid #e0ddd6;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  padding: 18px 24px; display: none;
}
.guw-cookie-banner.guw-visible { display: block; }
.guw-cookie-inner {
  max-width: 1100px; margin: 0 auto; display: flex; align-items: center;
  justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.guw-cookie-text { margin: 0; font-size: 0.92rem; color: #333; flex: 1 1 320px; }
.guw-cookie-text a { color: var(--color-primary, #4a8830); text-decoration: underline; }
.guw-cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }
.guw-cookie-btn { border: none; border-radius: 10px; padding: 10px 20px; font-weight: 700; font-size: 0.9rem; cursor: pointer; }
.guw-cookie-btn-primary { background: #4a8830; color: #fff; font-weight: 800; box-shadow: 0 2px 8px rgba(74,136,48,0.35); }
.guw-cookie-btn-primary:hover { background: #2c6a1f; }
.guw-cookie-btn-secondary { background: transparent; color: #888; border: 1px solid #ddd; }
.guw-cookie-btn-secondary:hover { background: #f7f6f3; color: #555; }
@media (max-width: 600px) {
  .guw-cookie-inner { flex-direction: column; align-items: stretch; text-align: center; }
  .guw-cookie-actions { justify-content: center; }
}
