/*
 * Zippelius Rechtsanwälte – Template-Stylesheet
 * Baut auf Bootstrap 5.3 aus dem Joomla-Core auf (wird vor dieser Datei geladen).
 * Farben und Proportionen stammen aus dem alten Template von 2012 (990px, drei Spalten),
 * umgesetzt mit CSS Grid/Flexbox und für kleine Bildschirme ergänzt.
 */

/* ---------- Grundwerte ---------- */
:root {
  --z-orange-light: #d67c24;  /* Kanzlei-Orange von 2012: nur Schmuck (Listenpunkte, Linien, Fokus-Schein) */
  --z-orange: #b85c00;        /* Flächen mit weißer Schrift: Reiter, Balken, Fußzeile (Kontrast 4,6:1) */
  --z-orange-text: #b35c0a;   /* orange Schrift auf Weiß (4,7:1) */
  --z-orange-on-grey: #9a4f08;/* orange Schrift auf der grauen Seitenspalte (5,0:1) */
  --z-grey-tab: #6f6f6e;      /* aktiver Reiter (weiße Schrift 5,0:1) */
  --z-grey-tab-text: #585857; /* Hover auf Flächen mit weißer Schrift */
  --z-grey-arrow: #8e8e8d;    /* kleine Pfeile der Unternavigation */
  --z-grey-bg: #ebebeb;       /* Seitenspalten */
  --z-grey-page: #ccc;        /* Hintergrund um die Seite */
  --z-text: #5f6062;
  --z-text-strong: #48494b;
  --z-line: #d5d5d5;

  --z-stub: 19px;             /* oranger Randstreifen links/rechts */
  --z-gap: 2px;               /* weiße Fuge zwischen den Reitern */
  --z-edge: calc(var(--z-stub) + var(--z-gap));
  /* Seitenspalte = Randstreifen + ein Reiter, wie im alten Raster */
  --z-side: calc(var(--z-edge) + (100% - 2 * var(--z-edge)) / 5);
  --z-tab-height: 3.25rem;
  --z-tab-drop: 1rem;         /* so weit hängt der aktive Reiter tiefer */

  --z-font: Verdana, Geneva, Arial, Helvetica, sans-serif;

  --bs-body-font-family: var(--z-font);
  --bs-body-font-size: 0.9375rem;
  --bs-body-line-height: 1.65;
  --bs-body-color: var(--z-text);
  --bs-body-bg: #fff;
  --bs-link-color: var(--z-text);
  --bs-link-color-rgb: 95, 96, 98;
  --bs-link-hover-color: var(--z-orange-text);
  --bs-link-hover-color-rgb: 179, 92, 10;
  --bs-border-radius: 0;
  --bs-border-color: var(--z-line);
}

html { scroll-behavior: smooth; }

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

body { background: var(--z-grey-page); -webkit-text-size-adjust: 100%; }

:focus-visible {
  outline: 3px solid var(--z-text-strong);
  outline-offset: 2px;
}

.z-skip {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: #fff;
  color: var(--z-text-strong);
  font-weight: 700;
}

/* ---------- Seitenrahmen ---------- */
.z-page {
  max-width: 1180px;
  margin: 0 auto;
  background: #fff;
}

@media (min-width: 1200px) {
  .z-page {
    margin: 1.25rem auto;
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.12);
  }
}

/* ---------- Kopf: Logo und Suche ---------- */
.z-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding: 1.25rem 1rem;
}

.z-logo { display: inline-block; line-height: 0; }
.z-logo__img { width: 235px; max-width: 100%; height: auto; }

.z-search { flex: 0 1 15rem; min-width: 11rem; }
.z-search search, .z-search form { margin: 0; }

.z-searchform__group { display: flex; gap: 3px; }

.z-searchform__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 2rem;
  padding: 0 0.5rem;
  border: 2px solid #b7b7b7;
  background: #fff;
  color: var(--z-text-strong);
  font: inherit;
  font-size: 0.8125rem;
}

.z-searchform__input::placeholder { color: #767676; opacity: 1; }

.z-searchform__input:focus {
  border-color: var(--z-orange-light);
  outline: none;
  box-shadow: 0 0 0 3px rgba(214, 124, 36, 0.35);
}

.z-searchform__button {
  flex: 0 0 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2rem;
  padding: 0;
  border: 0;
  background: var(--z-orange);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.15s;
}

.z-searchform__button:hover { background: var(--z-grey-tab-text); }

@media (min-width: 992px) {
  .z-header { padding: 2.25rem var(--z-edge) 2.25rem 1.75rem; }
}

/* ---------- Hauptnavigation: orange Reiter ---------- */
.z-mainnav {
  position: relative;
  background: var(--z-grey-bg);
}

.z-mainnav ul { margin: 0; padding: 0; list-style: none; }
.z-mainnav ul ul { display: none; }

.z-mainnav a,
.z-mainnav .mod-menu__heading,
.z-mainnav .mod-menu__separator {
  display: block;
  background: var(--z-orange);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.15s, margin-top 0.15s;
}

.z-mainnav a:hover { background: var(--z-grey-tab-text); color: #fff; }
.z-mainnav a:focus-visible { outline-color: #fff; outline-offset: -5px; }

.z-mainnav li.active > a,
.z-mainnav li.current > a { background: var(--z-grey-tab); }

.z-mainnav__toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.8rem 1rem;
  border: 0;
  background: var(--z-orange);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-align: left;
}

.z-burger,
.z-burger::before,
.z-burger::after {
  display: block;
  width: 1.375rem;
  height: 3px;
  background: currentColor;
}

.z-burger { position: relative; }
.z-burger::before, .z-burger::after { content: ""; position: absolute; left: 0; }
.z-burger::before { top: -7px; }
.z-burger::after { top: 7px; }

@media (max-width: 991.98px) {
  .z-mainnav li { margin-top: var(--z-gap); }
  .z-mainnav a { padding: 0.75rem 1rem; }
}

@media (min-width: 992px) {
  .z-mainnav { padding: 0 var(--z-edge); }

  .z-mainnav::before,
  .z-mainnav::after {
    content: "";
    position: absolute;
    top: 0;
    width: var(--z-stub);
    height: var(--z-tab-height);
    background: var(--z-orange);
  }

  .z-mainnav::before { left: 0; }
  .z-mainnav::after { right: 0; }

  .z-mainnav--empty { min-height: calc(var(--z-tab-height) + var(--z-tab-drop)); }

  .z-mainnav .z-menu,
  .z-mainnav .mod-menu {
    display: flex;
    align-items: flex-start;
    gap: var(--z-gap);
    min-height: calc(var(--z-tab-height) + var(--z-tab-drop));
  }

  .z-mainnav .z-menu > li,
  .z-mainnav .mod-menu > li { flex: 1 1 0; min-width: 0; }

  .z-mainnav a,
  .z-mainnav .mod-menu__heading,
  .z-mainnav .mod-menu__separator {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: var(--z-tab-height);
    padding: 0 0.5rem 0.55rem;
    line-height: 1.2;
    text-align: center;
  }

  .z-mainnav li.active > a,
  .z-mainnav li.current > a { margin-top: var(--z-tab-drop); }
}

/* ---------- Drei Spalten ---------- */
.z-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: var(--z-grey-bg);
}

.z-main {
  min-width: 0;
  padding: 1.5rem 1rem 2.5rem;
  background: #fff;
}

.z-main:focus { outline: none; }
.z-main--narrow { max-width: 46rem; }

.z-side, .z-right, .z-quick { min-width: 0; }

.z-right { padding: 1.5rem 1rem; font-size: 0.8125rem; }

@media (min-width: 768px) {
  .z-main { padding: 2rem 2rem 3rem; }

  .z-body--side {
    grid-template-columns: 15rem minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
      "side  main"
      "quick main"
      "right right";
  }

  .z-body--side .z-side { grid-area: side; }
  .z-body--side .z-main { grid-area: main; }
  .z-body--side .z-right { grid-area: right; }
  .z-body--side .z-quick { grid-area: quick; }
  .z-body--side:not(.z-body--right) { grid-template-areas: "side main" "quick main"; grid-template-rows: auto 1fr; }
  .z-body--right:not(.z-body--side) { grid-template-areas: "main" "right"; }
}

@media (min-width: 992px) {
  .z-main { padding: 2.75rem 3rem 3.5rem; min-height: 34rem; }

  .z-body--right { grid-template-columns: minmax(0, 1fr) var(--z-side); }
  .z-body--side { grid-template-columns: var(--z-side) minmax(0, 1fr); }

  .z-body--side.z-body--right {
    grid-template-columns: var(--z-side) minmax(0, 1fr) var(--z-side);
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "side  main right"
      "quick main right";
  }

  .z-right { padding: 4rem var(--z-edge) 2rem 1.5rem; }
}

/* ---------- Linke Spalte: Unternavigation ---------- */
.z-side__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 0;
  border-bottom: 1px solid var(--z-line);
  background: var(--z-grey-bg);
  color: var(--z-text-strong);
  font: inherit;
  font-weight: 700;
  text-align: left;
}

.z-side__toggle::after {
  content: "";
  border: 0.35em solid transparent;
  border-top-color: currentColor;
  border-bottom-width: 0;
  transition: transform 0.15s;
}

.z-side__toggle[aria-expanded="true"]::after { transform: rotate(180deg); }

.z-subnav { padding: 0.75rem 1rem 1rem; }

.z-subnav ul { margin: 0; padding: 0; list-style: none; }

.z-subnav a,
.z-subnav .mod-menu__heading,
.z-subnav .mod-menu__separator,
.z-subnav__title {
  position: relative;
  display: block;
  padding: 0.3rem 0 0.3rem 1rem;
  color: var(--z-text);
  line-height: 1.4;
  text-decoration: none;
}

/* Pfeil nach rechts vor jedem Eintrag */
.z-subnav a::before,
.z-subnav .mod-menu__heading::before,
.z-subnav .mod-menu__separator::before,
.z-subnav__title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  border: 0.32em solid transparent;
  border-left-color: var(--z-grey-arrow);
  border-right-width: 0;
}

.z-subnav a:hover { color: var(--z-text-strong); text-decoration: underline; }

.z-subnav li.current > a {
  color: var(--z-orange-on-grey);
  font-weight: 700;
}

.z-subnav li.current > a::before { border-left-color: var(--z-orange); }

/* Überschrift = Elternpunkt, Pfeil nach unten */
.z-subnav__title,
.z-subnav .mod-menu__heading,
.z-subnav .mod-menu__separator {
  margin-bottom: 0.5rem;
  color: var(--z-text-strong);
  font-weight: 700;
}

.z-subnav__title::before,
.z-subnav .mod-menu__heading::before,
.z-subnav .mod-menu__separator::before {
  top: 0.85em;
  border: 0.32em solid transparent;
  border-top-color: var(--z-grey-arrow);
  border-bottom-width: 0;
}

.z-subnav__title + ul,
.z-subnav .z-menu__sub { padding-left: 1rem; }

.z-module--left { padding: 0 1rem 1rem; font-size: 0.8125rem; }

@media (min-width: 768px) {
  .z-subnav { padding: 1.25rem 1rem 1.5rem 1.75rem; }
  .z-module--left { padding: 0 1rem 1.5rem 1.75rem; }
}

@media (min-width: 992px) {
  .z-subnav { min-height: 14rem; padding-left: calc(var(--z-edge) + 0.5rem); }
  .z-module--left { padding-left: calc(var(--z-edge) + 0.5rem); }
}

/* ---------- Linke Spalte: Schnellzugriff ---------- */
.z-quick { padding-bottom: 1.5rem; }

.z-quick__title {
  margin: 0;
  padding: 0.5rem 1rem 0.5rem calc(var(--z-edge) + 0.9rem);
  /* oranger Balken mit weißer Fuge nach dem Randstreifen */
  background: linear-gradient(to right, var(--z-orange) 0 var(--z-stub), #fff var(--z-stub) var(--z-edge), var(--z-orange) var(--z-edge));
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
}

.z-quick__list {
  padding: 0.75rem 0 0.5rem;
  border-bottom: 5px solid var(--z-orange);
  border-image: linear-gradient(to right, var(--z-orange) 0 var(--z-stub), #fff var(--z-stub) var(--z-edge), var(--z-orange) var(--z-edge)) 1;
}

.z-quick ul { margin: 0; padding: 0; list-style: none; }

.z-quick a {
  display: block;
  padding: 0.3rem 1rem 0.3rem calc(var(--z-edge) + 0.9rem);
  color: var(--z-text);
  font-size: 0.875rem;
  text-decoration: none;
}

.z-quick a:hover,
.z-quick li.current > a {
  background: linear-gradient(to right, var(--z-orange) 0 var(--z-stub), transparent var(--z-stub));
  color: var(--z-text-strong);
}

.z-quick li.current > a { font-weight: 700; }

@media (min-width: 768px) {
  /* wie früher: lange Liste in einem Rollfeld, damit die Spalte nicht endlos wird.
     Der Verlauf am unteren Rand zeigt, dass es weitergeht. */
  .z-quick__list {
    max-height: 17.5rem;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--z-grey-arrow) transparent;
  }

  .z-quick__list > ul {
    padding-bottom: 1.5rem;
    -webkit-mask-image: linear-gradient(#000 calc(100% - 2.25rem), transparent);
    mask-image: linear-gradient(#000 calc(100% - 2.25rem), transparent);
  }
}

/* ---------- Rechte Spalte ---------- */
.z-right img { max-width: 100%; height: auto; }
.z-right p { margin-bottom: 1rem; }
.z-right .z-module + .z-module { margin-top: 1.5rem; }
.z-right .z-module__title { font-size: 0.875rem; font-weight: 700; color: var(--z-text-strong); }

/* ---------- Inhalt ---------- */
.z-main h1,
.z-main .page-header h1,
.z-main .page-header h2 {
  margin: 0 0 1.5rem;
  color: var(--z-text-strong);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
}

.z-main h2 {
  margin: 2rem 0 1rem;
  color: var(--z-orange-text);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.4;
}

.z-main h3 {
  margin: 1.75rem 0 1rem;
  color: var(--z-text-strong);
  font-size: 1.125rem;
  font-weight: 700;
}

.z-main h4 {
  margin: 1.25rem 0 0.6rem;
  color: var(--z-orange-text);
  font-size: 1rem;
  font-weight: 400;
}

.z-main p { margin: 0 0 1.2em; }
.z-main strong, .z-main b { color: var(--z-text-strong); }

.z-main a {
  color: var(--z-text-strong);
  text-decoration: underline;
  text-decoration-color: var(--z-orange-light);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.z-main a:hover { color: var(--z-orange-text); text-decoration-thickness: 2px; }

.z-main img { max-width: 100%; height: auto; }

.z-main ul { margin: 0 0 1.2em; padding-left: 1.4em; list-style: square; }
.z-main ul li { padding-left: 0.2em; margin-bottom: 0.5em; }
.z-main ul li::marker { color: var(--z-orange-light); font-size: 1.15em; }
.z-main ol { margin: 0 0 1.2em; padding-left: 1.6em; }
.z-main ol li { margin-bottom: 0.5em; }

.z-main table { max-width: 100%; }
.z-main hr { border-color: var(--z-line); opacity: 1; }

.z-button,
.z-main a.z-button {
  display: inline-block;
  padding: 0.55rem 1.25rem;
  border: 0;
  background: var(--z-orange-text);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.z-button:hover,
.z-main a.z-button:hover { background: var(--z-grey-tab-text); color: #fff; }

.z-module--inset { margin-bottom: 1.5rem; }

/* ---------- Fußzeile ---------- */
.z-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: var(--z-orange);
  color: #fff;
}

.z-footer ul { margin: 0; padding: 0; list-style: none; }
.z-footer p { margin: 0; }

.z-footer__legal { padding: 0.6rem 1rem; }
.z-footer__legal li { display: inline-block; margin-right: 1.25rem; }

.z-footer__legal a {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.z-footer__legal a:hover { text-decoration: underline; }
.z-footer__legal a:focus-visible { outline-color: #fff; }

.z-footer__text {
  padding: 0.6rem 1rem;
  border: solid var(--z-orange);
  border-width: 2px 0;
  background: #fff;
  color: var(--z-text);
  font-size: 0.8125rem;
}

@media (min-width: 992px) {
  .z-footer {
    grid-template-columns: var(--z-side) minmax(0, 1fr) var(--z-side);
    align-items: stretch;
    background:
      linear-gradient(to right, var(--z-orange) 0 var(--z-stub), #fff var(--z-stub) var(--z-edge), transparent var(--z-edge)) left / 50% 100% no-repeat,
      linear-gradient(to left, var(--z-orange) 0 var(--z-stub), #fff var(--z-stub) var(--z-edge), transparent var(--z-edge)) right / 50% 100% no-repeat,
      var(--z-orange);
  }

  .z-footer__legal { padding: 0.55rem 1rem 0.55rem calc(var(--z-edge) + 0.9rem); }
  .z-footer__text { padding: 0.55rem 1.5rem; text-align: center; }
}

/* ---------- Fehlerseite, Offline-Seite, Komponentenansicht ---------- */
.z-error__code {
  margin: 0 0 0.25rem;
  color: var(--z-orange-text);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.1;
}

.z-error__debug { margin-top: 2rem; font-size: 0.8125rem; overflow-x: auto; }

.z-offline {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem 1rem;
}

.z-offline__card {
  width: 100%;
  max-width: 26rem;
  padding: 2rem 1.75rem;
  border-top: 8px solid var(--z-orange);
  background: #fff;
}

.z-offline__message { margin: 1.5rem 0; }
.z-offline__form .form-label { display: block; margin: 1rem 0 0.25rem; }
.z-offline__form .z-button { margin-top: 1.5rem; }

.z-component { padding: 1.5rem; background: #fff; }

/* ---------- Formulare und Joomla-Standardausgaben ---------- */
.form-control:focus,
.form-select:focus {
  border-color: var(--z-orange);
  box-shadow: 0 0 0 3px rgba(214, 124, 36, 0.35);
}

.btn-primary {
  --bs-btn-bg: var(--z-orange-text);
  --bs-btn-border-color: var(--z-orange-text);
  --bs-btn-hover-bg: var(--z-grey-tab-text);
  --bs-btn-hover-border-color: var(--z-grey-tab-text);
  --bs-btn-active-bg: var(--z-grey-tab-text);
  --bs-btn-active-border-color: var(--z-grey-tab-text);
}

/* ---------- Druck ---------- */
@media print {
  body { background: #fff; }
  .z-page { max-width: none; margin: 0; box-shadow: none; }
  .z-search, .z-mainnav, .z-side, .z-quick, .z-right, .z-footer__legal, .z-skip { display: none !important; }
  .z-body { display: block; background: #fff; }
  .z-main { padding: 0; }
  .z-footer { display: block; background: none; }
}

/* ---------- Bilder der rechten Spalte, Porträts ---------- */
.z-sideimage { margin: 0 0 1rem; }
.z-sideimage img[src$="bild-102.jpg"],
.z-sideimage img[src$="bild-109.jpg"] { display: none; } /* leere Platzhalterbilder der alten Seite */

/* Porträt: schwarz-weiß, bei Hover/Fokus farbig (früher per JavaScript) */
.z-portrait {
  position: relative;
  display: inline-block;
  line-height: 0;
  vertical-align: top;
}

.z-portrait__colour {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.2s;
}

a:hover .z-portrait__colour,
a:focus-visible .z-portrait__colour { opacity: 1; }

/* ---------- Feinschliff nach der Inhaltsübernahme ---------- */
/* Fett in Überschriften und Links behält deren Farbe (z. B. orange Zwischenüberschriften) */
.z-main :is(h1, h2, h3, h4, h5, h6, a) :is(strong, b) { color: inherit; }

/* Unternavigation: der erste Eintrag ist die Überschrift des Bereichs (Pfeil nach unten),
   wie im alten Menü – auch wenn er als Alias auf die aktuelle Seite zeigt. */
.z-subnav .z-menu > li:first-child > a,
.z-subnav .z-menu > li:first-child > span {
  margin-bottom: 0.5rem;
  color: var(--z-text-strong);
  font-weight: 700;
}

.z-subnav .z-menu > li:first-child > a::before,
.z-subnav .z-menu > li:first-child > span::before {
  top: 0.85em;
  border: 0.32em solid transparent;
  border-top-color: var(--z-grey-arrow);
  border-bottom-width: 0;
}

.z-subnav .z-menu > li:not(:first-child) { padding-left: 1rem; }

/* Schnellzugriff: nur Hover hervorheben. Mehrere Einträge zeigen als Alias auf dieselbe
   Seite und wären sonst alle gleichzeitig markiert. */
.z-quick li.current > a { background: none; color: var(--z-text); font-weight: 400; }
.z-quick li.current > a:hover { background: linear-gradient(to right, var(--z-orange) 0 var(--z-stub), transparent var(--z-stub)); color: var(--z-text-strong); }
.z-quick__list { padding-bottom: 0.75rem; }

/* Listen in der rechten Spalte: kleine orange Quadrate wie im Inhalt */
.z-right ul { margin: 0 0 1rem; padding-left: 1.2em; list-style: square; }
.z-right ul li { margin-bottom: 0.25em; }
.z-right ul li::marker { color: var(--z-orange-light); }
.z-right a { color: var(--z-text-strong); text-decoration-color: var(--z-orange); text-underline-offset: 0.18em; overflow-wrap: anywhere; }

/* Seiten ohne Unternavigation (z. B. aus dem Schnellzugriff): Abstand über dem Balken */
@media (min-width: 768px) {
  .z-body:not(:has(.z-side)) .z-quick { margin-top: 2.25rem; }
}


/* ==========================================================================
   Überarbeitung nach der Prüfung vom 27.11.2026 (shots/review/BERICHT.md)
   ========================================================================== */

/* ---------- lange Wörter: umbrechen statt aus der Spalte laufen ---------- */
.z-main :is(h1, h2, h3, h4, p, li, td, a),
.z-subnav a,
.z-quick a,
.z-right,
.z-footer__text { overflow-wrap: break-word; }

/* Silbentrennung nur dort, wo wenig Platz ist; Fließtext bleibt ungetrennt */
.z-main :is(h1, h2),
.z-subnav a,
.z-quick a,
.z-right { hyphens: auto; }

/* ---------- Überschriften ---------- */
.z-main h1,
.z-main .page-header h1 { font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.5rem); }

/* Zwischenüberschriften (im alten Inhalt <h4>): orange, normal gewichtet; fett nur, wo der Text es ist */
.z-main h2 {
  margin: 2rem 0 0.9rem;
  font-size: 1.0625rem;
  font-weight: 400;
}

.z-main h1 + h2 { margin-top: 1.25rem; }
.z-main > :last-child, .z-main .com-content-article__body > :last-child { margin-bottom: 0; }

/* Zitat-Absätze der Anwaltsprofile (alt: padding-left 30px) */
.z-main p[style*="padding-left"] {
  padding-left: 1.25rem !important;
  border-left: 3px solid var(--z-orange-light);
  color: var(--z-text-strong);
}

/* ---------- Porträts mit Namen (rechte Spalte) ---------- */
.z-portraits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 0.6rem;
  margin: 0 0 1.25rem;
}

.z-portrait-link {
  display: block;
  color: var(--z-text-strong);
  text-decoration: none;
}

.z-portrait-link .z-portrait { display: block; }
.z-portrait-link .z-portrait img { width: 100%; height: auto; }
.z-portrait-link .z-portrait__colour { height: 100%; }

.z-portrait__name {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.75rem;
  line-height: 1.3;
}

.z-portrait-link:hover .z-portrait__name { color: var(--z-orange-on-grey); text-decoration: underline; }

/* Porträt-Links im Inhalt: Fokusrahmen um das ganze Bild */
.z-main a:has(> .z-portrait) { display: inline-block; line-height: 0; }

/* ---------- rechte Spalte unter 992px: volle Breite, Inhalte nebeneinander ---------- */
@media (max-width: 991.98px) {
  .z-right {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 0.5rem 2rem;
    align-items: start;
    padding: 1.5rem 1rem;
    border-top: 1px solid var(--z-line);
  }

  .z-right .z-module + .z-module { margin-top: 0; }
  .z-right p[style*="width"] { width: auto !important; }
  .z-right .z-portraits { grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); max-width: 40rem; }
  .z-sideimage img { max-width: 10.5rem; }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .z-right { padding: 2rem; }
}

/* ---------- Schnellzugriff mobil: eingeklappt, bündig mit dem übrigen Inhalt ---------- */
.z-quick__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: 0;
  text-align: left;
  font-family: inherit;
}

.z-quick__toggle::after {
  content: "";
  border: 0.35em solid transparent;
  border-top-color: currentColor;
  border-bottom-width: 0;
  transition: transform 0.15s;
}

.z-quick__toggle[aria-expanded="true"]::after { transform: rotate(180deg); }
.z-quick__toggle:focus-visible { outline-color: #fff; outline-offset: -5px; }

@media (max-width: 767.98px) {
  .z-quick { padding-bottom: 0; }
  .z-quick__title { padding: 0.75rem 1rem; background: var(--z-orange); }
  .z-quick__list { border-bottom-width: 0; padding: 0.5rem 0; }
  .z-quick a { padding: 0.45rem 1rem; }
  .z-quick a:hover { background: rgba(0, 0, 0, 0.05); }
}

/* ---------- Fußzeile: schmale Desktops ---------- */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .z-footer__text { padding-inline: 0.75rem; font-size: 0.75rem; }
}

/* ---------- Fehlerseite: Inhalt über die ganze Breite, Text in lesbarer Zeilenlänge ---------- */
.z-main--narrow { max-width: none; }
.z-main--narrow > * { max-width: 40rem; }

/* ---------- Suchergebnisse (Smart Search) ---------- */
.com-finder .form-control, .com-finder .btn { border-radius: 0; }
.com-finder__results ol, .com-finder__results ul { padding-left: 0; list-style: none; }
.com-finder__results li { margin: 0 0 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--z-line); }
.com-finder__results .result__title { margin: 0 0 0.35rem; font-size: 1.0625rem; font-weight: 700; }
.com-finder__results a { overflow-wrap: anywhere; }
.com-finder__results mark, .z-main .highlight { padding: 0 0.1em; background: #fbe6cf; color: inherit; }

/* Leere Platzhalterbilder der alten Seite: das ganze Modul ausblenden, damit es keine Rasterzelle belegt */
.z-right .z-module:has(img[src$="bild-102.jpg"]),
.z-right .z-module:has(img[src$="bild-109.jpg"]) { display: none; }

/* Fußzeile: Impressum und Datenschutz nebeneinander */
@media (min-width: 992px) {
  .z-footer__legal { display: flex; align-items: center; }
  .z-footer__legal li { margin-right: 0.9rem; font-size: 0.875rem; }
  .z-footer__legal li:last-child { margin-right: 0; }
  .z-footer__text { display: flex; align-items: center; justify-content: center; }
}

/* Fußzeile am Desktop: beide Links passen in eine Zeile */
@media (min-width: 992px) {
  .z-footer__legal { padding-left: calc(var(--z-edge) + 0.6rem); padding-right: 0.5rem; }
  .z-footer__legal ul { display: flex; flex-wrap: wrap; gap: 0 0.8rem; }
  .z-footer__legal li { margin-right: 0; font-size: 0.8125rem; }
}

/* Suchergebnisse: nur eine Trennlinie je Treffer */
.com-finder__results hr { display: none; }

/* ---------- Anfahrt: Anschrift, Kartenbild, Kartenlinks ---------- */
.z-address {
  margin: 0 0 1.5rem;
  padding: 0.9rem 1.1rem;
  border-left: 3px solid var(--z-orange-light);
  background: var(--z-grey-bg);
  line-height: 1.7;
}

.z-map { margin: 0 0 1.25rem; }

.z-map a { display: block; line-height: 0; }
.z-main .z-map a { text-decoration: none; }

.z-map img {
  width: 100%;
  height: auto;
  border: 1px solid var(--z-line);
  transition: filter 0.2s;
}

.z-map a:hover img { filter: brightness(1.04) saturate(1.15); }
.z-map a:focus-visible { outline-offset: 3px; }

.z-map figcaption {
  margin-top: 0.4rem;
  color: #6b6c6e;
  font-size: 0.75rem;
}

.z-main .z-map figcaption a { display: inline; color: inherit; line-height: inherit; text-decoration: underline; }

.z-maplinks { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.z-main a.z-button--outline,
.z-button--outline {
  background: #fff;
  color: var(--z-orange-text);
  box-shadow: inset 0 0 0 2px var(--z-orange-text);
}

.z-main a.z-button--outline:hover,
.z-button--outline:hover { background: var(--z-orange-text); color: #fff; }

.z-note { color: #6b6c6e; font-size: 0.8125rem; }

@media (max-width: 575.98px) {
  .z-maplinks .z-button { flex: 1 1 100%; text-align: center; }
}

/* ---------- Suche der statischen Website (search.js) ---------- */
.z-sitesearch { margin: 0 0 1.5rem; }
.z-sitesearch label { display: block; margin-bottom: 0.3rem; }
.z-sitesearch__group { display: flex; gap: 0.5rem; max-width: 32rem; }
.z-sitesearch input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.5rem 0.65rem;
  border: 2px solid #b7b7b7;
  font: inherit;
}
.z-sitesearch input[type="search"]:focus { border-color: var(--z-orange-light); outline: none; box-shadow: 0 0 0 3px rgba(214, 124, 36, 0.35); }
.z-sitesearch__count { font-weight: 700; color: var(--z-text-strong); }
.z-main .z-sitesearch__list { padding: 0; list-style: none; }
.z-main .z-sitesearch__list li { margin: 0 0 1.25rem; padding: 0 0 1.25rem; border-bottom: 1px solid var(--z-line); }
.z-main .z-sitesearch__list h2 { margin: 0 0 0.3rem; font-size: 1.0625rem; font-weight: 700; }
.z-main .z-sitesearch__list p { margin: 0; }
