/* =====================================================================
   KGV Theme — Layout, Header, Footer, Hero, Page-TOC, Home & Kalender
   ===================================================================== */

/* ---------- BaseLayout ---------- */
body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.layout-main {
	flex: 1 0 auto;
}

/* ---------- SiteHeader ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 30;
	background: color-mix(in oklab, var(--leaf-900) 92%, transparent);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid color-mix(in oklab, var(--paper) 14%, transparent);
}

.site-header__inner {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 28px;
	align-items: center;
	min-height: var(--header-h);
}

.brand {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	white-space: nowrap;
}

.brand__logo {
	height: 60px;
	width: auto;
	display: block;
}

.brand__name {
	font-weight: 600;
	color: var(--paper);
	font-size: var(--fs-16);
	line-height: 1.3;
	letter-spacing: -0.01em;
}

.primary-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 18px;
	justify-content: flex-end;
	align-items: center;
}

.primary-nav__link {
	font-size: var(--fs-14);
	font-weight: 500;
	color: var(--leaf-200);
	text-decoration: none;
	padding: 8px 0;
	position: relative;
	letter-spacing: -0.005em;
	transition: color var(--dur) var(--ease);
}

.primary-nav__link:hover {
	color: var(--paper);
}

.primary-nav__link.is-active {
	color: var(--paper);
	font-weight: 600;
}

.primary-nav__link.is-active::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 2px;
	background: var(--honey-500);
	border-radius: 2px;
}

.nav-mobile {
	display: none;
	justify-self: end;
	position: relative;
}

.nav-mobile summary {
	list-style: none;
	cursor: pointer;
	padding: 10px;
	border-radius: var(--radius-md);
}

.nav-mobile summary::-webkit-details-marker {
	display: none;
}

.burger,
.burger::before,
.burger::after {
	display: block;
	width: 22px;
	height: 2px;
	background: var(--paper);
	border-radius: 2px;
}

.burger {
	position: relative;
}

.burger::before,
.burger::after {
	content: "";
	position: absolute;
	left: 0;
}

.burger::before {
	top: -7px;
}

.burger::after {
	top: 7px;
}

.nav-mobile nav {
	position: absolute;
	right: 0;
	top: calc(100% + 10px);
	min-width: 15rem;
	background: var(--white);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg);
	padding: 8px;
	display: flex;
	flex-direction: column;
}

.nav-mobile__link {
	padding: 11px 13px;
	border-radius: var(--radius-md);
	font-weight: 500;
	font-size: var(--fs-15);
	color: var(--ink-2);
	text-decoration: none;
}

.nav-mobile__link:hover,
.nav-mobile__link.is-active {
	background: var(--leaf-50);
	color: var(--leaf-900);
}

@media (max-width: 1040px) {
	.primary-nav {
		display: none;
	}
	.nav-mobile {
		display: block;
	}
	.site-header__inner {
		grid-template-columns: 1fr auto;
	}
}

/* ---------- SiteFooter ---------- */
.site-footer {
	background: var(--leaf-950);
	color: var(--leaf-200);
	margin-top: auto;
	padding: 52px 0 22px;
}

.site-footer__inner {
	display: grid;
	grid-template-columns: 1.5fr 1fr 1fr 1fr;
	gap: 36px;
	padding-bottom: 36px;
	border-bottom: 1px solid color-mix(in oklab, var(--paper) 12%, transparent);
}

.site-footer__brand {
	display: flex;
	gap: 16px;
	align-items: flex-start;
}

.site-footer__logo {
	height: 60px;
	width: auto;
	flex: none;
	display: block;
}

.site-footer__name {
	color: var(--paper);
	font-weight: 600;
	font-size: var(--fs-16);
	line-height: 1.3;
}

.site-footer__sub {
	color: var(--leaf-300);
	font-size: var(--fs-13);
	margin-top: 8px;
	line-height: 1.5;
}

.site-footer__label {
	font-size: 11.5px;
	color: var(--leaf-300);
	text-transform: uppercase;
	letter-spacing: var(--tracking-wider);
	font-weight: 600;
	margin-bottom: 12px;
}

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

.site-footer li {
	margin-bottom: 8px;
}

.site-footer a {
	color: var(--leaf-200);
	text-decoration: none;
}

.site-footer a:hover {
	color: var(--paper);
	text-decoration: underline;
	text-decoration-color: var(--leaf-500);
}

.site-footer p {
	color: var(--leaf-200);
	font-size: var(--fs-14);
	line-height: 1.6;
}

.site-footer__legal {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	padding-top: 20px;
	font-size: 12.5px;
	color: var(--leaf-300);
}

.site-footer__legal a {
	color: var(--leaf-300);
	text-decoration: underline;
}

@media (max-width: 880px) {
	.site-footer__inner {
		grid-template-columns: 1fr 1fr;
		gap: 28px;
	}
}

@media (max-width: 520px) {
	.site-footer__inner {
		grid-template-columns: 1fr;
	}
}

/* ---------- Page Hero (Unterseiten) ---------- */
.page-hero {
	position: relative;
	display: flex;
	align-items: center;
	min-height: clamp(220px, 42dvh, 400px);
	overflow: hidden;
	background: var(--leaf-900);
}

.page-hero__bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center;
}

.page-hero__inner {
	position: relative;
	z-index: 1;
	width: 100%;
	padding-top: var(--space-10);
	padding-bottom: var(--space-10);
}

.page-hero__card {
	background: var(--paper);
	max-width: 30rem;
	padding: 28px 32px 26px;
	box-shadow: var(--shadow-lg);
}

.page-hero__card h1 {
	font-size: clamp(28px, 3.4vw, 40px);
	margin: 0;
}

.page-hero__lead {
	font-size: var(--fs-16);
	line-height: var(--lh-base);
	color: var(--ink-2);
	margin: 12px 0 0;
	max-width: 42ch;
}

@media (max-width: 640px) {
	.page-hero {
		min-height: 13.5rem;
	}
	.page-hero__inner {
		padding-top: var(--space-8);
		padding-bottom: var(--space-8);
	}
	.page-hero__card {
		padding: 22px 20px 20px;
	}
}

/* ---------- TOC / Page-Section (Verein, Kontakt) ---------- */
.page-toc {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	padding: 0;
	margin: 0 0 var(--space-4);
}

.page-toc a {
	display: inline-flex;
	align-items: center;
	padding: 7px 14px;
	border-radius: var(--radius-pill);
	background: var(--leaf-100);
	border: 1px solid var(--leaf-200);
	color: var(--leaf-900);
	font-size: var(--fs-14);
	font-weight: 600;
	text-decoration: none;
	transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.page-toc a:hover {
	background: var(--leaf-200);
	border-color: var(--leaf-300);
	color: var(--leaf-900);
}

.page-section {
	scroll-margin-top: calc(var(--header-h) + 16px);
}

.page-section :where(h2, h3)[id] {
	scroll-margin-top: calc(var(--header-h) + 16px);
}

.page-section > h2 {
	margin-top: var(--space-10);
}

.page-section:first-of-type > h2 {
	margin-top: var(--space-6);
}

.content-wrap.prose hr {
	margin: var(--space-12) 0;
}

/* ---------- Startseite: Hero, Quick, News ---------- */
.hero {
	position: relative;
	display: flex;
	align-items: center;
	min-height: calc(100dvh - var(--header-h));
	overflow: hidden;
	background: var(--leaf-900);
}

.hero__bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center;
}

.hero__inner {
	position: relative;
	z-index: 1;
	width: 100%;
	padding-top: var(--space-16);
	padding-bottom: var(--space-16);
}

.hero__card {
	background: var(--paper);
	max-width: 36rem;
	padding: 48px 48px 40px;
	box-shadow: var(--shadow-lg);
}

.hero h1 {
	font-size: clamp(36px, 4.8vw, 56px);
	margin: 10px 0 28px;
}

.hero__cta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.quick {
	background: var(--leaf-900);
	border-top: 1px solid var(--leaf-800);
	border-bottom: 1px solid var(--leaf-800);
	padding: 56px 0;
}

.quick__head {
	margin-bottom: 28px;
}

.quick__head .eyebrow {
	color: var(--leaf-300);
}

.quick__head h2 {
	margin: 0;
	color: var(--paper);
}

.quick__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
}

.quick-card {
	display: grid;
	grid-template-rows: auto auto 1fr auto;
	background: var(--white);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 22px 20px 18px;
	text-decoration: none;
	transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.quick-card:hover {
	border-color: var(--leaf-300);
	box-shadow: var(--shadow-md);
}

.quick-card__icon {
	color: var(--leaf-700);
	margin-bottom: 14px;
}

.quick-card__t {
	font-size: var(--fs-16);
	font-weight: 600;
	color: var(--leaf-900);
	letter-spacing: -0.005em;
}

.quick-card__d {
	font-size: var(--fs-13);
	color: var(--ink-3);
	margin-top: 4px;
	line-height: 1.5;
}

.quick-card__more {
	justify-self: start;
	margin-top: 16px;
	font-size: 20px;
	color: var(--leaf-700);
	transition: transform var(--dur) var(--ease);
}

.quick-card:hover .quick-card__more {
	transform: translateX(3px);
}

.news {
	padding: 80px 0;
}

.news__head {
	margin-bottom: 20px;
}

.news__head h2 {
	margin: 0;
}

.news__list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.news-item {
	display: grid;
	grid-template-columns: 130px 1fr;
	gap: 24px;
	padding: 26px 0;
	align-items: start;
	border-top: 1px solid var(--rule);
}

.news-item:last-child {
	border-bottom: 1px solid var(--rule);
}

.news-item__meta {
	padding-top: 4px;
}

.news-item__eyebrow {
	font-size: 11.5px;
	color: var(--ink-3);
	text-transform: uppercase;
	letter-spacing: var(--tracking-wider);
	font-weight: 600;
}

.news-item__t {
	font-size: 22px;
	margin: 8px 0;
	color: var(--leaf-900);
	font-weight: 600;
	letter-spacing: -0.01em;
}

.news-item p {
	font-size: var(--fs-15);
	line-height: 1.55;
	color: var(--ink-2);
	margin: 0 0 10px;
	max-width: 64ch;
}

.news-item__link {
	font-size: var(--fs-14);
	font-weight: 600;
	color: var(--leaf-700);
	text-decoration: none;
}

.news-item__link:hover {
	color: var(--leaf-900);
	text-decoration: underline;
}

@media (max-width: 920px) {
	.hero {
		min-height: min(72dvh, 640px);
	}
	.hero__card {
		padding: 32px 28px 28px;
		max-width: 32rem;
	}
	.quick__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 560px) {
	.hero {
		min-height: 32rem;
	}
	.hero__inner {
		padding-top: var(--space-10);
		padding-bottom: var(--space-10);
	}
	.hero__card {
		padding: 28px 22px 24px;
	}
	.quick__grid {
		grid-template-columns: 1fr;
	}
	.news-item {
		grid-template-columns: 1fr;
		gap: 12px;
	}
}

/* ---------- Vereinsheim-Kalender ---------- */
.cal-wrap {
	margin: var(--space-6) 0 var(--space-10);
	background: var(--white);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
}

.cal-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 20px;
	border-bottom: 1px solid var(--rule);
	background: var(--leaf-50);
}

.cal-toolbar__title {
	font-size: var(--fs-18);
	font-weight: 600;
	color: var(--leaf-900);
	margin: 0;
	font-variant-numeric: tabular-nums;
}

.cal-nav {
	display: flex;
	gap: 6px;
	align-items: center;
}

.cal-nav__btn {
	appearance: none;
	background: var(--white);
	border: 1px solid var(--border);
	border-radius: var(--radius-pill);
	padding: 6px 12px;
	font-size: var(--fs-13);
	font-weight: 600;
	color: var(--leaf-900);
	text-decoration: none;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.cal-nav__btn:hover {
	background: var(--leaf-100);
	border-color: var(--leaf-300);
	text-decoration: none;
	color: var(--leaf-900);
}

.cal-nav__btn--today {
	background: var(--leaf-700);
	color: var(--paper);
	border-color: var(--leaf-700);
}

.cal-nav__btn--today:hover {
	background: var(--leaf-800);
	color: var(--paper);
	border-color: var(--leaf-800);
}

.cal-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 1px;
	background: var(--rule);
	border-top: 1px solid var(--rule);
}

.cal-grid__head {
	display: contents;
}

.cal-dow {
	background: var(--paper);
	color: var(--leaf-700);
	font-size: var(--fs-12);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: var(--tracking-wider);
	text-align: center;
	padding: 10px 6px;
}

.cal-cell {
	position: relative;
	background: var(--white);
	min-height: 84px;
	padding: 8px 10px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.cal-cell--other {
	background: var(--paper-2);
	color: var(--ink-3);
}

.cal-cell--today .cal-cell__num {
	color: var(--paper);
	background: var(--leaf-700);
	border-radius: var(--radius-pill);
	padding: 0 8px;
}

.cal-cell--occupied {
	background: color-mix(in oklab, var(--terracotta-200) 55%, var(--white));
}

.cal-cell--occupied.cal-cell--other {
	background: color-mix(in oklab, var(--terracotta-200) 30%, var(--paper-2));
}

.cal-cell__num {
	font-size: var(--fs-13);
	font-weight: 600;
	color: var(--leaf-900);
	align-self: flex-start;
	font-variant-numeric: tabular-nums;
}

.cal-cell__status {
	font-size: var(--fs-12);
	color: var(--terracotta-700);
	font-weight: 600;
	letter-spacing: -0.005em;
}

.cal-cell--occupied .cal-cell__status::before {
	content: "";
	display: inline-block;
	width: 6px;
	height: 6px;
	border-radius: 999px;
	background: var(--terracotta-500);
	margin-right: 6px;
	vertical-align: middle;
}

.cal-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	padding: 12px 20px 14px;
	background: var(--paper);
	border-top: 1px solid var(--rule);
	font-size: var(--fs-13);
	color: var(--ink-2);
}

.cal-legend__item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.cal-legend__swatch {
	display: inline-block;
	width: 14px;
	height: 14px;
	border-radius: var(--radius-sm);
	border: 1px solid var(--border);
	background: var(--white);
}

.cal-legend__swatch--occupied {
	background: color-mix(in oklab, var(--terracotta-200) 55%, var(--white));
	border-color: color-mix(in oklab, var(--terracotta-500) 25%, var(--border));
}

@media (max-width: 640px) {
	.cal-cell {
		min-height: 58px;
		padding: 6px 6px;
	}
	.cal-cell__status {
		font-size: 10.5px;
	}
	.cal-toolbar {
		flex-wrap: wrap;
	}
}

/* ---------- Vereinsheim Admin (nur /admin) ---------- */
.kgv-booking-list {
	width: 100%;
	border-collapse: collapse;
	margin-top: 1rem;
}

.kgv-booking-list th,
.kgv-booking-list td {
	padding: 8px 12px;
	border-bottom: 1px solid var(--rule, #ddd);
	text-align: left;
	vertical-align: top;
	font-size: 14px;
}

.kgv-booking-list th {
	font-weight: 600;
	background: #f5f5f5;
}

.kgv-booking-list__note {
	color: #666;
	font-size: 13px;
}
