/* ============================================================
   AerIQ Kommunen (kommunen.aeriq.de) – helles Behörden-Theme
   Eigenständiges Stylesheet. Markenfarbe Orange nur als Akzent.
   ============================================================ */

:root {
  /* Marke */
  --primary:        #a84d0e;   /* Orange, WCAG-AA auf Weiß (5,6:1) */
  --primary-dark:   #8f3f0a;
  --primary-light:  #c2410c;
  --primary-tint:   #fdf3ec;   /* sehr helles Orange für Flächen */
  --primary-border: #f0d8c6;

  /* Neutrale Töne – hell & klar */
  --ink:      #1f2937;   /* Überschriften */
  --body:     #374151;   /* Fließtext */
  --muted:    #6b7280;   /* Sekundärtext */
  --line:     #e5e7eb;   /* Trennlinien/Rahmen */
  --line-2:   #eef1f4;
  --bg:       #ffffff;
  --bg-soft:  #f8fafc;   /* Abschnittswechsel */
  --bg-panel: #f4f6f8;
  --radius:  10px;
  --radius-lg: 16px;
  --shadow:  0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.06);
  --shadow-md: 0 6px 20px rgba(16,24,40,.08);
  --maxw: 1140px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--body);
  background: var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
}
/* Harte Überlauf-Sperre auf Wurzelebene: `clip` erzeugt – anders als `hidden` –
   keinen Scroll-Container (position:sticky bleibt intakt) und verhindert das
   seitliche Verschieben der Seite auf Mobilgeräten zuverlässig (Off-Canvas-Menü,
   transformierte Elemente). Fallback für alte Browser: hidden. */
html, body { overflow-x: hidden; overflow-x: clip; }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--primary-dark); text-decoration: underline; }

h1,h2,h3,h4 { color: var(--ink); line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.8rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem); letter-spacing: -.01em; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }
/* Hilfsklasse (28.07.2026, B-7): Überschriften, die aus Gliederungsgründen von
   <h4> auf <h3> gehoben wurden, behalten damit exakt ihre bisherige Größe —
   die Seiten sehen unverändert aus, nur die Ebenenfolge stimmt jetzt. */
.h-sm { font-size: 1.05rem; }
.info-row h3 { margin-bottom: .15rem; }
p  { margin-bottom: 1rem; }
strong { color: var(--ink); }
ul, ol { margin: 0 0 1rem 1.2rem; }
li { margin-bottom: .4rem; }

/* ---------- Layout ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 4rem 0; }
.section--soft { background: var(--bg-soft); }
.section--tint { background: var(--primary-tint); }
/* Kopfblöcke sitzen auf ALLEN Seiten mittig wie auf index.php (27.07., Wunsch Martin) */
.narrow { max-width: 820px; margin-left: auto; margin-right: auto; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--primary); margin-bottom: .75rem;
}
.lead { font-size: 1.15rem; color: var(--body); }
.text-muted { color: var(--muted); }

/* Skip-Link (Barrierefreiheit) */
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--primary); color:#fff;
  padding: .6rem 1rem; z-index: 2000; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Sichtbarer Tastaturfokus (28.07.2026, B-2 / WCAG 2.4.7) ----------
   Vorher gab es nur zwei :focus-visible-Regeln (Footer-Icons); überall sonst
   blieb es beim Browser-Standard, und die Formularfelder hoben ihn mit
   `outline:none` sogar auf — ersetzt durch einen Schatten mit 12 % Deckkraft,
   der faktisch unsichtbar war. Jetzt: eine deutliche, markenfarbene Marke für
   ALLE per Tastatur angesteuerten Elemente. :focus-visible statt :focus, damit
   Mausklicks weiterhin keinen Rahmen hinterlassen. */
:where(a, button, input, select, textarea, summary, details, [tabindex]):focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}
/* Fokus auf dunklem/orangem Grund (CTA-Button, Ton-Button im Video) */
.btn-primary:focus-visible,
.aeriq-vp-sound:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 6px rgba(168,77,14,.55);
}
/* <main> nimmt den Skip-Link-Fokus an, soll aber selbst keinen Rahmen zeigen */
main:focus, main:focus-visible { outline: none; }
.form-input:focus-visible, .form-textarea:focus-visible, .form-select:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 1px;
}

/* ---------- Kopfzeile / Navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1000; background: rgba(255,255,255,.96);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 72px; padding: .5rem 0; }
.brand { display: flex; align-items: center; gap: .6rem; }
/* Logo in Hauptseiten-Größe (navbar-brand img = 80×80; SVG ist quadratisch 850×850) */
.brand img { height: 80px; width: 80px; }
.brand-badge {
  font-size: .9rem; font-weight: 700; color: var(--primary);
  border: 1px solid var(--primary-border); background: var(--primary-tint);
  padding: .18rem .65rem; border-radius: 999px; letter-spacing: .06em;
  white-space: nowrap; text-transform: uppercase;
}
.nav-menu { list-style: none; display: flex; align-items: center; gap: 1.6rem; margin: 0; }
.nav-menu a {
  color: var(--body); font-weight: 500; font-size: .97rem; padding: .4rem 0;
  border-bottom: 2px solid transparent;
}
.nav-menu a:hover, .nav-menu a[aria-current="page"] {
  color: var(--primary); border-bottom-color: var(--primary); text-decoration: none;
}
/* CTA-Button in der Navigation: weißer Text auf Orange (überschreibt .nav-menu a) */
.nav-menu a.btn-primary,
.nav-menu a.btn-primary:hover {
  color: #fff; border-bottom: 0; text-decoration: none;
}
.nav-menu a.btn-primary[aria-current="page"] { color: #fff; border-bottom: 0; }
/* Kontakt-CTA im Look des Hauptseiten-Kundenbereich-Buttons: .nav-menu a (padding .4rem 0,
   font 500/.97rem) gewinnt sonst die Kaskade gegen .btn und quetscht den Button. */
.nav-menu a.btn-primary {
  padding: .75rem 1.5rem; border-radius: 8px; font-weight: 600; font-size: 1rem;
  transition: background .2s, color .2s, box-shadow .2s, transform .2s;
}
.nav-menu a.btn-primary:hover {
  transform: translateY(-2px); box-shadow: 0 10px 25px rgba(168, 77, 14, .3);
}
.nav-cta { }
/* ---------- Dropdown „Leistungen" (27.07., CSS-only: hover + focus-within) ---------- */
.nav-item-sub { position: relative; }
.nav-item-sub > a .caret { font-size: .7em; margin-left: .3rem; display: inline-block; transition: transform .2s; }
.nav-sub {
  list-style: none; margin: 0; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-md);
  padding: .45rem; min-width: 250px; display: none; z-index: 1001;
}
/* unsichtbare Brücke gegen Hover-Abriss zwischen Link und Panel */
.nav-sub::before { content: ''; position: absolute; top: -12px; left: 0; right: 0; height: 12px; }
.nav-item-sub:hover > .nav-sub,
.nav-item-sub:focus-within > .nav-sub { display: block; }
.nav-item-sub:hover > a .caret,
.nav-item-sub:focus-within > a .caret { transform: rotate(180deg); }
.nav-sub li { margin: 0; }
.nav-sub a {
  display: block; padding: .6rem .85rem; border-radius: 8px; border-bottom: 0;
  font-size: .95rem; white-space: nowrap;
}
.nav-sub a:hover { background: var(--primary-tint); color: var(--primary-dark); border-bottom: 0; }
.nav-sub a[aria-current="page"] { color: var(--primary); font-weight: 600; }
.nav-menu .nav-parent-active > a { color: var(--primary); }
/* Logo/Badge dürfen nie von der Menüleiste überdeckt werden */
.brand { flex-shrink: 0; margin-right: 1rem; }
/* Zielfläche 44×44 px (28.07.2026, C-2): gemessen waren es 37×39 px. Die
   Balken bleiben optisch unverändert 24 px breit — nur die anklickbare
   Fläche wächst (WCAG 2.5.5, Angleichung an die Hauptseite). */
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: .4rem;
  width: 44px; height: 44px; align-items: center; justify-content: center;
  flex-direction: column;
  /* .nav ist ein Flex-Container — ohne diese Sperre schrumpft der Knopf wieder
     unter die 44 px (gemessen 37 px), weil Flex-Kinder standardmäßig nachgeben. */
  flex: 0 0 44px; min-width: 44px;
}
.nav-toggle span { display:block; width: 24px; height: 2px; background: var(--ink); margin: 3px 0; transition: .25s; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; justify-content: center;
  font-weight: 600; font-size: 1rem; line-height: 1; cursor: pointer;
  padding: .8rem 1.4rem; border-radius: 8px; border: 1px solid transparent;
  transition: background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color:#fff; text-decoration: none; box-shadow: var(--shadow-md); }
.btn-outline { background: #fff; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-tint); color: var(--primary-dark); text-decoration:none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); text-decoration:none; }
.btn-lg { padding: 1rem 1.8rem; font-size: 1.05rem; }

/* ---------- Hero ---------- */
.hero { background: var(--bg-soft); border-bottom: 1px solid var(--line); }
/* Nur vertikales Padding — das Shorthand mit „0" löschte auf index.php das
   seitliche .container-Padding (dort sind container+hero-inner EIN Element)
   → Text klebte mobil randlos (Feedback Martin 27.07.) */
.hero-inner { padding-top: 4rem; padding-bottom: 3.5rem; max-width: 820px; margin-left: auto; margin-right: auto; }
.hero h1 { margin-bottom: 1.1rem; }
.hero .lead { font-size: 1.25rem; margin-bottom: 1.8rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-note { margin-top: 1.4rem; font-size: .9rem; color: var(--muted); }

/* ---------- Breadcrumb ---------- */
.crumbs { font-size: .85rem; color: var(--muted); padding: .9rem 0; border-bottom: 1px solid var(--line-2); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }
.crumbs span[aria-current] { color: var(--ink); font-weight: 500; }

/* ---------- Karten-Raster ---------- */
.grid { display: grid; gap: 1.4rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.6rem; box-shadow: var(--shadow); transition: box-shadow .2s, border-color .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow-md); border-color: var(--primary-border); }
.card h3 { margin-bottom: .5rem; }
.card p:last-child { margin-bottom: 0; }
.card-icon {
  width: 46px; height: 46px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: var(--primary-tint); color: var(--primary); font-size: 1.35rem; margin-bottom: 1rem;
  border: 1px solid var(--primary-border);
}
.card--link { display: flex; flex-direction: column; }
.card--link .card-more { margin-top: auto; padding-top: .8rem; font-weight: 600; color: var(--primary); }

/* Ressort-/Nutzen-Liste mit Häkchen */
.checklist { list-style: none; margin-left: 0; }
.checklist li { position: relative; padding-left: 1.7rem; margin-bottom: .6rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .35em; width: 12px; height: 7px;
  border-left: 2px solid var(--primary); border-bottom: 2px solid var(--primary);
  transform: rotate(-45deg);
}

/* ---------- Problem/Lösung-Block ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; align-items: stretch; }
.panel { border-radius: var(--radius-lg); padding: 1.6rem; border: 1px solid var(--line); background:#fff; }
.panel--problem { background: var(--bg-panel); }
.panel--solution { background: var(--primary-tint); border-color: var(--primary-border); }
.panel h3 { font-size: 1.1rem; }
.panel-tag { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.panel--solution .panel-tag { color: var(--primary); }

/* ---------- Tabelle (Leistungsmatrix) ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); }
table.matrix { width: 100%; border-collapse: collapse; min-width: 640px; background:#fff; }
table.matrix th, table.matrix td { text-align: left; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .95rem; }
table.matrix thead th { background: var(--bg-soft); color: var(--ink); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
/* Agentisches Browsing 30.07.2026: Die erste Zelle jeder Zeile ist jetzt
   <th scope="row"> (Audit `td-has-header`). Damit die Optik exakt gleich
   bleibt, erbt der Zeilenkopf die td-Regeln und bekommt KEINEN eigenen
   Fettdruck — der steckt wie bisher im <strong> der Zelle. */
table.matrix tbody tr:last-child > * { border-bottom: 0; }
table.matrix tbody th { font-weight: 400; }
table.matrix tbody tr:hover { background: var(--bg-soft); }
table.matrix td strong { color: var(--ink); }

/* ---------- Statistik/Kennzahlen ---------- */
.stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.2rem; }
.stat { text-align: center; padding: 1.2rem; }
.stat .num { font-size: 2rem; font-weight: 800; color: var(--primary); line-height: 1; }
.stat .lbl { font-size: .9rem; color: var(--muted); margin-top: .4rem; }

/* ---------- Ablaufschritte ---------- */
.steps { counter-reset: step; display: grid; gap: 1.1rem; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 1rem; align-items: start; }
.step-num {
  counter-increment: step; width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary); color:#fff; font-weight: 700; display:flex; align-items:center; justify-content:center;
}
.step-num::before { content: counter(step); }
.step h3 { font-size: 1.1rem; margin-bottom: .3rem; }

/* ---------- Platzhalter-Bild-Rahmen ---------- */
.figure { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-soft); }
.figure img { width: 100%; }
.figure figcaption { padding: .7rem 1rem; font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); }
.ph-badge { font-size:.72rem; color: var(--muted); }

/* ---------- CTA-Band (hell, mit Orange-Akzent) ---------- */
.cta-band {
  background: var(--primary-tint); border: 1px solid var(--primary-border);
  border-top: 3px solid var(--primary);
  color: var(--body); border-radius: var(--radius-lg); padding: 2.4rem; text-align: center;
}
.cta-band h2 { color: var(--ink); }
.cta-band p { color: var(--body); max-width: 640px; margin: .6rem auto 1.5rem; }

/* ---------- FAQ (Aufklapp-Liste, ohne JavaScript) ---------- */
.faq { max-width: 820px; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .7rem; }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 1rem 2.8rem 1rem 1.2rem;
  font-weight: 600; color: var(--ink); position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 1.1rem; top: 50%; transform: translateY(-50%);
  color: var(--primary); font-size: 1.35rem; font-weight: 700; line-height: 1;
}
.faq-item[open] summary::after { content: "\2013"; }
.faq-item[open] summary { border-bottom: 1px solid var(--line-2); }
.faq-item summary:hover { color: var(--primary); }
.faq-body { padding: 1rem 1.2rem; }
.faq-body p:last-child { margin-bottom: 0; }

/* ---------- Formular ---------- */
.form-card { background:#fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.8rem; box-shadow: var(--shadow); }
.form-group { margin-bottom: 1.1rem; }
.form-label { display:block; font-weight: 600; color: var(--ink); margin-bottom: .35rem; font-size: .95rem; }
.form-input, .form-textarea, .form-select {
  width: 100%; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; color: var(--ink); background:#fff; transition: border-color .2s, box-shadow .2s;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(168,77,14,.12);
}
.form-textarea { min-height: 150px; resize: vertical; }
.form-hint { font-size: .82rem; color: var(--muted); margin-top: .3rem; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert { padding: .9rem 1.1rem; border-radius: 8px; margin-bottom: 1rem; font-size: .95rem; }
.alert-success { background: #ecfdf3; border: 1px solid #abefc6; color: #067647; }
.alert-error { background: #fef3f2; border: 1px solid #fecdca; color: #b42318; }

/* Kontakt-Infoblock */
.info-row { display: flex; gap: .9rem; align-items: flex-start; margin-bottom: 1.2rem; }
.info-icon { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 8px; background: var(--primary-tint); color: var(--primary); display:flex; align-items:center; justify-content:center; border:1px solid var(--primary-border); }
.info-row h4 { margin-bottom: .15rem; }
.info-row p { margin: 0; color: var(--muted); }

/* ---------- Fußzeile (hell, klar) ---------- */
.site-footer {
  background: var(--bg-soft); color: var(--body);
  border-top: 1px solid var(--line); padding: 3rem 0 1.5rem; margin-top: 0;
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr .8fr; gap: 2rem; }
/* h2 seit 28.07.2026 (B-7 — Ebenensprung im Footer); h4 bleibt als Selektor
   stehen, damit ältere eingebackene Fassungen (z. B. Generator-Ausgaben)
   optisch identisch bleiben. Beide sehen exakt gleich aus. */
.site-footer h2, .site-footer h4 { color: var(--ink); font-size: 1rem; margin-bottom: .9rem; line-height: 1.25; font-weight: 700; }
.site-footer a { color: var(--body); }
.site-footer a:hover { color: var(--primary); }
.site-footer ul { list-style: none; margin: 0; }
.site-footer li { margin-bottom: .5rem; }
.footer-brand-name { font-size: 1.05rem; }
.footer-brand p { color: var(--muted); font-size: .9rem; }
/* Siegel + Social wie Haupt-Footer (Hover per CSS, Tastatur gleichberechtigt) */
.footer-seals { display: flex; align-items: center; gap: .75rem; margin-top: 1rem; }
.footer-siegel img { display: block; opacity: .85; transition: opacity .2s; }
.footer-siegel:hover img,
.footer-siegel:focus-visible img { opacity: 1; }
.footer-socials { display: flex; align-items: center; gap: .75rem; margin-top: 1rem; }
.footer-social { color: var(--muted); transition: color .2s; }
.footer-social:hover,
.footer-social:focus-visible { color: var(--primary); }
.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;
}
.footer-bottom { border-top: 1px solid var(--line); margin-top: 2rem; padding-top: 1.2rem; font-size: .85rem; color: var(--muted); display:flex; flex-wrap:wrap; gap:.6rem 1.4rem; justify-content: space-between; }
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--primary); }

/* ---------- Glossar-/FAQ-Spiegel (27.07.) ---------- */
.glossar-letters {
  display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 2rem;
}
.glossar-letters a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.1rem; padding: .35rem .5rem; border: 1px solid var(--line);
  border-radius: 8px; font-weight: 600; font-size: .95rem; color: var(--body);
}
.glossar-letters a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
/* SEO/AEO 30.07.2026 (Welle 2): Abschnitts-Anker fuer Deep-Links aus
   Suchergebnissen und KI-Antworten. Ohne scroll-margin-top verschwindet das
   Sprungziel unter der sticky Kopfleiste (Logo 80px + Padding). Gleicher Wert
   wie bei .glossar-letter seit der Anker-Runde 29.07. */
section[id] { scroll-margin-top: 110px; }

.glossar-letter { margin: 2.2rem 0 .9rem; padding-bottom: .35rem; border-bottom: 2px solid var(--primary-border); color: var(--primary); scroll-margin-top: 110px; }
.faq-category-title { margin: 2.2rem 0 .9rem; }
.faq-item-body { padding: .2rem .2rem .6rem; }
.faq-item-body a { color: var(--primary); }

/* ---------- Utilities ---------- */
.mt-0{margin-top:0}.mt-2{margin-top:1rem}.mt-3{margin-top:1.5rem}.mt-4{margin-top:2rem}
.mb-0{margin-bottom:0}.mb-2{margin-bottom:1rem}.mb-3{margin-bottom:1.5rem}.mb-4{margin-bottom:2rem}
.text-center{text-align:center}
.reg { font-size: .6em; vertical-align: super; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
/* Navigation: mit sechs Menüpunkten bricht die Desktop-Leiste unterhalb von
   ~1080px um — Hamburger daher schon ab dieser Breite (Inhalts-Raster erst ab 760px). */
@media (max-width: 1080px) {
  .nav-toggle { display: flex; }   /* 44×44-Zielfläche, s. Basisregel oben (C-2) */
  /* Header kompakter, damit das Off-Canvas exakt darunter ansetzt (80px) */
  .brand img { height: 64px; width: 64px; }
  /* Dropdown im Off-Canvas: Unterpunkte immer sichtbar, eingerückt */
  .nav-item-sub { position: static; width: 100%; }
  .nav-item-sub > a .caret { display: none; }
  .nav-sub {
    display: block; position: static; transform: none; border: 0; box-shadow: none;
    background: transparent; padding: 0 0 0 1rem; min-width: 0; width: 100%;
  }
  .nav-sub::before { display: none; }
  .nav-sub a { white-space: normal; font-size: .92rem; }
  /* Off-Canvas per transform statt right:-100% — ein außerhalb geparktes Element
     mit negativem right vergrößert die scrollbare Seitenbreite (Seite ließ sich
     mobil seitlich verschieben, Inhalte wirkten abgeschnitten). transform erzeugt
     keinen Layout-Overflow; visibility nimmt das Menü aus Fokus/Screenreader. */
  .nav-menu {
    position: fixed; top: 80px; right: 0; width: min(80%, 320px); height: calc(100vh - 80px);
    background: #fff; border-left: 1px solid var(--line); flex-direction: column; align-items: flex-start;
    gap: .3rem; padding: 1.4rem; box-shadow: -8px 0 24px rgba(0,0,0,.06);
    transform: translateX(100%); visibility: hidden;
    transition: transform .28s ease, visibility 0s linear .28s;
  }
  .nav-menu.open { transform: none; visibility: visible; transition: transform .28s ease; }
  .nav-menu a { width: 100%; padding: .7rem 0; border-bottom: 1px solid var(--line-2); }
  .nav-menu .nav-cta { margin-top: .6rem; }
}

@media (max-width: 760px) {
  .grid-2, .grid-3, .grid-4, .split, .stats { grid-template-columns: 1fr; }

  /* Tabellen mobil als Zeilen-Karten stapeln (27.07., Feedback Martin:
     der Scroll-Wrapper schnitt die Tabelle ohne sichtbaren Hinweis ab).
     Spaltenköpfe kommen als data-label-Attribute an den Zellen mit. */
  .table-wrap { border: 0; border-radius: 0; overflow: visible; }
  table.matrix { min-width: 0; display: block; background: transparent; }
  table.matrix thead { display: none; }
  table.matrix tbody { display: block; }
  table.matrix tbody tr {
    display: block; background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius-lg); margin-bottom: .9rem; overflow: hidden;
  }
  table.matrix tbody tr:hover { background: #fff; }
  table.matrix td,
  table.matrix tbody th {
    display: block; padding: .65rem 1rem; font-size: .93rem;
    border-bottom: 1px solid var(--line);
  }
  table.matrix tbody tr td:last-child { border-bottom: 0; }
  table.matrix tbody th { background: var(--bg-soft); }
  table.matrix td[data-label]::before {
    content: attr(data-label); display: block;
    font-size: .72rem; font-weight: 600; letter-spacing: .04em;
    text-transform: uppercase; color: var(--muted); margin-bottom: .15rem;
  }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 3rem 0; }
  .cta-band { padding: 1.8rem; }

  /* Mobile-Härtung nach dem Muster der Hauptseite (aeriq.de):
     Raster-/Flex-Kinder dürfen schrumpfen (min-width:0), lange Wörter und
     Komposita brechen um, statt horizontal zu überlaufen. */
  .grid > *, .split > *, .step > div, .info-row > div { min-width: 0; }
  h1, h2, h3, h4, .faq-item summary,
  .card p, .card li, .panel p, .panel li, .faq-body p {
    word-wrap: break-word; overflow-wrap: break-word;
  }
  .brand-badge { font-size: .78rem; padding: .15rem .5rem; }
}

/* ============================================================
   Bewegung reduzieren (28.07.2026, B-1 / WCAG 2.3.3, unterstützt 2.2.2)
   Vorher enthielt dieses Stylesheet KEINE einzige
   prefers-reduced-motion-Regel (gemessen: 0). Betroffen waren das weiche
   Scrollen, alle Übergänge und der Dauer-Puls des Ton-Buttons im Video.
   Wer im Betriebssystem „Bewegung reduzieren" gesetzt hat, bekommt jetzt
   eine ruhige Seite — Funktion und Aussehen bleiben sonst unverändert.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  /* Off-Canvas darf nicht „hängen bleiben": ohne Übergang sofort schalten */
  .nav-menu { transition: none !important; }
}
