/* Klinische Klarheit — Layout: Header, Navigation, Burger-Drawer, Footer, Grid */

.container {
	width: 100%;
	max-width: var(--container);
	margin-inline: auto;
	padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.grid-12 {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: 2rem;
}

/* ---------- Header ---------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 500;
	background: rgba(255, 255, 255, 0.96);
	border-bottom: 1px solid var(--line);
	transition: padding var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}

.header-inner {
	max-width: var(--container);
	margin-inline: auto;
	padding: 1.1rem clamp(1.25rem, 4vw, 2.5rem);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	flex-wrap: nowrap;
	transition: padding var(--dur-base) var(--ease-out);
}

.site-header.is-scrolled .header-inner {
	padding-block: 0.6rem;
}

.site-header.is-scrolled {
	box-shadow: var(--shadow-sm);
}

.site-brand {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	text-decoration: none;
	min-width: 0;
	flex-shrink: 1;
}

.site-brand .brand-logo {
	height: 48px;
	width: auto;
	max-width: 200px;
	object-fit: contain;
	flex-shrink: 0;
	transition: height var(--dur-base) var(--ease-out);
}

.site-header.is-scrolled .brand-logo {
	height: 38px;
}

.site-brand .site-name {
	font-family: var(--font-display);
	color: var(--primary);
	font-weight: 600;
	font-size: 1.15rem;
	line-height: 1.2;
	white-space: normal;
}

.primary-nav {
	flex-shrink: 1;
	min-width: 0;
}

.primary-nav > ul {
	display: flex;
	align-items: center;
	gap: clamp(1.1rem, 2vw, 2rem);
}

.primary-nav > ul > li {
	position: relative;
}

.primary-nav a {
	display: inline-block;
	text-decoration: none;
	color: var(--ink);
	font-weight: 600;
	font-size: 0.98rem;
	padding: 0.4rem 0.1rem;
	position: relative;
}

.primary-nav a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 100%;
	bottom: -2px;
	height: 2px;
	background: var(--accent-ink);
	transition: right var(--dur-base) var(--ease-out);
}

.primary-nav a:hover::after,
.primary-nav a:focus-visible::after {
	right: 0;
}

/* Dropdown (Desktop) */
.primary-nav .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 15rem;
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow-md);
	padding: 0.6rem;
	margin-top: 0.6rem;
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), visibility var(--dur-base);
}

.primary-nav li:hover > .sub-menu,
.primary-nav li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.primary-nav .sub-menu li {
	position: static;
}

.primary-nav .sub-menu a {
	display: block;
	padding: 0.55rem 0.7rem;
	border-radius: calc(var(--radius) - 0.2rem);
	font-weight: 500;
}

.primary-nav .sub-menu a::after {
	display: none;
}

.primary-nav .sub-menu a:hover,
.primary-nav .sub-menu a:focus-visible {
	background: var(--surface);
}

.primary-nav .menu-item-has-children > a {
	padding-right: 1.1rem;
}

/* Burger */
.burger {
	display: none;
	background: none;
	border: 0;
	cursor: pointer;
	padding: 0.5rem;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	position: relative;
	z-index: 700;
	min-width: 44px;
	min-height: 44px;
}

.burger-box {
	position: relative;
	display: inline-block;
	width: 24px;
	height: 18px;
}

.burger-inner,
.burger-inner::before,
.burger-inner::after {
	position: absolute;
	left: 0;
	width: 24px;
	height: 2px;
	border-radius: 2px;
	background: var(--primary);
	transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out), background-color var(--dur-base);
}

.burger-inner {
	top: 8px;
}

.burger-inner::before {
	content: "";
	top: -8px;
}

.burger-inner::after {
	content: "";
	top: 8px;
}

.burger[aria-expanded="true"] .burger-inner {
	background: transparent;
}

.burger[aria-expanded="true"] .burger-inner::before {
	transform: translateY(8px) rotate(45deg);
}

.burger[aria-expanded="true"] .burger-inner::after {
	transform: translateY(-8px) rotate(-45deg);
}

/*
 * Drawer-Overlay + Drawer liegen als Geschwister von <header> direkt unter <body>.
 * Beide starten UNTERHALB des Headers (top: var(--header-h), per JS gesetzt) —
 * nicht bei top:0. Grund: .site-header ist position:sticky und bildet einen
 * eigenen Stacking-Context; ein z-index auf dem Burger-Button haette darin
 * keine Wirkung gegen den Drawer auf Root-Ebene, der Burger waere beim 2. Tap
 * nicht mehr klickbar. Startet der Drawer stattdessen erst unter dem Header,
 * bleibt der Header inkl. Burger immer sichtbar und klickbar — unabhaengig
 * von z-index-Vergleichen.
 */
.drawer-overlay {
	position: fixed;
	top: var(--header-h, 84px);
	right: 0;
	bottom: 0;
	left: 0;
	background: rgba(11, 23, 32, 0.45);
	z-index: 550;
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--dur-base) var(--ease-out), visibility var(--dur-base);
}

.drawer-overlay.is-open {
	opacity: 1;
	visibility: visible;
}

.mobile-drawer {
	position: fixed;
	top: var(--header-h, 84px);
	right: 0;
	height: calc(100vh - var(--header-h, 84px));
	width: min(85vw, 360px);
	background: var(--bg);
	z-index: 600;
	transform: translateX(100%);
	transition: transform var(--dur-base) var(--ease-out);
	overflow-y: auto;
	box-shadow: var(--shadow-md);
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.mobile-drawer.is-open {
	transform: translateX(0);
}

.drawer-top {
	display: flex;
	justify-content: flex-end;
}

.drawer-close {
	background: none;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	min-width: 44px;
	min-height: 44px;
	font-size: 1.3rem;
	line-height: 1;
	cursor: pointer;
	color: var(--primary);
}

.drawer-nav ul {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.drawer-nav a {
	display: block;
	padding: 0.85rem 0.2rem;
	text-decoration: none;
	color: var(--ink);
	font-weight: 600;
	font-size: 1.1rem;
	border-bottom: 1px solid var(--line);
	min-height: 44px;
}

.drawer-nav .sub-menu {
	display: flex;
	flex-direction: column;
	padding-left: 1rem;
}

.drawer-nav .sub-menu a {
	font-size: 0.98rem;
	font-weight: 500;
	color: var(--ink-soft);
	border-bottom: 1px dashed var(--line);
}

.drawer-contact {
	margin-top: auto;
	padding-top: 1rem;
	border-top: 1px solid var(--line);
	font-size: 0.95rem;
	color: var(--ink-soft);
}

.drawer-contact a {
	color: var(--primary);
	font-weight: 600;
	text-decoration: none;
}

@media (max-width: 1024px) {
	.primary-nav {
		display: none;
	}

	.burger {
		display: inline-flex;
	}

	/* Desktop-Hover/Focus-Within-Transforms fuer Dropdowns hart zuruecksetzen */
	.primary-nav .sub-menu,
	.primary-nav li:hover > .sub-menu,
	.primary-nav li:focus-within > .sub-menu {
		position: static !important;
		opacity: 1 !important;
		visibility: visible !important;
		transform: none !important;
		box-shadow: none !important;
	}
}

@media (max-width: 600px) {
	.mobile-drawer {
		width: 100vw;
	}
}

/* ---------- Footer ---------- */

.site-footer {
	background: var(--primary);
	color: #eaf1f6;
}

.footer-top {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: 2.5rem;
	padding-block: clamp(3rem, 6vw, 4.5rem);
}

.footer-brand {
	grid-column: span 4;
	display: flex;
	flex-direction: column;
	gap: 0.9rem;
}

.footer-brand .brand-logo {
	height: 34px;
	width: auto;
	max-width: 160px;
	object-fit: contain;
}

.footer-brand .site-name {
	font-family: var(--font-display);
	font-size: 1.05rem;
	color: #fff;
}

.footer-col {
	grid-column: span 4;
}

.footer-col h3 {
	color: #fff;
	font-size: 1.05rem;
	margin-bottom: 0.9rem;
}

.footer-col ul {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
}

.footer-col a,
.footer-contact a {
	color: #d8e6ec;
	text-decoration: none;
}

.footer-col a:hover,
.footer-contact a:hover {
	color: #fff;
	text-decoration: underline;
}

.footer-contact-row {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin-bottom: 0.6rem;
}

.footer-contact-row .icon {
	color: #9fc3d6;
	flex-shrink: 0;
}

.footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.16);
	padding-block: 1.3rem;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem 1.6rem;
	align-items: center;
	justify-content: space-between;
	font-size: 0.88rem;
	color: #b9cfda;
}

.footer-legal-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1.3rem;
}

.footer-legal-links a {
	color: #b9cfda;
	text-decoration: none;
}

.footer-legal-links a:hover {
	color: #fff;
	text-decoration: underline;
}

@media (max-width: 900px) {
	.footer-brand,
	.footer-col {
		grid-column: span 12;
	}
}

/* ---------- Section-Rhythmus (weit–eng–weit) ---------- */

.section {
	padding-block: clamp(4rem, 7vw, 7rem);
}

.section--tight {
	padding-block: clamp(2.5rem, 4vw, 4rem);
}

.section--wide {
	padding-block: clamp(5rem, 9vw, 10rem);
}

.section--band {
	background: var(--accent);
	color: #0d2a1f;
}

.section--surface {
	background: var(--surface);
}

.section--primary {
	background: var(--primary);
	color: #eaf1f6;
}

.section--primary h2,
.section--primary h3 {
	color: #fff;
}

.section-head {
	max-width: 46rem;
	margin-bottom: clamp(2rem, 4vw, 3rem);
}

/* Asymmetrisches 7/5-Raster statt mittiger Zweiteilung */
.split-7-5 {
	display: grid;
	grid-template-columns: 7fr 5fr;
	gap: clamp(2rem, 4vw, 4rem);
	align-items: center;
}

.split-5-7 {
	display: grid;
	grid-template-columns: 5fr 7fr;
	gap: clamp(2rem, 4vw, 4rem);
	align-items: center;
}

@media (max-width: 900px) {
	.split-7-5,
	.split-5-7 {
		grid-template-columns: 1fr;
	}
}

.page-content {
	padding-block: clamp(3rem, 6vw, 5rem);
}
