/* ==========================================================================
   Herz Apotheke – Contao Theme
   Version 1.0 · für Contao 5.x (kompatibel mit 4.13)
   --------------------------------------------------------------------------
   Aufbau
   01  Fonts (lokal, DSGVO-konform)
   02  Design-Tokens
   03  Basis & Typografie
   04  Seitengerüst (#wrapper, #header, #main, #footer)
   05  Header & Navigation
   06  Offcanvas (mobil)
   07  Sektionen (Artikel-Klassen)
   08  Hero
   09  Split-Layout (2 Spalten)
   10  Buttons
   11  Komponenten (Leistung, Öffnungszeiten, Checkliste, Trenner, Social …)
   12  Footer
   13  Hilfsklassen
   14  Responsive
   ========================================================================== */


/* 01  Fonts ---------------------------------------------------------------- */

@font-face {
  font-family: "Roboto Slab";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../../files/herz-apotheke/fonts/roboto-slab-latin-ext-wght-normal.woff2") format("woff2-variations");
  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: "Roboto Slab";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../../files/herz-apotheke/fonts/roboto-slab-latin-wght-normal.woff2") format("woff2-variations");
  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;
}


/* 02  Design-Tokens -------------------------------------------------------- */

:root {
  /* Farben – abgeleitet aus dem PRIVAPO-Logo
     Logo: Grün #28582A („PRIV“) · Rot #961D14 („APO“) · Schwarz #050505 · Gelb #D6DA00 */
  --c-ink:          #1c211c;   /* Text, Überschriften (fast schwarz, leicht grün) */
  --c-dark:         #1f4522;   /* Bühne, Footer, Offcanvas (dunkles Logo-Grün) */
  --c-green:        #28582a;   /* Logo-Grün: Shop-Button, Haken, „Geöffnet“      */
  --c-green-dark:   #1c3f1e;   /* Hover Grün                                     */
  --c-primary:      #961d14;   /* Logo-Rot: Buttons, Links, aktive Navigation    */
  --c-primary-dark: #74160f;   /* Hover Rot                                      */
  --c-accent:       #b8261a;   /* helleres Rot: Status „Geschlossen“, Hinweise   */
  --c-yellow:       #d6da00;   /* Logo-Gelb: Akzente auf dunklem Grund           */
  --c-black:        #050505;   /* Logo-Schwarz                                   */
  --c-open:         var(--c-green);
  --c-muted:        #636b60;
  --c-light:        #eef1ec;   /* Icon-Buttons, Flächen                          */
  --c-card:         #f6f8f4;   /* Karten                                         */
  --c-border:       #e1e6de;
  --c-white:        #fff;

  /* Farbwerte für Transparenzen (R, G, B) */
  --rgb-ink:     28, 33, 28;
  --rgb-primary: 150, 29, 20;
  --rgb-green:   40, 88, 42;

  /* Typografie */
  --font-base: "Roboto Slab", Georgia, "Times New Roman", serif;
  --fs-base: 16px;
  --lh-base: 1.5;
  --fs-h1: 52px;
  --fs-h2: 42px;
  --fs-h3: 24px;
  --fs-h4: 20px;
  --fs-lead: 18px;
  --fs-small: 13px;
  --fw-heading: 500;

  /* Layout */
  --container:        1200px;
  --container-narrow: 960px;
  --container-wide:   1360px;
  --gutter:           40px;
  --section-y:        70px;
  --header-h:         130px;
  --radius-card:      20px;
  --radius-pill:      500px;
  --page-border:      5px;

  --transition: .2s ease;
}


/* 03  Basis & Typografie --------------------------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-base);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: var(--lh-base);
  color: var(--c-ink);
  background: var(--c-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video { max-width: 100%; height: auto; vertical-align: middle; }
figure { margin: 0; }

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4 {
  margin: 0 0 20px;
  font-family: var(--font-base);
  font-weight: var(--fw-heading);
  line-height: 1.2;
  color: inherit;
}
* + h1, * + h2, * + h3, * + h4, * + h5, * + h6 { margin-top: 40px; }

h1, .h1 { font-size: var(--fs-h1); }
h2, .h2 { font-size: var(--fs-h2); }
h3, .h3 { font-size: var(--fs-h3); line-height: 1.4; }
h4, .h4 { font-size: var(--fs-h4); line-height: 1.4; }
h5, h6  { font-size: var(--fs-base); line-height: 1.4; }

/* Klassen auf Inhaltselementen wirken auch auf die enthaltene Überschrift */
.h1 > :is(h1,h2,h3,h4,h5,h6) { font-size: var(--fs-h1); }
.h2 > :is(h1,h2,h3,h4,h5,h6) { font-size: var(--fs-h2); }
.h3 > :is(h1,h2,h3,h4,h5,h6) { font-size: var(--fs-h3); }
.h4 > :is(h1,h2,h3,h4,h5,h6) { font-size: var(--fs-h4); }
.h-medium,
.h-medium > :is(h1,h2,h3,h4,h5,h6) { font-size: 32px; line-height: 1.25; }

p, ul, ol, dl, table, blockquote, pre { margin: 0 0 20px; }
:is(p, ul, ol, dl, table, blockquote, pre, figure):last-child { margin-bottom: 0; }

strong, b { font-weight: 700; }
small { font-size: 80%; }

a {
  color: var(--c-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition);
}
a:hover { color: var(--c-green); }

hr {
  margin: 30px 0;
  border: 0;
  border-top: 1px solid var(--c-border);
}

table { width: 100%; border-collapse: collapse; }
th, td { padding: 4px 0; text-align: left; vertical-align: top; }

:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 3px; }

::selection { background: var(--c-yellow); color: var(--c-black); }

/* Contao: Sprunglinks u. ä. */
.invisible,
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.invisible:focus {
  position: fixed !important;
  top: 10px; left: 10px; z-index: 2000;
  width: auto; height: auto; margin: 0;
  padding: 10px 20px;
  clip: auto;
  background: var(--c-ink); color: #fff;
  border-radius: var(--radius-pill);
}

/* Abstände zwischen Inhaltselementen */
.mod_article > * + * { margin-top: 20px; }
.mod_article > :is(h1, h2, h3, h4, h5, h6) { margin-bottom: 0; }


/* 04  Seitengerüst ----------------------------------------------------------- */

#wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  border-bottom: var(--page-border) solid var(--c-yellow);
  overflow-x: clip;
}
#container { flex: 1 0 auto; }
#main, #main > .inside { width: 100%; }


/* 05  Header & Navigation ---------------------------------------------------- */

#header {
  position: relative;
  z-index: 100;
  background: var(--c-white);
}

#header > .inside {
  display: flex;
  align-items: center;
  gap: 40px;
  min-height: var(--header-h);
  padding-inline: var(--gutter);
}

/* Logo */
.brand {
  display: inline-flex;
  flex: 0 0 auto;
  flex-direction: column;
  color: var(--c-ink);
  text-decoration: none;
  line-height: 1;
}
.brand:hover { color: var(--c-ink); }
.brand img { display: block; width: 250px; height: auto; }

/* Text-Platzhalter, solange kein Logo eingebunden ist */
.brand__name {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 34px;
  font-weight: 300;
  letter-spacing: -.01em;
}
.brand__name b { font-weight: 700; }
.brand__heart { color: var(--c-accent); font-size: .9em; }
.brand__claim { margin-top: 6px; padding-left: 2px; font-size: 11px; letter-spacing: .02em; }
#footer .brand,
#footer .brand:hover { color: var(--c-white); }

/* Hauptnavigation (Modul „Navigationsmenü“) */
#header .mod_navigation {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
}
#header .mod_navigation ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
#header .mod_navigation .level_1 {
  display: flex;
  align-items: center;
  gap: 40px;
}
#header .mod_navigation .level_1 > li { position: relative; }

#header .mod_navigation .level_1 > li > :is(a, strong, span) {
  position: relative;
  display: flex;
  align-items: center;
  min-height: var(--header-h);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--c-ink);
  text-decoration: none;
  transition: color var(--transition);
}

/* roter Balken oben am aktiven Punkt */
#header .mod_navigation .level_1 > li > :is(a, strong, span)::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  width: 42px; height: 4px;
  background: var(--c-primary);
  transform: translateX(-50%) scaleX(0);
  transition: transform var(--transition);
}

#header .mod_navigation .level_1 > li > a:hover,
#header .mod_navigation .level_1 > li.active > :is(a, strong),
#header .mod_navigation .level_1 > li.trail > :is(a, strong),
#header .mod_navigation .level_1 > li > :is(a, strong)[aria-current] { color: var(--c-primary); }

#header .mod_navigation .level_1 > li.active > :is(a, strong)::before,
#header .mod_navigation .level_1 > li.trail > :is(a, strong)::before,
#header .mod_navigation .level_1 > li > :is(a, strong)[aria-current]::before { transform: translateX(-50%) scaleX(1); }

/* Dropdown (2. Ebene) */
#header .mod_navigation .level_2 {
  position: absolute;
  top: calc(100% - 24px);
  left: 50%;
  min-width: 240px;
  padding: 15px 0;
  background: var(--c-white);
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(var(--rgb-ink), .12);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}
#header .mod_navigation .level_1 > li:is(:hover, :focus-within) > .level_2 {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
#header .mod_navigation .level_2 :is(a, strong) {
  display: block;
  padding: 7px 25px;
  font-size: 15px;
  font-weight: 500;
  color: var(--c-ink);
  text-decoration: none;
}
#header .mod_navigation .level_2 :is(a:hover, .active, strong) { color: var(--c-primary); }

/* Aktionen rechts (Shop-Button, Status, Burger) */
.header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

/* Status-Pille „Aktuell geöffnet/geschlossen“ */
.open-status {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 20px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--c-white);
  background: var(--c-accent);
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.open-status.is-open { background: var(--c-open); }

/* Burger-Button */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 0;
  font: 600 15px/1 var(--font-base);
  color: var(--c-ink);
  background: none;
  border: 0;
  cursor: pointer;
}
.nav-toggle__icon,
.nav-toggle__icon::before,
.nav-toggle__icon::after {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.nav-toggle__icon { position: relative; }
.nav-toggle__icon::before,
.nav-toggle__icon::after { content: ""; position: absolute; left: 0; }
.nav-toggle__icon::before { top: -7px; }
.nav-toggle__icon::after  { top: 7px; }


/* 06  Offcanvas (mobil) ------------------------------------------------------ */

.offcanvas {
  position: fixed;
  inset: 0;
  z-index: 1000;
  visibility: hidden;
  transition: visibility .3s;
}
.offcanvas.is-open { visibility: visible; }

.offcanvas__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(var(--rgb-ink), .55);
  opacity: 0;
  transition: opacity .3s;
}
.offcanvas.is-open .offcanvas__backdrop { opacity: 1; }

.offcanvas__panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: min(360px, 88vw);
  padding: 30px;
  overflow-y: auto;
  color: var(--c-white);
  background: var(--c-dark);
  transform: translateX(100%);
  transition: transform .3s ease;
}
.offcanvas.is-open .offcanvas__panel { transform: none; }

.offcanvas__close {
  align-self: flex-end;
  width: 40px; height: 40px;
  padding: 0;
  font-size: 28px;
  line-height: 1;
  color: var(--c-white);
  background: rgba(255, 255, 255, .1);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.offcanvas ul { margin: 0; padding: 0; list-style: none; }
.offcanvas li + li { border-top: 1px solid rgba(255, 255, 255, .12); }
.offcanvas__nav :is(a, strong) {
  display: block;
  padding: 14px 0;
  font-size: 20px;
  font-weight: 500;
  color: var(--c-white);
  text-decoration: none;
}
.offcanvas .level_2 { padding: 0 0 10px 15px; }
.offcanvas .level_2 li { border: 0; }
.offcanvas__nav .level_2 :is(a, strong) { padding: 6px 0; font-size: 16px; color: rgba(255, 255, 255, .7); }
.offcanvas__nav :is(.active, strong, a:hover) { color: var(--c-yellow); }
.offcanvas .offcanvas__extras { display: flex; flex-wrap: wrap; gap: 12px; }
.offcanvas__extras a.btn { min-height: 46px; padding: 0 25px; font-size: 13px; color: var(--c-ink); background: var(--c-white); }
.offcanvas__extras a.btn:hover { color: var(--c-white); background: var(--c-primary); }

body.offcanvas-open { overflow: hidden; }


/* 07  Sektionen (Klassen für Artikel) --------------------------------------- */

/* Jeder Artikel ist eine Sektion mit Container-Breite */
.mod_article {
  --container-w: var(--container);
  position: relative;
  padding-block: var(--section-y);
  padding-inline: max(var(--gutter), calc((100% - var(--container-w)) / 2));
}

.section--narrow { --container-w: var(--container-narrow); }
.section--wide   { --container-w: var(--container-wide); }
.section--full   { padding-inline: 0; }

.section--tight  { padding-block: 30px; }
.section--large  { padding-block: 110px; }
.section--flush-top    { padding-top: 0; }
.section--flush-bottom { padding-bottom: 0; }

.section--center { text-align: center; }

/* zwei weiße Abschnitte hintereinander: oberen Abstand nicht doppeln */
.mod_article:not(.hero, .section--light, .section--navy) + .mod_article:not(.hero, .section--light, .section--navy) { padding-top: 0; }
.section--light + .section--light { padding-top: 0; }

.section--light  { background: var(--c-card); }
.section--navy   { background: var(--c-dark); color: var(--c-white); }
.section--navy :is(p, li) { color: rgba(255, 255, 255, .8); }
.section--navy a:not(.btn, [class*="btn--"], .btn a, .buttons a, .social a, .brand) { color: var(--c-white); }


/* 08  Hero ------------------------------------------------------------------- */
/*
   Artikel-Klasse: hero
   Erstes Element: Bild mit Klasse „hero__media“ (links, randlos)
   Danach: Überschriften, Text, Buttons (rechte Spalte, dunkelblau)
*/

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 80px repeat(15, auto) minmax(80px, 1fr);
  min-height: 530px;
  padding: 0;
  color: var(--c-white);
  background: var(--c-dark);
}
.hero::before {           /* Abstandshalter oben */
  content: "";
  grid-column: 2;
  grid-row: 1;
}
.hero > * {
  grid-column: 2;
  max-width: 700px;
  padding-inline: 75px 40px;
}
.hero > * + * { margin-top: 0; }

.hero > .hero__media {
  grid-column: 1;
  grid-row: 1 / -1;
  max-width: none;
  padding: 0;
  overflow: hidden;
}
.hero__media :is(figure, picture, img) {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  object-fit: cover;
}

/* Unterkante gerade (die frühere Kurve ist entfernt) */

.hero :is(h1, h2, h3, h4) { margin: 0; color: var(--c-white); }
.hero h1 { font-size: var(--fs-h1); }
.hero h2 { font-size: 32px; }
.hero h3 { margin-top: 40px; margin-bottom: 15px; font-size: var(--fs-h3); color: var(--c-yellow); }
.hero :is(p, li) { color: rgba(255, 255, 255, .8); }
.hero > :is(.ce_hyperlink, .content-hyperlink, .buttons, .btn) { margin-top: 30px; }
.hero > :is(.ce_hyperlink, .content-hyperlink, .btn) + :is(.ce_hyperlink, .content-hyperlink, .btn) { margin-top: 12px; }



/* 09  Split-Layout ------------------------------------------------------------ */
/*
   Artikel-Klasse: split                → zweispaltig
   Element-Klasse: split__aside         → dieses Element bildet die zweite Spalte
                                          (z. B. Bild oder Öffnungszeiten-Karte)
   Modifikatoren (Artikel):
     split--aside-left                  → Aside links statt rechts
     split--center                      → Text vertikal mittig zur Aside
     split--wide-aside                  → Aside-Spalte breiter (5:7)
*/

.split {
  --split-text-col: 1;
  --split-aside-col: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(20, auto) 1fr;
  column-gap: 80px;
  align-items: start;
}
.split > * { grid-column: var(--split-text-col); }
.split > * + * { margin-top: 0; }
.split > :not(.split__aside) + :not(.split__aside) { margin-top: 20px; }

.split > .split__aside {
  grid-column: var(--split-aside-col);
  grid-row: 1 / -1;
  align-self: center;
}

.split--aside-left {
  --split-text-col: 2;
  --split-aside-col: 1;
}
.split--wide-aside { grid-template-columns: 5fr 7fr; }
.split--wide-aside.split--aside-left { grid-template-columns: 7fr 5fr; }

.split--center { grid-template-rows: 1fr repeat(20, auto) 1fr; }
.split--center::before {
  content: "";
  grid-column: var(--split-text-col);
  grid-row: 1;
}

.split__aside :is(figure, img) { display: block; margin-inline: auto; }


/* 10  Buttons ---------------------------------------------------------------- */
/*
   Variante A: Inhaltselement „Hyperlink“ mit Klasse  btn  (+ btn--secondary …)
   Variante B: Textelement mit Klasse  buttons  → alle Links darin werden Buttons
   Variante C: im HTML  <a class="btn btn--secondary" href="…">…</a>
*/

:is(div, p, span, li).btn a,
.buttons a,
a.btn,
button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 25px;
  font: 600 12px/1.2 var(--font-base);
  color: var(--c-white);
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  background: var(--c-primary);
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition), box-shadow var(--transition);
}
:is(div, p, span, li).btn a:hover,
.buttons a:hover,
a.btn:hover,
button.btn:hover {
  color: var(--c-white);
  background: var(--c-primary-dark);
  box-shadow: 0 6px 18px rgba(var(--rgb-primary), .25);
}

/* Varianten – wirken am Element-Wrapper, am Link oder an einem Link in .buttons */
:is(div, p, span, li).btn--secondary a, a.btn--secondary, .buttons a.btn--secondary { background: var(--c-green); }
:is(div, p, span, li).btn--secondary a:hover, a.btn--secondary:hover, .buttons a.btn--secondary:hover { background: var(--c-green-dark); box-shadow: 0 6px 18px rgba(var(--rgb-green), .3); }

:is(div, p, span, li).btn--light a, a.btn--light, .buttons a.btn--light { color: var(--c-ink); background: var(--c-white); }
:is(div, p, span, li).btn--light a:hover, a.btn--light:hover, .buttons a.btn--light:hover { color: var(--c-ink); background: var(--c-light); box-shadow: none; }

:is(div, p, span, li).btn--green a, a.btn--green, .buttons a.btn--green { background: var(--c-green); }
:is(div, p, span, li).btn--green a:hover, a.btn--green:hover, .buttons a.btn--green:hover { background: var(--c-green-dark); box-shadow: 0 6px 18px rgba(var(--rgb-green), .3); }

:is(div, p, span, li).btn--yellow a, a.btn--yellow, .buttons a.btn--yellow { color: var(--c-black); background: var(--c-yellow); }
:is(div, p, span, li).btn--yellow a:hover, a.btn--yellow:hover, .buttons a.btn--yellow:hover { color: var(--c-black); background: #c3c700; box-shadow: 0 6px 18px rgba(var(--rgb-ink), .2); }

:is(div, p, span, li).btn--large a, a.btn--large {
  min-height: 56px;
  padding: 0 35px;
  font-size: 20px;
  font-weight: 700;
}

/* Button-Gruppe: Links nebeneinander */
.buttons,
.buttons .rte,
.buttons p { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.buttons .rte,
.buttons p { margin: 0; }
.buttons a, a.btn, .btn a { position: relative; z-index: 1; }
.mod_article > .buttons:not(:first-child) { margin-top: 28px; }
.section--center :is(.buttons, .buttons .rte, .buttons p),
.text-center:is(.buttons) :is(.rte, p) { justify-content: center; }
.section--center .btn,
.btn.text-center { text-align: center; }

/* Im Hero ist der erste Button weiß */
.hero .buttons a:first-child:not([class*="btn--"]) { color: var(--c-ink); background: var(--c-white); }
.hero .buttons a:first-child:not([class*="btn--"]):hover { background: var(--c-light); box-shadow: none; }

/* Icons in Buttons */
.btn svg, .buttons svg { width: 20px; height: 20px; flex: 0 0 auto; }


/* 11  Komponenten ------------------------------------------------------------ */

/* Lead-Text */
.lead, .lead p { font-size: var(--fs-lead); font-weight: 500; line-height: 1.5; }

/* Hinweis (klein, rot) */
.note, .note p { font-size: 12px; line-height: 1.5; color: var(--c-accent); }

/* Meta / gedämpft */
.text-muted, .text-muted p { color: var(--c-muted); }
.text-meta,  .text-meta p  { font-size: var(--fs-small); color: var(--c-muted); }

/* Trenner mit rotem Punkt
   – als HTML:  <hr class="divider">
   – oder Klasse „divider-top“ an einem beliebigen Element */
hr.divider,
.divider-top::before {
  content: "";
  display: block;
  width: min(315px, 100%);
  height: 20px;
  margin: 0 auto 30px;
  border: 0;
  background:
    radial-gradient(circle, var(--c-accent) 0 3px, transparent 3.5px) center / 20px 20px no-repeat,
    linear-gradient(to right, var(--c-border) calc(50% - 20px), transparent calc(50% - 20px) calc(50% + 20px), var(--c-border) calc(50% + 20px)) center / 100% 1px no-repeat;
}
hr.divider { margin-block: 0 30px; }

/* Leistung: Textelement mit Icon (Bild links, ca. 50 px)
   Klasse: service */
.service {
  display: grid;
  grid-template-columns: 50px 1fr;
  column-gap: 15px;
  align-items: start;
}
.service > * { grid-column: 2; }
.service > :is(figure, .image_container, .media, picture) {
  grid-column: 1;
  grid-row: 1 / span 4;
  width: 50px;
  margin: 0 !important;
  float: none !important;
}
.service :is(figure, .image_container) img { width: 50px; height: 50px; object-fit: contain; }
.service :is(h2, h3, h4) { margin: 0 0 2px; font-size: var(--fs-h3); line-height: 1.3; }
.service :is(p, .rte) { margin: 0; font-size: 15px; line-height: 1.55; }
.service .rte > * + * { margin-top: 2px; }
.service + .service,
.split > .service + .service { margin-top: 40px; }

/* Öffnungszeiten: Inhaltselement „Tabelle“ mit Klasse  opening-hours */
.opening-hours {
  position: relative;
  isolation: isolate;
  padding: 40px;
  background: var(--c-card);
  border-radius: var(--radius-card);
}
.opening-hours::before {      /* Punkte-Muster hinter der Karte */
  content: "";
  position: absolute;
  inset: -70px -20px;
  z-index: -1;
  background: url("../../files/herz-apotheke/img/pattern-dots.svg") center / cover no-repeat;
  pointer-events: none;
}
.opening-hours::after {        /* deckende Kartenfläche über dem Muster */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--c-card);
  border-radius: inherit;
}
.opening-hours > :is(h2, h3, h4, caption),
.opening-hours caption {
  margin: 0 0 20px;
  font-size: var(--fs-h3);
  font-weight: var(--fw-heading);
  text-align: center;
}
.opening-hours table { margin: 0; font-size: 15px; }
.opening-hours :is(th, td) { padding: 3px 0; font-weight: 400; }
.opening-hours :is(th, td):last-child { text-align: right; white-space: nowrap; }
.opening-hours thead { display: none; }
.opening-hours tr.is-closed :is(th, td) { color: var(--c-accent); }
.opening-hours tr.is-today :is(th, td) { font-weight: 700; }

.opening-hours__status {
  display: block;
  margin: 0 0 25px;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  color: var(--c-accent);
  background: var(--c-white);
  border-radius: var(--radius-pill);
}
.opening-hours__status.is-open { color: var(--c-open); }

/* Karte (allgemein, ohne Raster) */
.card:not(.cards > .card) {
  padding: 40px;
  background: var(--c-card);
  border-radius: var(--radius-card);
}

/* Checkliste: Inhaltselement „Liste“ mit Klasse  checklist */
.checklist ul,
ul.checklist { margin: 0; padding: 0; list-style: none; }
.checklist li {
  position: relative;
  padding-left: 32px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.55;
}
.checklist li + li { margin-top: 10px; }
.checklist li::before {
  content: "";
  position: absolute;
  top: 2px; left: 0;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--c-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.3l3 3 6-6.3' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}

/* Social-Icons (runde Buttons) */
.social {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.section--center .social,
.social.text-center { justify-content: center; }
.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  color: var(--c-ink);
  background: var(--c-light);
  border-radius: 50%;
  transition: background-color var(--transition), color var(--transition);
}
.social a:hover { color: var(--c-white); background: var(--c-primary); }
.social svg { width: 20px; height: 20px; fill: currentColor; }
#footer .social a,
.section--navy .social a,
.hero .social a { background: var(--c-white); }
#footer .social a:hover,
.section--navy .social a:hover { color: var(--c-white); background: var(--c-primary); }

/* Produktbild / Abbildungen mit weichem Schatten frei */
.image--shadow img { filter: drop-shadow(0 25px 30px rgba(var(--rgb-ink), .15)); }


/* 12  Footer ----------------------------------------------------------------- */

#footer {
  position: relative;
  margin-top: 150px;           /* Platz für die Welle */
  color: var(--c-white);
  background: var(--c-dark);
}

/* Welle oberhalb des Footers */
#footer::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: calc(100% - 1px);
  height: 150px;
  background: url("../../files/herz-apotheke/img/divider-footer.svg") center bottom / 100% 100% no-repeat;
  pointer-events: none;
}

#footer > .inside {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px;
  padding: 60px max(var(--gutter), calc((100% - var(--container-wide)) / 2)) 20px;
}

#footer :is(h2, h3, h4, .footer-title) {
  position: relative;
  padding-bottom: 12px;
  margin: 0 0 20px;
  font-size: var(--fs-h3);
  font-weight: var(--fw-heading);
  line-height: 1.3;
  color: var(--c-white);
}

#footer :is(h2, h3, h4, .footer-title)::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 36px; height: 3px;
  background: var(--c-yellow);
}

#footer p { margin: 0 0 15px; }
#footer a:not(.btn, [class*="btn--"], .btn a, .buttons a, .social a, .brand) {
  color: rgba(255, 255, 255, .6);
  text-decoration: none;
}
#footer a:not(.btn, [class*="btn--"], .btn a, .buttons a, .social a, .brand):hover { color: var(--c-white); }

.footer-contact address,
.footer-contact p.address {
  margin: 0 0 20px;
  font-size: 18px;
  font-style: normal;
  line-height: 1.6;
}
.footer-contact address strong { font-weight: 700; }
.footer-contact address a:not(.btn) { color: inherit !important; }

.footer-brand .brand { margin-bottom: 30px; }

/* Footer-Navigationen (Modul „Individuelle Navigation“) */
#footer :is(.mod_customnav, .mod_navigation) ul { margin: 0; padding: 0; list-style: none; }
#footer :is(.mod_customnav, .mod_navigation) li + li { margin-top: 10px; }
#footer :is(.mod_customnav, .mod_navigation) :is(a, strong) {
  font-size: 15px;
  color: rgba(255, 255, 255, .6);
  text-decoration: none;
}
#footer :is(.mod_customnav, .mod_navigation) :is(a:hover, strong, .active) { color: var(--c-white); }

.footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 24px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: 13px;
  color: rgba(255, 255, 255, .7);
}
.footer-bottom p { margin: 0; }
.footer-bottom a { color: inherit; }
.footer-bottom a:hover { color: var(--c-white); }


/* 12b Erweiterungen (Karten, Seitenkopf, Accordion, Formulare, News, Video) */

/* Karten-Raster
   Artikel-Klasse: cards cards--2 | cards--3 | cards--4
   Inhaltselement „Elementgruppe“ mit Klasse: card
   Ein Hyperlink mit Klasse „card__link“ macht die ganze Karte klickbar. */
.cards {
  --cards: 3;
  display: grid;
  grid-template-columns: repeat(var(--cards), minmax(0, 1fr));
  gap: 30px;
  align-items: stretch;
}
.cards--2 { --cards: 2; }
.cards--3 { --cards: 3; }
.cards--4 { --cards: 4; }
.cards > * + * { margin-top: 0; }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 0 28px;
  overflow: hidden;
  background: var(--c-card);
  border-radius: var(--radius-card);
  transition: transform var(--transition), box-shadow var(--transition);
}
.card > * { margin: 0 !important; padding-inline: 28px; }
.card > :first-child:not(:is(.content-image, .ce_image)) { margin-top: 28px !important; }
.card > :is(.content-image, .ce_image) { padding-inline: 0; }
.card > :is(.content-image, .ce_image) figure { display: block; width: 100%; }
.card > :is(.content-image, .ce_image) img { display: block; width: auto; max-width: 100%; height: auto; margin-inline: auto; }
.card:has(> :only-child:is(.content-image, .ce_image)) { padding-bottom: 0; }
.card :is(h1, h2, h3, h4) { margin: 0; font-size: 22px; line-height: 1.3; }
.card :is(p, li) { font-size: 15px; }
.card:has(.card__link):hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(var(--rgb-ink), .12); }
.card__link { margin-top: auto !important; }
.card__link a {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-primary);
  text-decoration: none;
}
.card__link a::after {        /* ganze Karte klickbar */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.card__link a:hover { color: var(--c-ink); }
.card :is(input, textarea, button, select) { position: relative; z-index: 2; }

/* Seitenkopf für Unterseiten
   Artikel-Klassen: hero hero--page  (Überschrift + optional Text, ohne Bild) */
.hero--page {
  display: block;
  min-height: 0;
  padding: 70px max(var(--gutter), calc((100% - var(--container-narrow)) / 2));
  text-align: center;
}
.hero--page::before { display: none; }
.hero--page > * { max-width: none; padding-inline: 0; }
.hero--page > * + * { margin-top: 18px; }
.hero--page h1 { font-size: clamp(30px, 4vw, 48px); }
.hero--page :is(p, .rte) { max-width: 760px; margin-inline: auto; font-size: 18px; color: rgba(255, 255, 255, .85); }
.hero--compact { padding-top: 28px; padding-bottom: 28px; }
.hero-kicker { margin: 0; font-size: 15px !important; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.hero-kicker, .hero-kicker a { color: var(--c-yellow) !important; text-decoration: none; }
.hero > .hero-kicker + :is(h1, .content-headline) { margin-top: 10px; }
.hero > :is(h1, .content-headline) + .lead { margin-top: 18px; }
.hero .lead p { font-size: 19px; font-weight: 400; color: rgba(255, 255, 255, .88); }
.hero-kicker a:hover { color: var(--c-white); }

/* Accordion (Contao-Element „Akkordeon“, handorgel) */
.content-accordion { border-top: 1px solid var(--c-border); }
.content-accordion .handorgel__header {
  margin: 0;
  font-size: 18px;
  border-bottom: 1px solid var(--c-border);
}
.content-accordion .handorgel__header__button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  padding: 18px 0;
  font: 600 18px/1.4 var(--font-base);
  color: var(--c-ink);
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
}
.content-accordion .handorgel__header__button::after {
  content: "+";
  flex: 0 0 auto;
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
  color: var(--c-accent);
  transition: transform var(--transition);
}
.content-accordion .handorgel__header--open .handorgel__header__button::after { transform: rotate(45deg); }
.content-accordion .handorgel__header__button:hover { color: var(--c-primary); }
.content-accordion .handorgel__content { border: 0; }
.content-accordion .handorgel__content__inner { padding: 4px 0 24px; }
.content-accordion .handorgel__content__inner :is(h3, h4) { font-size: 17px; }

/* Formulare (Formulargenerator, Newsletter) */
.formbody .widget { margin-bottom: 18px; }
.formbody .widget > label,
.formbody .widget legend {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 600;
}
.formbody :is(input[type="text"], input[type="email"], input[type="tel"], input[type="search"], input[type="number"], input:not([type]), textarea, select),
.aponet-search input[type="text"] {
  width: 100%;
  padding: 12px 18px;
  font: 16px/1.4 var(--font-base);
  color: var(--c-ink);
  background: var(--c-white);
  border: 1px solid #cfd6cb;
  border-radius: 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.formbody textarea { min-height: 160px; resize: vertical; }
.formbody :is(input, textarea, select):focus,
.aponet-search input:focus {
  outline: 0;
  border-color: var(--c-green);
  box-shadow: 0 0 0 3px rgba(var(--rgb-green), .18);
}
.formbody fieldset { margin: 0; padding: 0; border: 0; }
.formbody .widget-checkbox fieldset > span,
.formbody .widget-radio fieldset > span { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; }
.formbody .widget-checkbox input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--c-green); }
.formbody span.mandatory { color: var(--c-accent); }
.formbody .error, p.error { font-size: 13px; color: var(--c-accent); }
.formbody .widget-explanation { font-size: 13px; color: var(--c-muted); }
.formbody button.submit,
.formbody input.submit,
.aponet-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 30px;
  font: 700 14px/1.2 var(--font-base);
  color: var(--c-white);
  background: var(--c-primary);
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background-color var(--transition);
}
.formbody button.submit:hover,
.aponet-search button:hover { background: var(--c-primary-dark); }
.form-card,
.content-form,
.ce_form,
.mod_subscribe {
  padding: 40px;
  background: var(--c-card);
  border-radius: var(--radius-card);
}
.card :is(.content-form, .ce_form, .mod_subscribe, .content-module) { padding: 0 28px; background: none; }
.section--center .formbody { text-align: left; }

/* aponet-Suche (Notdienst / Apothekensuche) */
.aponet-search { margin-top: 20px; }
.aponet-search h3 { margin: 0 0 10px; font-size: 18px; }
.aponet-search form { display: flex; gap: 10px; }
.aponet-search input[type="text"] { flex: 1 1 auto; }
.aponet-search small { display: block; margin-top: 8px; font-size: 12px; color: var(--c-muted); }

/* Video (YouTube/Vimeo) */
:is(.content-youtube, .content-vimeo, .ce_youtube, .ce_vimeo) iframe {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: var(--radius-card);
}

/* Video mit Vorschaubild: lädt YouTube erst nach dem Klick */
:is(.content-youtube, .content-vimeo) figure { margin: 0; }
:is(.content-youtube, .content-vimeo) [data-splash-screen] {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-card);
  background: var(--c-dark);
  cursor: pointer;
}
:is(.content-youtube, .content-vimeo) [data-splash-screen] :is(picture, img) {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  border-radius: 0;
  opacity: .85;
  transition: opacity .2s ease, transform .4s ease;
}
:is(.content-youtube, .content-vimeo) [data-splash-screen]::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--c-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M8 5v14l11-7z'/%3E%3C/svg%3E") 55% 50% / 34px no-repeat;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
  transform: translate(-50%, -50%);
  transition: transform .2s ease;
}
:is(.content-youtube, .content-vimeo) [data-splash-screen] > span {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  padding: 12px 18px;
  font-size: 13px;
  line-height: 1.4;
  color: #fff;
  text-align: left;
  background: linear-gradient(transparent, rgba(0, 0, 0, .7));
}
:is(.content-youtube, .content-vimeo) [data-splash-screen]:is(:hover, :focus-visible) img { opacity: 1; transform: scale(1.02); }
:is(.content-youtube, .content-vimeo) [data-splash-screen]:is(:hover, :focus-visible)::before { transform: translate(-50%, -50%) scale(1.08); }

/* Bildkacheln (Angebots-Banner) und Logo-Raster
   Artikel-Klasse: tiles tiles--2 | tiles--3 – jedes Bild-Element wird eine Kachel
   Artikel-Klasse: logo-grid – Markenlogos in gleich großen Feldern */
.tiles {
  --tiles: 3;
  --gap: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: var(--gap);
}
.tiles > :is(.content-image, .ce_image) { flex: 0 0 calc((100% - (var(--tiles) - 1) * var(--gap)) / var(--tiles)); }
.tiles > :not(.content-image, .ce_image) { flex: 0 0 100%; }
.tiles--2 { --tiles: 2; }
.tiles--3 { --tiles: 3; }
.logo-grid {
  --tiles: 5;
  --gap: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--gap);
}
.logo-grid > :is(.content-image, .ce_image) { flex: 0 0 calc((100% - (var(--tiles) - 1) * var(--gap)) / var(--tiles)); }
.logo-grid > :not(.content-image, .ce_image) { flex: 0 0 100%; }
:is(.tiles, .logo-grid) > * + * { margin-top: 0; }
:is(.tiles, .logo-grid) > .section-head + :not(.section-head) { margin-top: 0 !important; }
:is(.tiles, .logo-grid) > :is(.section-head, .section-link, h1, h2, h3, .content-text, .content-hyperlink) { grid-column: 1 / -1; }
:is(.tiles, .logo-grid) > .section-head:has(+ :not(.section-head)) { margin-bottom: 16px; }
:is(.tiles, .logo-grid) > .section-head + .section-head { margin-top: -10px; }
:is(.tiles, .logo-grid) > .section-link { margin-top: 16px; }
.tiles > :is(.content-image, .ce_image) figure { margin: 0; }
.tiles > :is(.content-image, .ce_image) img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(var(--rgb-ink), .06), 0 6px 18px rgba(var(--rgb-ink), .06);
  transition: transform .2s ease, box-shadow .2s ease;
}
.tiles > :is(.content-image, .ce_image) a:is(:hover, :focus-visible) img {
  transform: translateY(-3px);
  box-shadow: 0 2px 4px rgba(var(--rgb-ink), .08), 0 12px 28px rgba(var(--rgb-ink), .12);
}
.logo-grid > :is(.content-image, .ce_image) figure {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  min-height: 112px;
  margin: 0;
  padding: 16px 20px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 12px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.logo-grid > :is(.content-image, .ce_image) figure:has(a:is(:hover, :focus-visible)) {
  border-color: rgba(var(--rgb-green), .45);
  box-shadow: 0 6px 18px rgba(var(--rgb-ink), .08);
}
.logo-grid > :is(.content-image, .ce_image) figure > a { display: contents; }
.logo-grid > :is(.content-image, .ce_image) img {
  width: auto;
  max-width: 100%;
  max-height: 64px;
  border-radius: 0;
  object-fit: contain;
}

/* kleine runde Motive neben dem Text (Klasse split__aside--icon) */
.mod_article > .split__aside.split__aside--icon img { width: 220px; max-width: 100%; height: auto; border-radius: 50%; }

/* Ratgeber: in der Einzelansicht eines Beitrags den Seitenkopf ausblenden */
#main .inside:has(.mod_newsreader) > .mod_article.hero--page { display: none; }
#main .inside:has(.mod_newsreader) > .section--ratgeber { --container-w: var(--container-narrow); }

/* Bilder */
:is(.content-image, .ce_image) img { border-radius: 12px; }
.mod_article > :is(.content-image, .ce_image) figure,
.split__aside figure { text-align: center; }
.mod_article > :is(.content-image, .ce_image) img,
.content-text.media figure img { width: auto; max-width: 100%; max-height: 620px; }
.split__aside img { max-height: 560px; width: auto; }
.card :is(.content-image, .ce_image) img { border-radius: 0; }

/* Nachrichten (Apothekenwissen) */
.mod_newsreader .layout_full > h1 { margin-bottom: 8px; font-size: clamp(30px, 4vw, 44px); }
.mod_newsreader .layout_full .info,
.mod_newslist .info { font-size: 13px; color: var(--c-muted); }
.mod_newsreader .layout_full > .image_container,
.mod_newsreader .layout_full > figure { margin: 25px 0; }
.mod_newsreader .layout_full > :is(.image_container, figure) img { width: 100%; border-radius: var(--radius-card); }
.mod_newsreader .layout_full > * + * { margin-top: 20px; }
.mod_newsreader .back { margin-top: 40px; }
.mod_newsreader .back a { font-weight: 700; text-decoration: none; }
.mod_newslist {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
}
.mod_newslist > :is(h1, h2, h3) { grid-column: 1 / -1; }
.mod_newslist .layout_latest {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 0 26px;
  overflow: hidden;
  background: var(--c-card);
  border-radius: var(--radius-card);
}
.mod_newslist .layout_latest > * { margin: 0; padding-inline: 26px; }
.mod_newslist .layout_latest > :is(figure, .image_container) { order: -1; padding: 0; }
.mod_newslist .layout_latest > .info { margin-top: 6px; }
.mod_newslist .layout_latest:not(:has(> :is(figure, .image_container)))::before {
  content: "";
  order: -2;
  display: block;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--c-green) 0%, var(--c-dark) 100%);
}
.mod_newslist .layout_latest .more { margin-top: auto; }
.mod_newslist .layout_latest .more a { font-size: 14px; font-weight: 700; text-decoration: none; }
.mod_newslist .layout_latest img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.mod_newslist .layout_latest h2 { font-size: 20px; line-height: 1.3; }
.mod_newslist .layout_latest h2 a { color: var(--c-ink); text-decoration: none; }
.mod_newslist .layout_latest h2 a::after { content: ""; position: absolute; inset: 0; }
.mod_newslist .layout_latest .teaser { font-size: 15px; }
.mod_newslist .pagination { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 20px; }
.pagination p { margin: 0; font-size: 14px; color: var(--c-muted); }
.pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pagination li { margin: 0; padding: 0; }
.pagination li::before { content: none; }
.pagination :is(a, strong) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: var(--c-ink);
  text-decoration: none;
  background: #fff;
}
.pagination a:hover { border-color: var(--c-green); color: var(--c-green); }
.pagination strong { color: #fff; background: var(--c-green); border-color: var(--c-green); }

/* Abschnittskopf: zentrierte Überschrift mit kurzer Einleitung
   Element-Klasse: section-head (an Überschrift und Einleitungstext) */
.section-head { text-align: center; }
.section-head:is(h1, h2, h3) { margin-bottom: 0; }
.section-head p { max-width: 640px; margin-inline: auto; color: var(--c-muted); }
.mod_article > .section-head + :not(.section-head) { margin-top: 40px; }
.section-link { text-align: center; }
.mod_article > .section-link { margin-top: 40px; }
.cards > :is(.section-head, .section-link) { grid-column: 1 / -1; }
.cards > .section-head + :not(.section-head) { margin-top: 0 !important; }
.cards > .section-head:has(+ :not(.section-head)) { margin-bottom: 10px; }
.cards > .section-head + .section-head { margin-top: -18px !important; }

/* Schnellzugriff: Kacheln mit Icon (Artikel-Klasse: quicklinks, Elemente: Text mit Bild + Klasse service) */
.quicklinks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.quicklinks > * + * { margin-top: 0 !important; }
.quicklinks .service {
  position: relative;
  height: 100%;
  padding: 22px 22px 20px;
  background: var(--c-white);
  border-radius: 16px;
  box-shadow: 0 1px 0 var(--c-border);
  transition: transform var(--transition), box-shadow var(--transition);
}
.quicklinks .service:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(var(--rgb-ink), .1); }
.quicklinks .service :is(h2, h3, h4) { font-size: 18px; }
.quicklinks .service :is(p, .rte) { font-size: 14px; color: var(--c-muted); }
.quicklinks .service a { color: inherit; text-decoration: none; }
.quicklinks .service a::after { content: ""; position: absolute; inset: 0; }   /* ganze Kachel klickbar */
.quicklinks .service :is(h2, h3, h4)::after { content: " →"; color: var(--c-primary); }

/* Einheitliche Karten: gleiches Bildformat, Bild wird nicht beschnitten (Artikel-Klasse: cards--uniform) */
.cards--uniform .card > :is(.content-image, .ce_image) figure {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  padding: 18px;
  background: var(--c-light);
}
.cards--uniform .card > :is(.content-image, .ce_image) figure > a { display: contents; }
.cards--uniform .card > :is(.content-image, .ce_image) img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
}
.cards--uniform .card :is(h2, h3) { font-size: 20px; }

/* Karten und Öffnungszeiten auf hellem Abschnitt weiß absetzen */
.section--light :is(.card, .opening-hours) { background: var(--c-white); }
.section--light .opening-hours::after { background: var(--c-white); }
.section--light .opening-hours__status { background: var(--c-light); }

/* Dunkler Abschnitt: Überschriften weiß, Einleitung gedämpft */
.section--navy :is(h1, h2, h3, h4) { color: var(--c-white); }
.section--navy .lead p { color: rgba(255, 255, 255, .85); }

/* breites Logo (Wortmarke) und invertiertes Logo im Footer */
.brand--wide img { width: 300px; }

/* Header-Logo: über die Höhe skalieren, damit hohe und breite Logos passen.
   Höhe anpassen: --logo-h (Desktop), wird unten für kleinere Bildschirme verringert. */
#header { --logo-h: 76px; }
#header .brand img,
#header .brand--wide img {
  width: auto;
  height: var(--logo-h);
  max-width: none;
}
#footer .brand--invert img { filter: brightness(0) invert(1); }
/* Logo auf heller Plakette (für farbige Logos auf dunklem Grund) */
#footer .brand--plate img { padding: 12px 16px; background: var(--c-white); border-radius: 12px; }

/* 13  Hilfsklassen ----------------------------------------------------------- */

.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-red    { color: var(--c-primary); }
.text-white  { color: var(--c-white); }
.mt-0  { margin-top: 0 !important; }
.mt-l  { margin-top: 40px !important; }
.mb-0  { margin-bottom: 0 !important; }
.mx-auto { margin-inline: auto; }
.max-w-narrow { max-width: var(--container-narrow); margin-inline: auto; }
.hide-desktop { display: none !important; }


/* 14  Responsive ------------------------------------------------------------- */

@media (max-width: 1440px) {
  #header > .inside { gap: 26px; }
  #header .mod_navigation .level_1 { gap: 26px; }
  #header .mod_navigation .level_1 > li > :is(a, strong, span) { font-size: 16px; }
  .brand--wide img { width: 240px; }
  #header { --logo-h: 66px; }
  .cards--4 { --cards: 2; }
}

@media (max-width: 1199px) {
  :root { --fs-h1: 44px; --fs-h2: 36px; }
  .cards--3, .cards--4, .mod_newslist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles--3 { --tiles: 2; }
  .logo-grid { --tiles: 4; }
  .quicklinks { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Hero: Bild ausblenden, Text über volle Breite (wie Original) */
  .hero { grid-template-columns: 1fr; }
  .hero::before { grid-column: 1; }
  .hero > * { grid-column: 1; max-width: none; padding-inline: max(var(--gutter), calc((100% - var(--container)) / 2)); }
  .hero > .hero__media { display: none; }

  /* Header kompakt: Navigation in Offcanvas */
  #header .mod_navigation { display: none; }
  .nav-toggle { display: inline-flex; }
  .header-actions .btn--secondary { display: none; }
}

@media (max-width: 959px) {
  .opening-hours::before { inset: -28px -14px; }
  .split > .split__aside:not(:first-child) { margin-top: 48px; }
  :root {
    --gutter: 24px;
    --section-y: 50px;
    --header-h: 90px;
    --fs-h1: 38px;
    --fs-h2: 30px;
    --fs-h3: 22px;
  }

  .brand img { width: 190px; }
  .brand__name { font-size: 26px; }
  #header { --logo-h: 56px; }

  .split,
  .split--center { display: block; }
  .split::before { display: none; }
  .split > * + *,
  .split > .split__aside { margin-top: 40px; }
  .split--aside-left > .split__aside { margin-top: 0; margin-bottom: 40px; }
  .split--aside-left { display: flex; flex-direction: column; }
  .split--aside-left > .split__aside { order: -1; }
  .split--aside-left > :not(.split__aside) + :not(.split__aside) { margin-top: 20px; }

  .hero { grid-template-rows: 50px repeat(15, auto) minmax(50px, 1fr); min-height: 0; }
  .hero h2 { font-size: 24px; }

  #footer { margin-top: 90px; }
  #footer::before { height: 90px; }
  #footer > .inside { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; }

  .cards, .cards--2, .cards--3, .cards--4, .mod_newslist { grid-template-columns: minmax(0, 1fr); }
  .tiles, .tiles--2, .tiles--3 { --tiles: 2; --gap: 10px; }
  .tiles > :is(.content-image, .ce_image) img { border-radius: 8px; }
  .logo-grid { --tiles: 2; --gap: 12px; }
  .logo-grid > :is(.content-image, .ce_image) figure { min-height: 88px; }
  .quicklinks { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .hero--page { padding-top: 45px; padding-bottom: 45px; }
  .form-card, .content-form, .ce_form, .mod_subscribe { padding: 26px 22px; }
  .aponet-search form { flex-direction: column; }
  .hide-mobile  { display: none !important; }
  .hide-desktop { display: initial !important; }
}

@media (max-width: 599px) {
  #header { --logo-h: 48px; }

  /* Leistungskarten kompakt: Bild links, Text rechts */
  .cards--uniform { gap: 14px; }
  .cards--uniform .card {
    display: grid;
    grid-template-columns: 96px 1fr;
    column-gap: 16px;
    row-gap: 4px;
    align-content: center;
    padding: 14px 16px 14px 14px;
  }
  .cards--uniform .card > * { grid-column: 2; padding-inline: 0; }
  .cards--uniform .card > :first-child:not(:is(.content-image, .ce_image)) { margin-top: 0 !important; }
  .cards--uniform .card > :is(.content-image, .ce_image) { grid-column: 1; grid-row: 1 / span 3; align-self: center; }
  .cards--uniform .card > :is(.content-image, .ce_image) figure { aspect-ratio: 1; padding: 8px; border-radius: 12px; }
  .cards--uniform .card :is(h2, h3) { font-size: 17px; }
  .cards--uniform .card :is(p, li) { font-size: 14px; }
  .cards--uniform .card .card__link a { font-size: 13px; }
  .open-status { display: none; }
  #header .open-status.show-mobile { display: inline-flex; }
  #footer > .inside { grid-template-columns: 1fr; }
  .opening-hours { padding: 30px 22px; }
  :is(div, p, span, li).btn--large a, a.btn--large { font-size: 17px; padding: 0 25px; }
}

/* 15  Barrierefreiheits-Einstellungen (js/a11y.js) ---------------------------- */

.a11y {
  --a11y-bg: var(--c-dark);
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 900;
  font: 400 15px/1.4 var(--font-base);
}
.a11y__toggle {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--a11y-bg);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .28);
  cursor: pointer;
  transition: transform .2s ease, background-color .2s ease;
}
.a11y__toggle:hover { transform: scale(1.06); background: var(--c-green); }
.a11y__toggle:focus-visible { outline: 3px solid var(--c-yellow); outline-offset: 3px; }
.a11y.is-active .a11y__toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--c-yellow);
}
.a11y__toggle { position: relative; }

.a11y__panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: min(360px, calc(100vw - 40px));
  max-height: calc(100vh - 120px);
  max-height: calc(100dvh - 120px);
  overflow-y: auto;
  padding: 20px;
  color: var(--c-ink);
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}
.a11y__panel[hidden] { display: none; }
.a11y__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.a11y__title { margin: 0; font-size: 20px; line-height: 1.3; }
.a11y__title::after { content: none; }
.a11y__close {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--c-ink);
  background: var(--c-light);
  cursor: pointer;
}
.a11y__size {
  display: grid;
  grid-template-columns: 1fr 48px 64px 48px;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  padding: 10px 10px 10px 14px;
  background: var(--c-card);
  border-radius: 12px;
}
.a11y__size-label { font-weight: 700; }
.a11y__step {
  height: 44px;
  padding: 0;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  font: 700 17px/1 var(--font-base);
  color: var(--c-ink);
  background: #fff;
  cursor: pointer;
}
.a11y__step:disabled { opacity: .4; cursor: default; }
.a11y__value { font-weight: 700; text-align: center; }
.a11y__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.a11y__option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 82px;
  padding: 10px 8px;
  border: 2px solid var(--c-border);
  border-radius: 12px;
  font: 600 14px/1.25 var(--font-base);
  color: var(--c-ink);
  text-align: center;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.a11y__option:hover { border-color: var(--c-green); }
.a11y__option[aria-pressed="true"] { color: #fff; background: var(--c-green); border-color: var(--c-green); }
:is(.a11y__close, .a11y__step, .a11y__option, .a11y__reset, .a11y__link):focus-visible { outline: 3px solid var(--c-primary); outline-offset: 2px; }
.a11y__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; }
.a11y__reset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-pill);
  font: 700 14px/1 var(--font-base);
  color: #fff;
  background: var(--c-primary);
  cursor: pointer;
}
.a11y__link { font-size: 13px; color: var(--c-ink); }
@media (max-width: 599px) {
  .a11y { right: 14px; bottom: 14px; }
  .a11y__toggle { width: 50px; height: 50px; }
  .a11y__panel { position: fixed; right: 12px; left: 12px; bottom: 76px; width: auto; }
}

/* Wirkung der Einstellungen */
.a11y-size #wrapper { zoom: var(--a11y-zoom, 1); }

.a11y-contrast {
  --c-ink: #000;
  --c-muted: #1a1a1a;
  --c-dark: #0b2a0d;
  --c-green: #123d14;
  --c-green-dark: #0b2a0d;
  --c-primary: #7a0f08;
  --c-primary-dark: #5c0b06;
  --c-light: #fff;
  --c-card: #fff;
  --c-border: #000;
  --rgb-ink: 0, 0, 0;
}
.a11y-contrast :is(.card, .opening-hours, .service, .mod_newslist > .layout_latest, .logo-grid figure, .handorgel__header) { border: 2px solid #000 !important; }
.a11y-contrast :is(.section--light, .section--light::before) { background: #fff !important; }
.a11y-contrast #main a:not(.btn, [class*="btn"] a, .card__link) { text-decoration: underline !important; }
.a11y-contrast :is(.hero, .section--navy, #footer) :is(p, li, address, td, th) { color: #fff !important; }
.a11y-contrast .hero-kicker { color: var(--c-yellow) !important; }

.a11y-grayscale #wrapper { filter: grayscale(1); }

.a11y-links #wrapper a:not(.btn) {
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 3px;
}
.a11y-links :is(#main, #footer) a { outline: 2px dashed var(--c-primary); outline-offset: 2px; }
.a11y-links :is(.hero, .section--navy, #footer) a { outline-color: var(--c-yellow); }

.a11y-font,
.a11y-font #wrapper,
.a11y-font #wrapper * { --font-base: Verdana, Tahoma, "Segoe UI", Arial, sans-serif; font-family: var(--font-base) !important; }

.a11y-spacing #wrapper :is(p, li, dd, dt, td, th, address, label, blockquote) {
  line-height: 1.9 !important;
  letter-spacing: .05em !important;
  word-spacing: .12em !important;
}
.a11y-spacing #wrapper :is(p, ul, ol) + :is(p, ul, ol) { margin-top: 1.4em !important; }

.a11y-motion,
.a11y-motion *,
.a11y-motion *::before,
.a11y-motion *::after {
  scroll-behavior: auto !important;
  animation: none !important;
  transition: none !important;
}

.a11y-cursor,
.a11y-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 24 24'%3E%3Cpath d='M5 2l14 8-6 2 4 8-3 1.5-4-8-5 4z' fill='%23000' stroke='%23fff' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E") 6 3, auto !important;
}
.a11y-cursor :is(a, button, summary, label, [role="button"]),
.a11y-cursor :is(a, button, summary, label, [role="button"]) * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 24 24'%3E%3Cpath d='M5 2l14 8-6 2 4 8-3 1.5-4-8-5 4z' fill='%23961d14' stroke='%23fff' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E") 6 3, pointer !important;
}

.a11y-readbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 890;
  height: 56px;
  pointer-events: none;
  border-top: 3px solid var(--c-primary);
  border-bottom: 3px solid var(--c-primary);
  background: rgba(214, 218, 0, .18);
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .25);
}

@media print {
  #header, #footer::before, .offcanvas, .a11y, .a11y-readbar { display: none !important; }
  #wrapper { border: 0; }
  .hero { color: var(--c-ink); background: none; }
}

