/* =========================================================
   ntgb — Design "Gmundnerberg"
   Ruhige Reha-/Therapie-Optik: Berg-Blau & Schiefer aus dem
   Original-Headerfoto (Meine Reha am Gmundnerberg), warmes Papier.
   Sidebar links, einspaltige Vollbeiträge.
   ---------------------------------------------------------
   Palette (aus header-ntgb.jpg abgeleitet):
   --night     #1F2C36  tiefes Schiefer-Nacht (Header/Nav/Footer)
   --primary   #3D5D75  Berg-Blau (Primär, AA 6.52:1)
   --deep      #2F4557  Hover/dunkler (9.33:1)
   --teal      #5F8F86  Teal (dekorativ, 3.42:1)
   --sky       #B8C8D6  Himmelsblau (dekorativ auf dunkel)
   --paper     #F5F8FA  kühles Papier (Hintergrund)
   ========================================================= */

:root {
	/* Gmundnerberg-Tokens */
	--night: #1f2c36;
	--night-deep: #17212a;
	--night-2: #2b3a45;
	--primary: #3d5d75;
	--primary-deep: #2f4557;
	--primary-2: #4d6d85;
	--teal: #5f8f86;
	--sky: #b8c8d6;
	--sky-light: #c9d8e4;
	--moss: #6f8a84;
	--paper: #f5f8fa;
	--card: #ffffff;
	--line: #dfe7ec;
	--ink: #253544;
	--ink-soft: #52626f;
	--ink-faint: #84939e;
	--gb-shadow: 0 18px 40px -24px rgba(23, 33, 42, 0.35);
	--radius: 14px;

	/* Wellington-Variablen übersteuern (Parent liest diese) */
	--primary-color: var(--primary);
	--secondary-color: var(--primary-2);
	--tertiary-color: var(--primary-deep);
	--accent-color: var(--teal);
	--highlight-color: #7fa0b5;
	--light-gray-color: #e7edf1;
	--gray-color: #90a0ab;
	--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: #c4d2da;
	--light-border-color: var(--line);
	--link-color: var(--primary);
	--link-hover-color: var(--primary-deep);
	--button-color: var(--primary);
	--button-text-color: #ffffff;
	--button-hover-color: var(--primary-deep);
	--button-hover-text-color: #ffffff;
	--page-background-color: var(--paper);
	--sidebar-background-color: transparent;
	--site-title-color: #ffffff;
	--site-title-hover-color: var(--sky-light);
	--navi-background-color: var(--night-deep);
	--navi-color: #e0e9ed;
	--navi-hover-color: #ffffff;
	--navi-current-color: rgba(184, 200, 214, 0.16);
	--title-color: var(--ink);
	--title-hover-color: var(--primary);
	--meta-background-color: #e4ebef;
	--widget-title-color: var(--ink);
	--footer-background-color: var(--night-deep);
	--footer-text-color: #dbe5ea;
	--footer-link-hover-color: var(--sky-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(--primary);
	color: #fff;
}

/* ================= HEADER: Gmundnerberg-Foto ================= */
.site-header {
	position: relative;
	overflow: hidden;
	border-bottom: 3px solid var(--primary);
	background-color: var(--night);
}
/* festes Headerfoto aus dem Theme; ECHTE Ebene (.header-bg) für zuverlässiges
   Strecken. screen-Blend erhält die Farben des Originals. */
.header-bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	background: url('../img/header-ntgb.jpg') center/cover no-repeat;
	opacity: 0.85;
	mix-blend-mode: screen;
}
/* dunkler Schiefer-Schleier für Titel-Lesbarkeit */
.site-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(
		rgba(23, 33, 42, 0.66),
		rgba(23, 33, 42, 0.30) 55%,
		rgba(23, 33, 42, 0.52)
	);
}
.header-main {
	position: relative;
	z-index: 2;
	display: flex;
	flex-flow: row wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding-top: 44px;
	padding-bottom: 32px;
}
.site-branding {
	flex: 1 1 auto;
	min-width: 0;
}
/* Header-Widgets nicht die ganze Breite einnehmen lassen (sonst bricht die
   lange Beschreibung um): auf max. 40% deckeln. */
.header-widgets {
	flex: 0 1 auto;
	max-width: 42%;
}
.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;
	color: #ffffff;
}
.site-title a {
	color: #ffffff;
	text-decoration: none;
	text-shadow: 0 4px 22px rgba(0, 0, 0, 0.5);
}
.site-title a:hover,
.site-title a:active {
	color: var(--sky-light);
}
.site-description {
	font-size: clamp(1.15rem, 1.9vw, 1.4rem);
	color: #e2ebf2;
	margin: 0.55rem 0 0;
	font-weight: 500;
	/* Wellington versteckt die Beschreibung per Screen-Reader-Clip:
	   position:absolute; clip:rect(1px,1px,1px,1px); width:1px; height:1px; overflow:hidden
	   → Alle vier Teile aufheben (auch width, sonst bricht der Text Wort für Wort um): */
	position: static !important;
	clip: auto !important;
	width: auto !important;
	max-width: none !important;
	height: auto !important;
	overflow: visible !important;
}

/* ================= NAVIGATION (Button-Hover, #masthead-Prefix) ================= */
.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 Berg-Blau */
#masthead .main-navigation ul a:hover,
#masthead .main-navigation ul a:active,
#masthead .main-navigation ul a:focus {
	background: rgba(61, 93, 117, 0.55);
	color: #fff;
	box-shadow: 0 8px 18px -8px rgba(61, 93, 117, 0.6);
	transform: translateY(-1px);
}
#masthead .main-navigation ul a:active {
	transform: translateY(0);
	box-shadow: none;
}
#masthead .main-navigation ul a:focus-visible {
	outline: 2px solid var(--sky);
	outline-offset: 2px;
}
/* aktive Seite = fast voll gedeckte Fläche */
#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(61, 93, 117, 0.88);
	color: #fff;
}

/* ================= LAYOUT: breit + Sidebar links ================= */
.site {
	max-width: 1400px;
}
.site-content.site-content {
	display: flex !important;
	flex-flow: row wrap !important;
	align-items: flex-start !important;
	padding-top: 36px !important;
}
#content #primary {
	flex: 1 1 72% !important;
	min-width: 0;
	width: auto !important;
	/* Innenabstand, damit Text (v.a. auf statischen Seiten) nicht links klebt. */
	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;
}
#content #post-wrapper {
	display: block !important;
	width: 100% !important;
	margin: 0;
}
#content #post-wrapper .post-full {
	width: auto !important;
	max-width: 100% !important;
	float: none !important;
	margin: 0 0 28px;
}
@media (max-width: 960px) {
	#content #primary,
	#content #secondary {
		flex: 1 1 100% !important;
		order: 0;
	}
	body.sidebar-left #content #secondary {
		padding-right: 0 !important;
	}
}

/* ================= BEITRAGSKARTEN (einspaltig, voll) ================= */
#post-wrapper {
	gap: 30px;
}
.post-full {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--gb-shadow);
	padding: 28px 30px 26px;
	position: relative;
	overflow: hidden;
	transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.post-full::before {
	content: "";
	position: absolute;
	inset: 0 auto auto 0;
	width: 100%;
	height: 4px;
	background: linear-gradient(90deg, var(--primary), var(--teal));
}
.post-full:hover {
	transform: translateY(-3px);
	box-shadow: 0 24px 48px -24px rgba(23, 33, 42, 0.45);
}
.post-full .wp-post-image {
	border-radius: 0;
	margin: -28px -30px 20px;
	width: calc(100% + 60px);
	max-width: calc(100% + 60px);
}
.post-full .entry-title {
	font-size: 1.85rem;
	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: 10px;
}
.entry-meta a {
	color: var(--primary);
}

/* Inhalts-Links — kräftiger Hover (wie auf den anderen Blogs) */
.entry-content a {
	color: var(--primary);
	text-decoration: underline;
	text-decoration-color: rgba(61, 93, 117, 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: #1b2833;
	background: rgba(61, 93, 117, 0.12);
	border-radius: 3px;
	text-decoration-color: var(--teal);
	text-decoration-thickness: 2px;
}
.entry-categories .meta-categories a,
.entry-tags .meta-tags a {
	background: var(--primary);
	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(--primary-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(--gb-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(--primary), var(--teal));
}
.sidebar.widget-area .widget a {
	color: var(--primary);
	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 */
.sidebar.widget-area .widget a:hover,
.sidebar.widget-area .widget a:active {
	color: #1b2833;
	background: rgba(61, 93, 117, 0.12);
	border-radius: 3px;
	text-decoration: underline;
	text-decoration-color: var(--teal);
	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(--primary);
	border-color: var(--primary);
	color: #fff;
}
.pagination a.page-numbers:hover,
.pagination .page-numbers:hover {
	background: var(--primary-deep);
	border-color: var(--primary-deep);
	color: #fff;
}
.post-navigation a {
	color: var(--primary);
	font-weight: 700;
}
.post-navigation a:hover {
	color: var(--primary-deep);
}

/* ================= FOOTER ================= */
.site-footer {
	padding: 36px 4.5em 32px;
}
.site-footer a {
	color: var(--sky-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;
	}
}
/* Mobile Menü — Parent togglet `toggled-on` selbst */
@media (max-width: 60em) {
	.main-navigation {
		display: none;
	}
	.main-navigation.toggled-on {
		display: block;
	}
}
