/* AH-BK · Seitenkopf, Breadcrumb, Typografie im Inhalt, Seitenleiste */
/* Breadcrumb bleibt beim Scrollen unter dem Header stehen; --strip-h = seine Höhe im gescrollten Zustand, für die Sticky-Abstände darunter */
:root { --strip-h: 37px }
.page-strip { position: sticky; top: calc(var(--header-h) - var(--utility-weg, 0px)); z-index: 400; transition: top var(--t); background: var(--soft); border-bottom: 1px solid var(--line) }
.breadcrumbs { display: flex; align-items: center; gap: 8px; height: 52px; margin: 0; overflow-x: auto; scrollbar-width: none; white-space: nowrap; color: var(--muted); font-size: .78rem; transition: height var(--t) }
/* Beim Scrollen (Header .scrolled aus js/module/header.js) schrumpft die Leiste auf --strip-h */
body:has(.site-header.scrolled) .breadcrumbs { height: 36px }
.breadcrumbs a { color: var(--primary) }
.breadcrumbs a:hover { color: var(--accent-text) }
.breadcrumbs strong { color: var(--primary-800); font-weight: 700 }
.breadcrumbs span { opacity: .75 }
.page-head { margin: 0 0 40px }
.page-head .kicker { margin-bottom: 16px }
.page-head-zeile { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 32px }   /* Überschrift + $page['kopf_link'] */
.page-head-zeile .btn { flex: none; margin-bottom: 4px }
.content-main .page-head h1 { margin: 0; font-size: var(--fs-h1); line-height: 1.02; letter-spacing: -.05em; font-weight: 750; color: var(--primary-800) }
/* Subline: bewusst <p> (keine Überschrift); .content-main davor, damit die Fließtext-Regel .content-main p sie nicht überschreibt */
.content-main .page-intro { margin: 22px 0 0; max-width: var(--w-text); font-size: var(--fs-lead); line-height: 1.45; color: #3d4961; font-weight: 500 }
.page-hero { margin: 0 0 48px }
.page-hero img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; border-radius: var(--r-xl) }
.content-main.wide .page-hero img { aspect-ratio: 3 / 1 }

/* Typografie im Inhalt */
.page-body [id] { scroll-margin-top: calc(var(--header-h) + var(--strip-h) + 24px) }
.content-main h2 { position: relative; margin: 76px 0 34px; font-size: var(--fs-h2); line-height: 1.2; letter-spacing: -.035em; font-weight: 700 }
.content-main h2::after { content: ""; position: absolute; left: 0; bottom: -12px; width: 36px; height: 2px; background: var(--accent) }
.content-main .section-head h2 { margin-bottom: 0; font-size: var(--fs-h2); line-height: 1.2; letter-spacing: -.035em; font-weight: 700 }   /* Link „Alle … →“ steht auf einer Linie mit der Überschrift */
.content-main h3 { margin: 48px 0 14px; font-size: var(--fs-h3); line-height: 1.3; font-weight: 700; letter-spacing: -.01em; color: var(--ink) }
.content-main h4 { margin: 34px 0 10px; font-size: var(--fs-h4) }
.content-main p { margin: 0 0 1.35em; line-height: var(--lh-text); color: var(--text) }
.content-main .lead { margin-bottom: 56px; font-size: var(--fs-lead); line-height: 1.55; color: #2c3750; font-weight: 500 }
.page-body > p:first-child, .page-body > h2:first-child + p { font-size: 1.25rem; line-height: 1.65; color: #2c3750; font-weight: 500 }
.page-body > h2:first-child, .page-body > h3:first-child, .page-body > .lead:first-child, .content-main > h2:first-child, .content-main > .baustein:first-child > h2:first-child, .content-split > div > h2:first-child { margin-top: 0 }
.content-main ul:not([class]), .content-main ol:not([class]) { padding-left: 1.25em; margin: 0 0 1.6em }
.content-main ul:not([class]) > li, .content-main ol:not([class]) > li { margin: 0 0 .55em; line-height: 1.7; color: var(--text) }
.content-main ul:not([class]) > li::marker { color: var(--accent-strong) }
.content-main li > p { margin: 0 }
.content-main address { font-style: normal; margin: 0 0 16px }
.content-main hr { border: 0; border-top: 1px solid var(--line); margin: 30px 0 }
.content-main table { width: 100%; min-width: 480px; border-collapse: collapse; font-size: .95rem }
.content-main th, .content-main td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top }
.content-main th { border-bottom: 2px solid var(--primary-800); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted) }
/* Links im Fließtext */
.content-main :is(p, ul:not([class]) > li, ol:not([class]) > li, td, address, dd, figcaption) > a:not(.btn):not(.link-arrow), .content-main :is(p, ul:not([class]) > li, td) > strong > a { color: var(--primary); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgba(66, 84, 149, .35) }
.content-main .video-consent :is(p, ul:not([class]) > li) > a:not(.btn):not(.link-arrow) { color: #fff; text-decoration-color: rgba(255, 255, 255, .5) }
.content-main :is(p, ul:not([class]) > li, ol:not([class]) > li, td, address, dd) > a:not(.btn):hover { text-decoration-color: var(--accent-strong) }
/* Dateien nicht als Link im Fließtext, sondern als Datei-Button: {{datei:/pfad.pdf|Titel}} bzw. datei_button() */
/* Ausnahme: Überschriften in Karten und Modulen tragen keinen Akzentstrich */
.content-main :is(.bg-cta, .section-head, .sm-bereich, .bo-card, .dl-group, .chronik-dekade-kopf, .bo-wegweiser-head, .consent-head) h2::after { display: none }

/* Seitenleiste */
.side-col { align-self: start; position: sticky; top: calc(var(--header-h) - var(--utility-weg, 0px) + var(--strip-h) + 28px); transition: top var(--t); display: flex; flex-direction: column; gap: 18px }
.side-nav { background: var(--soft); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 24px 14px 16px }
.side-nav .kicker { padding: 0 12px; font-size: .64rem; color: var(--muted) }
.side-nav a.side-bereich { display: inline-block; margin: 0; padding: 2px 12px; border-radius: var(--r-sm); font-size: .64rem; font-weight: 800; color: var(--muted) }   /* Oberzeile verlinkt die Bereichsseite */
.side-nav a.side-bereich::before { display: none }
.side-nav a.side-bereich:hover { background: transparent; color: var(--primary); text-decoration: underline; text-underline-offset: 3px }
.side-nav a.side-title { display: block; padding: 6px 12px; margin: 4px 0 10px; font-size: 1.08rem; font-weight: 800; color: var(--primary-800) }   /* Gruppenname = Link zur Gruppen-Übersicht */
.side-nav a.side-title::before { display: none }
.side-nav a.side-title:hover { background: rgba(255, 255, 255, .7); color: var(--accent-text) }
.side-nav a.side-title.is-aktiv { background: #fff; box-shadow: var(--shadow-sm) }
.side-nav a { position: relative; display: flex; align-items: center; padding: 10px 14px 10px 26px; margin: 1px 0; border-radius: var(--r-md); font-size: .92rem; color: var(--text); transition: background var(--t-fast), color var(--t-fast) }
.side-nav a span:last-child { display: none }
.side-nav a::before { content: ""; position: absolute; left: 12px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: #c3cad8; transition: background var(--t-fast), transform var(--t-fast) }
.side-nav a:hover { background: rgba(255, 255, 255, .7); color: var(--primary-800) }
.side-nav a.active { background: #fff; color: var(--primary-800); font-weight: 700; box-shadow: var(--shadow-sm) }
.side-nav a.active::before { background: var(--accent-strong); transform: scale(1.5) }
.side-nav a.side-sub { padding-left: 40px; font-size: .86rem }
.side-nav a.side-sub::before { left: 26px }
/* Weitere Gruppen des Bereichs als eigene Kästen unter der Seitenleiste (render_side_nav) */
.side-andere-liste { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 0 }   /* andere Gruppen des Bereichs: gleiche Kästen wie die Seitenleiste – „hier bin ich, das sind die Nachbarn“ */
.side-andere { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 16px 26px; border-radius: var(--r-lg); background: var(--soft); border: 1px solid var(--line); font-size: .95rem; font-weight: 700; color: var(--primary-800); text-decoration: none; transition: background var(--t-fast), box-shadow var(--t-fast) }
.side-andere:hover { background: #fff; border-color: #cfd7e6 }
.side-andere .pfeil { font-style: normal; font-weight: 800; color: var(--accent-strong); transition: transform var(--t-fast) }
.side-andere:hover .pfeil { transform: translateX(3px) }
.toc { padding: 4px 26px 0 }
.toc .kicker { padding: 0; margin-bottom: 10px; color: var(--muted) }
.toc a { position: relative; display: block; padding: 6px 0 6px 14px; font-size: .84rem; line-height: 1.4; color: var(--muted); transition: color var(--t-fast) }
.toc a::before { content: ""; position: absolute; left: 0; top: 13px; width: 10px; height: 2px; border-radius: 2px; background: #c3cad8; transform: scaleX(.6); transform-origin: left; transition: transform .2s, background .2s }
.toc a:hover, .toc a.is-active { color: var(--primary-800) }
.toc a.is-active { font-weight: 700 }
.toc a.is-active::before { transform: translateX(-3px); background: var(--accent-strong) }

/* Responsive */
/* Seitenleiste auf Handy/Tablet als Aufklapper oben (layout.php, nur unter 1020px) */
.bereich-mobil { display: none }

@media (max-width: 1020px) {
	.side-col { display: none }
	.bereich-mobil { display: block; margin: 0 0 26px; border-radius: var(--r-lg); background: var(--soft) }
	.bereich-mobil .side-andere { background: #fff }
	.bereich-mobil summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; cursor: pointer; list-style: none }
	.bereich-mobil summary::-webkit-details-marker { display: none }
	.bereich-mobil summary span { display: flex; flex-direction: column; gap: 2px }
	.bereich-mobil summary small { font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted) }
	.bereich-mobil summary strong { font-size: 1rem; color: var(--primary-800) }
	.bereich-mobil summary i { flex: none; width: 9px; height: 9px; margin-top: -4px; border-right: 2px solid var(--accent-strong); border-bottom: 2px solid var(--accent-strong); transform: rotate(45deg); transition: transform var(--t-fast) }
	.bereich-mobil[open] summary i { margin-top: 4px; transform: rotate(-135deg) }
	.bereich-mobil-inhalt { display: flex; flex-direction: column; gap: 10px; padding: 0 8px 10px }
	.bereich-mobil .side-nav { padding: 0 6px 10px; background: transparent }
	.bereich-mobil .side-nav > .kicker { display: none }
}
@media (max-width: 760px) {
	.page-head { margin-bottom: 28px }
	.page-head .kicker { margin-bottom: 12px }
	.content-main .page-intro { margin-top: 14px }
	.page-hero { margin-bottom: 32px }
	.page-hero img, .content-main.wide .page-hero img { aspect-ratio: 16 / 10; border-radius: var(--r-lg) }
}
.content-main .page-intro .pruef-tag { margin: 0 0 0 6px; vertical-align: middle }
.nav-buttons { display: flex; flex-direction: column; align-items: flex-start; gap: 8px }   /* nur noch Rückfall in mega_leaf()/mobile_link() */
