/* =========================================================
   Treffpunkt Gruen — Design "Garten"
   Frische Hausgemeinschafts-Optik: sattes Grün auf warmem
   Papier, mit dem Original-Garten-Headerfoto (Grünhof der
   Bellegardegasse 16). Sidebar links, einspaltige Vollbeiträge.
   ---------------------------------------------------------
   Palette (aus Garten-Fotos abgeleitet, WCAG-AA-geprüft):
   --night      #2A3E28  tiefes Waldgrün (Header/Nav/Footer)
   --gruen      #3E7A3E  sattes Garten-Grün (Primär, AA 4.78:1)
   --gruen-deep #2F6330  Hover/dunkler (6.8:1)
   --terra      #B85C32  warmes Terracotta/Feuer (Akzent, AA 4.55:1)
   --sand       #DFB868  Strohgold auf dunkel (Akzent)
   --paper      #F7F6EF  warmes Papier (Hintergrund)
   ========================================================= */

:root {
	/* Garten-Tokens */
	--night: #2a3e28;
	--night-deep: #1f3020;
	--night-2: #334d2f;
	--gruen: #3e7a3e;
	--gruen-deep: #2f6330;
	--gruen-2: #4a8a46;
	--terra: #b85c32;
	--sand: #dfb868;
	--sand-light: #ebd2a4;
	--paper: #f7f6ef;
	--card: #fdfcf6;
	--line: #e7e3d3;
	--ink: #33382b;
	--ink-soft: #5d6250;
	--ink-faint: #8c9280;
	--mieter-shadow: 0 18px 40px -24px rgba(31, 48, 32, 0.38);
	--radius: 14px;

	/* Wellington-Variablen übersteuern (Parent liest diese) */
	--primary-color: var(--gruen);
	--secondary-color: var(--gruen-2);
	--tertiary-color: var(--gruen-deep);
	--accent-color: var(--terra);
	--highlight-color: var(--sand);
	--light-gray-color: #eceadb;
	--gray-color: #969b86;
	--dark-gray-color: var(--ink);
	--text-color: var(--ink);
	--medium-text-color: var(--ink-soft);
	--light-text-color: var(--ink-faint);
	--dark-border-color: var(--night);
	--medium-border-color: #d4d2bd;
	--light-border-color: var(--line);
	--link-color: var(--gruen);
	--link-hover-color: var(--gruen-deep);
	--button-color: var(--gruen);
	--button-text-color: #ffffff;
	--button-hover-color: var(--gruen-deep);
	--button-hover-text-color: #ffffff;
	--page-background-color: var(--paper);
	--sidebar-background-color: transparent;
	--site-title-color: #ffffff;
	--site-title-hover-color: var(--sand-light);
	--navi-background-color: var(--night-deep);
	--navi-color: #f1f0e4;
	--navi-hover-color: #ffffff;
	--navi-current-color: rgba(223, 184, 104, 0.16);
	--title-color: var(--ink);
	--title-hover-color: var(--gruen);
	--meta-background-color: #eceadb;
	--widget-title-color: var(--ink);
	--footer-background-color: var(--night-deep);
	--footer-text-color: #e7e6d6;
	--footer-link-hover-color: var(--sand-light);

	--text-font: "Gudea", system-ui, -apple-system, sans-serif;
	--title-font: "Magra", system-ui, sans-serif;
	--navi-font: "Magra", system-ui, sans-serif;
	--widget-title-font: "Magra", system-ui, sans-serif;
	--title-font-weight: bold;
	--text-line-height: 1.7;
}

/* ================= BASE ================= */
body {
	background-color: var(--paper);
	color: var(--ink);
	-webkit-font-smoothing: antialiased;
}
::selection {
	background: var(--gruen);
	color: #fff;
}
a {
	transition: color 0.18s ease;
}

/* ================= LAYOUT: breit + Sidebar links ================= */
.site {
	max-width: 1400px;
}
@media (min-width: 1000px) {
	.header-main {
		padding-left: 4.5em;
		padding-right: 4.5em;
	}
}
.site-content.site-content {
	display: flex !important;
	flex-flow: row wrap !important;
	align-items: flex-start !important;
}
#content #primary {
	flex: 1 1 72% !important;
	min-width: 0;
	width: auto !important;
	padding: 0 2.5em 0 2.5em !important;
}
#content #secondary {
	flex: 1 1 28% !important;
	min-width: 0;
	width: auto !important;
	padding: 0 0 0 2.5em !important;
}
body.sidebar-left #content #primary {
	order: 2;
}
body.sidebar-left #content #secondary {
	order: 1;
	padding: 0 1.5em 0 0 !important;
}
@media (max-width: 960px) {
	#content #primary,
	#content #secondary {
		flex: 1 1 100% !important;
		order: 0;
	}
	body.sidebar-left #content #secondary {
		padding-right: 0 !important;
	}
}

/* ================= HEADER: Garten-Foto ================= */
.site-header {
	position: relative;
	overflow: hidden;
	background-color: var(--night);
	border-bottom: 3px solid var(--sand);
}
/* festes Headerfoto aus dem Theme (nicht vom WP-Custom-Header abhängig);
   ECHTE Ebene über header.php (.header-bg), da ::before auf alten Themes kollabiert.
   mix-blend-mode: screen behält die ORIGINALFARBEN des Gartenfotos (kein luminosity). */
.header-bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	background: url('../img/header.jpg') center/cover no-repeat;
	opacity: 0.8;
	mix-blend-mode: screen;
}
/* dunkler Waldgrün-Schleier für Titel-Lesbarkeit */
.site-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(rgba(31, 48, 32, 0.62), rgba(31, 48, 32, 0.30));
}
.header-main {
	position: relative;
	z-index: 2;
	padding-top: 44px;
	padding-bottom: 34px;
}
.site-title {
	font-family: var(--title-font);
	font-weight: 700;
	font-size: clamp(1.9rem, 4.4vw, 2.9rem);
	line-height: 1.05;
	margin: 0;
}
.site-title a {
	color: #ffffff;
	text-decoration: none;
	text-shadow: 0 4px 22px rgba(0, 0, 0, 0.55);
}
.site-title a:hover,
.site-title a:active {
	color: var(--sand-light);
}
.site-description {
	color: rgba(255, 255, 255, 0.85);
	font-size: 0.86rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	margin: 10px 0 0;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
.site-branding::after {
	content: "";
	display: block;
	width: 64px;
	height: 3px;
	margin-top: 16px;
	border-radius: 2px;
	background: linear-gradient(90deg, var(--sand), var(--terra));
}

/* ================= NAVIGATION ================= */
.primary-navigation-wrap {
	position: relative;
	z-index: 2;
	background: rgba(0, 0, 0, 0.30);
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}
#masthead .main-navigation ul a {
	letter-spacing: 0.03em;
	border-radius: 4px;
	transition: background-color 0.22s ease, color 0.22s ease,
		box-shadow 0.22s ease, transform 0.22s ease;
}
/* Eckiger Block-Hover: ganze Menü-Zelle füllt sich deutlich Grün */
#masthead .main-navigation ul a:hover,
#masthead .main-navigation ul a:active,
#masthead .main-navigation ul a:focus {
	background: rgba(62, 122, 62, 0.58);
	color: #fff;
	box-shadow: 0 8px 18px -8px rgba(62, 122, 62, 0.5);
	transform: translateY(-1px);
	border-bottom-color: transparent;
}
#masthead .main-navigation ul a:active {
	transform: translateY(0);
	box-shadow: none;
}
#masthead .main-navigation ul a:focus-visible {
	outline: 2px solid var(--sand-light);
	outline-offset: 2px;
}
/* aktive Seite = fast voll gedeckte Grün-Fläche (sichtbar "hier bist du") */
#masthead .main-navigation ul li.current-menu-item > a,
#masthead .main-navigation ul li.current_page_item > a,
#masthead .main-navigation ul li.current_page_parent > a {
	background: rgba(62, 122, 62, 0.88);
	color: #fff;
	border-bottom-color: transparent;
}

/* ================= BEITRAGSKARTEN (einspaltig, voll) ================= */
#post-wrapper {
	gap: 30px;
}
.post-column .type-post {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--mieter-shadow);
	padding: 28px 30px 24px;
	position: relative;
	overflow: hidden;
	transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.post-column .type-post::before {
	content: "";
	position: absolute;
	inset: 0 auto auto 0;
	width: 100%;
	height: 4px;
	background: linear-gradient(90deg, var(--gruen), var(--sand));
}
.post-column .type-post:hover {
	transform: translateY(-3px);
	box-shadow: 0 24px 48px -24px rgba(31, 48, 32, 0.5);
}
.post-column .type-post .wp-post-image {
	border-radius: 0;
	margin: -28px -30px 20px;
	width: calc(100% + 60px);
	max-width: calc(100% + 60px);
}
.post-wrapper .type-post .entry-title {
	font-size: 1.9rem;
	line-height: 1.15;
	margin: 0 0 12px;
}
.entry-meta {
	color: var(--ink-faint);
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-bottom: 8px;
}
.entry-meta a {
	color: var(--gruen);
}
.entry-content a {
	color: var(--gruen);
	text-decoration: underline;
	text-decoration-color: rgba(62, 122, 62, 0.4);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: color 0.18s ease, background-color 0.18s ease,
		text-decoration-color 0.18s ease, text-decoration-thickness 0.18s ease;
}
.entry-content a:hover {
	color: #27301f;
	background: rgba(62, 122, 62, 0.16);
	border-radius: 3px;
	text-decoration-color: var(--terra);
	text-decoration-thickness: 2px;
}
.entry-categories .meta-categories a,
.entry-tags .meta-tags a {
	background: var(--gruen);
	color: #fff !important;
	border-radius: 999px;
	padding: 0.35em 1em;
	font-size: 0.76rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}
.entry-categories .meta-categories a:hover {
	background: var(--gruen-deep);
}

/* ================= SIDEBAR ================= */
.sidebar.widget-area .widget {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 22px 22px 8px;
	margin-bottom: 24px;
	box-shadow: var(--mieter-shadow);
}
.widget .widget-title {
	font-family: var(--widget-title-font);
	color: var(--ink);
	position: relative;
	padding-bottom: 12px;
	margin-bottom: 16px;
}
.widget .widget-title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 34px;
	height: 3px;
	border-radius: 2px;
	background: linear-gradient(90deg, var(--gruen), var(--sand));
}

.sidebar.widget-area .widget a {
	color: var(--gruen);
	text-decoration: none;
	transition: color 0.18s ease, background-color 0.18s ease,
		text-decoration-color 0.18s ease;
}
/* gleicher kräftiger Hover wie in Beiträgen (deckt Letzte Beiträge, Kategorien …) */
.sidebar.widget-area .widget a:hover,
.sidebar.widget-area .widget a:active {
	color: #27301f;
	background: rgba(62, 122, 62, 0.14);
	border-radius: 3px;
	text-decoration: underline;
	text-decoration-color: var(--terra);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

/* ================= PAGINATION / NAV ================= */
.pagination .page-numbers,
.pagination a.page-numbers,
.pagination a.page-numbers:link,
.pagination a.page-numbers:visited {
	background: var(--card);
	border: 1px solid var(--line);
	color: var(--ink);
	border-radius: 999px;
	padding: 0.45em 0.9em;
	margin-right: 6px;
}
.pagination .page-numbers.current {
	background: var(--gruen);
	border-color: var(--gruen);
	color: #fff;
}
.pagination a.page-numbers:hover,
.pagination .page-numbers:hover {
	background: var(--gruen-deep);
	border-color: var(--gruen-deep);
	color: #fff;
}
.post-navigation a {
	color: var(--gruen);
	font-weight: 700;
}
.post-navigation a:hover {
	color: var(--gruen-deep);
}

/* ================= FOOTER ================= */
.site-footer {
	padding: 36px 4.5em 32px;
}
.site-footer a {
	color: var(--sand-light);
}
.site-footer .credit-link {
	opacity: 0.85;
}

/* ================= SCROLL-REVEAL (fail-safe) ================= */
html.js-reveal .reveal {
	opacity: 0;
	transform: translateY(22px);
}
html.js-reveal .reveal.is-visible {
	opacity: 1;
	transform: translateY(0);
	transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
@media (prefers-reduced-motion: reduce) {
	html.js-reveal .reveal {
		opacity: 1;
		transform: none;
	}
	* {
		transition: none !important;
		animation: none !important;
	}
}

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
	.header-main {
		padding-left: 1.5em;
		padding-right: 1.5em;
	}
	.post-wrapper .type-post .entry-title {
		font-size: 1.45rem;
	}
}
/* Mobile Menü — Parent togglet `toggled-on` selbst */
@media (max-width: 60em) {
	.main-navigation {
		display: none;
	}
	.main-navigation.toggled-on {
		display: block;
	}
}
