/* www.breitenbach-architektur.de – Farben und Kopfbild wie bisher: Blau (Architekt), Gelb (Bauschaden-Notruf), Rot (Fachwerk) */
:root {
  --blau: #1557b0; --blau-dunkel: #0d48a0; --text: #4f463f; --grau: #8a817a; --linie: #e3e1de; --flaeche: #f4f3f1;
  --farbe: var(--blau); --farbe-dunkel: var(--blau-dunkel); --farbe-text: #fff; --farbe-titel: #04398c;
  --rund: 10px; --rund-klein: 6px;
}
.bereich-bn { --farbe: #f7b701; --farbe-dunkel: #e79800; --farbe-text: #3a2b00; --farbe-titel: #c27a00; }
.bereich-fa { --farbe: #d94310; --farbe-dunkel: #b13511; --farbe-titel: #c83605; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.6 Arial, Helvetica, "Segoe UI", sans-serif; color: var(--text); background: #d4d3d2; }
a { color: var(--text); }
a:hover { color: var(--farbe-titel); }
img { max-width: 100%; height: auto; }
.sprung { position: absolute; left: -999px; top: 0; background: #fff; padding: .5em 1em; z-index: 10; }
.sprung:focus { left: 1em; }
.seite { max-width: 842px; margin: 0 auto 1.5rem; }

/* Kopf: bisheriges Kopfbild je Bereich, Name und Anschrift als Text */
.kopf { position: relative; aspect-ratio: 842 / 230; background: url(kopf-ba.jpg) left top / 100% auto no-repeat; container-type: inline-size; }
.bereich-bn .kopf { background-image: url(kopf-bn.jpg); }
.bereich-fa .kopf { background-image: url(kopf-fa.jpg); }
.metanav { position: absolute; top: 3.5%; left: 2.4%; font-size: .8rem; }
.metanav a { text-decoration: none; color: var(--text); padding: 0 8px; border-right: 1px solid var(--grau); }
.metanav a:first-child { padding-left: 0; }
.metanav a:last-child { border-right: 0; }
.metanav a:hover, .metanav a[aria-current] { text-decoration: underline; }
.kopf-text { position: absolute; left: 3%; top: 40%; width: 39%; }
.kopf-text p { margin: 0; }
.kopf-name { font-size: 4.3cqw; line-height: 1.1; letter-spacing: -.01em; }
.kopf-name a { color: #1a56b4; text-decoration: none; }
.kopf-zusatz { font-size: 1.85cqw; line-height: 1.3; color: #1a56b4; margin-top: .3em !important; }
.kopf-adresse { font-size: 1.2cqw; color: #4f463f; margin-top: 1.4em !important; white-space: nowrap; }
.kopf-adresse a { color: inherit; text-decoration: none; }
.bereiche { position: absolute; inset: 0; }
.karte { position: absolute; top: 6%; width: 17.4%; height: 87%; border-radius: var(--rund-klein); }
.karte span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.karte-ba { left: 42.1%; } .karte-bn { left: 60.6%; } .karte-fa { left: 79.2%; }
.karte:hover, .karte:focus-visible { outline: 3px solid rgba(255,255,255,.7); outline-offset: -3px; }

/* Navigation oben in der Farbe des Bereichs */
/* Inhalt so breit wie die weiße Fläche im Kopfbild (links 10 px, rechts 20 px Schatten) */
.navigation-oben, .spalten, .fuss { margin: 0 2.38% 0 1.19%; }
.navigation-oben { background: linear-gradient(var(--farbe), var(--farbe-dunkel)); }
.navigation-oben ul { list-style: none; margin: 0; padding: 0 10px; display: flex; flex-wrap: wrap; }
.navigation-oben a { display: block; padding: 7px 18px; color: var(--farbe-text); text-decoration: none; font-size: .9rem; }
.navigation-oben a:hover, .navigation-oben a[aria-current] { background: rgba(0,0,0,.14); }
.navigation-oben a[aria-current] { font-weight: bold; }

/* Spalten */
.spalten { background: #fff; display: grid; grid-template-columns: minmax(0, 1fr); padding: 28px 34px 30px; gap: 30px; min-height: 380px; }
.spalten.mit-unternavigation { grid-template-columns: 200px minmax(0, 1fr); padding-left: 20px; }
.navigation-links { font-size: .9rem; }
.nav-titel { margin: 0 0 6px; padding: 4px 10px; font-weight: bold; }
.nav-titel a { color: var(--farbe-titel); text-decoration: none; }
.navigation-links ul { list-style: none; margin: 0; padding: 0; }
.navigation-links > ul > li { border-bottom: 1px solid var(--farbe); }
.navigation-links > ul > li:last-child { border-bottom: 0; }
.navigation-links a { display: block; padding: 7px 10px 7px 22px; text-decoration: none; position: relative; border-radius: var(--rund-klein); }
.navigation-links a:hover { background: var(--flaeche); }
.navigation-links a[aria-current]::before { content: ""; position: absolute; left: 9px; top: 50%; width: 6px; height: 6px; margin-top: -3px; background: var(--farbe); border-radius: 50%; }
.navigation-links a[aria-current="page"] { font-weight: bold; }
.navigation-links li ul { margin: 0 0 6px 14px; font-size: .85rem; }
.navigation-links li ul a { padding: 4px 10px 4px 22px; }

.inhalt h1 { font-size: 1.2rem; margin: 0 0 1em; color: var(--farbe-titel); }
.inhalt h2 { font-size: 1.05rem; margin: 1.3em 0 .5em; color: var(--farbe-titel); }
.inhalt h3, .inhalt h4 { font-size: .98rem; margin: 1.2em 0 .4em; color: var(--farbe-titel); }
.inhalt p, .inhalt ul, .inhalt ol, .inhalt pre { margin: 0 0 1em; }
.inhalt pre { white-space: pre-wrap; font: inherit; }
.inhalt p.adr { margin-bottom: .8em; }
.inhalt::after { content: ""; display: block; clear: both; }
.inhalt table { border-collapse: collapse; margin: 0 0 1em; }
.inhalt td { vertical-align: top; padding: 4px 8px 4px 0; }
img.bild { border-radius: var(--rund-klein); }
img.bild.links { float: left; margin: 4px 1.5em 1em 0; max-width: 45%; }
img.bild.rechts { float: right; margin: 4px 0 1em 1.5em; max-width: 45%; }
img.bild.mitte { display: block; margin: 0 0 1em; }
h2 img.bild, h3 img.bild { font-weight: normal; }
a.pdf::before { content: "PDF"; font-size: .7rem; font-weight: bold; background: var(--farbe-titel); color: #fff; border-radius: 4px; padding: 1px 5px; margin-right: 8px; vertical-align: 1px; }
.kontaktdaten { background: var(--flaeche); border-radius: var(--rund-klein); padding: .8em 1em; margin-bottom: 1em; }
.kontaktdaten p:last-child { margin-bottom: 0; }

/* Bildergalerie mit Leuchtkasten (ohne JavaScript) */
.galerie { list-style: none; padding: 0; margin: 0 0 1em; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.galerie a { display: block; border-radius: var(--rund-klein); overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.25); aspect-ratio: 3 / 2; }
.galerie img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.galerie a:hover img { transform: scale(1.04); }
.leuchtkasten { display: none; }
.leuchtkasten:target { display: flex; position: fixed; inset: 0; z-index: 20; background: rgba(20,18,16,.88); align-items: center; justify-content: center; padding: 50px 16px 16px; }
.leuchtkasten figure { margin: 0; text-align: center; color: #fff; max-width: 100%; }
.leuchtkasten img { max-height: calc(100vh - 110px); max-width: 100%; width: auto; height: auto; object-fit: contain; border-radius: var(--rund-klein); }
.leuchtkasten figcaption { margin-top: 8px; font-size: .9rem; }
.lk-zu { position: absolute; top: 12px; right: 16px; color: #fff; text-decoration: none; border: 1px solid #fff; border-radius: var(--rund-klein); padding: 2px 12px; font-size: .85rem; }
.lk-zu:hover { color: #fff; background: rgba(255,255,255,.15); }

/* Fuß mit dem Logo „Staatlich anerkannter Sachverständiger“ */
.fuss { background: #fff; border-top: 1px solid var(--linie); border-radius: 0 0 var(--rund) var(--rund);
  padding: 16px 30px 18px 190px; min-height: 160px; position: relative; font-size: .85rem; color: var(--grau); }
.fuss::before { content: ""; position: absolute; left: 24px; top: 6px; width: 150px; height: 141px; background: url(logo-sachverstaendiger.png) left top / contain no-repeat; }
.fuss a { color: var(--grau); }
.fuss p { margin: 0 0 .6em; }
.fuss-links a { margin-right: 16px; text-transform: uppercase; font-size: .78rem; text-decoration: none; }
.fuss-links a:hover { text-decoration: underline; }

/* schmale Bildschirme: Kopf als Text mit drei Reitern, Unternavigation über dem Inhalt */
@media (max-width: 700px) {
  .kopf { aspect-ratio: auto; background: #fff !important; padding: 10px 16px 0; }
  .metanav { position: static; margin-bottom: 8px; }
  .kopf-text { position: static; width: auto; }
  .kopf-name { font-size: 1.7rem; }
  .kopf-zusatz { font-size: .9rem; }
  .kopf-adresse { font-size: .8rem; white-space: normal; margin-top: .6em !important; }
  .bereiche { position: static; display: flex; gap: 4px; margin-top: 12px; }
  .karte { position: static; flex: 1; width: auto; height: auto; border-radius: var(--rund-klein) var(--rund-klein) 0 0; background: var(--flaeche); text-align: center; padding: 6px 4px; font-size: .72rem; text-decoration: none; color: var(--text); }
  .karte span { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; }
  .navigation-oben, .spalten, .fuss { margin: 0; }
  .karte[aria-current] { background: var(--farbe); color: var(--farbe-text); font-weight: bold; }
  .karte-ba[aria-current] { background: var(--blau); color: #fff; }
  .navigation-oben a { padding: 6px 12px; }
  .spalten, .spalten.mit-unternavigation { grid-template-columns: 1fr; padding: 16px; gap: 16px; }
  .navigation-links { background: var(--flaeche); border-radius: var(--rund); padding: 6px; }
  img.bild.links, img.bild.rechts { float: none; display: block; max-width: 100%; margin: 0 0 1em; }
  .fuss { padding: 16px; border-radius: 0; }
  .fuss::before { display: none; }
}
