/* =========================================================================
   Apotheken Local Optimisation - Basis-Stylesheet
   Aus dem Referenzdesign übernommen und auf ableitbare Farben umgebaut.

   WICHTIG: Nur der :root-Block darf je Apotheke ersetzt werden. Alle
   übrigen Töne werden per color-mix() aus den Basiswerten berechnet.
   Im Original standen ~25 Farbwerte fest verdrahtet im CSS - ein Wechsel
   von --green hätte überall grünliche Reste hinterlassen.

   Jede color-mix()-Deklaration hat einen statischen Vorgänger als
   Rückfallwert für Browser ohne color-mix (< Chrome 111 / Safari 16.2).
   ========================================================================= */

:root {
  /* --- Die einzigen Werte, die der Hub je Apotheke austauscht ---
     ⚠️ Der Akzent stand bis 16.08. auf #2f83c5. Nachgemessen erreichte er
     als Text nur 3,89:1 auf dem Untergrund und weisse Schrift darauf nur
     4,06:1 - beides unter den geforderten 4,5:1. #2973ac ist derselbe
     Farbton, nur dunkel genug. */
  --c-accent:       #2973ac;
  --c-accent-deep:  #173f62;
  --c-accent-soft:  #dbeaf6;
  --c-ink:          #18364e;
  --c-muted:        #60706a;
  --c-bg:           #fbfaf6;
  --c-band:         #f5f2ea;
  --c-surface-tint: #eef5fa;
  --c-line:         #d9ded9;
  --c-footer:       #102a40;

  --font-display: Georgia, "Times New Roman", serif;
  --font-text:    Arial, Helvetica, sans-serif;

  --radius-card:   18px;
  --radius-button: 4px;

  /* --- Status: bewusst NICHT vom Akzent abgeleitet ---
     Der Punkt "Vor Ort für Sie da" muss auch dann als "aktiv" lesbar
     bleiben, wenn eine Apotheke ein rotes oder oranges Branding hat. */
  --c-status: #7ee0b7;

  /* --- Abgeleitet: helle Schrift auf dunklem Grund ---
     ⚠️ Die Anteile sind nachgerechnet, nicht geschätzt: Bei 62 % Weiss kam
     die gedämpfte Stufe am 16.08. auf 3,6:1 und lag damit unter den von
     WCAG geforderten 4,5:1. Wer hier etwas ändert, muss auch
     MIX_AUF_DEEP_MIN in app/farben.php nachziehen - dort wird geprüft,
     dass der Grund dunkel genug für genau diese Mischung bleibt. */
  --c-on-deep:      #ffffff;
  --c-on-deep-soft: #d5e4df;
  --c-on-deep-soft: color-mix(in srgb, #ffffff 82%, var(--c-accent-deep));
  --c-on-deep-dim:  #c4d3e0;
  --c-on-deep-dim:  color-mix(in srgb, #ffffff 72%, var(--c-accent-deep));

  /* --- Abgeleitet: Fußzeile (siehe MIX_AUF_FOOTER_MIN) --- */
  --c-on-footer:      #c8d5d0;
  --c-on-footer:      color-mix(in srgb, #ffffff 72%, var(--c-footer));
  --c-on-footer-dim:  #a4aeb6;
  --c-on-footer-dim:  color-mix(in srgb, #ffffff 62%, var(--c-footer));
  --c-on-footer-faint:#8c99a3;
  --c-on-footer-faint:color-mix(in srgb, #ffffff 52%, var(--c-footer));
  --c-on-footer-line: #3d534c;
  --c-on-footer-line: color-mix(in srgb, #ffffff 16%, var(--c-footer));

  /* --- Abgeleitet: Trennlinien im Band --- */
  --c-band-line:      #e7e2d7;
  --c-band-line:      color-mix(in srgb, var(--c-band) 86%, var(--c-ink));
  --c-band-line-hard: #d9d3c8;
  --c-band-line-hard: color-mix(in srgb, var(--c-band) 78%, var(--c-ink));

  /* --- Abgeleitet: Schleier und Schatten --- */
  --shadow-card:  0 28px 80px color-mix(in srgb, var(--c-accent-deep) 22%, transparent);
  --shadow-panel: 0 28px 80px color-mix(in srgb, var(--c-accent-deep) 12%, transparent);
  --veil-photo:   linear-gradient(to bottom, transparent, color-mix(in srgb, var(--c-accent-deep) 78%, #000));
  --veil-visual:  linear-gradient(145deg,
                    color-mix(in srgb, var(--c-accent-deep) 5%, transparent),
                    color-mix(in srgb, var(--c-accent-deep) 25%, transparent));
  --c-watermark:  color-mix(in srgb, var(--c-accent) 5%, transparent);
}

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

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

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

body {
  background: var(--c-bg);
  color: var(--c-ink);
  margin: 0;
  font-family: var(--font-text);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }

img, svg { max-width: 100%; }

a { color: inherit; text-decoration: none; }
a, button { -webkit-tap-highlight-color: transparent; }

summary::-webkit-details-marker { display: none; }

/* Im Original fehlte jede Tastatur-Kennzeichnung - hier nachgerüstet. */
:where(a, button, summary):focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--c-accent);
  color: #fff;
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 800;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ============================ Kopfzeile ============================ */

.site-header {
  border-bottom: 1px solid var(--c-line);
  justify-content: space-between;
  align-items: center;
  width: min(1360px, 100% - 56px);
  height: 88px;
  margin: 0 auto;
  display: flex;
}
.brand { align-items: center; display: inline-flex; }
.brand-logo { width: 205px; height: auto; display: block; }

.desktop-nav { gap: 34px; font-size: 13px; font-weight: 700; display: flex; }
.desktop-nav a { padding: 10px 0; position: relative; }
.desktop-nav a::after {
  content: "";
  background: var(--c-accent);
  height: 1px;
  transition: right .2s;
  position: absolute;
  bottom: 3px; left: 0; right: 100%;
}
.desktop-nav a:hover::after { right: 0; }

.header-call { align-items: center; gap: 10px; font-size: 13px; font-weight: 700; display: inline-flex; }
.header-call span {
  background: var(--c-accent-soft);
  color: var(--c-accent);
  width: 30px; height: 30px;
  border-radius: 50%;
  place-items: center;
  display: grid;
}

/* ============================ Hero ============================ */

.hero {
  /* Rechte Spalte bekommt mehr Raum als im Original (dort 1.12/.88):
     das Bild soll die Fläche tragen, die Karte nur noch eine Ecke davon. */
  grid-template-columns: minmax(0, 1fr) minmax(430px, 1.05fr);
  align-items: center;
  gap: clamp(48px, 6vw, 92px);
  width: min(1360px, 100% - 56px);
  min-height: 690px;
  margin: 0 auto;
  padding: 74px clamp(0px, 2vw, 28px) 84px;
  display: grid;
  position: relative;
}
.hero::before {
  content: "+";
  color: var(--c-watermark);
  z-index: -1;
  font: 300 260px/1 var(--font-text);
  position: absolute;
  top: 120px; left: -26px;
}
.hero-copy { max-width: 720px; }

.eyebrow {
  color: var(--c-accent);
  letter-spacing: .14em;
  text-transform: uppercase;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  font-size: 11px;
  font-weight: 800;
  display: flex;
}
.eyebrow span { background: currentColor; width: 28px; height: 1px; flex: 0 0 auto; }

h1, h2 { letter-spacing: -.045em; font-family: var(--font-display); font-weight: 400; }
h1 { max-width: 740px; font-size: clamp(54px, 6.2vw, 94px); line-height: .98; }

.hero-lead { max-width: 610px; color: var(--c-muted); margin: 30px 0 0; font-size: 18px; line-height: 1.65; }
.hero-actions { flex-wrap: wrap; gap: 12px; margin-top: 36px; display: flex; }

.button {
  border-radius: var(--radius-button);
  justify-content: center;
  align-items: center;
  gap: 28px;
  min-height: 54px;
  padding: 0 24px;
  font-size: 13px;
  font-weight: 800;
  transition: transform .2s, background .2s;
  display: inline-flex;
}
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--c-accent); color: #fff; }
.button-primary:hover { background: var(--c-accent-deep); }
.button-secondary { border: 1px solid var(--c-line); background: rgb(255 255 255 / .55); }
.button-light { color: var(--c-ink); background: #fff; }

.address-line { align-items: center; gap: 13px; margin-top: 44px; display: flex; }
.address-line .pin {
  border: 2px solid var(--c-accent);
  border-radius: 50% 50% 50% 0;
  width: 11px; height: 11px;
  flex: 0 0 auto;
  transform: rotate(-45deg);
}
.address-line > span:last-child { flex-direction: column; gap: 2px; display: flex; }
.address-line strong { font-size: 13px; }
.address-line small { color: var(--c-muted); font-size: 12px; }

.hero-side { position: relative; }

.hero-photo {
  background: var(--c-accent-soft);
  border-radius: var(--radius-card);
  /* Höher als im Original (390 px): weil die Karte nur noch eine Ecke
     verdeckt, hängt sie weit unter dem Bild - ohne mehr Bildhöhe
     würde die Karte die Anordnung optisch beherrschen. */
  height: 480px;
  /* Ragt in den Spaltenabstand hinein und schiebt das Bild damit weiter
     nach links. Der Wert bleibt unter dem Abstand (clamp 48-92px), sonst
     liefe das Bild in den Text der linken Spalte. */
  margin-left: -40px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-panel);
}
.hero-photo img { object-fit: cover; width: 100%; height: 100%; display: block; }
/* Der dunkle Schleier am unteren Bildrand ist entfallen: er war nur da,
   um die Bildunterschrift lesbar zu machen - und die gibt es nicht mehr. */

/* ============================ Öffnungszeiten-Karte ============================ */

.hours-card {
  z-index: 2;
  background: var(--c-accent-deep);
  color: #fff;
  border-radius: var(--radius-card);
  padding: 30px 34px;
  box-shadow: var(--shadow-card);

  /* Bewusst im Fluss statt absolut positioniert.
     Absolut mit bottom:0 hiess: die Überdeckung hängt an der HOEHE der
     Karte - eine Apotheke mit Mittagspause oder Zusatzhinweis bekommt
     eine höhere Karte und damit mehr Überdeckung, ohne dass jemand
     etwas geändert hätte.
     Mit negativem Außenabstand ist die Überlappung ein fester Wert:
     120 px, egal wie hoch die Karte wird. */
  position: relative;
  /* 88 % greift nur in mittleren Fensterbreiten (etwa 1000-1200 px), wo
     die Spalte schmal wird - ohne die Begrenzung käme die Überdeckung
     dort auf über 20 %. */
  width: min(400px, 88%);
  margin-left: auto;
  margin-top: -100px;
}
.card-topline { justify-content: space-between; align-items: center; gap: 18px; display: flex; }
.card-kicker {
  color: var(--c-on-deep-dim);
  letter-spacing: .15em;
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 800;
}
.availability { color: var(--c-on-deep-soft); align-items: center; gap: 7px; font-size: 10px; display: inline-flex; }
.availability i {
  background: var(--c-status);
  border-radius: 50%;
  width: 7px; height: 7px;
  flex: 0 0 auto;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-status) 12%, transparent);
}
.hours-card h2 { margin: 18px 0 22px; font-size: 34px; line-height: 1.08; }

.hours-list { border-top: 1px solid rgb(255 255 255 / .15); }
.hour-row {
  border-bottom: 1px solid rgb(255 255 255 / .11);
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 36px;
  font-size: 12px;
  display: flex;
}
.hour-row span { color: var(--c-on-deep-soft); }
.hour-row strong { font-size: 12px; font-weight: 700; text-align: right; }
.hour-row.muted { opacity: .48; }

.card-call {
  background: rgb(255 255 255 / .08);
  border: 1px solid rgb(255 255 255 / .12);
  border-radius: 6px;
  justify-content: space-between;
  align-items: center;
  margin-top: 22px;
  padding: 14px 17px;
  display: flex;
}
.card-call span { flex-direction: column; gap: 4px; display: flex; }
.card-call small { color: var(--c-on-deep-dim); font-size: 10px; }
.card-call strong { font-size: 15px; }
.card-call b { font-size: 22px; font-weight: 400; }

/* ============================ Vertrauensleiste ============================ */

.trust-strip {
  background: var(--c-band);
  border-top: 1px solid var(--c-band-line);
  border-bottom: 1px solid var(--c-band-line);
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  padding: 30px max(28px, 50vw - 630px);
  display: grid;
}
.trust-strip div {
  border-right: 1px solid var(--c-band-line-hard);
  flex-direction: column;
  gap: 5px;
  padding: 4px 38px;
  display: flex;
}
.trust-strip div:first-child { padding-left: 0; }
.trust-strip div:last-child { border-right: 0; }
.trust-strip strong { font: 400 20px/1.2 var(--font-display); }
.trust-strip span { color: var(--c-muted); font-size: 11px; }

/* ============================ Leistungen ============================ */

.section { width: min(1260px, 100% - 56px); margin: 0 auto; }
.services { padding: 120px 0 130px; }

.section-heading {
  grid-template-columns: 1.25fr .75fr;
  align-items: end;
  gap: 70px;
  margin-bottom: 54px;
  display: grid;
}
.section-heading h2, .about h2, .location h2, .emergency h2 {
  font-size: clamp(46px, 5vw, 68px);
  line-height: 1.02;
}
.section-heading > p { max-width: 430px; color: var(--c-muted); margin: 0 0 7px; font-size: 15px; line-height: 1.75; }

.service-grid {
  border-top: 1px solid var(--c-line);
  border-left: 1px solid var(--c-line);
  grid-template-columns: repeat(3, 1fr);
  display: grid;
}
.service-card {
  border-right: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
  background: rgb(255 255 255 / .27);
  min-height: 270px;
  padding: 31px;
  transition: background .2s, transform .2s;
  position: relative;
}
.service-card:hover { background: #fff; transform: translateY(-3px); }
.service-index { color: var(--c-accent); letter-spacing: .12em; font-size: 10px; font-weight: 800; }
.service-card h3 { margin: 50px 0 13px; font: 400 24px/1.2 var(--font-display); }
.service-card p { max-width: 310px; color: var(--c-muted); font-size: 13px; line-height: 1.65; }
.service-line { background: var(--c-accent-soft); width: 26px; height: 2px; position: absolute; bottom: 31px; left: 31px; }

/* ============================ Über uns ============================ */

.about {
  background: var(--c-surface-tint);
  grid-template-columns: 1fr 1fr;
  min-height: 590px;
  margin-bottom: 130px;
  display: grid;
}
.about-visual { background: var(--c-accent-soft); min-height: 560px; position: relative; overflow: hidden; }
.about-visual::after { content: ""; background: var(--veil-visual); position: absolute; inset: 0; }
/* ⚠️ Nachfahre, nicht Kind. Das <img> steckt in einem <picture> (für die
   WEBP-Quelle) und ist damit ein Enkel. Mit dem Kind-Selektor griff die
   Regel nie: object-fit blieb auf "fill" und das Bild wurde auf die Höhe
   des Bereichs gestreckt. Hero und Standort hatten von Anfang an
   Nachfahren-Selektoren und waren deshalb in Ordnung. */
.about-visual img { object-fit: cover; width: 100%; height: 100%; display: block; position: absolute; inset: 0; }

.about-badge {
  z-index: 2;
  background: var(--c-accent);
  color: #fff;
  text-align: center;
  border-radius: 50%;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 150px; height: 150px;
  display: flex;
  position: absolute;
  bottom: 36px; right: 36px;
  transform: rotate(-7deg);
}
.about-badge strong { font: 400 27px/1.1 var(--font-display); }
.about-badge span { letter-spacing: .08em; text-transform: uppercase; margin-top: 5px; font-size: 9px; }

.about-copy { flex-direction: column; justify-content: center; padding: clamp(60px, 7vw, 100px); display: flex; }
.about-copy > p:not(.eyebrow) { color: var(--c-muted); margin: 26px 0 30px; font-size: 15px; line-height: 1.8; }

.owner { align-items: center; gap: 13px; display: flex; }
.owner-initials {
  background: var(--c-accent);
  color: #fff;
  border-radius: 50%;
  place-items: center;
  width: 43px; height: 43px;
  flex: 0 0 auto;
  font: 400 14px var(--font-display);
  display: grid;
}
.owner > span:last-child { flex-direction: column; gap: 3px; display: flex; }
.owner strong { font-size: 12px; }
.owner small { color: var(--c-muted); font-size: 10px; }

/* ============================ Notdienst (neu, optional) ============================ */

.emergency {
  background: var(--c-band);
  border-top: 1px solid var(--c-band-line);
  border-bottom: 1px solid var(--c-band-line);
  padding: 84px max(28px, 50vw - 630px);
}
.emergency h2 { max-width: 760px; }
.emergency p { max-width: 620px; color: var(--c-muted); margin: 24px 0 0; font-size: 15px; line-height: 1.75; }
.emergency .button { margin-top: 30px; }

/* ============================ Standort ============================ */

/* Der farbige Grund läuft über die volle Bildschirmbreite, der Inhalt
   bleibt in derselben Spalte wie der Rest der Seite.
   Gemacht wie bei .trust-strip und der Fußzeile: volle Breite plus ein
   Innenabstand, der rechnerisch bis zur Spaltenkante reicht
   (50vw - halbe Spaltenbreite). Ein Randabstand am Element selbst würde
   stattdessen den Grund mit einziehen. */
.location {
  color: #fff;
  background: var(--c-accent-deep);
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: 90px;
  min-height: 520px;
  width: 100%;
  padding: 78px max(28px, 50vw - 630px);
  display: grid;
  position: relative;
  overflow: hidden;
}
.location::before {
  content: "+";
  color: rgb(255 255 255 / .035);
  font: 400 620px/1 var(--font-text);
  position: absolute;
  top: -170px; left: 40%;
}
.eyebrow.light { color: var(--c-on-deep-dim); }
.location-copy { z-index: 1; position: relative; }
.location-copy > p:not(.eyebrow) { color: var(--c-on-deep-soft); font-size: 15px; }
.location-actions { flex-wrap: wrap; align-items: center; gap: 26px; margin-top: 32px; display: flex; }
.text-link { border-bottom: 1px solid rgb(255 255 255 / .4); padding-bottom: 5px; font-size: 12px; font-weight: 700; }

.location-photo {
  background: rgb(255 255 255 / .06);
  border: 1px solid rgb(255 255 255 / .16);
  min-height: 330px;
  position: relative;
  overflow: hidden;
}
.location-photo img { object-fit: cover; width: 100%; height: 100%; display: block; position: absolute; inset: 0; }
.location-photo::after { content: ""; background: var(--veil-photo); position: absolute; inset: 38% 0 0; }
.location-photo figcaption {
  z-index: 1;
  flex-direction: column;
  gap: 7px;
  display: flex;
  position: absolute;
  bottom: 28px; left: 30px; right: 30px;
}
.location-photo small { color: var(--c-on-deep-soft); letter-spacing: .12em; text-transform: uppercase; font-size: 10px; }
.location-photo strong { font: 400 21px/1.25 var(--font-display); }

/* ============================ Fußzeile ============================ */

footer {
  color: #fff;
  background: var(--c-footer);
  padding: 62px max(28px, 50vw - 630px) 28px;
}
.footer-main { justify-content: space-between; gap: 40px; padding-bottom: 45px; display: flex; }
.footer-brand { flex-direction: column; align-items: flex-start; gap: 10px; display: flex; }
.footer-logo { background: #fff; border-radius: 4px; width: 190px; height: auto; padding: 8px 10px; display: block; }
.footer-brand small { color: var(--c-on-footer-dim); font-size: 10px; }
.footer-contact {
  color: var(--c-on-footer);
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  font-size: 11px;
  display: flex;
}
.footer-contact a:hover { color: #fff; }

/* ==================== Impressum und Datenschutz ====================

   Zwei aufklappbare Bereiche nebeneinander, der Inhalt erscheint unter
   dem jeweils angeklickten Punkt. Darunter bleibt die Zeile mit dem
   Rechtevermerk.

   § 5 DDG verlangt "leicht erkennbar, unmittelbar erreichbar und ständig
   verfügbar". Das ist hier erfüllt: Beide stehen auf JEDER Seite, mit
   eigener Beschriftung, einen Klick entfernt und ohne Seitenwechsel. Der
   Text steht ausserdem immer im Quelltext - ein zugeklapptes <details>
   verbirgt ihn nur optisch.

   Bewusst <details>/<summary> und kein Umweg über ein Kontrollkästchen mit
   Beschriftung: Der Bildschirmleser kündigt es von sich aus als auf- und
   zuklappbar an, die Tastatur bedient es ohne Zutun, und es braucht kein
   Skript. Auf diesen Seiten läuft kein einziges - genau das behauptet die
   Datenschutzerklärung ja auch.

   ⚠️⚠️ Der Text steht NEBEN dem <details>, nicht darin. Grund: Solange er
   darin steht, sitzt er in derselben Rasterzelle wie die Beschriftung und
   kann nur halb so breit werden. Beides zugleich - Beschriftungen inline
   nebeneinander UND Text über die volle Breite - geht mit dem Text im
   <details> nicht.
   ⚠️ `display: contents` auf dem <details> waere der naheliegende Ausweg
   und ist am 16.08. in Chrome 151 nachgemessen worden: Es zerlegt den
   Klappmechanismus, der Text war dauerhaft sichtbar. Nicht benutzen.

   Die Kennungen impressum/datenschutz bleiben erhalten: Damit ist
   /#impressum eine verweisbare Adresse, obwohl es keine eigene Seite mehr
   gibt.

   ⚠️ Nachgemessen am 16.08. in Chrome 151: Ein per Sprungmarke
   angesteuertes <details> klappt NICHT von selbst auf. Die Annahme, das
   erledige der Browser, war falsch - deshalb die :target-Regeln unten.
   ================================================================== */

.legal-panels {
  border-top: 1px solid var(--c-on-footer-line);
  display: grid;
  /* Zwei Beschriftungen so breit wie ihr Text, der Rest bleibt frei. */
  grid-template-columns: auto auto 1fr;
  column-gap: 30px;
  align-items: baseline;
  margin-top: 6px;
}

.legal-panels > details { grid-row: 1; scroll-margin-top: 90px; }
.legal-panels > details:nth-of-type(1) { grid-column: 1; }
.legal-panels > details:nth-of-type(2) { grid-column: 2; }

.legal-panels summary {
  cursor: pointer;
  list-style: none;
  color: #fff;
  font-family: var(--font-text);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 20px 0;
  display: inline-block;
}
.legal-panels summary::-webkit-details-marker { display: none; }

/* Ohne Unterstrich, ohne Effekt beim Überfahren. Welcher Bereich offen
   ist, sagt der Text darunter - er beginnt eindeutig mit "Angaben gemäß
   § 5 DDG" beziehungsweise "Informationen nach Art. 13 DSGVO". */

/* Der Text nimmt die ganze Breite und steht unter beiden Beschriftungen. */
.legal-panels > .legal-copy { grid-column: 1 / -1; }

/* ⚠️ Das Verbergen steht bewusst IN @supports. Ein Browser ohne :has()
   koennte den Text sonst nie einblenden - und ein unerreichbares Impressum
   ist ein Rechtsproblem. Ohne :has() bleibt einfach beides sichtbar; das
   ist unschoen, aber die harmlose Richtung. */
@supports selector(:has(*)) {
  .legal-panels > .legal-copy { display: none; }

  .legal-panels:has(> #impressum[open])   > .legal-copy[data-fuer="impressum"],
  .legal-panels:has(> #impressum:target)  > .legal-copy[data-fuer="impressum"],
  .legal-panels:has(> #datenschutz[open]) > .legal-copy[data-fuer="datenschutz"],
  .legal-panels:has(> #datenschutz:target)> .legal-copy[data-fuer="datenschutz"] {
    display: block;
  }
}

.legal-copy {
  color: var(--c-on-footer);
  padding-bottom: 26px;
  font-size: 12.5px;
  line-height: 1.75;
}
.legal-copy h3 {
  color: #fff;
  font-family: var(--font-text);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin: 22px 0 8px;
}
.legal-copy h3:first-child { margin-top: 0; }
.legal-copy p { margin-bottom: 12px; }
.legal-copy p:last-child { margin-bottom: 0; }
.legal-copy ul { margin: 0 0 12px; padding-left: 18px; }
.legal-copy li { margin-bottom: 3px; }
.legal-copy a { text-decoration: underline; text-underline-offset: 3px; word-break: break-word; }
.legal-copy a:hover { color: #fff; }
.legal-copy strong { color: #fff; font-weight: 700; }
.legal-copy .legal-lead { color: var(--c-on-footer-dim); }
.legal-copy .legal-note { color: var(--c-on-footer-faint); font-size: 11.5px; }

.footer-bottom {
  color: var(--c-on-footer-faint);
  letter-spacing: .05em;
  text-transform: uppercase;
  border-top: 1px solid var(--c-on-footer-line);
  padding-top: 26px;
  font-size: 9px;
}

/* ============================ Mobile Leiste ============================ */

.mobile-bar { display: none; }

/* ============================ Umbrüche ============================ */

@media (max-width: 980px) {
  .desktop-nav { display: none; }
  .hero { grid-template-columns: 1fr; gap: 54px; padding-top: 72px; }
  .hero-copy { max-width: 800px; }
  .hero-side { width: 100%; max-width: 660px; }
  .hero-photo { margin-left: 0; }
  .hours-card { width: min(400px, calc(100% - 24px)); }
  .trust-strip { grid-template-columns: 1fr; gap: 20px; }
  .trust-strip div { border-bottom: 1px solid var(--c-band-line-hard); border-right: 0; padding: 0 0 20px; }
  .trust-strip div:last-child { border-bottom: 0; padding-bottom: 0; }
  .section-heading { grid-template-columns: 1fr; gap: 24px; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .about { grid-template-columns: 1fr; }
  .about-visual { min-height: 430px; }
  .location { grid-template-columns: 1fr; gap: 54px; }
  .location-photo { max-width: 600px; }
}

@media (max-width: 640px) {
  body { padding-bottom: 64px; }
  /* Untereinander: Nebeneinander bliebe je Spalte kaum Platz für einen
     Rechtstext, und der ist hier vollständig, nicht abgekürzt. */
  /* Auf Schmalbild untereinander: Zwei Beschriftungen nebeneinander
     passen zwar, der Rechtstext daneben aber nicht mehr sinnvoll.

     ⚠️⚠️ Hier KEIN Raster mit festen Zeilen. Der erste Versuch gab dem
     zweiten <details> `grid-row: 3`. Ein zugeklappter Text steht aber auf
     `display: none` und belegt gar keine Zelle - beim Aufklappen fand der
     Datenschutztext deshalb die freie Zeile 2 und landete ÜBER seinem
     eigenen Link. Von aussen sah es aus, als wäre "Impressum" die
     Überschrift der Datenschutzerklärung.

     Mit `display: block` gilt schlicht die Reihenfolge im Quelltext, und
     die ist bereits die richtige: Link, Text, Link, Text. */
  .legal-panels { display: block; }
  .legal-panels > details { border-top: 1px solid var(--c-on-footer-line); }
  .legal-panels > details:first-of-type { border-top: 0; }
  .site-header { width: calc(100% - 32px); height: 76px; }
  .brand-logo { width: 172px; }
  .header-call { display: none; }
  .hero { width: calc(100% - 32px); min-height: auto; padding: 58px 0 70px; }
  .hero::before { display: none; }
  .eyebrow { margin-bottom: 20px; font-size: 9px; }
  h1 { font-size: clamp(49px, 15vw, 66px); }
  .hero-lead { font-size: 16px; }
  .hero-actions { grid-template-columns: 1fr; display: grid; }
  .button { width: 100%; }
  .hero-photo { border-radius: var(--radius-card) var(--radius-card) 0 0; height: 280px; margin-left: 0; }
  /* Auf dem Telefon keine Überlappung: Bild und Karte stossen bündig
     aneinander und bilden zusammen einen Block. */
  .hours-card {
    border-radius: 0 0 var(--radius-card) var(--radius-card);
    width: 100%; margin-left: 0; margin-top: 0; padding: 28px 22px;
  }
  .card-topline { flex-direction: column; align-items: flex-start; }
  .hours-card h2 { font-size: 34px; }
  .trust-strip { padding: 28px 24px; }
  .section { width: calc(100% - 32px); }
  .services { padding: 84px 0 90px; }
  .section-heading h2, .about h2, .location h2, .emergency h2 { font-size: 43px; }
  .service-grid { grid-template-columns: 1fr; }
  .service-card { min-height: 235px; }
  .about { width: 100%; margin-bottom: 0; }
  .about-visual { min-height: 340px; }
  .about-copy { padding: 62px 24px 72px; }
  .emergency { padding: 64px 24px; }
  .location { width: 100%; padding: 70px 24px; }
  .location-photo { min-height: 250px; }
  footer { padding: 54px 24px 24px; }
  .footer-main { flex-direction: column; }
  .footer-contact { align-items: flex-start; }
  .footer-bottom { flex-direction: column; gap: 22px; }

  .mobile-bar {
    z-index: 20;
    background: #fff;
    grid-template-columns: 1fr 1fr;
    height: 64px;
    display: grid;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    box-shadow: 0 -8px 30px rgb(0 0 0 / .12);
  }
  .mobile-bar a { place-items: center; font-size: 12px; font-weight: 800; display: grid; }
  .mobile-bar a:last-child { background: var(--c-accent); color: #fff; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

@media print {
  .mobile-bar, .desktop-nav, .hero-actions, .location-actions { display: none; }
  body { background: #fff; }
  /* Beim Ausdruck beide Rechtstexte offen: Wer eine Seite ausdruckt oder
     als PDF sichert, soll Impressum und Datenschutz mit in der Hand
     haben - zugeklappt fehlten sie im Ausdruck vollständig. Seit der Text
     neben dem <details> steht, genuegt dafuer eine Regel. */
  /* Auch hier kein Raster - siehe die Begründung beim Schmalbild. Mit
     einer Spalte, aber weiterhin gesetztem `grid-column: 2` am zweiten
     Eintrag entstünde eine implizite zweite Spalte. */
  .legal-panels { display: block; }
  .legal-panels > .legal-copy { display: block !important; }
}
