/* ===========================================================================
   Notfallpraxis — Bühne (Fassung 7.4, Bauvertrag §2.1, VORGABE-global §9 + §1.4)

   npz/buehne (Fach, 19 Unterseiten, Kontakt) und npz/start-buehne (Start) tragen
   dieselben Klassen. Text links auf Slate, Bild rechts randabfallend bis an den
   Fensterrand.

                    Rechner ≥ 1025        Tablet 768–1024       ≤ 767 gestapelt / ≤ 599
   Spalten          1fr | 1fr (720|720)   58 % | 42 %           Text, darunter Bild
   Höhe             min. 600 (Start 674)  min. 480              nach Inhalt
   Text-Polster     72 / 72* / 72 / Bund  48 / 12 / 48 / Rand     600–767 48/40/48/40;
                                                                ≤ 599 32 (Pfad 8) / 24 / 36 / 24
   Pfad → H1        24                    24                    16 (≤ 599)
   H1 → Unterzeile  20                    20                    12
   → Status         64                    64                    40
   → Knöpfe         48                    48                    40
   → Zusatz         48                    48                    40
   Bild             720 breit             42 %                  clamp(260, 50vw, 380); ≤ 599 260

   * rechts 24 bei 1025, stufenlos bis 72 bei 1121. Textspalte ab 1338 immer 540 (Kasten =
     Bund + 612), H1 ab 1025 höchstens 532.
   Zweispaltig ab 768 (V1): bei 600 bliebe dem Text 268 px.
   Groups tragen im klassischen Theme einen Innenkasten (`wp-block-group__inner-container`)
   — die Regeln gelten für beide Formen.
   =========================================================================== */

body.hbl-npz .npz-buehne {
  /* Rechts stufenlos 24 → 72 zwischen 1025 und 1121 (QA responsive-4): beim Sprung auf
     1fr|1fr bliebe dem Text bei 1025 sonst 403 px — Knöpfe untereinander, H1 bricht im Wort. */
  --npz-b-polster: 72px clamp(24px, calc((100vw - 1025px) / 2 + 24px), 72px) 72px var(--hbl-inhaltsbund);
  --npz-b-pfad: 24px;
  --npz-b-titel: 20px;
  --npz-b-status: 64px;
  --npz-b-knoepfe: 48px;
  --npz-b-min: 600px;
  position: relative;
  margin: 0;
  padding: 0;
  background: var(--slate);
  color: var(--white);
}
body.hbl-npz .npz-buehne.npz-buehne-start { --npz-b-min: 674px; }

body.hbl-npz .npz-buehne > .wp-block-group__inner-container,
body.hbl-npz .npz-buehne:not(:has(> .wp-block-group__inner-container)) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: var(--npz-b-min);
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

/* --- Text ------------------------------------------------------------------ */
body.hbl-npz .npz-buehne .npz-buehne-text {
  box-sizing: border-box;
  align-self: center;
  width: 100%;
  /* Bund + 540 Inhalt + 72 rechts (QA responsive-1): Bei 1440 genau 720 wie Figma; breiter
     wächst nur der Bund, die Textspalte bleibt 540 und ihre Kante auf dem Inhaltsbund.
     Vorher 720 fest — der Bund frass die Spalte (1920: 300, 2560: 0). */
  max-width: calc(var(--hbl-inhaltsbund) + 612px);
  margin: 0;
  padding: var(--npz-b-polster);
}
body.hbl-npz .npz-buehne .npz-buehne-text > .wp-block-group__inner-container { padding: 0; margin: 0; max-width: none; }
body.hbl-npz .npz-buehne .npz-buehne-text > *,
body.hbl-npz .npz-buehne .npz-buehne-text > .wp-block-group__inner-container > * { margin-block: 0; }
body.hbl-npz .npz-buehne .npz-buehne-text * + :is(h1, .npz-buehne-titel, .npz-start-titel) { margin-top: var(--npz-b-pfad); }
body.hbl-npz .npz-buehne .npz-buehne-text * + :is(.npz-buehne-unterzeile, .npz-slogan, .npz-start-slogan) { margin-top: var(--npz-b-titel); }
body.hbl-npz .npz-buehne .npz-buehne-text * + .npz-status { margin-top: var(--npz-b-status); }
body.hbl-npz .npz-buehne .npz-buehne-text * + .wp-block-buttons.npz-knoepfe { margin-top: var(--npz-b-knoepfe); }
body.hbl-npz .npz-buehne .npz-buehne-text * + .npz-buehne-zusatz { margin-top: var(--npz-b-knoepfe); }
/* Der erste sichtbare Teil steht ohne Abstand oben. */
body.hbl-npz .npz-buehne .npz-buehne-text :is(h1, .npz-buehne-titel, .npz-start-titel):first-child { margin-top: 0; }

/* H1 48/56 Bold Weiss, −0,4; ≤ 1024 32/38 (Entscheid 9). */
body.hbl-npz .npz-buehne :is(h1, .npz-buehne-titel) {
  margin: 0;
  color: var(--white);
  font-size: 48px;
  font-weight: 700;
  line-height: 56px;
  letter-spacing: -0.4px;
  hyphens: manual;
}
/* Rechner: H1 höchstens 532 breit (QA v-unterseiten-1, Entscheid Norman: Figma gilt).
   Chromium setzt Inter rund 1 % schmaler als Figma; bei 540 passte «untersuchung in
   Zürich» noch in eine Zeile, in Figma bricht «Zürich» um. Wirkt nur auf Schicht-
   tauglichkeit, Abhängigkeitserkrankungen und Schwindel (gemessen, alle 23 Bühnen). */
@media (min-width: 1025px) {
  body.hbl-npz .npz-buehne :is(h1, .npz-buehne-titel) { max-width: 532px; }
}
/* Unterzeile (lead) 22/33 Weiss; Slogan (Start) 30/42 Light Taupe. */
body.hbl-npz .npz-buehne .npz-buehne-unterzeile {
  color: var(--white);
  font-size: 22px;
  font-weight: 400;
  line-height: 33px;
}
body.hbl-npz .npz-buehne .npz-slogan {
  color: var(--taupe);
  font-size: 30px;
  font-weight: 300;
  line-height: 42px;
}

/* --- Zusatz (Kontakt): Liste, Zeilen 14 auseinander ------------------------- */
body.hbl-npz .npz-buehne-angaben {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
body.hbl-npz .npz-buehne-angaben li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  column-gap: 14px;
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  color: color-mix(in srgb, var(--white) 84%, transparent);
}
body.hbl-npz .npz-buehne-angaben li::before {
  content: "";
  grid-row: 1 / span 2;
  width: 20px;
  height: 20px;
  margin-top: 3px;
  background: var(--taupe);
  -webkit-mask: var(--npz-icon) center / 20px 20px no-repeat;
  mask: var(--npz-icon) center / 20px 20px no-repeat;
}
body.hbl-npz .npz-buehne-angaben li strong { display: block; font-weight: 600; color: var(--white); }
body.hbl-npz .npz-angabe-ort  { --npz-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E"); }
body.hbl-npz .npz-angabe-uhr  { --npz-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E"); }
body.hbl-npz .npz-angabe-tram { --npz-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='16' height='16' x='4' y='3' rx='2'/%3E%3Cpath d='M4 11h16'/%3E%3Cpath d='M12 3v8'/%3E%3Cpath d='m8 19-2 3'/%3E%3Cpath d='m18 22-2-3'/%3E%3Cpath d='M8 15h.01'/%3E%3Cpath d='M16 15h.01'/%3E%3C/svg%3E"); }
body.hbl-npz .npz-angabe-auto { --npz-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2'/%3E%3Ccircle cx='7' cy='17' r='2'/%3E%3Cpath d='M9 17h6'/%3E%3Ccircle cx='17' cy='17' r='2'/%3E%3C/svg%3E"); }

/* --- Bild: randabfallend, volle Bühnenhöhe --------------------------------- */
body.hbl-npz .npz-buehne .npz-buehne-bild {
  position: relative;
  min-height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
body.hbl-npz .npz-buehne .npz-buehne-bild > .wp-block-group__inner-container { position: absolute; inset: 0; max-width: none; padding: 0; }
body.hbl-npz .npz-buehne .npz-buehne-bild img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: var(--npz-fokus, 50% 50%);
  border-radius: 0;
}

/* --- Tablet 768–1024 --------------------------------------------------------- */
@media (max-width: 1024px) {
  body.hbl-npz .npz-buehne {
    /* Rechts nur 12: in Figma 820 stehen beide Knöpfe nebeneinander (bis x463 bei
       einer Textspalte von 476) — mit 40 bräche die Knopfzeile um. */
    --npz-b-polster: 48px 12px 48px var(--npz-rand);
    --npz-b-min: 480px;
  }
  body.hbl-npz .npz-buehne.npz-buehne-start { --npz-b-min: 480px; }
  body.hbl-npz .npz-buehne > .wp-block-group__inner-container,
  body.hbl-npz .npz-buehne:not(:has(> .wp-block-group__inner-container)) {
    grid-template-columns: minmax(0, 58fr) minmax(0, 42fr);
  }
  body.hbl-npz .npz-buehne .npz-buehne-text { max-width: none; }
  body.hbl-npz .npz-buehne :is(h1, .npz-buehne-titel) { font-size: 32px; line-height: 38px; }
  body.hbl-npz .npz-buehne .npz-buehne-unterzeile { font-size: 19px; line-height: 28px; }
  body.hbl-npz .npz-buehne .npz-slogan { font-size: 22px; line-height: 32px; }
}

/* --- ≤ 767: gestapelt, Bild unter dem Text ---------------------------------- */
@media (max-width: 767px) {
  body.hbl-npz .npz-buehne > .wp-block-group__inner-container,
  body.hbl-npz .npz-buehne:not(:has(> .wp-block-group__inner-container)) {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }
  body.hbl-npz .npz-buehne .npz-buehne-text { align-self: start; }
  body.hbl-npz .npz-buehne .npz-buehne-bild { min-height: 0; height: clamp(260px, 50vw, 380px); }
}

/* --- Telefon ≤ 599 ---------------------------------------------------------- */
@media (max-width: 599px) {
  body.hbl-npz .npz-buehne {
    --npz-b-polster: 32px var(--npz-rand) 36px;
    --npz-b-pfad: 16px;
    --npz-b-titel: 12px;
    --npz-b-status: 40px;
    --npz-b-knoepfe: 40px;
  }
  /* Mit Pfad oben 8: die Tippfläche des Zurück-Links (44) bringt ihre Luft mit. */
  body.hbl-npz .npz-buehne .npz-buehne-text:has(.npz-pfad) { padding-top: 8px; }
  body.hbl-npz .npz-buehne .npz-buehne-bild { height: 260px; }
}

/* Umbruch wie Figma (Zentral 17.11.: text-wrap): Das Theme balanciert alle Überschriften
   (text-wrap: balance); Figma füllt die Zeile. Befund Unterseiten/Fach. */
body.hbl-npz .npz-buehne :is(h1, .npz-buehne-titel) { text-wrap: wrap; }
