/* =====================================================================
   bsp_styles – Stylesheet Bike Special Parts für Contao 5.7
   Erstellt:      2026-11-11
   Überarbeitet:  2026-11-30 12:20 (Knöpfe: kräftigerer Rand beim Darüberfahren nach außen statt nach innen)
   ===================================================================== */


/* ---------------------------------------------------------------------
   0. Schriften – Fließtext IBM Plex Sans (IBM, SIL Open Font License, Datei
   IBMPlexSans-OFL.txt), Überschriften Montserrat; alle im Ordner fonts neben css
   --------------------------------------------------------------------- */
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/IBMPlexSans-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/IBMPlexSans-LightItalic.woff2") format("woff2");
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/IBMPlexSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/IBMPlexSans-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/IBMPlexSans-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/IBMPlexSans-SemiBoldItalic.woff2") format("woff2");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";   /* Überschriften; Google Fonts, SIL Open Font License */
  src: url("../fonts/Montserrat-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}


/* ---------------------------------------------------------------------
   1. Variablen – für eine neue Website nur diesen Block anpassen
   --------------------------------------------------------------------- */
:root {
  /* Grundfarbe. Alles andere wird daraus berechnet. */
  --color-primary:        #1e28ad;
  --color-primary-dark:   color-mix(in srgb, var(--color-primary) 70%, black);   /* Footer */
  --color-primary-light:  color-mix(in srgb, var(--color-primary) 14%, white);   /* aktiver Menüpunkt, Linien */
  --color-primary-pale:   color-mix(in srgb, var(--color-primary) 6%,  white);   /* jede zweite Sektion */
  --color-primary-deep:   color-mix(in srgb, var(--color-primary) 40%, #05060f); /* sehr dunkles Blau: Klappmenü */

  --color-heading:        var(--color-primary-dark);   /* Überschriften: dunkler als das Logoblau, wirkt bei großer Schrift satter */
  --color-text:           color-mix(in srgb, var(--color-primary) 12%, #1a1a1a); /* fast schwarz, leicht blau */
  --color-text-muted:     color-mix(in srgb, var(--color-primary) 10%, #555);
  --color-surface:        #fff;
  --gradient-dark:        radial-gradient(ellipse 80% 140% at 20% -10%, rgb(90 100 230 / .30), transparent 65%),
                          linear-gradient(170deg, #161b5e 0%, #0b0e33 60%, #070820 100%);   /* Footer und Angebot: sattes, tiefes Blau mit Licht oben links */
  --gloss-edge:           linear-gradient(180deg, rgb(255 255 255 / .10) 0, rgb(255 255 255 / 0) 2px);   /* feiner Glanzstreifen an der Oberkante */
  --color-alert:          #b3261e;   /* Notfall-Kasten; mit weißer Schrift ausreichender Kontrast */

  /* Schrift */
  --font-family:          "IBM Plex Sans", system-ui, sans-serif;  /* Fließtext */
  --font-weight-text:     300;       /* Light; Hervorhebungen (strong) 600 */
  --font-family-heading:  "Montserrat", var(--font-family);   /* Überschriften, Menü, Rufnummer */
  --line-height:          1.65;   /* luftiger als 1.5 */
  --line-height-heading:  1.2;

  /* Schriftgrößen: 5 Stufen, Verhältnis 1,25 */
  --font-scale:           1.25;      /* Verhältnis zwischen zwei Schriftgrößen (große Terz) */
  --font-size-small:      calc(var(--font-size-normal) / var(--font-scale));   /* 14,4 Pixel (Smartphone 13,6): Bildunterschrift, Kleingedrucktes */
  --font-size-normal:     1.125rem;  /* 18 Pixel (Smartphone 17): Fließtext; 20 Pixel getestet, zu groß */
  --font-size-large:      calc(var(--font-size-normal) * var(--font-scale));   /* 22,5 Pixel (Smartphone 21,3): h3, Rufnummer */
  --font-size-larger:     calc(var(--font-size-large) * var(--font-scale));    /* 28,1 Pixel (Smartphone 26,6): h2 */
  --font-size-huge:       calc(var(--font-size-larger) * var(--font-scale));   /* 35,2 Pixel (Smartphone 33,2): h1 */

  /* Abstände: 5 Stufen */
  --space-1:              0.5rem;    /*  8 Pixel */
  --space-2:              1rem;      /* 16 Pixel */
  --space-3:              1.5rem;    /* 24 Pixel */
  --space-4:              2.5rem;    /* 40 Pixel */
  --space-5:              4rem;      /* 64 Pixel */

  /* Maße */
  --page-gutter:          var(--space-3);   /* Seitenrand links und rechts bei Header, Sektionen und Footer: 24 Pixel, ab 1024 Pixel 40 Pixel (siehe unten) */
  --content-width:        80rem;     /* maximale Breite für Header, Inhalt, Katalog und Footer auf allen Seiten: 1280 Pixel */
  --header-height:        5rem;      /* Höhe des Sticky Headers, auch für Sprungziele */
  --logo-height:          3.5rem;
  --radius:               0.25rem;   /* Rundung von Bildern und Knöpfen */
  --header-border:        5px;       /* blaue Linie unter dem Header */
  --header-image-max:     80rem;     /* Headerbild höchstens 1280 Pixel breit (bei 3 : 1 also 427 Pixel hoch), so breit wie der Inhalt; vorübergehend, bis Headerbilder in 2880 Pixel Breite vorliegen */
  --parallax-height:      clamp(18rem, 60vh, 38rem);   /* Parallax-Abschnitt: 60 % der Fensterhöhe, mindestens 288, höchstens 608 Pixel */
  --parallax-height-low:  clamp(12rem, 35vh, 22rem);   /* CSS-Klasse parallax-low:  35 %, 192 bis 352 Pixel */
  --parallax-height-high: clamp(24rem, 85vh, 56rem);   /* CSS-Klasse parallax-high: 85 %, 384 bis 896 Pixel */
  --heading-line-min:     33%;       /* Linie unter h2: mindestens ein Drittel der Textbreite (zwei Drittel: 67%) */
  --heading-line-extra:   1.5rem;    /* Linie unter h2: 24 Pixel länger als der Text */

  /* dezente Schatten gegen zu sterile Wirkung; zum Abschalten auf none setzen */
  --shadow-header:        0 3px 8px rgb(0 0 0 / .14);
  --shadow-image:         0 1px 2px color-mix(in srgb, var(--color-primary-deep) 10%, transparent),
                          0 3px 10px color-mix(in srgb, var(--color-primary-deep) 13%, transparent);   /* weich, zweischichtig, leicht blaustichig wie Karten und Knöpfe */
  --shadow-lifted:        0 2px 4px color-mix(in srgb, var(--color-primary-deep) 10%, transparent),
                          0 12px 28px color-mix(in srgb, var(--color-primary-deep) 16%, transparent);  /* angehoben: Bilder, Karten, Kacheln beim Darüberfahren */

  /* Kettenblatt-Motiv in den blassblauen Sektionen; zum Abschalten --pattern-opacity: 0 */
  --pattern-opacity:      .05;
  --pattern-size:         34rem;

  /* Umbruchpunkt Smartphone/Desktop: 48em = 768 Pixel.
     CSS erlaubt dort keine Variable, der Wert steht deshalb direkt in den @media-Regeln. */
}
@media (min-width: 64em) {
  :root { --page-gutter: var(--space-4); }   /* breiter Bildschirm: Seitenrand 40 statt 24 Pixel */
}


@media (max-width: 47.99em) {
  :root { --font-size-normal: 1.0625rem; }   /* Smartphone: 17 Pixel */
}


/* ---------------------------------------------------------------------
   2. Grundlagen
   --------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
html { overflow-x: clip; }   /* das geschlossene Klappmenü liegt rechts außerhalb; ohne clip ließ sich die Seite auf dem Smartphone seitlich verschieben */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; transition-delay: 0s !important; }
}

body {
  margin: 0;
  font-family: var(--font-family);
  font-weight: var(--font-weight-text);
  font-size: var(--font-size-normal);
  line-height: var(--line-height);
  color: var(--color-text);
  background: var(--color-surface);
}

strong, b { font-weight: 600; }   /* halbfett statt fett: fügt sich ruhiger in den Text */
.rte [style*="font-size"] { font-size: inherit !important; }   /* Schriftgrößen aus dem Editor gelten nicht: Größen kommen nur aus diesem Stylesheet */
img, video { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }

h1, h2, h3, h4 {
  margin: 0 0 var(--space-2);
  font-family: var(--font-family-heading);
  line-height: var(--line-height-heading);
  font-weight: 500;   /* halbfett wirkte zu schwer */
  color: var(--color-heading);
}
h1, h2 { margin-bottom: var(--space-3); }   /* Überschriften mit Linie: 24 Pixel Abstand zum Text (vorher 16) */
h1 { font-size: var(--font-size-huge); }
h2 { font-size: var(--font-size-larger); }
h3 { font-size: var(--font-size-large); }
h4 { font-size: var(--font-size-normal); }

p, ul, ol { margin: 0 0 1.1em; }   /* Absatzabstand passend zur Zeilenhöhe */
.rte { max-width: 75ch; }   /* Zeilenlänge begrenzen: lange Zeilen lesen sich schlecht, auch wenn die Sektion breit ist */
.rte > :last-child, p:last-child { margin-bottom: 0; }

a { color: var(--color-primary); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; text-underline-offset: .2em; }
a[href^="tel:"], a[href^="mailto:"] { white-space: nowrap; }  /* Rufnummern und E-Mail-Adressen nie umbrechen */

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

/* Nur für Screenreader sichtbar (Contao nutzt die Klasse z. B. für „Navigation überspringen“) */
.invisible {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

#wrapper, #container, #main { width: auto; margin: 0; padding: 0; }


/* ---------------------------------------------------------------------
   3. Header: Logo, Rufnummer, Menü – klebt oben
   HTML kommt aus dem Seiten-Template page/layout/bsp:
     Logo, Rufnummer und Menü-Knopf fest im Template,
     die Navigation im Layoutbereich Kopfzeile innerhalb von
     <div id="main-navigation" popover>.
   --------------------------------------------------------------------- */
#header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: var(--header-border) solid var(--color-primary);
  box-shadow: var(--shadow-header);
}

/* Funktioniert mit und ohne innere <div class="inside"> */
#header:not(:has(> .inside)),
#header > .inside {
  display: flex;
  flex-wrap: nowrap;        /* alles in einer Zeile, sonst stimmt die Höhe für das Klappmenü nicht */
  align-items: center;
  gap: var(--space-1) var(--space-2);
  max-width: calc(var(--content-width) + 2 * var(--page-gutter));  /* bündig mit den Sektionen */
  min-height: var(--header-height);
  margin-inline: auto;
  padding: var(--space-1) var(--page-gutter);
}

.header-logo { margin-right: auto; min-width: 0; }   /* darf auf sehr schmalen Geräten schrumpfen */
.header-logo img { height: auto; max-height: calc(var(--logo-height) * .8); width: auto; max-width: 100%; }  /* Smartphone etwas kleiner */

.header-phone {
  display: inline-flex;
  align-items: center;
  min-height: 3.5rem;            /* so hoch wie der Menü-Knopf: gut mit dem Daumen zu treffen */
  padding: 0 var(--space-1);
  border-radius: .5rem;
  white-space: nowrap;
  font-family: var(--font-family-heading);
  font-size: var(--font-size-large);   /* auf allen Geräten groß */
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
}
.header-phone:hover, .header-phone:active { background: var(--color-primary-pale); }
.header-phone:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
@media (max-width: 26em) {   /* sehr schmale Smartphones bis 416 Pixel: Logo etwas kleiner, Platz für die Rufnummer */
  .header-logo img { max-height: 2.5rem; }
  #header > .inside, #header:not(:has(> .inside)) { padding-inline: var(--space-2); }
}

/* Menü-Knopf: blaue Fläche, drei Striche, darunter „Menü“; wird beim Öffnen zum Kreuz */
.menu-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 3.5rem;            /* 56 × 56 Pixel, quadratisch: gut mit dem Daumen zu treffen */
  height: 3.5rem;
  padding: 10px 0 8px;      /* oben bis zum ersten Strich = unten bis zur Schriftlinie von „Menü“ (2 Pixel weniger, weil der Knopf jetzt 2 Pixel Rand hat) */
  font: 600 .7rem/1 var(--font-family-heading);
  letter-spacing: .02em;
  color: #fff;
  background: var(--color-primary);
  border: 0;
  border-radius: .5rem;
  cursor: pointer;
}
.menu-toggle:hover { background: var(--color-primary-dark); }
.menu-toggle:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; }

.menu-toggle-icon,
.menu-toggle-icon::before,
.menu-toggle-icon::after {
  display: block;
  width: 1.875rem;          /* 30 Pixel */
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition: transform .25s ease, background-color .25s ease;
}
.menu-toggle-icon { position: relative; margin: 7px 0; }  /* 7px = Platz für den oberen und unteren Strich */
.menu-toggle-icon::before,
.menu-toggle-icon::after { content: ""; position: absolute; left: 0; }
.menu-toggle-icon::before { top: -7px; }
.menu-toggle-icon::after  { top:  7px; }

/* geöffnet: mittlerer Strich weg, die anderen beiden kreuzen sich */
#header:has(#main-navigation:popover-open) .menu-toggle-icon { background-color: transparent; }
#header:has(#main-navigation:popover-open) .menu-toggle-icon::before { transform: translateY(7px) rotate(45deg); }
#header:has(#main-navigation:popover-open) .menu-toggle-icon::after  { transform: translateY(-7px) rotate(-45deg); }


/* ---------------------------------------------------------------------
   4. Hauptmenü
   Smartphone und Tablet (bis 960 Pixel): Klappmenü rechts, volle Höhe unter dem Header, dunkelblau halbtransparent
   Desktop (ab 960 Pixel):  waagerechte Leiste, Unterpunkte klappen beim Überfahren auf
   --------------------------------------------------------------------- */
#main-navigation { font-family: var(--font-family-heading); }
#main-navigation ul { list-style: none; margin: 0; padding: 0; }
#main-navigation a,
#main-navigation strong { display: block; }
#main-navigation .invisible { position: absolute; padding: 0; }   /* Sprunglink „Navigation überspringen“ bleibt unsichtbar */

/* Smartphone */
@media (max-width: 59.99em) {   /* Klappmenü bis 960 Pixel: darunter passt die Menüleiste nicht in eine Zeile */
  #main-navigation[popover] {
    inset: calc(var(--header-height) + var(--header-border)) 0 0 auto;   /* unter dem Header bis zum unteren Rand */
    width: min(100%, max(66vw, 18rem));                 /* zwei Drittel, mindestens 18rem, höchstens volle Breite */
    height: auto;
    max-height: none;
    margin: 0;
    padding: 0;
    overflow: auto;
    border: 0;
    color: #fff;
    background: linear-gradient(165deg,
      color-mix(in srgb, var(--color-primary-deep) 72%, transparent) 0%,
      color-mix(in srgb, #05060f 86%, transparent) 100%);   /* dunkles Blau, nach unten fast schwarz; die Seite scheint durch */
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    box-shadow: -12px 0 32px rgb(0 0 0 / .3);   /* hebt das Menü dezent von der Seite ab */
  }
  #main-navigation[popover]::backdrop { background: transparent; }

  /* sanftes Ein- und Ausgleiten in beide Richtungen:
     das Menü bleibt auch geschlossen gerendert (nur unsichtbar), damit das Ausgleiten
     in allen Browsern sichtbar ist */
  #main-navigation[popover] {
    display: block;
    visibility: hidden;
    translate: 100% 0;
    opacity: 0;
    transition: translate .3s ease, opacity .3s ease, visibility 0s linear .3s;
  }
  #main-navigation[popover]:popover-open {
    visibility: visible;
    translate: 0 0;
    opacity: 1;
    transition: translate .3s ease, opacity .3s ease, visibility 0s;
  }

  #main-navigation .level_1 > li {
    translate: 1.5rem 0;
    opacity: 0;
    transition: translate .3s ease, opacity .3s ease;
  }
  #main-navigation:popover-open .level_1 > li { translate: 0 0; opacity: 1; }
  #main-navigation:popover-open .level_1 > li:nth-child(1) { transition-delay: .08s; }
  #main-navigation:popover-open .level_1 > li:nth-child(2) { transition-delay: .13s; }
  #main-navigation:popover-open .level_1 > li:nth-child(3) { transition-delay: .18s; }
  #main-navigation:popover-open .level_1 > li:nth-child(4) { transition-delay: .23s; }
  #main-navigation:popover-open .level_1 > li:nth-child(5) { transition-delay: .28s; }
  #main-navigation:popover-open .level_1 > li:nth-child(n+6) { transition-delay: .33s; }

  #main-navigation li { border-bottom: 1px solid rgb(255 255 255 / .14); }   /* feine Trennlinien */
  #main-navigation a,
  #main-navigation strong {
    padding: var(--space-2) var(--space-3);
    font-size: var(--font-size-large);
    font-weight: 400;
    color: #fff;
  }
  #main-navigation a:hover,
  #main-navigation a:focus-visible { background: rgb(255 255 255 / .12); }
  #main-navigation :focus-visible { outline-color: #fff; outline-offset: -3px; }

  /* aktiver Punkt: Unterstrich wie in der Menüleiste, auf dem dunklen Grund in hellem Blau */
  #main-navigation a:hover {   /* Überfahren mit der Maus: dünnerer, blasserer Unterstrich */
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: .4em;
    text-decoration-color: rgb(255 255 255 / .35);
  }
  #main-navigation strong.active,
  #main-navigation .trail > a,
  #main-navigation .trail > a:hover {
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: .4em;
    text-decoration-color: color-mix(in srgb, var(--color-primary) 35%, white);
  }

  /* Unterpunkte eingerückt, Trennlinie oben statt unten */
  #main-navigation ul ul { border-top: 1px solid rgb(255 255 255 / .14); }
  #main-navigation ul ul li:last-child { border-bottom: 0; }
  #main-navigation ul ul a,
  #main-navigation ul ul strong {
    padding-block: var(--space-1);
    padding-left: var(--space-5);
    font-size: var(--font-size-normal);
  }
  #main-navigation ul ul li { border-bottom-color: rgb(255 255 255 / .25); }
}

/* Desktop */
@media (min-width: 60em) {
  .menu-toggle { display: none; }
  #header:not(:has(> .inside)),
  #header > .inside { column-gap: var(--space-4); }
  .header-logo { flex-shrink: 0; }   /* Logo behält seine Größe; bei Platzmangel bricht das Menü um */
  .header-logo img { height: var(--logo-height); max-height: none; max-width: none; }
  .header-phone { font-size: var(--font-size-large); }

  .header-logo     { order: 0; }
  #main-navigation    { order: 1; }
  .header-phone  { order: 2; }

  #main-navigation[popover] {
    display: block;           /* immer sichtbar, Popover-Verhalten ausgeschaltet */
    position: static;
    inset: auto;
    width: auto;
    max-height: none;
    margin: 0;
    padding: 0;
    overflow: visible;
    border: 0;
    background: none;
  }

  #main-navigation a,
  #main-navigation strong {
    padding: var(--space-1) var(--space-2);
    font-weight: 400;
    color: var(--color-text);
  }
  #main-navigation a:hover,
  #main-navigation a:focus-visible { color: var(--color-primary); text-decoration: none; background: var(--color-primary-pale); }

  #main-navigation { flex: 1 1 auto; min-width: 0; }   /* nimmt den Platz zwischen Logo und Rufnummer */
  #main-navigation .level_1 { display: flex; flex-wrap: wrap; justify-content: flex-end; }   /* bei Platzmangel zweite Zeile statt aus dem Fenster */
  #main-navigation .level_1 > li { white-space: nowrap; }   /* „über uns“ nicht innerhalb des Punkts umbrechen */
  #main-navigation li { position: relative; }

  /* Erste Ebene: aktiver Punkt mit blauem Strich unten */
  #main-navigation .level_1 > li > a,
  #main-navigation .level_1 > li > strong { box-shadow: inset 0 -3px 0 transparent; }
  #main-navigation .level_1 > li > a:hover,
  #main-navigation .level_1 > li > a:focus-visible { background: none; box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--color-primary) 40%, white); }   /* Überfahren: kräftiger als hellblau, schwächer als der aktive Punkt */
  #main-navigation .level_1 > li > strong.active,
  #main-navigation .level_1 > li.trail > a { font-weight: 600; color: var(--color-primary); box-shadow: inset 0 -3px 0 var(--color-primary); }

  #main-navigation ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1;
    min-width: 14rem;
    padding: var(--space-1) 0;
    background: var(--color-surface);
    border-top: 3px solid var(--color-primary);
    box-shadow: 0 4px 12px rgb(0 0 0 / .15);
  }
  #main-navigation li:hover > ul,
  #main-navigation li:focus-within > ul { display: block; }
  /* Untermenü: Einträge durch feine hellblaue Linien getrennt, wie im Klappmenü;
     etwas mehr Höhe, damit Unterstrich und Linie sich nicht berühren */
  #main-navigation ul ul li + li { border-top: 1px solid var(--color-primary-light); }
  #main-navigation ul ul :is(a, strong) { padding-block: .6rem; }
  /* Untermenü: dieselbe Sprache wie die Menüleiste – Unterstrich statt Hintergrund */
  #main-navigation ul ul a:hover,
  #main-navigation ul ul a:focus-visible {
    background: none;
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: .4em;
    text-decoration-color: color-mix(in srgb, var(--color-primary) 40%, white);
  }
  #main-navigation ul ul strong.active,
  #main-navigation ul ul .trail > a,
  #main-navigation ul ul .trail > a:hover {
    font-weight: 600;
    color: var(--color-primary);
    background: none;
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: .4em;
    text-decoration-color: var(--color-primary);
  }
}


/* ---------------------------------------------------------------------
   5. Zufallsbild unter dem Header (Contao-Modul „Zufallsbild“, Quelle: ein Ordner)
   Headerbilder sind gestaltete Ausschnitte im Format 3 : 1 und werden nie
   beschnitten, nur skaliert. Ab --header-image-max steht das Bild mittig,
   links und rechts läuft der hellblaue Hintergrund weiter.
   --------------------------------------------------------------------- */
.mod_randomImage { background: var(--color-primary-pale); }
.mod_randomImage figure { max-width: var(--header-image-max); margin-inline: auto; }
.header-image-slot { max-width: var(--header-image-max); margin-inline: auto; aspect-ratio: 3 / 1; }   /* hält den Platz frei, bis das Skript das Bild eingesetzt hat (Vorlage mod_randomImage_header) */
.mod_randomImage img {
  width: 100%;
  height: auto;
  aspect-ratio: auto 3 / 1;   /* hält den Platz frei, bis das Bild geladen ist; danach gilt das echte Verhältnis, nichts wird verzerrt */
}
.mod_randomImage figcaption { display: none; }
#main .mod_randomImage img { border-radius: 0; }  /* volle Breite ohne gerundete Ecken */


/* ---------------------------------------------------------------------
   6. Sektionen (= Artikel)
   Hintergrund volle Breite, Inhalt auf --content-width begrenzt
   --------------------------------------------------------------------- */
#main .mod_article {
  display: grid;
  gap: var(--space-3);
  align-content: start;
  padding-block: var(--space-4);
  padding-inline: max(var(--page-gutter), (100% - var(--content-width)) / 2);
  scroll-margin-top: var(--header-height);
}

#main .mod_article:nth-child(even of .mod_article) { background: var(--color-primary-pale); }

/* Kettenblatt-Motiv: groß, sehr blass, angeschnitten; wechselt zwischen rechts unten und links oben.
   Die Farbe kommt aus --color-primary, die Form aus einer Maske. */
#main .mod_article:nth-child(even of .mod_article),
#main .error-page {
  position: relative;
  isolation: isolate;       /* Motiv liegt über dem Hintergrund, aber unter dem Inhalt */
  overflow: hidden;
}
#main .mod_article:nth-child(even of .mod_article)::before,
#main .error-page::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(var(--pattern-size), 90vw);
  aspect-ratio: 1;
  right: calc(min(var(--pattern-size), 90vw) * -.25);
  bottom: calc(min(var(--pattern-size), 90vw) * -.3);
  background: var(--color-primary);
  opacity: var(--pattern-opacity);
  pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%20400%20400%27%3E%3Cg%20fill%3D%27none%27%20stroke%3D%27%23000%27%20stroke-width%3D%273%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M200.0%2C28.0%20L209.3%2C10.2%20L218.6%2C10.9%20L225.2%2C29.9%20L233.6%2C31.3%20L246.2%2C15.7%20L255.2%2C18.2%20L257.9%2C38.1%20L265.8%2C41.1%20L281.2%2C28.2%20L289.6%2C32.4%20L288.4%2C52.5%20L295.6%2C57.0%20L313.2%2C47.4%20L320.5%2C53.1%20L315.5%2C72.6%20L321.6%2C78.4%20L340.8%2C72.4%20L346.9%2C79.5%20L338.2%2C97.5%20L343.0%2C104.4%20L363.0%2C102.3%20L367.6%2C110.4%20L355.5%2C126.5%20L358.9%2C134.2%20L378.9%2C136.0%20L381.8%2C144.8%20L366.8%2C158.2%20L368.7%2C166.4%20L387.9%2C172.1%20L389.1%2C181.4%20L371.8%2C191.6%20L372.0%2C200.0%20L389.8%2C209.3%20L389.1%2C218.6%20L370.1%2C225.2%20L368.7%2C233.6%20L384.3%2C246.2%20L381.8%2C255.2%20L361.9%2C257.9%20L358.9%2C265.8%20L371.8%2C281.2%20L367.6%2C289.6%20L347.5%2C288.4%20L343.0%2C295.6%20L352.6%2C313.2%20L346.9%2C320.5%20L327.4%2C315.5%20L321.6%2C321.6%20L327.6%2C340.8%20L320.5%2C346.9%20L302.5%2C338.2%20L295.6%2C343.0%20L297.7%2C363.0%20L289.6%2C367.6%20L273.5%2C355.5%20L265.8%2C358.9%20L264.0%2C378.9%20L255.2%2C381.8%20L241.8%2C366.8%20L233.6%2C368.7%20L227.9%2C387.9%20L218.6%2C389.1%20L208.4%2C371.8%20L200.0%2C372.0%20L190.7%2C389.8%20L181.4%2C389.1%20L174.8%2C370.1%20L166.4%2C368.7%20L153.8%2C384.3%20L144.8%2C381.8%20L142.1%2C361.9%20L134.2%2C358.9%20L118.8%2C371.8%20L110.4%2C367.6%20L111.6%2C347.5%20L104.4%2C343.0%20L86.8%2C352.6%20L79.5%2C346.9%20L84.5%2C327.4%20L78.4%2C321.6%20L59.2%2C327.6%20L53.1%2C320.5%20L61.8%2C302.5%20L57.0%2C295.6%20L37.0%2C297.7%20L32.4%2C289.6%20L44.5%2C273.5%20L41.1%2C265.8%20L21.1%2C264.0%20L18.2%2C255.2%20L33.2%2C241.8%20L31.3%2C233.6%20L12.1%2C227.9%20L10.9%2C218.6%20L28.2%2C208.4%20L28.0%2C200.0%20L10.2%2C190.7%20L10.9%2C181.4%20L29.9%2C174.8%20L31.3%2C166.4%20L15.7%2C153.8%20L18.2%2C144.8%20L38.1%2C142.1%20L41.1%2C134.2%20L28.2%2C118.8%20L32.4%2C110.4%20L52.5%2C111.6%20L57.0%2C104.4%20L47.4%2C86.8%20L53.1%2C79.5%20L72.6%2C84.5%20L78.4%2C78.4%20L72.4%2C59.2%20L79.5%2C53.1%20L97.5%2C61.8%20L104.4%2C57.0%20L102.3%2C37.0%20L110.4%2C32.4%20L126.5%2C44.5%20L134.2%2C41.1%20L136.0%2C21.1%20L144.8%2C18.2%20L158.2%2C33.2%20L166.4%2C31.3%20L172.1%2C12.1%20L181.4%2C10.9%20L191.6%2C28.2%20Z%27/%3E%3Ccircle%20cx%3D%27200%27%20cy%3D%27200%27%20r%3D%27120%27/%3E%3Ccircle%20cx%3D%27200%27%20cy%3D%27200%27%20r%3D%2740%27/%3E%3Ccircle%20cx%3D%27200.0%27%20cy%3D%27120.0%27%20r%3D%279%27/%3E%3Ccircle%20cx%3D%27276.1%27%20cy%3D%27175.3%27%20r%3D%279%27/%3E%3Ccircle%20cx%3D%27247.0%27%20cy%3D%27264.7%27%20r%3D%279%27/%3E%3Ccircle%20cx%3D%27153.0%27%20cy%3D%27264.7%27%20r%3D%279%27/%3E%3Ccircle%20cx%3D%27123.9%27%20cy%3D%27175.3%27%20r%3D%279%27/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%20400%20400%27%3E%3Cg%20fill%3D%27none%27%20stroke%3D%27%23000%27%20stroke-width%3D%273%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M200.0%2C28.0%20L209.3%2C10.2%20L218.6%2C10.9%20L225.2%2C29.9%20L233.6%2C31.3%20L246.2%2C15.7%20L255.2%2C18.2%20L257.9%2C38.1%20L265.8%2C41.1%20L281.2%2C28.2%20L289.6%2C32.4%20L288.4%2C52.5%20L295.6%2C57.0%20L313.2%2C47.4%20L320.5%2C53.1%20L315.5%2C72.6%20L321.6%2C78.4%20L340.8%2C72.4%20L346.9%2C79.5%20L338.2%2C97.5%20L343.0%2C104.4%20L363.0%2C102.3%20L367.6%2C110.4%20L355.5%2C126.5%20L358.9%2C134.2%20L378.9%2C136.0%20L381.8%2C144.8%20L366.8%2C158.2%20L368.7%2C166.4%20L387.9%2C172.1%20L389.1%2C181.4%20L371.8%2C191.6%20L372.0%2C200.0%20L389.8%2C209.3%20L389.1%2C218.6%20L370.1%2C225.2%20L368.7%2C233.6%20L384.3%2C246.2%20L381.8%2C255.2%20L361.9%2C257.9%20L358.9%2C265.8%20L371.8%2C281.2%20L367.6%2C289.6%20L347.5%2C288.4%20L343.0%2C295.6%20L352.6%2C313.2%20L346.9%2C320.5%20L327.4%2C315.5%20L321.6%2C321.6%20L327.6%2C340.8%20L320.5%2C346.9%20L302.5%2C338.2%20L295.6%2C343.0%20L297.7%2C363.0%20L289.6%2C367.6%20L273.5%2C355.5%20L265.8%2C358.9%20L264.0%2C378.9%20L255.2%2C381.8%20L241.8%2C366.8%20L233.6%2C368.7%20L227.9%2C387.9%20L218.6%2C389.1%20L208.4%2C371.8%20L200.0%2C372.0%20L190.7%2C389.8%20L181.4%2C389.1%20L174.8%2C370.1%20L166.4%2C368.7%20L153.8%2C384.3%20L144.8%2C381.8%20L142.1%2C361.9%20L134.2%2C358.9%20L118.8%2C371.8%20L110.4%2C367.6%20L111.6%2C347.5%20L104.4%2C343.0%20L86.8%2C352.6%20L79.5%2C346.9%20L84.5%2C327.4%20L78.4%2C321.6%20L59.2%2C327.6%20L53.1%2C320.5%20L61.8%2C302.5%20L57.0%2C295.6%20L37.0%2C297.7%20L32.4%2C289.6%20L44.5%2C273.5%20L41.1%2C265.8%20L21.1%2C264.0%20L18.2%2C255.2%20L33.2%2C241.8%20L31.3%2C233.6%20L12.1%2C227.9%20L10.9%2C218.6%20L28.2%2C208.4%20L28.0%2C200.0%20L10.2%2C190.7%20L10.9%2C181.4%20L29.9%2C174.8%20L31.3%2C166.4%20L15.7%2C153.8%20L18.2%2C144.8%20L38.1%2C142.1%20L41.1%2C134.2%20L28.2%2C118.8%20L32.4%2C110.4%20L52.5%2C111.6%20L57.0%2C104.4%20L47.4%2C86.8%20L53.1%2C79.5%20L72.6%2C84.5%20L78.4%2C78.4%20L72.4%2C59.2%20L79.5%2C53.1%20L97.5%2C61.8%20L104.4%2C57.0%20L102.3%2C37.0%20L110.4%2C32.4%20L126.5%2C44.5%20L134.2%2C41.1%20L136.0%2C21.1%20L144.8%2C18.2%20L158.2%2C33.2%20L166.4%2C31.3%20L172.1%2C12.1%20L181.4%2C10.9%20L191.6%2C28.2%20Z%27/%3E%3Ccircle%20cx%3D%27200%27%20cy%3D%27200%27%20r%3D%27120%27/%3E%3Ccircle%20cx%3D%27200%27%20cy%3D%27200%27%20r%3D%2740%27/%3E%3Ccircle%20cx%3D%27200.0%27%20cy%3D%27120.0%27%20r%3D%279%27/%3E%3Ccircle%20cx%3D%27276.1%27%20cy%3D%27175.3%27%20r%3D%279%27/%3E%3Ccircle%20cx%3D%27247.0%27%20cy%3D%27264.7%27%20r%3D%279%27/%3E%3Ccircle%20cx%3D%27153.0%27%20cy%3D%27264.7%27%20r%3D%279%27/%3E%3Ccircle%20cx%3D%27123.9%27%20cy%3D%27175.3%27%20r%3D%279%27/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}
#main .mod_article:nth-child(4n of .mod_article)::before {
  right: auto;
  bottom: auto;
  left: calc(min(var(--pattern-size), 90vw) * -.3);
  top: calc(min(var(--pattern-size), 90vw) * -.25);
}

@media (min-width: 48em) {
  #main .mod_article { padding-block: var(--space-5); gap: var(--space-4); }

  /* Genau zwei Elemente, keines davon eine Überschrift und keines eine Karte
     mit Bild (die hat schon zwei Spalten in sich): zwei Spalten */
  #main .mod_article:has(> :nth-child(2):last-child):not(:has(> .content-headline, > .content-text.media--left, > .content-text.media--right, > .product-card, > .tile-card, > .parallax-section)) {
    grid-template-columns: 1fr 1fr;
    align-items: start;   /* oben bündig: Überschriften links und rechts auf gleicher Höhe */
  }

  /* Überschrift zuerst, danach genau zwei Elemente: Überschrift über beide Spalten */
  #main .mod_article:has(> .content-headline:first-child):has(> :nth-child(3):last-child) {
    grid-template-columns: 1fr 1fr;
    align-items: start;   /* oben bündig: Überschriften links und rechts auf gleicher Höhe */
  }
  #main .mod_article > .content-headline:first-child { grid-column: 1 / -1; margin-bottom: 0; }
}


/* ---------------------------------------------------------------------
   7. Inhaltselemente
   --------------------------------------------------------------------- */
#main img { border-radius: var(--radius); }
#main figure img { box-shadow: var(--shadow-image); }     /* Inhaltsbilder und Galerie */
#main .mod_randomImage img { box-shadow: none; }           /* großes Bild unter dem Header ohne Schatten */

/* Bilder heben sich beim Überfahren mit der Maus minimal an (nur Geräte mit Maus) */
#main figure img { transition: transform .25s ease, box-shadow .25s ease; }
@media (hover: hover) {
  #main figure:hover img { transform: translateY(-3px); box-shadow: var(--shadow-lifted); }
  #main .mod_randomImage:hover img { transform: none; box-shadow: none; }
}

/* blaue Linie unter den Überschriften der Sektionen (h2) und dem Seitentitel (h1):
   so lang wie der Text plus --heading-line-extra, mindestens --heading-line-min
   der Textbreite des Abschnitts bzw. Kastens */
#main .mod_article :is(h1, h2) {
  width: fit-content;
  min-width: var(--heading-line-min);
  max-width: 100%;
  padding-right: var(--heading-line-extra);
}
#main .mod_article :is(h1, h2)::after {
  content: "";
  display: block;
  width: calc(100% + var(--heading-line-extra));   /* 100 % ist ohne den Innenabstand rechts, deshalb die Zugabe hier */
  height: 3px;
  margin-top: var(--space-1);
  border-radius: 2px;
  background: var(--color-primary);
}

/* Text mit Bild links oder rechts: zwei Spalten statt Umfließen */
@media (min-width: 48em) {
  .content-text.media--left,
  .content-text.media--right {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr;
    column-gap: var(--space-4);
    align-items: start;
  }
  .content-text.media--left  { grid-template-areas: "bild titel" "bild text"; }
  .content-text.media--right { grid-template-areas: "titel bild" "text bild"; }

  .content-text.media--left  > figure,
  .content-text.media--right > figure { grid-area: bild; }
  .content-text.media--left  > :is(h1, h2, h3, h4, h5, h6),
  .content-text.media--right > :is(h1, h2, h3, h4, h5, h6) { grid-area: titel; }
  .content-text.media--left  > .rte,
  .content-text.media--right > .rte { grid-area: text; }
}
.content-text.media--above > figure { margin-bottom: var(--space-2); }
.content-text.media--below > figure { margin-top: var(--space-2); }

figcaption {
  margin-top: var(--space-1);
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
}

/* Galerie: Spaltenzahl passt sich der Bildschirmbreite an */
.content-gallery ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(9rem, 100%), 1fr));
  gap: var(--space-2);
  list-style: none;
  margin: 0;
  padding: 0;
}

.content-player video { width: 100%; }


/* ---------------------------------------------------------------------
   7a. Inhalte aus dem Editor mit festen Breiten (Altbestand)
   Tabellen, Bilder und Videos mit Breiten in px aus dem Editor
   werden auf die verfügbare Breite begrenzt. Auf dem Smartphone werden
   Tabellen ohne Überschrift (caption) – das sind Logo-Reihen und
   Anordnungshilfen – aufgelöst, ihre Zellen stehen dann neben- und
   untereinander. Echte Tabellen mit caption (z. B. Öffnungszeiten) bleiben.
   --------------------------------------------------------------------- */
.rte img { max-width: 100%; height: auto; }
.rte iframe { max-width: 100%; height: auto; aspect-ratio: 16 / 9; }
.rte table { max-width: 100%; height: auto !important; }
.rte :is(td, th) { height: auto !important; }

@media (max-width: 47.99em) {
  .rte table:not(:has(caption)) { width: auto !important; }
  .rte table:not(:has(caption)),
  .rte table:not(:has(caption)) :is(tbody, tr) { display: block; }
  .rte table:not(:has(caption)) tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
  }
  .rte table:not(:has(caption)) :is(td, th) {
    display: block;
    width: auto !important;
    padding: 0;
    text-align: left !important;
  }
  .rte [style*="float"] { float: none !important; }
}


/* ---------------------------------------------------------------------
   7b. Videos mit Zwei-Klick-Lösung
   Das Skript im Template legt um jedes Vorschaubild mit data-video einen
   Rahmen mit Datenschutzhinweis und Knopf. Erst der Klick lädt das Video.
   --------------------------------------------------------------------- */
.video-consent { position: relative; margin-block: var(--space-2); }
.video-consent img { display: block; width: 100%; height: auto; cursor: pointer; }
.video-consent-note {
  position: absolute;
  inset: auto 0 0 0;
  padding: var(--space-2) var(--space-3);
  color: #fff;
  font-size: var(--font-size-small);
  line-height: 1.5;
  background: rgb(0 0 0 / .72);
}
.video-consent-note p { margin: 0; max-width: 75ch; }
.video-consent-note a { color: #fff; text-decoration: underline; }
.video-consent-play {
  margin-bottom: var(--space-1);
  padding: .5em 1.1em;
  color: #fff;
  font: inherit;
  font-size: var(--font-size-normal);
  font-weight: 600;
  background: var(--color-primary);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}
.video-consent-play:hover,
.video-consent-play:focus-visible { background: var(--color-primary-dark); }
@media (max-width: 47.99em) {
  .video-consent-note { position: static; }   /* auf dem Smartphone unter dem Bild statt darüber */
}


/* ---------------------------------------------------------------------
   8. Footer: vier Spalten (Öffnungszeiten Winter und Sommer, Firma, Kontakt),
   darunter die Fußleiste mit Rechtlichem und dem Knopf „nach oben“.
   Firma, Kontakt und Fußleiste stehen im Template, die Öffnungszeiten kommen
   aus dem Artikel „oeffnungszeiten“ (zwei Tabellen mit Überschrift als caption).
   Tablet: zwei Spalten, Smartphone: alles untereinander.
   --------------------------------------------------------------------- */
#footer {
  color: #fff;
  background: var(--gloss-edge), var(--gradient-dark);
  line-height: 1.6;
}

#footer > .inside {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4) var(--space-3);
  max-width: calc(var(--content-width) + 2 * var(--page-gutter));  /* bündig mit den Sektionen */
  margin-inline: auto;
  padding: var(--space-5) var(--page-gutter) var(--space-4);
}

#footer address { font-style: normal; }
#footer p { margin: 0; }
#footer a { color: #fff; text-decoration: underline; text-decoration-color: rgb(255 255 255 / .4); text-underline-offset: .2em; }
#footer a:hover, #footer a:focus-visible { text-decoration-color: #fff; }
#footer :focus-visible { outline-color: #fff; }

/* Spaltenüberschriften: im Template als h2, in den Öffnungszeiten die erste fette Zeile */
#footer .footer-heading,
#footer .footer-hours caption strong {
  display: block;
  margin: 0 0 var(--space-1);
  font-family: var(--font-family-heading);
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: var(--line-height-heading);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-primary-light);
}

/* Öffnungszeiten: ein Element mit zwei Tabellen belegt die Spalten 1 und 2 */
#footer .footer-hours { grid-column: span 2; order: -1; }
#footer .footer-hours :is(h1, h2, h3, h4) { display: none; }   /* Überschrift des Elements gilt nur auf „über uns“ */
#footer .footer-hours .rte {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: var(--space-3);
  max-width: none;
}
#footer .footer-hours table {
  width: auto !important;               /* Breiten aus dem Editor überstimmen */
  height: auto !important;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;   /* Ziffern gleich breit */
}
#footer .footer-hours caption { caption-side: top; padding: 0 0 var(--space-1); text-align: left; }
#footer .footer-hours caption strong + br { display: none; }   /* Zeilenumbruch nur für die Darstellung ohne dieses CSS */
#footer .footer-hours :is(th, td) { padding: 0; text-align: left; vertical-align: top; font-weight: inherit; }
#footer .footer-hours th { padding-right: var(--space-2); white-space: nowrap; }
#footer .footer-hours td[colspan] { padding-top: .25em; }

/* Fußleiste */
.footer-bar {
  background: #151a40;   /* Fußleiste: dunkles Blau, heller als das Ende des Verlaufs, setzt sich ab */
  border-top: 1px solid rgb(255 255 255 / .08);   /* feine Kante wie der Glanzstreifen oben */
  font-size: var(--font-size-small);
}
.footer-bar > .inside {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-3);
  max-width: calc(var(--content-width) + 2 * var(--page-gutter));
  margin-inline: auto;
  padding: var(--space-2) var(--page-gutter);
}
.footer-links { display: flex; gap: var(--space-3); margin-left: auto; }
#footer .back-to-top {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgb(255 255 255 / .5);
  border-radius: 50%;
  font-size: var(--font-size-large);
  line-height: 1;
  text-decoration: none;
}
#footer .back-to-top:hover,
#footer .back-to-top:focus-visible { background: rgb(255 255 255 / .12); }
/* Smartphone: Copyright und Links links untereinander, Pfeil nach oben rechts daneben (statt in eine eigene Zeile links zu rutschen) */
@media (max-width: 47.99em) {
  .footer-bar > .inside { display: grid; grid-template-columns: 1fr auto; align-items: center; }
  .footer-links { grid-column: 1; margin-left: 0; }
  #footer .back-to-top { grid-column: 2; grid-row: 1 / span 2; }
}

/* Tablet */
@media (max-width: 63.99em) {
  #footer > .inside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Smartphone */
@media (max-width: 47.99em) {
  #footer > .inside { grid-template-columns: 1fr; gap: var(--space-3); padding-block: var(--space-4) var(--space-3); }
  #footer .footer-hours { grid-column: auto; }
  #footer .footer-hours .rte { grid-template-columns: 1fr; }
}


/* ---------------------------------------------------------------------
   9. Hinweis-Kasten und Knopf
   Hinweis-Kasten: Element „Text“ mit CSS-Klasse „notice“ (setzt der Administrator, nicht die Redaktion)
   --------------------------------------------------------------------- */
.notice {
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow-image);
}

.button {
  display: inline-block;
  min-height: 3rem;                 /* gut mit dem Daumen zu treffen */
  padding: var(--space-1) var(--space-3);
  font: 600 var(--font-size-normal)/1.2 var(--font-family-heading);
  color: #fff;
  background: var(--color-primary);
  border: 0;
  border-radius: .5rem;
  cursor: pointer;
}
.button:hover { background: var(--color-primary-dark); }
.button:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; }


/* ---------------------------------------------------------------------
   10. Externer Katalog (BIDEX) mit Zwei-Klick-Lösung
   Erst nach dem Klick auf „Katalog laden“ wird der Katalog von den BIDEX-Servern geladen.
   --------------------------------------------------------------------- */
.catalog { min-width: 0; }               /* breite Kataloginhalte sprengen das Raster nicht */
#BidexCatalog { max-width: 100%; }

/* Der Katalog nutzt dieselbe Breite wie Header und Inhalt (--content-width), damit alles bündig ist. */

.catalog-teaser {
  display: grid;
  overflow: hidden;
  background: var(--color-primary-deep);
  color: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-image);
}
.catalog-teaser > * { grid-area: 1 / 1; }  /* Bild und Text übereinander */
#main .catalog-image {
  width: 100%;
  height: 100%;
  min-height: 22rem;
  object-fit: cover;
  opacity: .7;
  border-radius: 0;
  box-shadow: none;
}
.catalog-text {
  position: relative;               /* über dem halbdurchsichtigen Bild */
  z-index: 1;
  align-self: center;
  max-width: 36rem;
  padding: var(--space-4) var(--space-3);
  text-shadow: 0 1px 3px rgb(0 0 0 / .6), 0 2px 14px rgb(0 0 0 / .55);   /* hebt die Schrift vom Bild ab: schmaler Kantenschatten plus weicher Hof */
}
/* Vignette: ovale Abschattung direkt hinter dem Text, dämpft die Lichtreflexe im Bild; liegt über dem Bild, unter der Schrift */
.catalog-text::before {
  content: "";
  position: absolute;
  inset: -35% -30% -35% -30%;
  z-index: -1;
  background: radial-gradient(closest-side, rgb(9 12 46 / .75), rgb(9 12 46 / .68) 40%, rgb(9 12 46 / .5) 62%, rgb(9 12 46 / .25) 82%, transparent);
  pointer-events: none;
}
.catalog-text a { color: #fff; text-decoration: underline; text-underline-offset: .2em; }
.catalog-title {
  font-family: var(--font-family-heading);
  font-size: var(--font-size-larger);
  font-weight: 600;
  line-height: var(--line-height-heading);
}
.catalog-teaser .button { background: #fff; color: var(--color-primary); margin-top: var(--space-1); text-shadow: none; }
.catalog-teaser .button:hover { background: var(--color-primary-pale); }
.catalog-teaser .button:focus-visible { outline-color: #fff; }
.catalog-note { margin-top: var(--space-2); font-size: var(--font-size-small); }

.catalog-error {
  padding: var(--space-2) var(--space-3);
  border-left: 4px solid #b00;
  background: var(--color-surface);
}
@media (min-width: 48em) {
  .catalog-text { padding: var(--space-5) var(--space-5); }
}


/* ---------------------------------------------------------------------
   11. Karten: Text mit Bild als zusammengehörige Einheit
   Moderne Fassung der früheren Box mit Schatten; nur für Textelemente
   mit Bild, reine Texte bleiben ohne Rahmen.
   --------------------------------------------------------------------- */
#main .content-text.media {
  padding: var(--space-2);
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--color-primary) 10%, transparent);
  border-radius: var(--radius);
  box-shadow:
    0 1px 2px color-mix(in srgb, var(--color-primary-deep) 8%, transparent),
    0 6px 20px color-mix(in srgb, var(--color-primary-deep) 10%, transparent);
}
#main .content-text.media figure img { width: 100%; box-shadow: none; }   /* Bild füllt seine Spalte, kein zweiter Schatten */
@media (min-width: 48em) {
  #main .content-text.media { column-gap: var(--space-3); padding: var(--space-3); }
}

/* Preislisten: Tabellen mit Links zu Scott, Preise rechtsbündig, Ziffern gleich breit, kein Umbruch */
.rte table:has(a[href*="scott-sports.com"]) td:last-child { white-space: nowrap; }   /* nur Preise; Beschreibungen in der letzten Spalte müssen umbrechen dürfen */
.rte table:has(a[href*="scott-sports.com"]) td:last-child {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
  padding-left: var(--space-2);
}


/* ---------------------------------------------------------------------
   12. Zweispaltiger Text für kurze Seiten
   An der Seite im Backend: Experten-Einstellungen → CSS-Klasse „layout-two-columns“.
   Der Text des Abschnitts fließt ab etwa 1024 px in zwei Spalten; für lange
   Texte wie die Datenschutzerklärung nicht geeignet (Hin- und Herscrollen).
   --------------------------------------------------------------------- */
@media (min-width: 64em) {
  .layout-two-columns #main .mod_article {
    display: block;
    columns: 2;
    column-gap: var(--space-5);
  }
  .layout-two-columns #main .mod_article > * + * { margin-top: var(--space-3); }
  .layout-two-columns #main .rte { max-width: none; }
  .layout-two-columns #main :is(h1, h2, h3, h4, h5, h6) { break-after: avoid; }
  .layout-two-columns #main :is(li, tr) { break-inside: avoid; }
  .layout-two-columns #main p { orphans: 3; widows: 3; }   /* lange Absätze dürfen umbrechen, aber nicht mit einzelnen Zeilen; sonst bleibt die Überschrift allein unten stehen */
}


/* ---------------------------------------------------------------------
   13. Tabellen im Inhalt und Logos im Text
   Echte Tabellen (mit caption, z. B. Öffnungszeiten): linksbündig, Überschrift
   links, nebeneinander soweit Platz ist. Logos, die im Editor in den Text
   gesetzt wurden, stehen in einer Reihe statt untereinander.
   --------------------------------------------------------------------- */
.rte table { border-collapse: collapse; }
.rte caption { caption-side: top; padding: 0 0 var(--space-1); text-align: left; white-space: nowrap; }   /* Tabellenüberschrift nicht umbrechen */
.rte caption strong + br { display: none; }
.rte caption strong { display: block; font-family: var(--font-family-heading); font-weight: 600; color: var(--color-heading); }
.rte :is(th, td) { padding: .1em var(--space-2) .1em 0; text-align: left; vertical-align: top; }
.rte th { font-weight: inherit; white-space: nowrap; }
.rte table:has(caption) {
  display: inline-table;
  margin: var(--space-2) var(--space-4) var(--space-3) 0;   /* oben: Abstand zur Überschrift, für alle Tabellen gleich */
  vertical-align: top;
  font-variant-numeric: tabular-nums;
}
#footer .footer-hours table { margin: 0; }   /* im Footer ordnet das Raster */

.rte img { display: inline-block; vertical-align: middle; }
.rte p > img,
.rte p > a > img { margin: var(--space-1) var(--space-2) var(--space-1) 0; }

/* Lange Wörter und breite Inhalte bleiben in ihrer Spalte bzw. Karte.
   anywhere statt break-word: wirkt auch auf die Mindestbreite, sonst macht ein langer
   Link (z. B. in der Datenschutzerklärung) die ganze Seite auf dem Smartphone zu breit */
.rte { overflow-wrap: anywhere; }
#main .mod_article > * { min-width: 0; }
@media (max-width: 47.99em) {
  h1, h2, h3, .rte { hyphens: auto; }   /* Silbentrennung auf schmalen Bildschirmen (Sprache de aus dem Seitenlayout) */
}
.content-text.media > * { min-width: 0; }


/* ---------------------------------------------------------------------
   14. Vorlagenvarianten für Redakteure (Inhaltselement Text, Feld „Individuelles Template“)
   content_element/text/aktuell     → .news-box   Kasten für Neuigkeiten
   content_element/text/angebot     → .offer-box  farbiger Kasten für Angebote
   content_element/text/logo_reihe  → .logo-row   Logos in einer Reihe, gleich hoch
   content_element/text/notfall     → .emergency-box  roter Kasten, nur für echte Notfälle
   Die Redaktion wählt nur die Variante; Farben und Schrift kommen von hier,
   Schriftfarbe und -größe aus dem Editor werden in den Kästen übergangen.
   --------------------------------------------------------------------- */
#main :is(.news-box, .offer-box, .emergency-box) {
  width: 100%;                  /* immer gleich breit, auch wenn verschoben */
  max-width: 50rem;             /* kurze Texte nicht über die ganze Breite ziehen */
  padding: var(--space-3);
  border-radius: var(--radius);
  box-shadow:
    0 1px 2px color-mix(in srgb, var(--color-primary-deep) 8%, transparent),
    0 6px 20px color-mix(in srgb, var(--color-primary-deep) 10%, transparent);
}
#main :is(.news-box, .offer-box, .emergency-box) .rte :is(span, strong, font) { color: inherit !important; font-size: inherit !important; }
#main :is(.news-box, .offer-box, .emergency-box) .rte > :last-child { margin-bottom: 0; }
@media (min-width: 48em) {
  #main :is(.news-box, .offer-box, .emergency-box) { padding: var(--space-4); }
}

/* Aktuelles: weiß, kräftige Linie links, Text eine Stufe größer */
#main .news-box {
  background: var(--color-surface);
  border-left: 6px solid var(--color-primary);
  font-size: var(--font-size-large);
  line-height: 1.5;
}
#main .news-box h2 { font-size: var(--font-size-larger); }   /* nicht mit dem Fließtext mitwachsen */

/* Angebot: blauer Kasten mit weißer Schrift, Telefonnummer als Knopf */
#main .offer-box {
  color: #fff;
  background: var(--gloss-edge), var(--gradient-dark);   /* wie Footer und Klappmenü */
}
#main .offer-box :is(h1, h2, h3, h4, h5, h6) { color: #fff; }   /* jede Überschriftsebene, die im Element gewählt wird */
#main .offer-box :is(h1, h2)::after { background: #fff; }
#main .offer-box a { color: #fff; text-underline-offset: .2em; }
#main .offer-box a[href^="tel:"] {
  display: inline-block;
  margin-top: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font: 600 var(--font-size-large)/1.2 var(--font-family-heading);
  color: var(--color-primary);
  background: #fff;
  border-radius: .5rem;
  text-decoration: none;
  white-space: nowrap;
}
#main .offer-box a[href^="tel:"]:hover { background: var(--color-primary-light); }

/* Logo-Reihe: jeder Absatz mit Logos wird eine umbrechende Reihe,
   alle Logos gleich hoch, unabhängig von Breite und Höhe aus dem Editor */
#main .logo-row .rte p:has(img) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
  margin-block: var(--space-3);
}
#main .logo-row .rte > p:has(img):first-child { margin-top: var(--space-4); }   /* Logos direkt unter der Überschrift: 40 Pixel (vorher 24) */
#main .logo-row .rte p:has(img) > :is(a, img) { flex: 0 0 auto; line-height: 0; }
#main .logo-row .rte img {
  width: auto !important;
  height: 3.5rem !important;
  max-width: 11rem;
  margin: 0;
  object-fit: contain;
  box-shadow: none;
}
#main .logo-row .rte a:hover img { transform: translateY(-2px); transition: transform .2s ease; }

/* Kästen: großer, blasser Schriftzug im Hintergrund, angeschnitten wie das Kettenblatt.
   Neuer Kasten: eigene Zeile mit content und color ergänzen. */
#main :is(.news-box, .offer-box, .emergency-box) { position: relative; isolation: isolate; overflow: hidden; }
#main :is(.news-box, .offer-box, .emergency-box)::before {
  content: "Angebot" / "";       /* nur Gestaltung, wird nicht vorgelesen */
  position: absolute;
  z-index: -1;
  right: -.06em;
  bottom: -.12em;
  font: 800 clamp(5rem, 16vw, 11rem)/1 var(--font-family-heading);
  letter-spacing: -.02em;
  color: rgb(255 255 255 / .08);
  white-space: nowrap;
  transform: rotate(-6deg);
  transform-origin: right bottom;
  pointer-events: none;
}
/* Lage der Kästen: immer gegenüber dem Kettenblatt. Hellblaue Abschnitte mit Kettenblatt
   rechts unten → Kasten links; Kettenblatt links oben (jeder vierte) → Kasten rechts;
   weiße Abschnitte ohne Kettenblatt → Kasten rechts. Wirkt nur, wenn Platz neben dem Kasten ist. */
#main .mod_article:nth-child(odd of .mod_article) > :is(.news-box, .offer-box, .emergency-box),
#main .mod_article:nth-child(4n of .mod_article) > :is(.news-box, .offer-box, .emergency-box) { margin-left: auto; }

#main .news-box::before { content: "Aktuell" / ""; color: color-mix(in srgb, var(--color-primary) 6%, transparent); }
#main .emergency-box::before { content: "Wichtig" / ""; color: rgb(255 255 255 / .1); }

/* Notfall: kräftig rot, weiße Schrift; nur für echte Notfälle, danach unsichtbar schalten */
#main .emergency-box {
  color: #fff;
  background: linear-gradient(135deg, var(--color-alert), color-mix(in srgb, var(--color-alert) 70%, black));
}
#main .emergency-box :is(h1, h2, h3, h4, h5, h6) { color: #fff; }   /* jede Überschriftsebene, die im Element gewählt wird */
#main .emergency-box :is(h1, h2)::after { background: #fff; }
#main .emergency-box a { color: #fff; text-underline-offset: .2em; }


/* ---------------------------------------------------------------------
   15. Produkt-Karten (Vorlagenvariante content_element/text/produkt → .product-card)
   Text mit Bild und Preisliste. Bild oben über die volle Kartenbreite,
   darunter Modellname und Preisliste. Produkt-Karten eines Abschnitts
   stehen nebeneinander (je nach Breite 1 bis 3), alle anderen Elemente
   des Abschnitts (Einleitung) über die volle Breite.
   --------------------------------------------------------------------- */
#main .mod_article:has(> .product-card) {
  grid-template-columns: repeat(auto-fill, minmax(min(21rem, 100%), 1fr));
  align-items: stretch;
}
#main .mod_article:has(> .product-card) > :not(.product-card) { grid-column: 1 / -1; }

#main .content-text.product-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;           /* Karte mit Bild setzt sonst start */
  padding: 0;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}
@media (hover: hover) {
  #main .content-text.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lifted);
  }
  #main .product-card figure:hover img { transform: none; box-shadow: none; }
}
#main .product-card > figure { order: -1; margin: 0; }
#main .product-card > figure img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;              /* alle Bilder gleich hoch; Hochformat wird mittig beschnitten */
  border-radius: 0;
  box-shadow: none;
}
#main .product-card > :is(h1, h2, h3, h4) {
  margin: var(--space-3) var(--space-3) var(--space-1);
  font-size: var(--font-size-large);
  width: auto; min-width: 0; padding-right: 0;
}
#main .product-card > :is(h1, h2, h3, h4)::after { display: none; }
#main .product-card > .rte { padding: 0 var(--space-3) var(--space-3); }
#main .product-card .rte > p:last-child:not(:has(:not(br))) { display: none; }   /* leerer Absatz am Ende */

/* Preisliste: volle Kartenbreite, feine Linien, Preise rechtsbündig */
#main .product-card .rte table {
  display: table;
  width: 100% !important;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
#main .product-card .rte tbody { display: table-row-group; }
#main .product-card .rte tr { display: table-row; }
#main .product-card .rte :is(td, th) {
  display: table-cell;
  width: auto !important;
  padding: .35em 0;
  text-align: left !important;
  vertical-align: baseline;
  border-bottom: 1px solid var(--color-primary-light);
}
#main .product-card .rte :is(td, th):last-child { text-align: right !important; padding-left: var(--space-2); white-space: nowrap; }
#main .product-card .rte tr:has(strong) :is(td, th) {   /* Kopfzeile „UVP“ */
  padding-top: 0;
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
  border-bottom-color: var(--color-primary);
}
#main .product-card .rte tr:has(strong) strong { font-weight: 600; }
#main .product-card .rte tr:not(:has(a, strong, img)) :is(td, th) {   /* Leerzeile: nur Abstand zwischen Modellgruppen */
  padding: 0;
  height: var(--space-2) !important;
  font-size: 0;
  border-bottom: 0;
}
#main .product-card .rte a { text-decoration: none; }
#main .product-card .rte a:hover { text-decoration: underline; }


/* ---------------------------------------------------------------------
   16. Kacheln (Vorlagenvariante content_element/text/kachel → .tile-card)
   Text mit Bild als Wegweiser: Bild oben, Name, kurzer Untertitel; der
   Link im Text macht die ganze Kachel anklickbar. Kacheln eines Abschnitts
   stehen nebeneinander wie die Produkt-Karten (Abschnitt 15).
   --------------------------------------------------------------------- */
#main .mod_article:has(> .tile-card) {
  grid-template-columns: repeat(auto-fill, minmax(min(17rem, 100%), 1fr));
  align-items: stretch;
}
#main .mod_article:has(> .tile-card) > :not(.tile-card) { grid-column: 1 / -1; }

#main .content-text.tile-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}
#main .tile-card > figure { order: -1; margin: 0; }
#main .tile-card > figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 0; box-shadow: none; }
#main .tile-card > :is(h1, h2, h3, h4) {
  margin: var(--space-3) var(--space-3) var(--space-1);
  font-size: var(--font-size-large);
  width: auto; min-width: 0; padding-right: 0;
}
#main .tile-card > :is(h1, h2, h3, h4)::after { display: none; }
#main .tile-card > .rte { display: flex; flex-direction: column; flex: 1; padding: 0 var(--space-3) var(--space-3); color: var(--color-text-muted); }
#main .tile-card .rte p:has(> a:only-child) { margin-top: auto; padding-top: var(--space-2); }   /* Link immer unten in der Kachel */
#main .tile-card .rte a {
  font: 600 var(--font-size-normal)/1.3 var(--font-family-heading);
  text-decoration: none;
}
#main .tile-card .rte a::after { content: " →" / ""; }
#main .tile-card .rte a::before { content: ""; position: absolute; inset: 0; z-index: 1; }   /* ganze Kachel anklickbar */
@media (hover: hover) {
  #main .tile-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lifted);
  }
  #main .tile-card:hover .rte a { text-decoration: underline; }
  #main .tile-card figure:hover img { transform: none; box-shadow: none; }
}
#main .tile-card:has(a:focus-visible) { outline: 2px solid var(--color-primary); outline-offset: 3px; }


/* ---------------------------------------------------------------------
   17. Parallax-Abschnitt (Vorlagenvariante parallax für die Elemente Text, Bild und Galerie → .parallax-section)
   Das Bild füllt den ganzen Abschnitt und bleibt beim Scrollen im Fenster stehen.
   Technik: Das Bild steht fest im Fenster (position: fixed), der Abschnitt schneidet es
   zu (clip-path). Das funktioniert auch auf iPhone und iPad, anders als
   background-attachment: fixed. Bei „Bewegung reduzieren“ scrollt das Bild normal mit.
   --------------------------------------------------------------------- */
#main .mod_article:has(> .parallax-section) { padding: 0; background: none; overflow: visible; }
#main .mod_article:has(> .parallax-section)::before { display: none; }   /* kein Kettenblatt */
#main .mod_article > .parallax-section { grid-column: 1 / -1; }   /* immer volle Breite, auch wenn weitere Elemente im Abschnitt stehen */

#main .parallax-section {
  position: relative;
  isolation: isolate;
  clip-path: inset(0);            /* schneidet das feststehende Bild auf den Abschnitt zu */
  display: grid;
  /* Kurzer Text beginnt etwa auf halber Höhe: Der freie Raum wird 3 : 1 auf oben und unten verteilt
     (erste und letzte Zeile des Rasters). Bei langem Text schrumpft der Raum oben, der Text rückt nach oben. */
  grid-template-rows: 3fr auto auto auto 1fr;
  min-height: var(--parallax-height);
  padding: var(--space-5) max(var(--page-gutter) + var(--space-3), (100% - var(--content-width)) / 2 + var(--space-4));   /* Text etwas weiter eingerückt als der Seitenrand */
  color: #fff;
}
#main .parallax-section::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 100vh;                  /* Ersatz für ältere Browser */
  height: 100lvh;                 /* feste Höhe = Fenster bei eingeklappter Adressleiste; sonst springt die Bildgröße auf iPhone und Android beim Scrollen */
  z-index: -1;
  background:
    linear-gradient(rgb(5 6 15 / .30), rgb(5 6 15 / .45)),   /* abdunkeln, damit die Schrift lesbar bleibt */
    var(--parallax-image, none) center / cover no-repeat;
  pointer-events: none;
}
/* Höhe je Element über das Feld „CSS-Klasse“ (Experten-Einstellungen): parallax-low oder parallax-high */
#main .parallax-section.parallax-low  { min-height: var(--parallax-height-low); }
#main .parallax-section.parallax-high { min-height: var(--parallax-height-high); }
/* Inhalt in die Zeilen 2 bis 4, erste und letzte Zeile bleiben frei (Überschrift, Text, ggf. ein weiteres Element) */
#main .parallax-section > :nth-child(1) { grid-row: 2; }
#main .parallax-section > :nth-child(2) { grid-row: 3; }
#main .parallax-section > :nth-child(n+3) { grid-row: 4; }
/* Text auf die ruhige Bildseite: Feld „CSS-Klasse“ parallax-text-right (Standard: links). Auf dem Smartphone immer volle Breite. */
@media (min-width: 48em) {
  #main .parallax-section.parallax-text-right { grid-template-columns: 1fr minmax(0, 40rem); }
  #main .parallax-section.parallax-text-right > * { grid-column: 2; }
}
#main .parallax-noscript { position: absolute; inset: 0; z-index: -1; background: var(--parallax-image) center / cover no-repeat; }   /* Galerie ohne JavaScript: erstes Bild */
#main .parallax-section--image-only::before { background: var(--parallax-image, none) center / cover no-repeat; }   /* ohne Text nicht abdunkeln */
#main .parallax-section > :is(h1, h2, h3) { color: #fff; text-shadow: 0 1px 12px rgb(0 0 0 / .45); }
#main .parallax-section > :is(h1, h2)::after { background: #fff; }
#main .parallax-section .rte { max-width: 40rem; font-size: var(--font-size-large); line-height: 1.5; text-shadow: 0 1px 8px rgb(0 0 0 / .5); }
#main .parallax-section a { color: #fff; }
#main .parallax-section .rte > :last-child { margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
  #main .parallax-section::before { position: absolute; inset: 0; height: auto; }   /* Bild scrollt mit und füllt genau den Abschnitt */
}


/* ---------------------------------------------------------------------
   18. Fehlerseite (Seite „404 Seite nicht gefunden“, Element „Text“ mit CSS-Klasse error-page;
       setzt der Administrator): blassblauer Kasten mit Kettenblatt, Links als Knöpfe, Telefon als Knopf
   --------------------------------------------------------------------- */
#main .error-page {
  max-width: 50rem;
  padding: var(--space-3);
  background: var(--color-primary-pale);
  border-radius: var(--radius);
  box-shadow:
    0 1px 2px color-mix(in srgb, var(--color-primary-deep) 8%, transparent),
    0 6px 20px color-mix(in srgb, var(--color-primary-deep) 10%, transparent);
}
@media (min-width: 48em) {
  #main .error-page { padding: var(--space-4); }
}
#main .error-page ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin: var(--space-2) 0 var(--space-3);
  padding: 0;
  list-style: none;
}
#main .error-page li { margin: 0; }
#main .error-page li a {
  display: inline-block;
  padding: .5rem 1rem;
  font: 500 var(--font-size-normal)/1.3 var(--font-family-heading);
}
#main .error-page a[href^="tel:"] {
  display: block;                 /* eigene Zeile unter dem Satz */
  width: fit-content;
  margin-top: var(--space-2);
  padding: var(--space-1) var(--space-3);
  font: 600 var(--font-size-large)/1.2 var(--font-family-heading);
  white-space: nowrap;
}
/* Farben, Rand und Reaktion der Knöpfe: Abschnitt 19 */


/* ---------------------------------------------------------------------
   19. Knöpfe: auf der ganzen Website gleich (Entscheidung 30.11.2026)
   Zwei Arten, Unterschied nur in der Fläche:
     blau  – Verlauf oben heller, unten dunkler, Glanzstreifen, dunklerer Rand, weiße Schrift
     weiß  – weiße Fläche, blauer Rand, blaue Schrift (auf blauem oder dunklem Grund)
   Beim Darüberfahren für beide gleich: Fläche bleibt, Rand wirkt kräftiger (3 statt 2 Pixel,
   1 Pixel nach außen; nach innen wirkte der Knopf eingelaufen), leichter Schatten, hebt sich um 1 Pixel, keine Unterstreichung.
   Größe, Abstände und Schrift legt jeder Knopf in seinem eigenen Abschnitt fest.
   --------------------------------------------------------------------- */
:root {
  --button-blue-bg:
    linear-gradient(180deg, rgb(255 255 255 / .18) 0, rgb(255 255 255 / 0) 3px),      /* Glanzstreifen oben */
    linear-gradient(180deg, color-mix(in srgb, var(--color-primary) 80%, #fff) 0%,      /* oben heller (20 % Weiß) */
                            var(--color-primary) 50%,
                            color-mix(in srgb, var(--color-primary) 75%, #000) 100%);    /* unten dunkler (25 % Schwarz) */
  --button-shadow-hover: 0 3px 8px color-mix(in srgb, var(--color-primary-deep) 25%, transparent);
}

/* blau */
.button,
.menu-toggle,
.video-consent-play,
#main .error-page a[href^="tel:"] {
  color: #fff;
  background: var(--button-blue-bg);
  border: 2px solid var(--color-primary-dark);
  border-radius: .5rem;
  text-decoration: none;
}
/* weiß */
.catalog-teaser .button,
#main .offer-box a[href^="tel:"],
#main .error-page li a {
  color: var(--color-primary);
  background: #fff;
  border: 2px solid var(--color-primary);
  border-radius: .5rem;
  text-decoration: none;
}

/* Darüberfahren und Tastatur-Fokus */
:is(.button, .menu-toggle, .video-consent-play, #main .offer-box a[href^="tel:"], #main .error-page li a, #main .error-page a[href^="tel:"]) {
  transition: box-shadow .15s ease, translate .15s ease;
}
.button:is(:hover, :focus-visible),
.menu-toggle:is(:hover, :focus-visible),
.video-consent-play:is(:hover, :focus-visible),
#main .error-page a[href^="tel:"]:is(:hover, :focus-visible) {
  background: var(--button-blue-bg);   /* Fläche bleibt gleich, damit das Weiß der Schrift rein bleibt */
  text-decoration: none;
  translate: 0 -1px;
  box-shadow: 0 0 0 1px var(--color-primary-dark), var(--button-shadow-hover);   /* Rand wächst nach außen: Knopf wirkt größer statt eingelaufen */
}
.catalog-teaser .button:is(:hover, :focus-visible),
#main .offer-box a[href^="tel:"]:is(:hover, :focus-visible),
#main .error-page li a:is(:hover, :focus-visible) {
  background: #fff;
  text-decoration: none;
  translate: 0 -1px;
  box-shadow: 0 0 0 1px var(--color-primary), var(--button-shadow-hover);
}
@media (prefers-reduced-motion: reduce) {
  :is(.button, .menu-toggle, .video-consent-play, #main .offer-box a[href^="tel:"], #main .error-page li a, #main .error-page a[href^="tel:"]):is(:hover, :focus-visible) { translate: none; }
}


/* ---------------------------------------------------------------------
   20. Dezente Veredelung (Grundsatz 30.11.2026: hochwertig, aber unaufdringlich)
   --------------------------------------------------------------------- */
/* Linie unter h1/h2: links kräftig, läuft nach rechts leicht ins Hellblaue aus.
   In Kästen und Parallax-Abschnitten bleibt sie weiß (dort eigene Regeln weiter oben). */
#main .mod_article :is(h1, h2)::after {
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary) 45%, color-mix(in srgb, var(--color-primary) 40%, #fff) 100%);
}
#main :is(.offer-box, .emergency-box, .parallax-section) :is(h1, h2)::after { background: #fff; }

/* Header: oben an der Seite ohne Schatten, beim Scrollen blendet der Schatten in den ersten
   120 Pixeln weich ein. Browser ohne scrollgesteuerte Animation zeigen ihn wie bisher immer. */
@supports (animation-timeline: scroll()) {
  #header {
    animation: bsp-header-schatten linear both;
    animation-timeline: scroll(root);
    animation-range: 0 120px;
  }
  @keyframes bsp-header-schatten {
    from { box-shadow: none; }
    to   { box-shadow: var(--shadow-header); }
  }
}
