/* ==========================================================================
   Globale Styles fuer strassburg-therapie.de (Pilot: Verbundenes Atmen)

   Strategie: Mobile-First-Reset + Desktop-Layout ab >=869px.

   - Desktop (>=869px): 758px-Container, hg-home.jpg als Hintergrund, klassisches
     Lepton-Layout (Top-Nav, Main-Nav, 3-Spalten-Grid).
   - Mobile/Tablet (<869px): D2-Design — blau-grauer Gradient, Topbar mit Burger,
     Hero-Karte mit Aquarell + Claim, Pill-Button + ausklappbares Menue,
     Glass-Cards (rgba(255,255,255,0.36) + backdrop-blur).
   ========================================================================== */

/* ==========================================================================
   Webfonts (lokal gehostet — kein Google Fonts CDN, DSGVO-konform)
   Lato 400 / 700 + Source Sans 3 (Variable Font 400-700)
   Latin und Latin-Extended Subsets fuer deutsche Diakritik.
   ========================================================================== */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/lato-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/lato-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/lato-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/lato-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/source-sans-3-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/source-sans-3-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ==========================================================================
   Reset / Basis
   ========================================================================== */

* {
  box-sizing: border-box;
}

/* Bildoptimierung: Der <picture>-Wrapper (eleventy-img → AVIF/WebP + Fallback)
   ist layout-neutral — das innere <img> verhält sich wie ein direktes Kind
   seines Eltern-Elements. So greifen alle bestehenden <img>-Regeln (Float,
   Prozentbreite, Flex-Item, Zentrierung, display-Toggle) unverändert weiter. */
picture {
  display: contents;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Lato', Arial, Helvetica, sans-serif;
  font-size: 14px;
  color: #333333;
}

a {
  color: #132477;
  text-decoration: none;
}

/* ==========================================================================
   Mobile-First (D2-Design, <869px)
   ========================================================================== */

body {
  /* Aeusserer Hintergrund: echtes Bild bg_aussen.png (cover, fixed). */
  background-color: #bdc2c1;
  background-image: url(../images/bg_aussen.png);
  background-image: image-set(url(../images/bg_aussen.webp) type("image/webp"), url(../images/bg_aussen.png) type("image/png"));
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center top;
  background-attachment: fixed;
  font-family: 'Source Sans 3', 'Lato', Arial, Helvetica, sans-serif;
  color: #3a4252;
}

/* Desktop-Elemente: standardmaessig versteckt (werden ueber Media-Query gezeigt) */
.nav-top,
.nav-main {
  display: none;
}

/* Gap-Mask (Mobile): liegt fix zwischen Topbar-Unterkante und Bereich-Header-Unterkante.
   Deckt mit demselben bg_aussen.png (fixed-attachment) den Bereich ab, in dem sonst
   beim Scrollen Text-Bleed-through und Wrapper-Raender sichtbar waeren.
   z-index 5 — unter Topbar (50) und Bereich-Header (10), aber ueber Wrapper-Inhalt. */
.gap-mask {
  position: fixed;
  top: 77px;
  left: 0;
  right: 0;
  height: 21px;
  z-index: 5;
  pointer-events: none;
  background-color: #bdc2c1;
  background-image: url(../images/bg_aussen.png);
  background-image: image-set(url(../images/bg_aussen.webp) type("image/webp"), url(../images/bg_aussen.png) type("image/png"));
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center top;
  background-attachment: fixed;
}

/* Topbar (Mobile) — sticky am oberen Rand.
   Nutzt dasselbe bg_aussen.png mit identischen background-* Eigenschaften wie der Body.
   Da background-attachment: fixed ist, deckt sich das Bild der Topbar nahtlos mit
   dem Bild des Body — kein sichtbarer "Streifen" oder Trennlinie. */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px max(14px, calc((100% - 720px) / 2));
  background-color: #bdc2c1;
  background-image: url(../images/bg_aussen.png);
  background-image: image-set(url(../images/bg_aussen.webp) type("image/webp"), url(../images/bg_aussen.png) type("image/png"));
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center top;
  background-attachment: fixed;
  /* Schatten ist dynamisch — wird in app.js per Scroll-Position gesetzt.
     Fade-in beim Scrollen, fade-out wenn Bereich-Header sticky wird. */
  box-shadow: 0 6px 14px -6px rgba(15, 25, 45, 0);
  transition: box-shadow 0.05s linear;
}

.topbar-logo {
  width: 175px;
  height: auto;
}

.burger {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0;
}
.burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: #1e3a6f;
  border-radius: 2px;
}
.burger:focus-visible {
  outline: 2px solid #1e3a6f;
  outline-offset: 2px;
}

/* Hero-Karte (Mobile): Aquarell + Claim */
.hero-card {
  position: relative;
  z-index: 6;            /* ueber der Gap-Mask (z=5), damit sie bei Scroll=0 nicht ueberdeckt wird */
  width: calc(100% - 28px);
  max-width: 720px;
  margin: 1px auto 0;    /* 1px Top-Margin: Topbar (position:fixed) verdeckt sonst genau 1px vom oberen Border */
  padding: 18px;
  background: rgba(255, 255, 255, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 18px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-align: center;
}

.hero-watercolor {
  width: 72%;
  max-width: 320px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.hero-claim {
  margin: 12px 0 0 0;
  color: #1e3a6f;
  font-size: 13px;
  letter-spacing: 1.2px;
  font-weight: 500;
}
/* Drei farbige Kreis-Trenner: nach Erkennen (orange), Thematisieren (blau), Auflösen (gruen)
   Asymmetrische Margins: Kreis nah am vorhergehenden Wort, mehr Abstand zum naechsten. */
.hero-claim .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  vertical-align: middle;
  margin: 0 14px 0 2px;
  position: relative;
  top: -1px;
}
.hero-claim .dot-orange { background: #d49a3a; }
.hero-claim .dot-blue   { background: #3a9ad4; }
.hero-claim .dot-green  { background: #3aa44c; }

/* Container (Mobile): wir behalten den Container fuer Pill + Inhalt;
   Desktop-Layout wird erst in der Media-Query unten aktiviert. */
.container {
  width: calc(100% - 28px);
  max-width: 720px;
  margin: 14px auto 24px;
  padding: 0;
}

/* Content-Wrapper (Mobile, D3-a): nur Layout-Container.
   Die sichtbare Card-Border sitzt auf Sticky-Gruppe + Main-Content. So bleibt
   die Border am sticky Aufklapp-Menue, statt mit dem Gesamtwrapper zu scrollen. */
.content-wrapper {
  display: block;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  overflow: visible;
}

.sidebar {
  margin: 0;
  position: relative;
}

/* Bereich-Header (Mobile, D3-a): weisser Header oben in der Karte.
   STICKY direkt unter der Topbar — bleibt beim Scrollen sichtbar.
   Border-radius matched die Karte, damit der Header bei Sticky-Position
   auch ohne Wrapper-overflow noch rund aussieht. */
/* Sticky-Gruppe (Mobile): umfasst Bereich-Header + Sidebar(mit Pill-Menue).
   Pinnt als EIN Element am oberen Rand — das absolute Pill-Menue erscheint
   visuell darunter und bleibt mit dem Header verbunden. Body-Text scrollt
   darunter weg (z-index 10 ueber Main-Content z=0).

   Eigener Overlay-BG + Border (passend zur Main-Content-Border), damit der
   Card-Look beim Sticky-Pinning *mit* dem Bereich-Header oben bleibt. */
.bereich-sticky-group {
  position: sticky;
  top: 78px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
}

/* Bereich-Header (Mobile, D3-a): liegt im Sticky-Wrapper, daher nicht mehr
   selbst sticky. KEINE Top/Left/Right-Border (Sticky-Wrapper hat die schon),
   sonst Doppellinie. Border-Radius bleibt, damit die opaken cremefarbenen
   Ecken zur Rundung des Wrappers passen. */
.bereich-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 14px 18px;
  background: #f8f7f3;        /* deckend */
  border-bottom: 1px solid rgba(30, 58, 111, 0.10);
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
}

@media (max-width: 868px) {
  .bereich-header {
    border-bottom: 0;
  }
}

.bereich-header-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.bereich-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(30, 58, 111, 0.6);
  text-transform: uppercase;
  letter-spacing: 1.2px;   /* exakt wie Original-Design */
  line-height: normal;
  margin: 0 0 2px 0;       /* Original: 2px Gap zwischen Label-Boden und Title-Top */
}
.bereich-title {
  font-size: 17px;
  font-weight: 700;
  color: #1f2533;
  line-height: normal;
  margin: 0;
}

/* Variante fuer Seiten OHNE Aufklapp-Submenue:
   Body bekommt Klasse "no-bereich-submenu" — dann werden Label, Counter, Chevron
   ausgeblendet, der Titel rueckt nach oben (vertikal zentriert in der Header-Hoehe). */
body.no-bereich-submenu .bereich-label,
body.no-bereich-submenu .bereich-header-controls {
  display: none;
}
body.no-bereich-submenu .bereich-header {
  align-items: center;
}
body.no-bereich-submenu .pill-menu {
  display: none;
}

/* Counter-Pill + Chevron-Button (rechts in Bereich-Header) */
.bereich-header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.counter-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(30, 58, 111, 0.1);
  border-radius: 999px;
  padding: 4px 10px;       /* exakt wie Original-Design */
  font-size: 13px;
  font-weight: 600;
  color: #1e3a6f;
  line-height: 1.4;        /* gibt 26.5px Pill-Hoehe wie Original */
}

.chevron-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: rgba(30, 58, 111, 0.08);
  border: 1px solid rgba(30, 58, 111, 0.18);
  border-radius: 10px;
  color: #1f2533;
  cursor: pointer;
}
.chevron-btn svg {
  transition: transform 0.2s ease;
}
.chevron-btn[aria-expanded="true"] svg {
  transform: rotate(180deg);
}
.chevron-btn:focus-visible {
  outline: 2px solid #1e3a6f;
  outline-offset: 2px;
}

/* Pill-Menue (Mobile, D3-a): unter dem Bereich-Header, initial geschlossen.
   ACHTUNG: Diese Regel wird auch auf Desktop angewandt (Desktop-Sidebar nutzt
   .pill-menu). Daher hier nur Eigenschaften, die auf BEIDEN gelten — alle
   Mobile-spezifischen Borders, Radii usw. gehoeren in .pill-menu.is-open
   (die is-open-Klasse wird per JS nur auf Mobile getoggelt). */
.pill-menu {
  list-style: none;
  margin: 0;
  padding: 6px;
  background: #ffffff;
  border-radius: 0;
  box-shadow: 0 6px 22px rgba(20, 40, 70, 0.08);
  display: none;
  border-bottom: 1px solid rgba(30, 58, 111, 0.08);
}
/* Mobile-Aufklapp-State: bildet zusammen mit Bereich-Header die geschlossene
   Box. Border + rounded bottom corners gleich wie Bereich-Header (oben).
   position: absolute — wichtig: Pill-Menue traegt nicht zum Layout-Flow bei.
   Sonst wuerde der Browser beim Aufklappen den Scroll-Anchor anpassen
   (automatischer Scroll-Sprung, weil Main-Content nach unten "geschoben" wird).
   Mit absolute haengt das Menue visuell unter dem Bereich-Header (top: 100%
   des Sidebars, welches direkt unter dem Bereich-Header sitzt), erbt aber
   den z-index des Sticky-Wrappers — pinnt damit mit. */
.pill-menu.is-open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: -1px;
  right: -1px;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  border-left: 1px solid rgba(255, 255, 255, 0.9);
  border-right: 1px solid rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.9);
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
}

.pill-menu li {
  margin: 0;
  padding: 0;
}
.pill-menu li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  color: #3a4252;
  font-size: 15px;
  border-radius: 8px;
  text-decoration: none;
}
.pill-menu li a:hover {
  background: rgba(30, 58, 111, 0.04);
}
.pill-menu li.current a {
  background: rgba(30, 58, 111, 0.08);
  color: #1e3a6f;
  font-weight: 700;
}
.pill-menu li.current a::after {
  content: "✓";
  color: #1e3a6f;
  font-weight: 700;
  margin-left: 8px;
}
/* Aktive Eintraege bleiben in DOM-Reihenfolge (keine Order-Manipulation):
   Holotropes Atmen erscheint dadurch korrekt an Position 6, nicht oben. */

/* (Entfernt: "+ N weitere"-Toggle — alle Eintraege werden direkt angezeigt) */

/* Haupt-Inhalt (Mobile) — eigene Innen-Padding, da .content-wrapper kein Padding mehr hat */
.main-content {
  position: relative;
  z-index: 0;
  background: rgba(255, 255, 255, 0.36);
  border-left: 1px solid rgba(255, 255, 255, 0.55);
  border-right: 1px solid rgba(255, 255, 255, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
  font-size: 15.5px;
  line-height: 1.6;
  color: #3a4252;
  padding: 18px 18px 24px 18px;
}
.main-content p {
  margin: 14px 0;
}
.main-content p:first-child {
  margin-top: 0;
}
.main-content p:last-child {
  margin-bottom: 0;
}
.main-content strong {
  color: #1f2533;
  font-weight: 700;
}
.main-content a {
  color: #2c4a85;
  text-decoration: underline;
  text-decoration-color: rgba(44, 74, 133, 0.4);
}

/* ==========================================================================
   Off-Canvas-Menue (Mobile) — Drawer-Stil nach Design-Referenz
   warmes Off-White, klare Zeilen, aktiver Eintrag mit 3px Navy-Border links.
   ========================================================================== */
.offcanvas {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(86vw, 360px);
  background: #f4f3ee;                    /* warm off-white wie Referenz */
  z-index: 1001;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(.2,.8,.2,1);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.18);
}
.offcanvas.is-open {
  transform: translateX(0);
}

.offcanvas-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 25, 45, 0.5);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.offcanvas-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Header: "MENU"-Label links, Close-Button rechts */
.offcanvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #d8dde6;
}
.offcanvas-header-label {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #6b7588;
  font-weight: 600;
}
.offcanvas-close {
  position: static;       /* nicht mehr absolute */
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #d8dde6;
  background: transparent;
  color: #3b4760;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  padding: 0;
}
.offcanvas-close:hover {
  background: rgba(30, 58, 111, 0.04);
}

/* Kontakt-CTA-Gruppe — Haupt-Button + Telefon-Icon-Button nebeneinander */
.offcanvas-cta-group {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin: 14px 16px 6px;
}

/* Haupt-Kontakt-Button (links, nimmt verfuegbaren Platz) */
.offcanvas-cta {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  background: #1e3a6f;
  color: #ffffff;
  text-align: center;
  font-weight: 600;
  font-size: 15px;
  border-radius: 8px;
  text-decoration: none;
  min-height: 44px;
  border: 1px solid #1e3a6f;
}
.offcanvas-cta svg {
  flex-shrink: 0;
}
.offcanvas-cta:hover {
  background: #16305b;
}

/* Icon-Buttons (Mail / Telefon) — quadratisch, gleiche Hoehe wie Haupt-Button */
.offcanvas-cta-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-height: 44px;
  background: #1e3a6f;
  color: #ffffff;
  border-radius: 8px;
  border: 1px solid #1e3a6f;
  text-decoration: none;
  flex-shrink: 0;
}
.offcanvas-cta-icon:hover {
  background: #16305b;
}
.offcanvas-cta-icon svg {
  display: block;
}

/* Hauptmenue-Liste */
.offcanvas-nav {
  flex: 1;
  padding: 6px 0;
}
.offcanvas-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.offcanvas-list > li {
  /* Trennlinie pro Reihe (auch fuer Buttons) */
}
.offcanvas-list > li > a,
.offcanvas-list .submenu-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 22px;
  color: #18253b;
  font-size: 17px;
  font-weight: 400;
  text-decoration: none;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #e8ecf2;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}
.offcanvas-list > li:last-child > a,
.offcanvas-list > li:last-child > .submenu-trigger {
  /* letzte Zeile keine Border-Bottom */
}
.offcanvas-list > li > a:hover,
.offcanvas-list .submenu-trigger:hover {
  background: rgba(30, 58, 111, 0.025);
}

/* Aktiver Eintrag (Top-Level): Navy-Text + heller Navy-BG + 3px-Border links */
.offcanvas-list > li > a.is-active,
.offcanvas-list .has-submenu.is-active-parent > .submenu-trigger {
  color: #1e3a6f;
  font-weight: 600;
  background: rgba(30, 58, 111, 0.05);
  border-left: 3px solid #1e3a6f;
  padding-left: 19px;
}

/* Submenu-Trigger: Chevron rechts */
.submenu-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1e3a6f;
  transition: transform 0.25s ease;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.submenu-trigger[aria-expanded="true"] .submenu-chevron {
  transform: rotate(180deg);
}

/* Submenu-Liste — sanfter, eingerueckt, geringerer Kontrast */
.submenu {
  list-style: none;
  margin: 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.02);
  display: none;
  border-bottom: 1px solid #e8ecf2;
}
.submenu.is-open {
  display: block;
}
.submenu li a {
  display: block;
  padding: 12px 22px 12px 38px;       /* mehr Einrueckung als Indent */
  color: #3b4760;
  font-size: 15px;
  text-decoration: none;
  border-top: 1px solid #e8ecf2;
}
.submenu li:first-child a {
  border-top: 0;
}
.submenu li a:hover {
  background: rgba(30, 58, 111, 0.03);
  color: #1e3a6f;
}
/* Aktiver Untermenupunkt:
   anders markiert als der aktive Uebermenupunkt — Haekchen rechts statt Border links.
   So unterscheidet sich visuell die Ebene (Border links = Parent, Haekchen rechts = Sub). */
.submenu li.current a {
  color: #1e3a6f;
  font-weight: 600;
  background: rgba(30, 58, 111, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* padding-left bleibt bei 38px (Submenu-Indent), kein Left-Border */
}
.submenu li.current a::after {
  content: "✓";
  margin-left: 14px;
  color: #1e3a6f;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
}

/* Footer: Impressum + Datenschutz */
.offcanvas-footer {
  padding: 14px 22px 18px;
  border-top: 1px solid #d8dde6;
  color: #6b7588;
  font-size: 13px;
  text-align: left;
}
.offcanvas-footer a {
  color: #6b7588;
  text-decoration: none;
}
.offcanvas-footer a:hover {
  color: #1e3a6f;
  text-decoration: underline;
}
.offcanvas-footer-sep {
  color: rgba(30, 58, 111, 0.25);
  margin: 0 10px;
}

/* ==========================================================================
   Desktop-Layout (>= 869px)
   Hier ueberschreiben wir Mobile-Styles und stellen den Lepton-Look wieder her.
   ========================================================================== */

@media (min-width: 869px) {

  body {
    background: #B1BABB url(../images/hg-home.jpg) no-repeat center top;
    background-image: image-set(url(../images/hg-home.webp) type("image/webp"), url(../images/hg-home.jpg) type("image/jpeg"));
    background-attachment: scroll;
    font-family: 'Lato', Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: #333333;
  }

  /* Mobile-Only-Elemente verstecken */
  .topbar,
  .gap-mask,
  .hero-card,
  .bereich-header,
  .offcanvas,
  .offcanvas-backdrop {
    display: none !important;
  }

  /* Sticky-Wrapper aufloesen, damit Sidebar wieder direktes Grid-Kind ist */
  .bereich-sticky-group {
    display: contents;
  }

  /* Desktop-Container: 758px Center */
  .container {
    width: 758px;
    max-width: 758px;
    margin: 0 auto;
    padding-top: 139px;
    padding-left: 0;
    padding-right: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    backdrop-filter: none;
  }

  /* Desktop-Navs sichtbar */
  .nav-top {
    display: block;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: normal;
    letter-spacing: 1px;
    margin-bottom: 165px;
  }
  .nav-top a { color: #FFFFFF; text-decoration: none; }
  .nav-top a:hover { color: #132477; }
  .nav-top .current,
  .nav-top .current a { color: #132477; }

  .nav-main {
    display: block;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: normal;
    letter-spacing: 1px;
    margin-bottom: 60px;
  }
  .nav-main a { color: #FFFFFF; text-decoration: none; }
  .nav-main a:hover { color: #132477; }
  .nav-main .current a,
  .nav-main .parent a { color: #132477; }

  /* Inhalts-Bereich: Grid wie im Original (Sidebar 141 + Gap 32 + Content 585 = 758) */
  .content-wrapper {
    display: grid;
    grid-template-columns: 141px 32px 585px;
    align-items: start;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    backdrop-filter: none;
  }

  /* Sidebar (Desktop) */
  .sidebar {
    grid-column: 1;
    color: #FFFFFF;
    font-size: 14px;
    letter-spacing: normal;
    margin-bottom: 0;
    background: transparent;
    border: 0;
    padding: 0;
  }

  /* Sidebar-Liste (Desktop) — ersetzt das Mobile-Pill-Menue */
  .pill-menu {
    display: block !important;
    list-style: none;
    padding: 0;
    margin: 14px 0;
    padding-top: 19px;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    border-bottom: 0;  /* Mobile-Border-Bottom auf Desktop ausblenden */
  }
  .pill-menu li {
    padding-bottom: 20px;
    order: 0;  /* DOM-Reihenfolge auf Desktop */
  }
  .pill-menu li.current { order: 0; }
  .pill-menu li a {
    display: block;
    padding: 0;
    color: #FFFFFF;
    font-size: 14px;
    background: transparent;
    border-radius: 0;
    text-align: left;
    justify-content: flex-start;
  }
  .pill-menu li a::after {
    content: none !important;  /* Kein Häkchen im Desktop */
  }
  .pill-menu li a:hover {
    color: #132477;
    background: transparent;
  }
  .pill-menu li.current a {
    color: #132477;
    background: transparent;
    font-weight: normal;
  }

  /* Hauptinhalt rechts (Desktop) */
  .main-content {
    grid-column: 3;
    position: static;
    z-index: auto;
    background: transparent;
    border: 0;
    border-radius: 0;
    color: #333333;
    line-height: 130%;
    font-size: 14px;
    padding: 0;  /* Mobile-Padding zuruecksetzen */
  }
  .main-content a {
    color: #132477;
    text-decoration: none;
  }
  .main-content p {
    margin: 14px 0;
  }
  .main-content p:first-child {
    margin-top: 14px;  /* explizit, da Mobile :first-child auf 0 setzt */
  }
  .main-content strong {
    font-weight: bold;
    color: #333333;
  }
}

/* ============================================================
   Phase E: Body-Klassen-gesteuerte Hintergrundbilder (Desktop)
   --------------------------------------------------------------
   Additiv. Greift nur, wenn <body> die jeweilige Klasse traegt.
   Default (body ohne dieser Klassen) bleibt hg-home.jpg unveraendert.
   Mobile-Hintergrund (bg_aussen.png + watercolor.png) bleibt gleich.
   ============================================================ */
@media (min-width: 869px) {
  body.bg-themen        { background-image: url(../images/hg-themen.jpg); background-image: image-set(url(../images/hg-themen.webp) type("image/webp"), url(../images/hg-themen.jpg) type("image/jpeg")); }
  body.bg-ueberblick    { background-image: url(../images/hg-ueberblick.jpg); background-image: image-set(url(../images/hg-ueberblick.webp) type("image/webp"), url(../images/hg-ueberblick.jpg) type("image/jpeg")); }
  body.bg-therapieformen { background-image: url(../images/hg-therapieformen.jpg); background-image: image-set(url(../images/hg-therapieformen.webp) type("image/webp"), url(../images/hg-therapieformen.jpg) type("image/jpeg")); }
  body.bg-kontakt       { background-image: url(../images/hg-kontakt.jpg); background-image: image-set(url(../images/hg-kontakt.webp) type("image/webp"), url(../images/hg-kontakt.jpg) type("image/jpeg")); }

  /* Lange Seiten (Weiterfuehrende Therapie-Infos, Datenschutz): hg-home.jpg
     ist nur 1984px hoch — bei langem Content sieht man unten den Fallback-
     Color. hg-oversize.jpg (das untere Zehntel) wird nahtlos ab y=1984
     angehaengt und vertikal wiederholt, um beliebig langen Content abzudecken. */
  body.bg-extend {
    background-color: #B1BABB;
    background-image:
      url(../images/hg-home.jpg),
      url(../media/hg-oversize.jpg);
    background-position:
      center top,
      center 1984px;
    background-repeat:
      no-repeat,
      repeat-y;
    background-attachment: scroll;
  }
}

/* ============================================================
   Home-spezifisches Layout (additiv, greift nur bei body.is-home)
   --------------------------------------------------------------
   Home hat keine Sidebar-Navigation (es ist Top-Level ohne Submenu),
   nutzt aber eine interne <table> mit Text+Portrait nebeneinander.
   Desktop: Container-Breite voll nutzen (kein Sidebar-Spalten-Versatz).
   Mobile: Layout-Tabelle aufbrechen, alles untereinander stapeln.
   ============================================================ */

/* === Desktop (>=869px): Top-Level-Seiten ohne Submenu nutzen volle Container-Breite ===
   Greift bei: is-home (Home) UND no-bereich-submenu (Ihre Themen, Supervision,
   Nachsorgegruppe, Kontakt, Impressum, Honorar, Gedanken).
   Detail-/Übersichts-Seiten mit Sidebar bleiben beim 141+32+585-Grid. */
@media (min-width: 869px) {
  body.is-home .content-wrapper,
  body.no-bereich-submenu .content-wrapper {
    grid-template-columns: 1fr;
  }
  body.is-home .sidebar,
  body.no-bereich-submenu .sidebar {
    display: none;
  }
  body.is-home .main-content,
  body.no-bereich-submenu .main-content {
    grid-column: 1;
  }
  /* Original-Lepton-Layout hat 145px Linksversatz für no-Submenu Pages
     (leere Sidebar-Spalte + Spacer rendern sich zusammen zu ~145px).
     Home (is-home) hat eigene 3-Spalten-Tabelle und braucht volle Breite. */
  body.no-bereich-submenu:not(.is-home) .main-content {
    padding-left: 145px;
  }
  /* Kontakt: 40px weiter links als andere no-Submenu Pages */
  body.bg-kontakt.no-bereich-submenu .main-content {
    padding-left: 105px;
  }
}

/* === Mobile (<760px): Layout-Tabelle aufbrechen, Bilder responsive === */
@media (max-width: 868.98px) {
  /* Layout-Tabelle in vertikalen Stack umbrechen */
  body.is-home .main-content table,
  body.is-home .main-content tbody,
  body.is-home .main-content tr {
    display: block;
    width: 100%;
  }
  body.is-home .main-content td {
    display: block;
    width: 100% !important;
    padding: 0;
  }
  /* Bilder responsive skalieren, max innerhalb der Overlay-Box */
  body.is-home .main-content img {
    max-width: 100%;
    height: auto;
    display: block;
  }
  /* Spacer-Zelle ausblenden */
  body.is-home .main-content td:empty {
    display: none;
  }
  /* Portrait + Buchcover zentrieren auf Mobile (p > a img: descendant, damit ein
     evtl. <picture>-Wrapper um das Buchcover-<img> die Regel nicht aushebelt) */
  body.is-home .main-content td:last-child img,
  body.is-home .main-content p > a img {
    margin-left: auto;
    margin-right: auto;
  }
  /* Headline-Image (Wenn Ihr Leben ein Haus wäre) sauber zentrieren */
  body.is-home .main-content td:first-child > p:first-child img {
    margin-left: auto;
    margin-right: auto;
  }
}

/* ============================================================
   Layout-Hilfsklassen für Body-Content (Mobile + Desktop)
   --------------------------------------------------------------
   Werden vom Cleaner aus DB-inline-styles erzeugt.
   Nur in .main-content gescopet, damit kein Pilot-Layout-Risk.
   ============================================================ */
.main-content .float-right { float: right; margin: 0 0 12px 16px; max-width: 50%; height: auto; }
.main-content .float-left  { float: left;  margin: 0 16px 12px 0; max-width: 50%; height: auto; }
.main-content .text-center { text-align: center; }
.main-content .text-right  { text-align: right; }

/* Float-Container-Clear: nur dort wo Floats wirklich auftreten (Home + Kontakt + Therapie-Infos) */
body.is-home .main-content td::after { content: ""; display: table; clear: both; }

/* Mobile: floats deaktivieren — alles untereinander */
@media (max-width: 868.98px) {
  .main-content .float-right,
  .main-content .float-left {
    float: none;
    margin: 12px auto;
    max-width: 100%;
    display: block;
  }
}

/* ============================================================
   Home Mobile-Restructure (additiv, nur body.is-home)
   --------------------------------------------------------------
   Auf Mobile: Portrait wird nach dem 2. Text-Paragraph eingeblendet
   (mobile-only-portrait), das Original in TD2 (desktop-only) ist hidden.
   Leere Spacer-Paragraphen sind nur auf Desktop sichtbar (Original-Spacing).
   ============================================================ */
@media (min-width: 869px) {
  /* Desktop: Mobile-Portrait und Mobile-Wrapper aus */
  body.is-home .mobile-only-portrait,
  body.is-home .mobile-portrait-wrap { display: none; }
  /* Desktop: Das Portrait-Foto sitzt in der rechten Tabellenspalte, die (vertical-
     align:middle) in einer sehr hohen Zeile vertikal zentriert wird → es wirkt zu
     weit unten. 125px rein visuell nach oben rücken (position, ohne die Zeilenhöhe
     oder den restlichen Textfluss zu verändern). */
  body.is-home .main-content img.desktop-only { position: relative; top: -115px; }
}
@media (max-width: 868.98px) {
  /* Mobile: Desktop-Portrait und alle Spacer aus */
  body.is-home .desktop-only { display: none; }
  body.is-home .spacer-only { display: none; }
  /* Auch TD2 (rechter Spacer + Portrait-TD) hidden, da Portrait jetzt inline kommt */
  body.is-home .main-content tr > td:nth-child(2),
  body.is-home .main-content tr > td:nth-child(3) { display: none; }
  /* Mobile-Portrait sauber zentriert in der Box */
  body.is-home .mobile-portrait-wrap {
    text-align: center;
    margin: 16px 0;
  }
  body.is-home .mobile-only-portrait {
    max-width: 100%;
    height: auto;
    display: inline-block;
  }
}

/* Home Headline-Image (Wenn Ihr Leben…) — Mobile/Tablet: 15px oben + 15px unten am Image
   (jeweils +10px vom letzten Wert), Folge-Text 30px margin-top (+10 mehr) */
@media (max-width: 868.98px) {
  body.is-home .headline-img-p {
    margin-top: 15px;
    margin-bottom: 15px;
  }
  /* Direktes Folge-<p> ohne Spacer dazwischen: top-Margin auf 30px */
  body.is-home .headline-img-p + p:not(.spacer-only) {
    margin-top: 30px;
  }
  /* Mit dazwischenliegendem (hidden) spacer-only: trotzdem nächstes Text-p anpassen */
  body.is-home .headline-img-p + .spacer-only + p {
    margin-top: 30px;
  }
}

/* Home Mobile/Tablet: Buchcover linksbündig (override des Mittig-Defaults) */
@media (max-width: 868.98px) {
  body.is-home .main-content img.float-right,
  body.is-home .main-content img.float-left {
    margin-left: 0;
    margin-right: auto;
  }
}

/* ============================================================
   Mobile/Tablet: Lepton-Spacer aus dem Body-Content ausblenden
   --------------------------------------------------------------
   Die <p> </p> Spacer waren im Original Desktop-Layout-Hilfen.
   Auf Mobile innerhalb der schmalen Overlay-Box wirken sie als
   überflüssiger Whitespace und werden unterdrückt.
   ============================================================ */
@media (max-width: 868.98px) {
  /* Utility: Elemente nur auf Mobile verstecken (Desktop sieht sie normal) */
  .hide-on-mobile { display: none; }
  .main-content .spacer-only { display: none; }
  /* Mobile: padding-bottom moderat (8 → 14px), damit der letzte Paragraph
     genügend Luft zum Overlay-Rand hat aber kein Riesen-Whitespace entsteht */
  .main-content { padding-bottom: 14px; }
  /* Mobile: Wenn der Body mit versteckten spacer-only(s) beginnt, soll der
     erste echte Inhalt kein margin-top haben (sonst doppelter Abstand
     durch padding-top + margin-top). Deckt 1-3 leading spacers ab. */
  .main-content > .spacer-only:first-child + p,
  .main-content > .spacer-only:first-child + h1,
  .main-content > .spacer-only:first-child + h2,
  .main-content > .spacer-only:first-child + h3,
  .main-content > .spacer-only:first-child + h4,
  .main-content > .spacer-only:first-child + .spacer-only + p,
  .main-content > .spacer-only:first-child + .spacer-only + h1,
  .main-content > .spacer-only:first-child + .spacer-only + h2,
  .main-content > .spacer-only:first-child + .spacer-only + h3,
  .main-content > .spacer-only:first-child + .spacer-only + h4,
  .main-content > .spacer-only:first-child + .spacer-only + .spacer-only + p,
  .main-content > .spacer-only:first-child + .spacer-only + .spacer-only + h1,
  .main-content > .spacer-only:first-child + .spacer-only + .spacer-only + h2,
  .main-content > .spacer-only:first-child + .spacer-only + .spacer-only + h3,
  .main-content > .spacer-only:first-child + .spacer-only + .spacer-only + h4 {
    margin-top: 0;
  }
  /* Mobile: alle Body-Content-Bilder skalieren, damit sie nicht ueber die
     Overlay-Box hinausragen (z.B. Tango_Erfahrung 400px, Nachsorgegruppe-Foto). */
  .main-content img {
    max-width: 100%;
    height: auto;
  }
  /* <br> am Ende der ersten Heading-Zeile (innerhalb <strong>) auf Mobile suppressen
     → sie waren im Lepton-Editor als Spacer eingefügt, sind auf Mobile aber zu viel. */
  body.no-bereich-submenu .main-content > p:first-child strong br,
  body.no-bereich-submenu .main-content > p:first-child span br {
    display: none;
  }
}

/* ============================================================
   Kontakt-Seite: Photos-Grid, Flyer-Block, Maps-Bild, Routenplaner
   ============================================================ */

/* Kontakt-Grid: 3 Praxis-Photos + Flyer-Block. Desktop 2 Spalten / 2 Zeilen,
   Mobile 1 Spalte (alles untereinander). */
.kontakt-grid {
  margin: 24px 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 869px) {
  .kontakt-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    align-items: start;
  }
}
.kontakt-grid-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 3px 10px rgba(20, 40, 70, 0.14);
  object-fit: cover;
  aspect-ratio: 4 / 3;
}
.kontakt-grid-flyer {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}
.kontakt-flyer-image {
  display: inline-block;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(20, 40, 70, 0.18);
  transition: transform 0.2s ease;
  max-width: 100%;
}
/* Flyer-Link auf volle Spaltenbreite (max. 320px) — wie in der Original-Seite.
   Grund: das eleventy-img-<img> trägt srcset+sizes; in einem schrumpfenden
   inline-block/Flex-Kontext zieht der Browser den sizes-Wert (240px) als
   Layout-Breite heran, sodass der Flyer schmaler bliebe als die Raum-Fotos.
   width:100% macht die Breite definit → die sizes-Heuristik greift nicht mehr,
   der Flyer füllt die Rasterspalte wie die drei Fotos. */
.kontakt-grid-flyer .kontakt-flyer-image { width: 100%; max-width: 320px; }
.kontakt-flyer-image:hover {
  transform: translateY(-2px);
}
.kontakt-flyer-image img {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
}
.kontakt-flyer-caption {
  margin: 0;
  color: #3a4252;
  line-height: 1.5;
}

/* Maps-Vorschaubild — ganz unten auf der Seite */
.kontakt-map {
  margin: 30px 0 0 0;
  text-align: center;
}
@media (min-width: 869px) {
  .kontakt-map { margin-bottom: 50px; }
}
.kontakt-map a {
  display: block;
  /* Karte auf volle Inhaltsbreite (wie das Foto-Raster darüber). Ohne width:100%
     zieht der Browser – wie beim Flyer – den sizes-Wert des eleventy-img-<img>
     (530px) als Layout-Breite heran und die Karte bliebe schmaler und zentriert
     statt bündig. width:100% macht die Breite definit → Karte füllt die Spalte. */
  width: 100%;
  max-width: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(20, 40, 70, 0.18);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.kontakt-map a:hover {
  box-shadow: 0 6px 18px rgba(20, 40, 70, 0.28);
  transform: translateY(-1px);
}
.kontakt-map img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 700px;
}

/* Routenplaner-Link: Pille mit Pfeil */
.map-routenplaner-link {
  margin: 8px 0 14px 0;
}
.map-routenplaner-link a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #132477;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 12px 6px 0;
  transition: gap 0.2s ease;
}
.map-routenplaner-link a:hover {
  gap: 10px;
  text-decoration: underline;
}
.map-routenplaner-link svg {
  flex-shrink: 0;
}

/* Der "Google Maps Routenplaner"-Link steht im frei editierbaren Kontakttext
   (Markdown bzw. Writer — kein HTML nötig). Per Attribut wie im Original
   auszeichnen: fett, dunkelblau, ohne Unterstrich, mit Pfeil. Der Karten-Bild-
   Link in .kontakt-map ist ausgenommen (kein Pfeil/Fett). */
.main-content a[href*="google.com/maps"] {
  color: #132477;
  font-weight: 600;
  text-decoration: none;
}
.main-content a[href*="google.com/maps"]:hover {
  text-decoration: underline;
}
.main-content a[href*="google.com/maps"]::after {
  content: " \2192";
}
.main-content .kontakt-map a[href*="google.com/maps"] {
  color: inherit;
  font-weight: inherit;
}
.main-content .kontakt-map a[href*="google.com/maps"]::after {
  content: none;
}

/* ============================================================
   Body-Content Typografie (h1–h5, address) — für Datenschutz
   und ähnliche längere Texte
   ============================================================ */
.main-content h1 {
  color: #333333;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.2;
  margin: 42px 0 14px;
}
.main-content h1:first-child { margin-top: 0; }

.main-content h2 {
  color: #333333;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  margin: 34px 0 14px;
}
.main-content h2:first-child { margin-top: 0; }

.main-content h3 {
  color: #333333;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin: 24px 0 10px;
  padding-top: 6px;
  border-top: 1px solid rgba(30, 58, 111, 0.12);
}
.main-content h3:first-of-type { border-top: 0; padding-top: 0; }

.main-content h4 {
  color: #333333;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  margin: 22px 0 8px;
}

.main-content h5 {
  color: #333333;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  margin: 16px 0 6px;
}

.main-content h6 {
  color: #333333;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  margin: 14px 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Zitat (blockquote) — eingerückter, dezent hinterlegter Block. Optik an den
   address-Block angelehnt (gleicher Akzentrand/Hintergrund) für ein einheitliches
   Bild. Wird über den „Zitat"-Knopf der Editor-Leiste erzeugt. */
.main-content blockquote {
  margin: 18px 0;
  padding: 10px 18px;
  border-left: 3px solid rgba(30, 58, 111, 0.4);
  background: rgba(30, 58, 111, 0.04);
  border-radius: 0 4px 4px 0;
  color: #4a5568;
  font-style: italic;
}
.main-content blockquote p { margin: 6px 0; }
.main-content blockquote p:first-child { margin-top: 0; }
.main-content blockquote p:last-child { margin-bottom: 0; }

.main-content address {
  font-style: normal;
  margin: 8px 0 14px;
  padding: 10px 14px;
  background: rgba(30, 58, 111, 0.04);
  border-left: 3px solid rgba(30, 58, 111, 0.4);
  border-radius: 4px;
  line-height: 1.6;
}

.main-content ul { margin: 10px 0 14px 0; padding-left: 24px; }
.main-content ul li { margin-bottom: 6px; }

/* ============================================================
   Generische Mobile/Desktop-Image-Switches (auch außerhalb is-home)
   ============================================================ */
@media (min-width: 869px) {
  .main-content .mobile-image-wrap,
  .main-content .mobile-only-block-image { display: none; }
}
@media (max-width: 868.98px) {
  .main-content img.desktop-only { display: none; }
  .main-content .mobile-image-wrap {
    text-align: center;
    margin: 18px 0;
  }
  .main-content .mobile-only-block-image {
    max-width: 100%;
    height: auto;
    display: inline-block;
    border-radius: 4px;
  }
}

/* ==========================================================================
   Mobile-CTA-Sektion (alle Seiten) — selbe Optik wie offcanvas-cta-group:
   grosser "Kontakt aufnehmen" + quadratisches Telefon-Icon nebeneinander.
   ========================================================================== */
.mobile-cta-section {
  display: none;
}

@media (max-width: 868.98px) {
  .mobile-cta-section {
    display: flex;
    align-items: stretch;
    gap: 8px;
    margin-top: 24px;
    padding: 0 0 12px;
  }
  a.mobile-cta-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 14px;
    background: #1e3a6f;
    color: #ffffff;
    text-align: center;
    font-weight: 600;
    font-size: 15px;
    border-radius: 8px;
    text-decoration: none;
    min-height: 44px;
    border: 1px solid #1e3a6f;
  }
  a.mobile-cta-main svg {
    flex-shrink: 0;
  }
  a.mobile-cta-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-height: 44px;
    background: #1e3a6f;
    color: #ffffff;
    border-radius: 8px;
    border: 1px solid #1e3a6f;
    text-decoration: none;
    flex-shrink: 0;
  }
  a.mobile-cta-icon svg {
    display: block;
  }
}

/* Mobile-Geraete >= 560px breit: "Kontakt aufnehmen" nur noch auf halber Breite
   (linksbuendig), damit er auf breiteren Phones/Tablets nicht uebermaessig
   gestreckt aussieht. */
@media (min-width: 560px) and (max-width: 868.98px) {
  a.mobile-cta-main {
    flex: 0 0 calc(50% - 4px);
  }
}

/* ==========================================================================
   iOS Safari/Chrome Fix (Mobile only):
   - body-bg via body::before mit position:fixed (viewport-stabil).
   - Topbar wird position:FIXED statt sticky (iOS WebKit bricht sticky bei
     bg-attachment:fixed → fixed umgeht das Problem komplett). Body padding-
     top kompensiert den Flow-Verlust.
   - Topbar und Gap-Mask haben transparente bg + ein ::before-Pseudo mit
     position:absolute (relativ zum fixed-parent). Overflow:hidden auf parent
     clipt das pseudo auf parent-Hoehe. Pseudo zeigt denselben Viewport-
     relativen Bildausschnitt wie das Body-Pseudo → nahtloser Look.
   Desktop unveraendert (Topbar ist auf Desktop display:none).
   ========================================================================== */
@media (max-width: 868.98px) {
  body {
    background-image: none;
    padding-top: 77px;  /* Platz fuer position:fixed Topbar */
  }
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-color: #bdc2c1;
    background-image: url(../images/bg_aussen.png);
  background-image: image-set(url(../images/bg_aussen.webp) type("image/webp"), url(../images/bg_aussen.png) type("image/png"));
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center top;
    z-index: -1;
    pointer-events: none;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    will-change: transform;
  }

  .topbar {
    position: fixed;
    left: 0;
    right: 0;
    /* top: 0 ist schon im base CSS */
    background-image: none;
    background-attachment: scroll;
    overflow: hidden;
  }
  .topbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #bdc2c1;
    background-image: url(../images/bg_aussen.png);
  background-image: image-set(url(../images/bg_aussen.webp) type("image/webp"), url(../images/bg_aussen.png) type("image/png"));
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center top;
    z-index: -1;
    pointer-events: none;
  }

  .gap-mask {
    background-image: none;
    background-attachment: scroll;
    overflow: hidden;
  }
  .gap-mask::before {
    content: '';
    position: absolute;
    top: -77px;   /* gap-mask sitzt 77px unter viewport-top; pseudo um 77px
                     hoch verschieben, damit es bei viewport-y 0 beginnt */
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #bdc2c1;
    background-image: url(../images/bg_aussen.png);
  background-image: image-set(url(../images/bg_aussen.webp) type("image/webp"), url(../images/bg_aussen.png) type("image/png"));
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center top;
    z-index: -1;
    pointer-events: none;
  }
}

/* ============================================================
   „Bild"-Baustein  (CMS-Inhaltsbaustein, src/admin/bild-baustein.js)
   --------------------------------------------------------------
   Im Seiten-Text eingefügt als {% bild … %} -> <figure class="bild bild--POS"
   style="width:N%">. Breite (25/50/75/100 %) steht inline am <figure>; Position
   = left/center/right (links/rechts: Text umfließt; center: eigene Zeile).
   Mobile/Tablet: immer volle Breite, untereinander. Nur in .main-content.
   ============================================================ */
.main-content .bild { margin: 18px 0; max-width: 100%; clear: both; }
.main-content .bild img { display: block; width: 100%; height: auto; border-radius: 8px; }
.main-content .bild a { display: block; border: 0; text-decoration: none; }
/* Bildunterschrift (figcaption) — liegt IM <figure> und nimmt dessen Breite/
   Ausrichtung an, steht also direkt unter dem Bild, auch bei schmaleren links/
   rechts ausgerichteten Bildern. Dezent, klein, kursiv. */
.main-content .bild figcaption,
.main-content .bild-caption {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.4;
  font-style: italic;
  color: #6b7280;
  text-align: center;
}
/* Zentriert = immer eigener Block, Folge-Text darunter. */
.main-content .bild--center { margin-left: auto; margin-right: auto; }
/* Textfluss „wrap": Text umfliesst das links/rechts ausgerichtete Bild (float).
   margin-top:0 → das Bild beginnt exakt auf Höhe der danebenstehenden Überschrift
   (die per `.bild--flow-wrap + *{margin-top:0}` ebenfalls ganz oben sitzt); 4px oben
   hätten das Bild 4px unter die Überschrift geschoben. */
.main-content .bild--flow-wrap.bild--left  { float: left;  margin: 0 20px 12px 0; }
.main-content .bild--flow-wrap.bild--right { float: right; margin: 0 0 12px 20px; }
/* Textfluss „block": Bild links/rechts ausgerichtet, Folge-Text beginnt DARUNTER. */
.main-content .bild--flow-block.bild--left  { float: none; margin-right: auto; }
.main-content .bild--flow-block.bild--right { float: none; margin-left: auto; }
/* Textfluss „reihe": mehrere Bilder NEBENEINANDER in einer Reihe. Das globale
   .bild{clear:both} (und die clear-Regeln unten) würden jedes Folgebild sonst UNTER
   das vorige zwingen → hier explizit clear:none. Breite kommt inline (z. B. 33 % je
   Bild bei drei Bildern); box-sizing:border-box (global) hält padding INNERHALB der
   Breite, sodass 3×33 % + Innenabstand zusammen in eine Zeile passen. Folge-Text nach
   der Reihe räumt über die bestehende `.bild + *`-Regel automatisch nach unten. */
.main-content .bild--flow-reihe { clear: none !important; float: left; margin: 4px 0 12px 0; padding-right: 14px; }
/* „Reihe"-Layout ({% bild … "reihe" %}): mehrere Bilder NEBENEINANDER, danach soll
   der Folge-Text UNTER der ganzen Reihe beginnen (nicht in eine Lücke neben einem
   der Bilder rutschen). Das Element, das DIREKT auf ein Reihen-Bild folgt, räumt die
   Floats frei. Bewusst nur der direkte Nachbar (`+`), NICHT `~`: Reihen-Bilder stehen
   ohnehin unmittelbar nebeneinander — ein `~` griffe dagegen über einen {% breit %}-
   Trenner hinweg in eine SPÄTERE, eigenständige Sektion und zerstörte dort das
   Umfließen (die Überschrift des nächsten links/rechts umflossenen Bildes landete
   dann UNTER statt neben dem Bild). Das nächste Bild der Reihe hat clear:none
   !important (Regel oben) → bleibt in der Reihe; nur der Text danach räumt frei. */
.main-content .bild--flow-reihe + * { clear: both; }
/* Zickzack/„Text neben Bild": das Element, das DIREKT auf ein links/rechts umflossenes
   Bild folgt (die Überschrift bzw. der erste Absatz), soll auf GLEICHER HÖHE wie der
   Bildoberrand beginnen. Ohne dies drückt der große margin-top einer Überschrift
   (h2: 28px, h3: 28px + Trennlinie) sie sichtbar UNTER den Bildoberrand — der Abschnitt
   sieht dann „verrutscht" aus. margin-top:0 richtet die Oberkanten bündig aus (das Bild
   hat selbst nur 4px oben); der Textbaustein liegt damit optisch auf Bildhöhe. */
.main-content .bild--flow-wrap.bild--left  + *,
.main-content .bild--flow-wrap.bild--right + * { margin-top: 0; }
/* h3 bringt zusätzlich eine Trennlinie (border-top + padding-top) mit — direkt neben dem
   Bild stört die Linie und schiebt den Text nach unten; hier neutralisieren. */
.main-content .bild--flow-wrap.bild--left  + h3,
.main-content .bild--flow-wrap.bild--right + h3 { border-top: 0; padding-top: 0; }
/* „Neuer Absatz (nach Bild)"-Markierung ({% breit %}, breit-baustein.js): unsichtbares Element,
   das die vorausgehenden Float-Bilder freiräumt. Der folgende Absatz beginnt damit
   UNTER dem (linken/rechten) Bild und läuft voll breit → steht „zwischen" zwei
   Bildern, wenn das nächste Bild danach folgt. Selbst keine Höhe/Abstand. */
.main-content .breit-trenner { clear: both; height: 0; margin: 0; padding: 0; border: 0; font-size: 0; line-height: 0; }
/* Floats sauber einschließen, damit Folge-Text/-Abstand nicht überlappt */
.main-content::after { content: ""; display: table; clear: both; }

/* Mobile/Tablet: Floats deaktivieren — Bild volle Breite, untereinander */
@media (max-width: 868.98px) {
  .main-content .bild { float: none !important; width: 100% !important; margin: 16px auto !important; }
}

/* FAQ-Baustein ({% faq %} … {% endfaq %}, siehe .eleventy.js): aufklappbares Accordion.
   Global & auf .faq-block gescoped (kein Eingriff in andere Seiten). Der KI-Assistent
   erzeugt die Struktur; der Kunde bearbeitet die Texte normal im Editor. */
.main-content .faq-block { clear: both; margin: 22px 0; }
.main-content .faq-item {
  border: 1px solid #d8deea; border-radius: 8px; margin: 10px 0; background: #fff; overflow: hidden;
}
.main-content .faq-item > summary {
  list-style: none; cursor: pointer; padding: 15px 46px 15px 18px; position: relative;
  font-weight: 600; color: #132477; line-height: 1.4;
}
.main-content .faq-item > summary::-webkit-details-marker { display: none; }
.main-content .faq-item > summary::after {
  content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  font-weight: 400; font-size: 22px; line-height: 1; color: #132477;
}
.main-content .faq-item[open] > summary::after { content: "\2212"; } /* − */
.main-content .faq-item[open] > summary { border-bottom: 1px solid #eef1f7; }
.main-content .faq-antwort { padding: 12px 18px 4px; color: #333333; }
.main-content .faq-antwort > :first-child { margin-top: 0; }
.main-content .faq-antwort > :last-child { margin-bottom: 12px; }

/* „Nebeneinander"-Baustein ({% nebeneinander %} … +++ … {% endnebeneinander %}, siehe
   .eleventy.js): mehrere Spalten in einer Reihe — z. B. Text | Bild | Text. Gleich breite
   Spalten, vertikal mittig ausgerichtet; auf Handy/Tablet untereinander. */
.main-content .spalten { display: flex; gap: 26px; align-items: stretch; clear: both; margin: 22px 0; }
.main-content .spalten > .spalte { flex: 1 1 0; min-width: 0; }
.main-content .spalten > .spalte > :first-child { margin-top: 0; }
.main-content .spalten > .spalte > :last-child { margin-bottom: 0; }
/* Ein Bild in einer Spalte füllt die Spalte (kein Float, keine feste Breite). */
.main-content .spalten > .spalte .bild { width: 100% !important; max-width: 100% !important; float: none !important; clear: none !important; margin: 0 auto !important; }
@media (max-width: 868.98px) {
  .main-content .spalten { flex-direction: column; gap: 14px; align-items: stretch; }
}

/* „Freies Layout"-Baustein ({% layout "css" %} … +++ … {% endlayout %}, siehe .eleventy.js):
   Die KI entwirft das Grid/Flex FREI — das Container-CSS steht inline im Marker (.frei-layout).
   Hier nur neutrale Basis + Sicherheitsnetz: Slots sind oben/unten bündig, ein Bild sprengt den
   Slot nicht, ein sinnvoller Standard-Abstand (gap) greift, falls die KI keinen setzt. Auf
   Handy/Tablet fällt alles auf Untereinander zurück (ein inline-Grid kann kein @media tragen). */
.main-content .frei-layout { clear: both; margin: 22px 0; gap: 26px; }
.main-content .frei-slot { min-width: 0; }
.main-content .frei-slot > :first-child { margin-top: 0; }
.main-content .frei-slot > :last-child { margin-bottom: 0; }
.main-content .frei-slot .bild { float: none !important; clear: none !important; max-width: 100% !important; }
/* ÜBERSCHRIFT oben EXAKT bündig mit einem Bild in der Nachbarspalte: ein Bild beginnt genau an
   der Box-Oberkante, eine Überschrift NICHT — Zeilenhöhe + Schrift-Metrik lassen die Groß-
   buchstaben ~0.29em tiefer starten. Dieser negative Rand zieht die Kappenhöhe der ersten
   Überschrift eines Slots exakt auf die Bildoberkante (empirisch für Lato gemessen: Cap ≈
   0.716em, Ascent-zu-Cap-Vorlauf 0.284em; deckt h2–h4 ab, größenunabhängig via em). */
.main-content .frei-layout > .frei-slot > h2:first-child,
.main-content .frei-layout > .frei-slot > h3:first-child,
.main-content .frei-layout > .frei-slot > h4:first-child { margin-top: -0.29em; }
@media (max-width: 868.98px) {
  .main-content .frei-layout { display: block !important; }
  .main-content .frei-slot { width: auto !important; }
  .main-content .frei-slot + .frei-slot { margin-top: 18px; }
}

/* „Kasten"-Baustein ({% kasten %} … {% endkasten %}, siehe .eleventy.js): gerahmter /
   getönter Container. Mit {% nebeneinander %} kombiniert werden daraus Karten. */
.main-content .box { border-radius: 10px; padding: 16px 20px; margin: 20px 0; clear: both; }
.main-content .box > :first-child { margin-top: 0; }
.main-content .box > :last-child { margin-bottom: 0; }
.main-content .box--neutral { background: #f4f6fb; border: 1px solid #e2e7f0; }
.main-content .box--akzent { background: #eef3fb; border: 1px solid #dbe4f4; border-left: 4px solid #132477; }
.main-content .box--hinweis { background: #eef7ff; border: 1px solid #cfe2f6; }
/* Spalten füllen die Zeilenhöhe (align-items:stretch). Inhalt OBEN ausrichten
   (flex-start) — so beginnen die Überschriften/Texte ALLER Spalten auf gleicher Höhe und
   bündig mit einem Bild in einer Nachbarspalte. (Früher justify-content:center → kürzere
   Spalten wurden vertikal zentriert → Überschriften standen auf unterschiedlicher Höhe,
   keine war mit dem Bild bündig.) Karten (Kasten) füllen die Spalte via height:100%, für
   sie ist die Ausrichtung ohnehin egal. */
.main-content .spalten > .spalte { display: flex; flex-direction: column; justify-content: flex-start; }
.main-content .spalten > .spalte > .box { margin: 0; height: 100%; box-sizing: border-box; }

/* „Knopf"-Baustein ({% knopf %} … {% endknopf %}): DEZENTER Text-Link (kein gefüllter
   Button — der würde nicht zum zurückhaltenden Desktop-Stil passen). Unterstrichener
   Text (wie normale Links) + Pfeil daneben. Der mobile Kontakt-Button unten ist ein
   ANDERES Element (eigene Klasse) und bleibt unberührt. */
.main-content .btn-zeile { margin: 16px 0; }
.main-content a.btn-cta {
  display: inline-block; color: #2c4a85; text-decoration: none;
  background: none; padding: 0; border: 0; border-radius: 0; font-weight: inherit;
}
.main-content a.btn-cta .btn-txt { text-decoration: underline; text-decoration-color: rgba(44, 74, 133, 0.4); }
.main-content a.btn-cta::after { content: "\00a0\2192"; text-decoration: none; } /* geschütztes Leerzeichen + → */
.main-content a.btn-cta:hover .btn-txt { text-decoration-color: #2c4a85; }
.main-content .spalten .btn-zeile { margin: 10px 0 0; }

/* ═══ Weitere KI-Bausteine (.ki-*) — Optik rein per CSS, Inhalt = normales Markdown ═══ */

/* Abstand: vertikaler Leerraum, räumt Float-Bilder frei (wie {% breit %}, nur mit Höhe). */
.main-content .ki-abstand { clear: both; }
.main-content .ki-abstand--klein { height: 14px; }
.main-content .ki-abstand--mittel { height: 34px; }
.main-content .ki-abstand--gross { height: 48px; }

/* Trenner: dezente horizontale Linie. */
.main-content hr.ki-trenner { clear: both; border: 0; border-top: 1px solid #e2e7f0; margin: 30px 0; }

/* Intro/Lead: größerer, ruhiger Einleitungs-Absatz. */
.main-content .ki-intro { clear: both; margin: 6px 0 22px; }
.main-content .ki-intro > :first-child { margin-top: 0; }
.main-content .ki-intro p { font-size: 1.15em; line-height: 1.6; color: #3a3f4a; }

/* Zitat / Testimonial (letzte „—"-Zeile = Quelle → figcaption). */
.main-content .ki-zitat { clear: both; margin: 26px 0; padding: 2px 0 2px 22px; border-left: 4px solid #132477; }
.main-content .ki-zitat blockquote { margin: 0; font-size: 1.1em; font-style: italic; color: #333; }
.main-content .ki-zitat blockquote > :first-child { margin-top: 0; }
.main-content .ki-zitat blockquote > :last-child { margin-bottom: 0; }
.main-content .ki-zitat figcaption { margin-top: 8px; font-size: 0.92em; color: #6b7280; }
.main-content .ki-zitat figcaption::before { content: "— "; }

/* Merkmale: Häkchen-Liste (normale „- "-Liste, CSS macht die Haken). */
.main-content .ki-merkmale { clear: both; margin: 18px 0; }
.main-content .ki-merkmale ul { list-style: none; padding-left: 0; margin: 0; }
.main-content .ki-merkmale li { position: relative; padding-left: 30px; margin: 9px 0; }
.main-content .ki-merkmale li::before { content: "✓"; position: absolute; left: 0; top: 0; color: #132477; font-weight: 700; }

/* Schritte: nummerierter Ablauf — jede ###-Überschrift = ein Schritt (CSS nummeriert). */
.main-content .ki-schritte { clear: both; counter-reset: ki-schritt; margin: 20px 0; }
.main-content .ki-schritte h3 { position: relative; padding: 3px 0 3px 46px; margin: 22px 0 6px; border-top: 0; min-height: 32px; }
.main-content .ki-schritte h3:first-child { margin-top: 0; }
.main-content .ki-schritte h3::before {
  counter-increment: ki-schritt; content: counter(ki-schritt);
  position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%;
  background: #132477; color: #fff; font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.main-content .ki-schritte h3 + p { margin-left: 46px; }

/* Sprechzeiten & Preise: getönte Box mit Liste (Gemini macht den Schlüssel **fett**). */
.main-content .ki-zeiten, .main-content .ki-preise {
  clear: both; margin: 20px 0; padding: 12px 20px; background: #f4f6fb; border: 1px solid #e2e7f0; border-radius: 10px;
}
.main-content .ki-zeiten > :first-child, .main-content .ki-preise > :first-child { margin-top: 0; }
.main-content .ki-zeiten ul, .main-content .ki-preise ul { list-style: none; padding-left: 0; margin: 0; }
.main-content .ki-zeiten li, .main-content .ki-preise li { padding: 8px 0; border-bottom: 1px solid #e6eaf2; }
.main-content .ki-zeiten li:last-child, .main-content .ki-preise li:last-child { border-bottom: 0; }

/* Kontaktbox: hervorgehobene Kontakt-/Handlungs-Box, zentriert. */
.main-content .ki-kontaktbox {
  clear: both; margin: 24px 0; padding: 20px 24px; text-align: center;
  background: #eef3fb; border: 1px solid #dbe4f4; border-radius: 12px;
}
.main-content .ki-kontaktbox > :first-child { margin-top: 0; }
.main-content .ki-kontaktbox > :last-child { margin-bottom: 0; }
.main-content .ki-kontaktbox .btn-zeile { text-align: center; }

/* Zahlen/Kennzahlen: ###-Zahl groß & farbig, Folgeabsatz als Beschriftung. */
.main-content .ki-zahlen { clear: both; margin: 24px 0; }
.main-content .ki-zahlen h3 { border-top: 0; padding-top: 0; margin: 18px 0 2px; font-size: 2em; color: #132477; line-height: 1.1; }
.main-content .ki-zahlen h3:first-child { margin-top: 0; }
.main-content .ki-zahlen h3 + p { margin: 0 0 8px; color: #6b7280; }

/* Zusammenfassung: „Das Wichtigste in Kürze" — getönte Info-Box. */
.main-content .ki-summary { clear: both; margin: 24px 0; padding: 16px 22px; background: #eef7ff; border: 1px solid #cfe2f6; border-radius: 12px; }
.main-content .ki-summary > :first-child { margin-top: 0; }
.main-content .ki-summary > :last-child { margin-bottom: 0; }

/* ═══════════════════════════════════════════════════════════════════════════
   Gleichmäßige Abschnitts-Abstände + einheitliche Inhalts-Tabellen
   --------------------------------------------------------------------------
   Deterministische Normalisierung, damit KI-Seiten überall gleichmäßig
   aussehen — und im Editor (Frontend-Vorschau) IDENTISCH zur Live-Seite, weil
   rein .main-content-/klassen-basiert (kein body-scope, greift auch im Shadow-
   DOM der Vorschau).
   ═══════════════════════════════════════════════════════════════════════════ */

/* GLEICHMÄSSIGE ABSCHNITTS-ABSTÄNDE.
   Vorher schwankte der Abstand ÜBER einer Sektion: begann sie mit einem
   umflossenen Bild → margin-top:0 (klebte oben), begann sie mit einer nackten
   Überschrift → 28px + Float-Freiraum (große Lücke). Das sah ungleichmäßig aus.
   Jetzt bekommt der ERSTE Block nach jedem Sektions-Trenner ({% breit %}) und
   nach dem Intro denselben festen Abstand — egal ob Bild oder Überschrift folgt.
   (Die „Überschrift klebt oben am Bild"-Regel WEITER innerhalb der Sektion gilt,
   weil sie auf `.bild + *` zielt, nicht auf `.breit-trenner + *`.) */
/* Der Abstand kommt vom TRENNER SELBST (feste Höhe) bzw. vom Intro-Unterrand — NICHT
   vom margin-top des Folgeblocks. Wichtig, weil ein umflossenes Bild (float) und die
   danebenstehende Überschrift SEPARAT fließen: ein margin-top am Bild schöbe nur das
   Bild nach unten, die Überschrift bliebe oben → sie stünden nicht mehr auf gleicher
   Höhe. Trenner-Höhe dagegen schiebt die GANZE Sektion (Bild + Überschrift) gemeinsam. */
.main-content .breit-trenner { height: 34px; }
.main-content .ki-intro { margin-bottom: 34px; }
/* Der erste Block der neuen Sektion (Bild ODER Überschrift) klebt oben am Trenner:
   in Bild-Sektionen bleibt die Überschrift damit auf Bildhöhe, in Sektionen ohne Bild
   entsteht kein doppelter Abstand. So ist der Abstand über JEDER Sektion gleich (34px). */
.main-content .breit-trenner + *,
.main-content .ki-intro + * { margin-top: 0 !important; }
/* {% abstand %} bestimmt den Abstand SELBST (über seine Höhe). Der Folgeblock darf
   keinen eigenen margin-top mehr draufpacken, sonst stapeln sich Spacer +
   Überschriften-Abstand zu einer riesigen Lücke (zuletzt über „Weitere Hinweise"
   ~100px). So ist {% abstand mittel %} = genau 34px, planbar. */
.main-content .ki-abstand + * { margin-top: 0 !important; }
/* …und die ANDERE Seite: ein Element DIREKT VOR einem {% abstand %}/{% breit %} gibt seinen
   unteren Rand ab. Sonst summieren sich Element-Rand (z. B. Intro 34px, Layout 22px) + Spacer-
   Höhe zu einer viel zu großen Lücke. So liefert AUSSCHLIESSLICH der Abstand-Block die Lücke. */
.main-content > *:has(+ .ki-abstand),
.main-content > *:has(+ .breit-trenner) { margin-bottom: 0 !important; }

/* EINHEITLICHE INHALTS-TABELLEN.
   Markdown-Tabellen im Seitentext (| … |) tragen automatisch die Klasse
   .inhalt-tabelle — gesetzt vom Markdown-Renderer (.eleventy.js, live) UND von
   der Editor-Vorschau (frontend-vorschau.js). Dadurch:
   • einheitliche, dezente Optik OHNE dass die KI eigenes Tabellen-CSS schreibt;
   • von Haus aus mobil-sicher: die Tabelle passt sich per Umbruch der verfügbaren
     Breite an (max-width:100%), statt die Seite breiter zu machen — auf schmalen
     Handys zusätzlich kleinere Schrift/Innenabstände;
   • Kopfzeile IDENTISCH in Vorschau und live: live liefert <thead><th>, die
     Slate-Editor-Vorschau eine erste <tr> mit <td> OHNE <thead> — beide als Kopf.
   Die Layout-Tabelle der Startseite trägt die Klasse NICHT und bleibt unberührt. */
.main-content table.inhalt-tabelle {
  width: 100%; max-width: 100%; border-collapse: collapse; clear: both;
  margin: 22px 0; font-size: 0.95em; line-height: 1.45;
}
.main-content table.inhalt-tabelle th,
.main-content table.inhalt-tabelle td {
  padding: 10px 14px; text-align: left; vertical-align: top;
  border-bottom: 1px solid #e6eaf2; overflow-wrap: break-word;
}
.main-content table.inhalt-tabelle thead th,
.main-content table.inhalt-tabelle:not(:has(thead)) tr:first-child td {
  background: #f4f6fb; font-weight: 700; color: #1f2533; border-bottom: 2px solid #dbe1ee;
}
.main-content table.inhalt-tabelle tbody tr:nth-child(even) td { background: #fafbfe; }
@media (max-width: 868.98px) {
  .main-content table.inhalt-tabelle { font-size: 0.8rem; }
  .main-content table.inhalt-tabelle th,
  .main-content table.inhalt-tabelle td { padding: 7px 9px; }
}
