/* Wambur — Gesundheitsmagazin. Ein Stylesheet, keine externen Fonts/CDNs.
   Design-System: siehe DESIGN-SYSTEM.md. WCAG-AA, mobile-first. */

:root {
  --bg: #f6faf9;
  --surface: #ffffff;
  --panel: #eef6f4;
  --text: #14293b;
  --muted: #51637a;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-soft: #e6f5f2;
  --accent: #c2410c;
  --accent-dark: #9a330a;
  --good: #1a7f37;
  --warn: #8a6d00;
  --border: #dbe7e4;
  --measure: 68ch;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 41, 59, .05), 0 14px 34px rgba(15, 118, 110, .10);
  --shadow-sm: 0 1px 2px rgba(20, 41, 59, .06);
  --grad-hero: linear-gradient(165deg, #0f766e 0%, #115e59 55%, #0c4a45 100%);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.06rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--primary-dark); }
a:hover { color: var(--accent-dark); }
h1, h2, h3 { line-height: 1.25; color: #10202f; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: .2em 0 .5em; }
h2 { font-size: clamp(1.3rem, 2.6vw, 1.6rem); margin: 1.8em 0 .5em; }
h3 { font-size: 1.15rem; margin: 1.4em 0 .4em; }
p { margin: 0 0 1.1em; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

.skip-link { position: absolute; left: -999px; top: 0; background: #fff; padding: 10px 16px; z-index: 200; }
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Layout-Container ---------- */
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
main { display: block; }
.article, .legal-page { max-width: 760px; margin: 0 auto; padding: 26px 20px 60px; }
.article > p, .article > ul, .article > ol, .article > h2, .article > h3,
.legal-page > p, .legal-page > ul, .legal-page > ol { max-width: var(--measure); }

/* ---------- Header ---------- */
/* Sticky gehört auf den Slot-Wrapper (Body-Kind, hoch genug zum Kleben) —
   NICHT auf .site-header, sonst klebt er nur innerhalb seiner eigenen Höhe. */
#site-header-slot { position: sticky; top: 0; z-index: 100; background: var(--surface); }
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.header-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 14px; max-width: 1140px; margin: 0 auto; padding: 12px 20px; transition: padding .18s ease; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--primary-dark); font-weight: 800; font-size: 1.25rem; letter-spacing: -.01em; transition: font-size .18s ease; }
.brand svg { width: 30px; height: 30px; flex: none; transition: width .18s ease, height .18s ease; }
.brand .claim { font-weight: 500; font-size: .82rem; color: var(--muted); }
.header-spacer { margin-left: auto; }

/* Sticky-Header schrumpft beim Scrollen: kleineres Logo, weniger Höhe, Quicknav ein.
   Suche + Menü + Logo bleiben sichtbar (kompakte Leiste). Klasse via site-layout.js. */
.site-header.scrolled .header-bar { padding-top: 7px; padding-bottom: 7px; }
.site-header.scrolled .brand { font-size: 1.05rem; }
.site-header.scrolled .brand svg { width: 22px; height: 22px; }
.site-header.scrolled .brand .claim { display: none; }
.site-header.scrolled .site-search { padding-top: 7px; padding-bottom: 7px; }
.site-header.scrolled .quicknav { display: none; }
@media (prefers-reduced-motion: reduce) {
  .header-bar, .brand, .brand svg, .burger i { transition: none; }
}
.menu-btn { flex: none; display: inline-flex; align-items: center; gap: 8px; background: var(--primary-soft); color: var(--primary-dark); border: 1px solid var(--border); border-radius: 10px; padding: 9px 14px; font: inherit; font-weight: 700; cursor: pointer; }
.menu-btn:hover { background: #d6ede8; }
.menu-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.burger { position: relative; width: 18px; height: 14px; flex: none; }
.burger i { position: absolute; left: 0; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: top .2s, transform .2s, opacity .2s; }
.burger i:nth-child(1) { top: 0; }
.burger i:nth-child(2) { top: 6px; }
.burger i:nth-child(3) { top: 12px; }
.menu-btn[aria-expanded="true"] .burger i:nth-child(1) { top: 6px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .burger i:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] .burger i:nth-child(3) { top: 6px; transform: rotate(-45deg); }
.menu-label-close { display: none; }
.menu-btn[aria-expanded="true"] .menu-label-open { display: none; }
.menu-btn[aria-expanded="true"] .menu-label-close { display: inline; }

/* ---------- Globale Suche (Muster: top-shop-welt.de) ---------- */
.site-search { position: relative; flex: 1 1 300px; max-width: 480px; min-width: 0; display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 9px 16px; box-shadow: var(--shadow-sm); }
.site-search > svg { color: var(--muted); flex: none; }
#siteSearch { width: 100%; min-width: 0; font: inherit; padding: 0; border: 0; background: none; color: var(--text); outline: none; }
#siteSearch::placeholder { color: var(--muted); }
.site-search-panel { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden auto; max-height: 60vh; }
.site-search-panel a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; }
.site-search-panel a:last-child { border-bottom: none; }
.site-search-panel a:hover, .site-search-panel a.is-hl { background: var(--panel); }
.site-search-panel a strong { color: var(--text); font-weight: 600; font-size: .95rem; }
.site-search-panel a span { color: var(--primary-dark); font-size: .72rem; font-weight: 700; background: var(--primary-soft); padding: 3px 9px; border-radius: 999px; flex: none; }
.site-search-panel .search-none { padding: 12px 16px; color: var(--muted); font-size: .9rem; }
.quicknav { border-top: 1px solid var(--border); background: var(--panel); }
.quicknav .wrap { display: flex; gap: 4px; flex-wrap: wrap; padding: 6px 20px; }
.quicknav a { text-decoration: none; color: var(--text); font-weight: 600; font-size: .93rem; padding: 7px 12px; border-radius: 8px; }
.quicknav a:hover, .quicknav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary-dark); }

/* Menü-Panel (Slide-in) */
.nav-panel { position: fixed; inset: 0 0 0 auto; width: min(340px, 88vw); background: #fff; box-shadow: -18px 0 44px rgba(12, 43, 42, .16); padding: 0 0 max(18px, env(safe-area-inset-bottom)); z-index: 130; overflow-y: auto; transform: translateX(105%); visibility: hidden; transition: transform .28s cubic-bezier(.32,.72,.31,1), visibility .28s; }
.nav-panel.open { transform: translateX(0); visibility: visible; }
.nav-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: #fff; }
.nav-panel-title { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.nav-close { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font: inherit; font-size: .88rem; font-weight: 600; padding: 8px 13px; border-radius: 999px; cursor: pointer; }
.nav-close:hover { background: var(--primary-soft); color: var(--primary-dark); border-color: #bfe2db; }
.nav-close svg { flex: none; }
.nav-panel-links { padding: 10px 20px 4px; }
.nav-panel-links a { display: flex; align-items: center; justify-content: space-between; padding: 15px 2px; border-bottom: 1px solid #eef3f1; text-decoration: none; color: var(--text); font-weight: 600; font-size: 1.04rem; }
.nav-panel-links a:last-child { border-bottom: 0; }
.nav-panel-links a::after { content: ""; width: 8px; height: 8px; border-right: 2px solid #b8c8c4; border-top: 2px solid #b8c8c4; transform: rotate(45deg); flex: none; }
.nav-panel-links a:hover { color: var(--primary-dark); }
.nav-panel-links a[aria-current="page"] { color: var(--primary-dark); }
.nav-panel-note { margin: 14px 20px 0; padding-top: 14px; border-top: 1px solid var(--border); font-size: .84rem; color: var(--muted); }
.nav-overlay { position: fixed; inset: 0; background: rgba(12, 43, 42, .42); z-index: 120; opacity: 0; visibility: hidden; transition: opacity .28s, visibility .28s; }
.nav-overlay.open { opacity: 1; visibility: visible; }
@media (prefers-reduced-motion: reduce) { .nav-panel, .nav-overlay { transition: none; } }

/* ---------- Hero (Startseite) ---------- */
.hero { background: var(--grad-hero); color: #fff; padding: 54px 0 60px; }
.hero h1 { color: #fff; max-width: 20ch; }
.hero p { color: #dff2ee; max-width: 54ch; font-size: 1.15rem; }
.hero .btn { margin-top: 8px; }

/* ---------- Buttons ---------- */
.btn, .btn-accent { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; border-radius: 10px; padding: 12px 20px; border: 1px solid transparent; cursor: pointer; font: inherit; font-weight: 700; }
.btn { background: #fff; color: var(--primary-dark); border-color: var(--border); }
.btn:hover { background: var(--primary-soft); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); color: #fff; }
.btn.secondary { background: transparent; }

/* ---------- Karten / Grid ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin: 24px 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 20px; }
.card h3 { margin-top: 0; }
.card a.card-link { text-decoration: none; }
.section { padding: 40px 0; }
.section h2 { margin-top: 0; }

/* ---------- Breadcrumb + Meta ---------- */
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 12px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary-dark); }
/* Meta als eine ruhige Zeile mit Punkt-Trennern statt gestapelter Blöcke */
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; color: var(--muted); font-size: .84rem; margin: 0 0 30px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.article-meta span + span::before { content: ""; display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; margin: 0 11px; vertical-align: middle; }
.article-meta strong { color: var(--text); font-weight: 600; }

/* ---------- Redaktioneller Hinweis / Callout (editorial) ---------- */
.callout-eyebrow { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.med-disclaimer { margin: 6px 0 34px; padding: 20px 22px; background: #faf6ec; border: 1px solid #ecdfc2; border-radius: 14px; font-size: .95rem; line-height: 1.65; color: #4b4534; }
.med-disclaimer > :last-child { margin-bottom: 0; }
.med-disclaimer .callout-eyebrow { color: #a4670f; padding-left: 22px; position: relative; }
.med-disclaimer .callout-eyebrow::before { content: ""; position: absolute; left: 0; top: 50%; width: 14px; height: 2px; background: #c8891f; transform: translateY(-50%); }
.med-disclaimer strong { color: #3d3829; }

/* ---------- Affiliate-/Anzeige-Box ---------- */
.ad-box { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px 22px 20px; margin: 30px 0; box-shadow: var(--shadow-sm); overflow: hidden; }
.ad-box::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 3px; background: var(--primary); }
.ad-label { display: inline-block; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.ad-box h3 { margin-top: 0; }
.ad-box .btn-accent { margin-top: 8px; }
.ad-note { font-size: .8rem; color: var(--muted); margin: 12px 0 0; }

/* ---------- E-E-A-T Autorenbox ---------- */
.author-box { border: 1px solid var(--border); border-radius: 18px; padding: 24px; margin: 44px 0 12px; background: var(--surface); }
.author-head { display: flex; gap: 15px; align-items: center; }
.author-avatar { width: 46px; height: 46px; border-radius: 14px; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 1.15rem; flex: none; }
.author-name { font-weight: 700; font-size: 1.02rem; }
.author-role { color: var(--muted); font-size: .88rem; }
.author-reviewed { margin-top: 14px; font-size: .88rem; color: var(--muted); line-height: 1.6; }
.author-reviewed strong { color: var(--text); font-weight: 600; }
.sources { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 18px; }
.sources h3 { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.sources ol { margin: 0; padding: 0; list-style: none; counter-reset: src; }
.sources li { counter-increment: src; position: relative; padding: 0 0 11px 32px; font-size: .88rem; color: var(--muted); line-height: 1.55; }
.sources li::before { content: counter(src); position: absolute; left: 0; top: 0; width: 21px; height: 21px; border-radius: 7px; background: var(--primary-soft); color: var(--primary-dark); font-size: .72rem; font-weight: 700; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.sources a { word-break: break-word; }

/* ---------- Inhaltsverzeichnis (nummeriert, Hairlines) ---------- */
.toc { margin: 0 0 32px; padding: 18px 20px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.toc strong { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: flex; align-items: baseline; gap: 13px; padding: 10px 0; text-decoration: none; color: var(--text); border-bottom: 1px solid #eef3f1; font-size: .96rem; }
.toc li:last-child a { border-bottom: 0; }
.toc a::before { content: counter(toc, decimal-leading-zero); font-size: .78rem; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; flex: none; }
.toc a:hover { color: var(--primary-dark); }

/* ---------- FAQ (Hairline-Akkordeon) ---------- */
.faq { margin: 8px 0; }
.faq details { border-top: 1px solid var(--border); }
.faq details:last-of-type { border-bottom: 1px solid var(--border); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 18px; cursor: pointer; font-weight: 600; font-size: 1.02rem; padding: 17px 2px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s ease; flex: none; margin-top: -3px; }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: 3px; }
.faq .faq-a { padding: 0 2px 18px; color: var(--muted); line-height: 1.65; }

/* ---------- Footer (mobile-first) ---------- */
.site-footer { background: #0c2b2a; color: #cfe5e0; margin-top: 48px; }
.footer-inner { padding-top: 36px; padding-bottom: max(20px, env(safe-area-inset-bottom)); }
.footer-brandblock { display: flex; gap: 14px; align-items: flex-start; padding-bottom: 24px; border-bottom: 1px solid #1c403d; }
.footer-mark { flex: none; display: block; line-height: 0; }
.footer-brand { display: block; font-weight: 800; color: #fff; font-size: 1.15rem; letter-spacing: .01em; }
.footer-tagline { margin: 4px 0 0; font-size: .88rem; color: #9fc4bd; max-width: 46ch; line-height: 1.55; }
.footer-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 24px 20px; padding: 24px 0 6px; }
.footer-h { font-size: .68rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: #7fa8a1; margin: 0 0 4px; }
.footer-list { display: flex; flex-direction: column; }
.footer-list a { color: #d7ebe6; text-decoration: none; font-size: .95rem; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.07); }
.footer-list a:last-child { border-bottom: 0; }
.footer-list a:hover { color: #fff; }
.footer-disclaimer { margin: 14px 0 20px; font-size: .8rem; line-height: 1.6; color: #8fb3ac; }
.footer-disclaimer strong { color: #b9d6d0; }
.footer-legalbar { display: flex; flex-wrap: wrap; gap: 9px; padding-bottom: 20px; }
.footer-legalbar a { color: #d7ebe6; text-decoration: none; font-size: .84rem; font-weight: 600; padding: 8px 14px; border: 1px solid #235450; border-radius: 999px; }
.footer-legalbar a:hover { background: #123c39; color: #fff; }
.footer-base { border-top: 1px solid #1c403d; padding-top: 16px; font-size: .82rem; color: #7fa8a1; }

/* ---------- Utilities ---------- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.lead { font-size: 1.15rem; color: var(--muted); }
.center { text-align: center; }
.mt-0 { margin-top: 0; }

@media (max-width: 720px) {
  /* Menü oben rechts neben dem Logo, Suche in eigener Zeile darunter. */
  .brand { flex: 1 1 auto; min-width: 0; }
  .brand .claim { display: none; }              /* spart Breite -> Menü passt in Logo-Zeile */
  .menu-btn { margin-left: auto; order: 2; }
  .site-search { order: 3; flex-basis: 100%; max-width: none; }
  /* Quicknav als eine horizontal scrollbare Zeile statt umbrechendem 2-Zeilen-Raster */
  .quicknav .wrap { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 7px 16px; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); }
  .quicknav .wrap::-webkit-scrollbar { display: none; }
  .quicknav a { white-space: nowrap; flex: none; }
}
@media (max-width: 640px) {
  body { font-size: 1.02rem; }
  .hero { padding: 40px 0 44px; }
  .footer-base .wrap { flex-direction: column; align-items: flex-start; }
}
