/*
Theme Name: Chausseehaus
Description: Modernes Theme fuer DJT- und DTK-vom-Chausseehaus in den Farben der alten Seiten. Farbe je Seite ueber body-Klasse.
Version: 2.2
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: chausseehaus
*/

/* ---------- Farben (aus den alten Seiten) ---------- */
:root {
	/* DJT: Gruentoene der alten Seite */
	--dunkel: #186321;
	--akzent: #24890d;
	--mittel: #41a62a;
	--leuchte: #55d737;
	--zart: #ceefbd;
	--hintergrund: #bfe6a8;                 /* kraeftiges Hellgruen statt Weiss */
	--muster: radial-gradient(circle at 15% 10%, rgba(255,255,255,.35) 0, transparent 40%),
	          radial-gradient(circle at 85% 60%, rgba(65,166,42,.18) 0, transparent 45%);
	--flaeche: #f3fbee;                     /* Karten leicht gruen getoent */
	--verlauf: linear-gradient(135deg, #186321 0%, #24890d 55%, #41a62a 100%);
	--auf-dunkel: #ffffff;

	--text: #1f2a1a;
	--text-leise: #56664c;
	--linie: #cfe5c2;
	--radius: 16px;
	--schatten: 0 1px 2px rgba(0,0,0,.06), 0 10px 30px rgba(20,60,10,.14);
	--breite: 1120px;
	--schrift: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
body.seite-dtk {
	/* DTK: Orange/Apricot/Gelb der alten Seite */
	--dunkel: #9a5409;
	--akzent: #d17b16;
	--mittel: #e8a23c;
	--leuchte: #ffff6b;
	--zart: #ffe6a8;
	--hintergrund: #ffe98a;                 /* warmes Gelb statt Weiss */
	--muster: radial-gradient(circle at 15% 10%, rgba(255,255,255,.4) 0, transparent 40%),
	          radial-gradient(circle at 85% 60%, rgba(209,123,22,.16) 0, transparent 45%);
	--flaeche: #fffbe3;                     /* Karten leicht cremig */
	--verlauf: linear-gradient(135deg, #b8640f 0%, #d17b16 45%, #ffcc66 100%);
	--text: #2e2412;
	--linie: #f2dfa6;
	--text-leise: #6e5c36;
	--schatten: 0 1px 2px rgba(0,0,0,.06), 0 10px 30px rgba(110,60,0,.16);
}

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--muster), var(--hintergrund);
	background-attachment: fixed;
	color: var(--text);
	font: 17px/1.7 var(--schrift);
	min-height: 100vh; display: flex; flex-direction: column;   /* Fusszeile unten halten */
}
img { max-width: 100%; height: auto; }
a { color: var(--akzent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--dunkel); }
h1, h2, h3, h4 { font-weight: 750; line-height: 1.2; letter-spacing: -.015em; color: var(--dunkel); }
.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { position: static; clip: auto; width: auto; height: auto; padding: .5rem 1rem; display: inline-block; }
.huelle { max-width: var(--breite); margin: 0 auto; padding: 0 24px; }

/* ---------- Kopf: farbig, bleibt oben ---------- */
.kopf {
	position: sticky; top: 0; z-index: 50;
	background: var(--dunkel);
	box-shadow: 0 2px 12px rgba(0,0,0,.18);
}
.admin-bar .kopf { top: 32px; }
.kopf .huelle { display: flex; align-items: center; gap: 1.2rem; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.marke { text-decoration: none; display: flex; align-items: center; gap: .7rem; margin-right: auto; }
.marke-zeichen {
	width: 42px; height: 42px; border-radius: 12px; flex: none;
	background: var(--verlauf); border: 2px solid rgba(255,255,255,.35);
	display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .95rem; letter-spacing: -.02em;
}
.marke-titel { font-size: 1.25rem; font-weight: 750; color: var(--auf-dunkel); line-height: 1.15; display: block; letter-spacing: -.01em; }
.marke-zusatz { color: rgba(255,255,255,.72); font-size: .85rem; display: block; }

/* Navigation */
.navi ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.navi a {
	display: block; padding: 7px 14px; border-radius: 999px;
	text-decoration: none; color: rgba(255,255,255,.9); font-size: .93rem; font-weight: 500;
	transition: background .15s, color .15s;
}
.navi a:hover { background: rgba(255,255,255,.14); color: #fff; }
.navi .current-menu-item > a, .navi .current_page_item > a, .navi .current-menu-ancestor > a {
	background: var(--leuchte); color: var(--dunkel); font-weight: 650;
}
.navi-knopf {
	display: none; background: rgba(255,255,255,.12); border: 0; border-radius: 10px;
	padding: 8px 14px; font: inherit; color: #fff; cursor: pointer;
}

/* ---------- Startseite: Farbband (Hero) ---------- */
.hero {
	background: var(--verlauf); color: #fff; position: relative; overflow: hidden;
	padding: 64px 0 120px;
}
.hero::after {   /* weiche Welle nach unten */
	content: ""; position: absolute; left: -5%; right: -5%; bottom: -60px; height: 120px;
	background: var(--hintergrund); border-radius: 50% 50% 0 0;
}
.hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.4rem); margin: 0 0 .25em; letter-spacing: -.03em; }
.hero p { margin: 0; font-size: clamp(1.05rem, 2vw, 1.3rem); color: rgba(255,255,255,.9); max-width: 40ch; }
.hero .knopf { margin-top: 1.6em; }
.home .haupt { padding-top: 0; margin-top: -70px; position: relative; z-index: 2; }

.knopf {
	display: inline-block; background: #fff; color: var(--dunkel); font-weight: 650;
	padding: 11px 22px; border-radius: 999px; text-decoration: none;
	box-shadow: 0 6px 18px rgba(0,0,0,.15); transition: transform .15s;
}
.knopf:hover { transform: translateY(-2px); color: var(--dunkel); }

/* ---------- Inhalt ---------- */
.haupt { padding: 40px 0 56px; flex: 1 0 auto; }
.karte {
	background: var(--flaeche); border-radius: var(--radius); box-shadow: var(--schatten);
	padding: 40px 48px; margin-bottom: 28px; position: relative; overflow: hidden;
}
.karte::before {   /* farbige Kante oben */
	content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--verlauf);
}
.eintrag-titel { margin: 0 0 .7em; font-size: clamp(1.7rem, 3.5vw, 2.3rem); }
.eintrag-titel::after {
	content: ""; display: block; width: 56px; height: 4px; border-radius: 4px;
	background: var(--mittel); margin-top: .35em;
}
.eintrag-titel a { color: inherit; text-decoration: none; }
.eintrag-titel a:hover { color: var(--akzent); }
.eintrag-meta { color: var(--text-leise); font-size: .88rem; margin: -.6em 0 1.2em; }
.eintrag-inhalt > *:first-child { margin-top: 0; }
.eintrag-inhalt img { border-radius: 12px; }
.eintrag-inhalt p { margin: 0 0 1.1em; }
.eintrag-inhalt table { border-collapse: collapse; width: 100%; }
.eintrag-inhalt td, .eintrag-inhalt th { border-bottom: 1px solid var(--linie); padding: 8px 6px; text-align: left; }
.alignleft { float: left; margin: .3em 1.5em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.5em; }
.aligncenter { display: block; margin: 0 auto 1.2em; }
.eintrag-inhalt::after { content: ""; display: table; clear: both; }
.wp-caption { max-width: 100%; }
.wp-caption-text, figcaption { color: var(--text-leise); font-size: .88rem; text-align: center; margin-top: .4em; }

/* Startseite: Begruessungsbild gross und mittig */
.home .eintrag-inhalt img { display: block; margin: 0 auto 1.2em; box-shadow: 0 12px 30px rgba(0,0,0,.2); }

/* Galerien (klassisch + Block) */
.gallery, .wp-block-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin: 0 0 1.4em; padding: 0; }
.gallery-item, .wp-block-gallery .wp-block-image { margin: 0; width: auto !important; }
.gallery-item img, .wp-block-gallery img {
	width: 100%; height: 210px; object-fit: cover; border-radius: 12px; display: block;
	transition: transform .2s, box-shadow .2s;
}
.gallery-item img:hover, .wp-block-gallery img:hover { transform: scale(1.02); box-shadow: 0 10px 24px rgba(0,0,0,.2); }
.wp-block-image { margin: 0 0 1.2em; }

/* Beitragslisten + Kacheln "Neues" auf der Startseite */
.liste .karte { padding: 30px 38px; }
.weiter { display: inline-block; margin-top: .4em; font-weight: 650; text-decoration: none; }
.seiten-navi { display: flex; justify-content: space-between; gap: 1rem; }
.seiten-navi a { background: var(--dunkel); color: #fff; padding: 10px 18px; border-radius: 999px; box-shadow: var(--schatten); text-decoration: none; font-weight: 600; }

.neues h2 { font-size: 1.5rem; margin: 8px 0 18px; }
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.kachel {
	background: var(--flaeche); border-radius: var(--radius); box-shadow: var(--schatten); overflow: hidden;
	text-decoration: none; color: var(--text); display: flex; flex-direction: column;
	transition: transform .15s, box-shadow .15s;
}
.kachel:hover { transform: translateY(-3px); color: var(--text); box-shadow: 0 14px 34px rgba(0,0,0,.16); }
.kacheln { align-items: start; }
.kachel-bild { height: 200px; overflow: hidden; background: var(--verlauf); display: grid; place-items: center; }
.kachel-bild b { font-size: 4rem; font-weight: 800; color: rgba(255,255,255,.35); letter-spacing: -.04em; }
.kachel-bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kachel-text { padding: 16px 18px 18px; border-top: 4px solid var(--mittel); }
.kachel-text strong { display: block; color: var(--dunkel); font-size: 1.05rem; line-height: 1.3; }
.kachel-text span { color: var(--text-leise); font-size: .85rem; }

/* ---------- Fuss ---------- */
.fuss { background: var(--dunkel); color: rgba(255,255,255,.75); font-size: .9rem; margin-top: 24px; }
.fuss .huelle { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem 1.5rem; padding-top: 26px; padding-bottom: 26px; }
.fuss a { color: rgba(255,255,255,.85); text-decoration: none; }
.fuss a:hover { color: #fff; text-decoration: underline; }
.fuss ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.4rem; flex-wrap: wrap; }

/* ---------- Cookie-Hinweis (Plugin) passend einfaerben ---------- */
#cookie-notice {
	background: var(--flaeche) !important; color: var(--text) !important;
	border: 0 !important; border-top: 5px solid var(--akzent) !important;
	border-radius: var(--radius) !important; box-shadow: 0 12px 40px rgba(0,0,0,.25) !important;
	font-family: var(--schrift) !important; font-size: .93rem !important;
}
#cookie-notice button, #cookie-notice .button {
	background: var(--akzent) !important; color: #fff !important; border: 0 !important;
	border-radius: 999px !important; text-transform: none !important; font-family: var(--schrift) !important; font-weight: 600 !important;
}
#cookie-notice a { color: var(--akzent) !important; }

/* ---------- Handy ---------- */
@media (max-width: 900px) {
	.navi-knopf { display: block; }
	.navi { width: 100%; display: none; padding-bottom: 6px; }
	.navi.offen { display: block; }
	.navi ul { flex-direction: column; gap: 2px; }
	.navi a { padding: 11px 14px; border-radius: 10px; }
	.marke-zusatz { display: none; }
	.karte { padding: 28px 22px; }
	.hero { padding: 44px 0 100px; }
	.alignleft, .alignright { float: none; margin: 0 auto 1em; display: block; }
}
@media (max-width: 782px) { .admin-bar .kopf { top: 46px; } }

/* ---------- Datenschutz-Hinweis (ersetzt Cookie-Banner) ---------- */
.hinweis {
	position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 100;
	width: min(720px, calc(100% - 24px));
	display: flex; align-items: center; gap: 16px;
	background: var(--dunkel); color: rgba(255,255,255,.92);
	padding: 14px 16px 14px 20px; border-radius: 999px;
	box-shadow: 0 12px 34px rgba(0,0,0,.28); font-size: .9rem; line-height: 1.45;
}
.hinweis[hidden] { display: none; }
.hinweis p { margin: 0; flex: 1; }
.hinweis strong { color: #fff; }
.hinweis a { color: var(--leuchte); }
body.seite-dtk .hinweis a { color: var(--zart); }
.hinweis-ok {
	flex: none; border: 0; cursor: pointer; font: inherit; font-weight: 650;
	background: var(--leuchte); color: var(--dunkel); padding: 9px 18px; border-radius: 999px;
}
@media (max-width: 600px) {
	.hinweis { border-radius: var(--radius); flex-direction: column; align-items: stretch; text-align: center; bottom: 10px; }
}

/* Seiten-Symbol (Pfote) statt Kuerzel im Kopf */
.marke-zeichen.marke-pfote { background: none; border: 0; padding: 0; width: 46px; height: 46px; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,.18); display: block; }
