/* ==========================================================================
   Kontora – header.css
   Kopfbereich, Hauptnavigation, Insights-Menü, Sprachwahl, Suche,
   mobile Navigation und Kontaktleiste rechts.
   Werte nach Tao main.css, style.css, barriere.css und Messung der alten
   Seite (old.kontoramail.com, 11.11.2026, 1.400 / 900 / 390 px).
   Markup: siehe 08-basis.md, Abschnitt 4.3 (umgesetzt in fe_page, 4.4).
   Benötigt: bootstrap.min.css, variables.css, base.css
   ========================================================================== */

:root {
	--nav-farbe: #333333;   /* Tao Hauptnavigation */
}

/* --------------------------------------------------------------------------
   1. Rahmen: klebt oben (style.css .page-header sticky)
   Designanpassung 15.11.2026 (Vorbild kontora-kvg.com): volle Breite,
   50 px Rand links/rechts, feine Goldlinie unten.
   -------------------------------------------------------------------------- */
:root {
	--kopf-rand:  50px;
	--kopf-pad:   20px;
	--kopf-linie: 1px solid rgba(220, 183, 123, .8);
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 20;
	padding: var(--kopf-pad) 0;
	border-bottom: var(--kopf-linie);
	background: var(--c-flaeche);
}

.site-header__inner.container-seite {
	max-width: none;
	padding-left: var(--kopf-rand);
	padding-right: var(--kopf-rand);
}
/* Raster: Logo links über beide Zeilen; oben rechts Suche und Sprachwahl
   (über Navigation und Insights), darunter Navigation und Insights.
   .site-header__spalte ist nur Hülle (display: contents). */
.site-header__inner {
	display: grid;
	grid-template-columns: auto 1fr auto;
	grid-template-areas:
		"logo meta meta"
		"logo nav  insights";
	align-items: end;
}

/* --------------------------------------------------------------------------
   2. Logo: neue Datei mit Zusatzzeile, Breite wie das alte Logo (145 px),
   seit 15.11.2026 bündig am linken Rand des Kopfes
   -------------------------------------------------------------------------- */
.site-header__logo {
	grid-area: logo;
	align-self: center;
	display: block;
}
.site-header__logo img {
	display: block;
	width: 145px;
	max-width: none;
	height: auto;
}

/* --------------------------------------------------------------------------
   3. Rechte Spalte: Suche und Sprachwahl oben, Hauptnavigation darunter
   -------------------------------------------------------------------------- */
.site-header__spalte {
	display: contents;
}
.site-header__spalte > .hauptnav {
	grid-area: nav;
	text-align: right;
}

.site-header__meta {
	grid-area: meta;
	display: flex;
	justify-content: flex-end;
	align-items: center;
	min-height: 40px;
}

/* Suche (style.css .navSearchMainMenu, Tao-Buttonabstand) */
.site-header__suche {
	display: inline-block;
	margin: 0 25px;
	padding: 5px 0;
	line-height: 1;
	color: var(--c-akzent);
}
.site-header__suche:hover,
.site-header__suche:focus {
	color: var(--c-akzent);
}
.site-header__suche svg {
	width: 17px;
	height: 17px;
	fill: currentColor;
}

/* Sprachwahl (style.css .mod_changelanguage): 0,8em, Trenner | */
.sprachwahl {
	display: inline-block;
	padding-right: 1.719em;   /* bündig mit dem Text des letzten Menüpunkts (1,429em × 0,9625 / 0,8) */
	font-size: .8em;
	color: var(--c-schwarz);
}
.sprachwahl ul {
	display: inline;
	margin: 0;
	padding: 0;
	list-style: none;
}
.sprachwahl li {
	display: inline-block;
}
.sprachwahl li:not(:last-child)::after {
	content: "|";
	margin: 0 10px;
	color: var(--c-akzent);
}
.sprachwahl strong {
	font-weight: 700;
}
body.kontrast .sprachwahl a {
	text-decoration: underline;
}

/* --------------------------------------------------------------------------
   4. Hauptnavigation (Tao .main-navigation, style.css, barriere.css)
   Gemessen: 15,4 px fett, Abstand 22 px, aktive Linie 2 px, 16 px unter
   der Oberkante des Textes, so breit wie der Text.
   -------------------------------------------------------------------------- */
.hauptnav {
	font-size: 1.1em;
	font-weight: 700;
}
.hauptnav ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
.hauptnav .level_1 {
	display: inline-flex;
	flex-wrap: wrap;
	justify-content: flex-end;
}
.hauptnav .level_1 > li {
	position: relative;
}
.hauptnav .level_1 > li > :is(a, strong) {
	position: relative;
	display: block;
	padding: 0 1.429em;
	font-size: .875em;
	font-weight: inherit;
	line-height: 1.5625;
	color: var(--nav-farbe);
}
.hauptnav .level_1 > li > a:hover,
.hauptnav .level_1 > li > a:focus,
.hauptnav .level_1 > li:hover > a {
	color: var(--c-akzent);
	text-decoration: none;
}
.hauptnav .level_1 > li > :is(.active, .trail, .forward) {
	color: var(--c-akzent);
}
.hauptnav .level_1 > li > .active::after {
	content: "";
	position: absolute;
	top: calc(1.5625em + 4px);
	left: 1.429em;
	right: 1.429em;
	height: 2px;
	background-color: var(--c-akzent);
}

/* Untermenü (Designanpassung 15.11.2026, Vorbild kontora-kvg.com): weißer
   Kasten mit Schatten direkt unter der Goldlinie, Einträge mit Trennlinie;
   Schrift wie bisher (fett, schwarz). Gilt auch für das Insights-Menü.
   Öffnet bei Hover und Tastaturfokus, Insights zusätzlich per Klick. */
.hauptnav .level_2,
.site-header__insights .insights__menu {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 1;
	min-width: 13em;
	margin-top: calc(var(--kopf-pad) + 1px);
	padding: 0;
	text-align: left;
	background: var(--c-weiss);
	box-shadow: 0 0 15px 5px rgba(0, 0, 0, .15);
	opacity: 0;
	visibility: hidden;
	transition: opacity .3s, visibility 0s .3s;
}
/* Brücke über den Abstand, damit das Menü beim Hineinfahren offen bleibt */
.hauptnav .level_2::before,
.site-header__insights .insights__menu::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 100%;
	height: calc(var(--kopf-pad) + 1px);
}
.hauptnav .level_1 > li:hover > .level_2,
.hauptnav .level_1 > li:focus-within > .level_2,
.site-header__insights .insights:hover .insights__menu,
.site-header__insights .insights:focus-within .insights__menu,
.site-header__insights .insights.is-offen .insights__menu {
	opacity: 1;
	visibility: visible;
	transition: opacity .2s;
}
.hauptnav .level_1 > li.last > .level_2,
.site-header__insights .insights__menu {
	left: auto;
	right: 0;
}
.hauptnav .level_2 li {
	white-space: nowrap;
}
.hauptnav .level_2 :is(a, strong),
.site-header__insights .insights__menu a {
	display: block;
	padding: 10px 45px 10px 25px;
	border-bottom: 1px solid rgba(0, 0, 0, .15);
	font-size: .875rem;
	font-weight: 700;
	line-height: 1.5;
	white-space: nowrap;
	color: var(--c-schwarz);
}
.hauptnav .level_2 li:last-child > :is(a, strong),
.site-header__insights .insights__menu a:last-child {
	border-bottom: 0;
}
.hauptnav .level_2 a:hover,
.hauptnav .level_2 a:focus,
.hauptnav .level_2 .active,
.site-header__insights .insights__menu a:hover,
.site-header__insights .insights__menu a:focus,
.site-header__insights .insights__menu [aria-current] {
	color: var(--c-akzent);
	text-decoration: none;
}

/* --------------------------------------------------------------------------
   5. Insights als Menüpunkt (Designanpassung 15.11.2026; bisher goldener
   Knopf). Steht direkt rechts neben der Hauptnavigation und sieht aus wie
   ein Punkt der ersten Ebene. Nur DE (Layoutbereich „insights“).
   Öffnet bei Hover, Fokus und Klick (kontora.js setzt .is-offen und
   aria-expanded); Untermenü siehe Abschnitt 4.
   -------------------------------------------------------------------------- */
.site-header__insights {
	grid-area: insights;
	font-size: 1.1em;      /* wie .hauptnav */
	font-weight: 700;
}

.insights {
	position: relative;
	display: inline-block;
}

.site-header__insights .insights__knopf {
	display: block;
	padding: 0 1.429em;
	border: 0;
	font-size: .875em;     /* wie .hauptnav .level_1 > li > a */
	font-weight: inherit;
	line-height: 1.5625;
	color: var(--nav-farbe);
	background: none;
	cursor: pointer;
}
.site-header__insights .insights__knopf:hover,
.site-header__insights .insights__knopf:focus-visible,
.site-header__insights .insights:hover .insights__knopf,
.site-header__insights .insights.is-offen .insights__knopf,
.site-header__insights .insights:has([aria-current]) .insights__knopf {
	color: var(--c-akzent);
}
.insights__knopf svg {
	display: none;
}

.insights__menu a {
	display: block;
}

/* --------------------------------------------------------------------------
   6. Zwischengröße 992–1.079 px (seit 15.11.2026): Navigation und Insights
   passen nicht mehr neben das Logo. Oben Logo links, Suche/Sprache rechts;
   darunter Navigation und Insights über die volle Breite, rechtsbündig.
   -------------------------------------------------------------------------- */
@media (min-width: 992px) and (max-width: 1079.98px) {
	.site-header__inner {
		grid-template-areas:
			"logo meta meta"
			"nav  nav  insights";
		row-gap: 12px;
	}
}

/* --------------------------------------------------------------------------
   7. Unter 992 px (bisher unter 600 px): Logo mittig (150 px),
   Burger rechts, Handy-Menü als Panel von rechts (seit 15.11.2026)
   -------------------------------------------------------------------------- */
.site-header__burger {
	display: none;
}

@media (max-width: 991.98px) {
	.site-header {
		padding: 11px 0 18px;
	}
	.site-header__inner {
		grid-template-columns: 1fr;
		grid-template-areas: "logo";
	}
	.site-header__logo {
		justify-self: center;
		padding-top: 0;
	}
	.site-header__logo img {
		width: 150px;
	}
	.site-header__spalte,
	.site-header__insights {
		display: none;
	}

	/* Burger (Designanpassung 15.11.2026, Vorbild acplan): 44 × 44 px, drei
	   feine Linien 2 px, rechtsbündig, 28 / 20 / 24 px lang, Akzentfarbe;
	   bei Hover und Fokus alle 28 px. Linien als Hintergrund-Verläufe. */
	.site-header__burger {
		--burger-farbe: var(--c-akzent);
		position: absolute;
		top: 23px;
		right: 18px;
		display: block;
		width: 44px;
		height: 44px;
		padding: 0;
		border: 0;
		background:
			linear-gradient(var(--burger-farbe), var(--burger-farbe)) right 8px top 14px / 28px 2px no-repeat,
			linear-gradient(var(--burger-farbe), var(--burger-farbe)) right 8px top 21px / 20px 2px no-repeat,
			linear-gradient(var(--burger-farbe), var(--burger-farbe)) right 8px top 28px / 24px 2px no-repeat;
		transition: background-size .3s;
		cursor: pointer;
	}
	.site-header__burger:is(:hover, :focus-visible) {
		background-size: 28px 2px, 28px 2px, 28px 2px;
	}
}

/* Handy-Menü als natives <dialog class="mobilnav"> (Esc, Fokusführung vom
   Browser). Designanpassung 15.11.2026 (Vorbild acplan.digital-neuland.de,
   Farben Kontora): Panel fährt von rechts herein, Anthrazit wie der dunkle
   Footer, Schrift weiß, Akzente Gold. Aufbau (fe_page_kontora):
   __kopf („Menü“, Schließen) · __inhalt (Navigation, Insights) ·
   __fuss (Suche, Sprachwahl, Kontakt). Der Kontrastmodus ändert hier nichts
   (dunkle Fläche, weiße Schrift, wie der dunkle Footer). */
.mobilnav {
	--mn-flaeche: var(--c-anthrazit);
	--mn-linie:   rgba(255, 255, 255, .15);
	--mn-rand:    28px;
	--mn-zeile:   62px;   /* Höhe eines Menüpunkts der ersten Ebene */

	position: fixed;
	inset: 0 0 0 auto;
	width: min(87%, 400px);
	max-width: none;
	height: 100%;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	text-align: left;
	color: var(--c-weiss);
	background: var(--mn-flaeche);
	box-shadow: -24px 0 60px rgba(0, 0, 0, .25);
	transform: translateX(100%);
	transition: transform .5s cubic-bezier(.77, 0, .18, 1), overlay .5s allow-discrete, display .5s allow-discrete;
}
.mobilnav[open] {
	display: flex;
	flex-direction: column;
	transform: translateX(0);
}
@starting-style {
	.mobilnav[open] { transform: translateX(100%); }
}
.mobilnav::backdrop {
	background: rgba(0, 0, 0, .35);
	backdrop-filter: blur(3px);
}
.mobilnav a {
	color: inherit;
	text-decoration: none;
}
.mobilnav :focus-visible {
	outline: 2px solid var(--c-gold);
	outline-offset: 2px;
}
.mobilnav ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Kopf: „Menü“ klein gesperrt, Schließen als Quadrat mit Rahmen */
.mobilnav__kopf {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 18px 14px var(--mn-rand);
	border-bottom: 1px solid var(--mn-linie);
}
.mobilnav__titel {
	font-size: 12px;
	letter-spacing: 3px;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .75);
}
.mobilnav__schliessen {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .35);
	color: var(--c-weiss);
	background: none;
	cursor: pointer;
	transition: border-color .2s, color .2s;
}
.mobilnav__schliessen:hover,
.mobilnav__schliessen:focus-visible {
	border-color: var(--c-gold);
	color: var(--c-gold);
}
.mobilnav__schliessen svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

/* Mitte: Navigation und Insights, Punkte groß, gesperrt, mit Trennlinie */
.mobilnav__inhalt {
	padding: 10px var(--mn-rand) 30px;
}
.mobilnav .mod_navigation li,
.mobilnav .insights {
	position: relative;
}
.mobilnav__inhalt .level_1 > li,
.mobilnav .insights {
	display: block;
	border-bottom: 1px solid var(--mn-linie);
}
.mobilnav__inhalt .level_1 > li > :is(a, strong),
.mobilnav .insights__knopf {
	position: relative;
	display: block;
	width: 100%;
	padding: 18px 40px 18px 0;
	border: 0;
	font: inherit;
	font-size: 16px;
	font-weight: 400;
	line-height: 26px;
	letter-spacing: .1em;
	text-align: left;
	text-transform: uppercase;
	color: var(--c-weiss);
	background: none;
	cursor: pointer;
}
.mobilnav__inhalt .level_1 > li > a:hover,
.mobilnav__inhalt .level_1 > li > a:focus-visible,
.mobilnav .insights__knopf:hover,
.mobilnav .insights__knopf:focus-visible {
	color: var(--c-gold);
}
/* Aktiver Punkt: kurzer Goldstrich unter dem Text */
.mobilnav__inhalt .level_1 > li > :is(.active, .trail, .forward)::after,
.mobilnav .insights:has([aria-current]) .insights__knopf::before {
	content: "";
	position: absolute;
	left: 0;
	bottom: 12px;
	width: 28px;
	height: 2px;
	background: var(--c-gold);
}

/* Auf-/Zuklappen: Winkel rechts (kontora.js setzt .mobilnav__aufklappen) */
.mobilnav__aufklappen {
	position: absolute;
	top: 0;
	right: 0;
	width: 44px;
	height: var(--mn-zeile);
	padding: 0;
	border: 0;
	color: var(--c-weiss);
	background: none;
	cursor: pointer;
}
.mobilnav__aufklappen::after,
.mobilnav .insights__knopf::after {
	content: "";
	position: absolute;
	top: calc(var(--mn-zeile) / 2 - 6px);
	right: 16px;
	width: 8px;
	height: 8px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg);
	transition: transform .3s;
}
.mobilnav__aufklappen[aria-expanded="true"]::after,
.mobilnav .insights.is-offen .insights__knopf::after {
	top: calc(var(--mn-zeile) / 2 - 2px);
	transform: rotate(-135deg);
}

/* Zweite Ebene und Insights-Liste: eingerückt, Goldlinie links, kleiner */
.mobilnav .mod_navigation li > ul,
.mobilnav .insights__menu {
	display: none;
	margin: 0 0 18px;
	padding: 2px 0 2px 16px;
	border-left: 1px solid var(--c-gold);
}
.mobilnav .mod_navigation li.is-offen > ul,
.mobilnav .insights.is-offen .insights__menu {
	display: block;
}
.mobilnav .level_2 :is(a, strong),
.mobilnav .insights__menu a {
	display: block;
	padding: 7px 0;
	font-size: 14px;
	font-weight: 400;
	line-height: 20px;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .85);
}
.mobilnav .level_2 a:hover,
.mobilnav .level_2 a:focus-visible,
.mobilnav .level_2 :is(.active, .trail),
.mobilnav .insights__menu a:hover,
.mobilnav .insights__menu a:focus-visible,
.mobilnav .insights__menu [aria-current] {
	color: var(--c-gold);
}
.mobilnav .insights__knopf svg {
	display: none;
}

/* Fuß: Suche und Sprachwahl, darunter Kontakt (Daten wie im Footer) */
.mobilnav__fuss {
	margin-top: auto;
	padding: 22px var(--mn-rand) 28px;
	border-top: 1px solid var(--mn-linie);
	font-size: 13px;
	line-height: 1.9;
	letter-spacing: .03em;
}
.mobilnav__werkzeuge {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}
.mobilnav__suche {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	text-transform: uppercase;
	letter-spacing: .12em;
}
.mobilnav__suche svg {
	width: 15px;
	height: 15px;
	fill: var(--c-gold);
}
.mobilnav__suche:hover,
.mobilnav__suche:focus-visible {
	color: var(--c-gold);
}
.mobilnav .sprachwahl {
	display: block;
	padding: 0;
	font-size: inherit;
	letter-spacing: .12em;
	color: rgba(255, 255, 255, .75);
}
.mobilnav .sprachwahl strong {
	color: var(--c-weiss);
}
.mobilnav .sprachwahl a:hover,
.mobilnav .sprachwahl a:focus-visible {
	color: var(--c-gold);
}
.mobilnav__adresse {
	margin: 0;
	font-style: normal;
	color: rgba(255, 255, 255, .75);
}
.mobilnav__adresse a {
	color: var(--c-gold);
}
.mobilnav__adresse a:hover,
.mobilnav__adresse a:focus-visible {
	text-decoration: underline;
}

/* --------------------------------------------------------------------------
   8. Kontaktleiste rechts (barriere.css .kontaktdatenWrapperRight)
   Gemessen: 40 × 47 px je Kasten, 7,8 px Abstand, oben 400 px (mobil 250 px)
   -------------------------------------------------------------------------- */
.kontaktleiste {
	position: fixed;
	top: 400px;
	right: 0;
	z-index: 100;
	display: flex;
	flex-direction: column;
	gap: 7.8px;
	width: 40px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 21.875px;   /* 25 px × 0,875 */
}
@media (max-width: 575.98px) {
	.kontaktleiste { top: 250px; }
}

.kontaktleiste__eintrag > :is(a, button) {
	display: grid;
	place-items: center;
	width: 100%;
	height: 47.34px;
	padding: 0;
	border: 0;
	border-radius: 3px;
	line-height: 1;
	color: var(--c-weiss);
	background-color: var(--c-gold);
	transition: color .4s ease;
	cursor: pointer;
}
.kontaktleiste__eintrag > :is(a, button):hover {
	color: var(--c-schwarz);
	text-decoration: none;
}
.kontaktleiste svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}
body.kontrast .kontaktleiste__eintrag > :is(a, button) {
	color: var(--c-weiss);
	background-color: var(--c-schwarz);
}
