/*
Theme Name: Elsbach
Theme URI: https://www.elsbachstiftung.de/
Description: Schlankes, wartungsarmes Theme für die Elsbachstiftung im Stil von Azeria. Ohne externe Bibliotheken, ohne Google Fonts, ohne Verbindungen zu fremden Servern. Übernimmt beim Aktivieren automatisch Logo, Header-Bild, Menü, Widgets, Slider-Einstellungen und Zusätzliches CSS aus Azeria.
Author: Mediendesign Tietz
Version: 1.2.1
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: elsbach
Tags: two-columns, right-sidebar, custom-background, custom-header, custom-logo, custom-menu, featured-images, full-width-template, translation-ready
*/

/* ==========================================================================
   1. Grundwerte
   ========================================================================== */

:root {
	--elsbach-accent: #005ca9;
	--elsbach-text: #3a3a3a;
	--elsbach-heading: #111;
	--elsbach-muted: #686868;
	--elsbach-line: #d9d9d9;
	--elsbach-surface: #fff;
	--elsbach-radius: 0;
	--elsbach-gap: 30px;
	--elsbach-width: 1170px;
	--elsbach-font: "Open Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--elsbach-font-head: "Open Sans Condensed", "Roboto Condensed", "Arial Narrow", "Segoe UI", Roboto, Arial, sans-serif;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	font-size: 95%; /* etwas kompakter, wie bisher */
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	*,
	*::before,
	*::after {
		transition: none !important;
		animation: none !important;
	}
}

body {
	margin: 0;
	background-color: #f3f3f3;
	color: var(--elsbach-text);
	font-family: var(--elsbach-font);
	font-size: 15px;
	line-height: 1.7;
}

img,
video,
iframe,
svg {
	max-width: 100%;
	height: auto;
}

img {
	display: block;
	border: 0;
}

figure {
	margin: 0 0 1.5em;
}

a {
	color: var(--elsbach-accent);
	text-decoration: none;
}

a:hover,
a:focus {
	text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.hero-track:focus-visible {
	outline: 2px solid var(--elsbach-accent);
	outline-offset: 2px;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 .6em;
	color: var(--elsbach-heading);
	font-family: var(--elsbach-font-head);
	font-weight: 700;
	line-height: 1.2;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.45rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

@media (max-width: 767px) {
	h1 { font-size: 1.6rem; }
	h2 { font-size: 1.4rem; }
	h3 { font-size: 1.25rem; }
}

p,
ul,
ol,
dl,
blockquote,
pre,
table {
	margin: 0 0 1.25em;
}

ul,
ol {
	padding-left: 1.4em;
}

blockquote {
	margin-left: 0;
	padding: .5em 0 .5em 1.25em;
	border-left: 4px solid var(--elsbach-accent);
	font-style: italic;
}

hr {
	height: 1px;
	margin: 2em 0;
	border: 0;
	background: var(--elsbach-line);
}

table {
	width: 100%;
	border-collapse: collapse;
}

th,
td {
	padding: .5em .75em;
	border: 1px solid var(--elsbach-line);
	text-align: left;
}

pre {
	overflow: auto;
	padding: 1em;
	background: #f6f6f6;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
	word-wrap: normal !important;
}

.skip-link:focus {
	z-index: 100000;
	top: 8px;
	left: 8px;
	width: auto;
	height: auto;
	padding: 12px 20px;
	clip: auto;
	background: #fff;
	color: var(--elsbach-accent);
	font-weight: 700;
}

.container {
	width: 100%;
	max-width: var(--elsbach-width);
	margin: 0 auto;
	padding: 0 16px;
}

.site {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.site-content {
	flex: 1 0 auto;
}

.search-form + p {
	margin-top: 1.25em;
}

.icon {
	display: inline-block;
	flex: none;
	vertical-align: middle;
}

/* ==========================================================================
   2. Buttons und Formulare
   ========================================================================== */

.button,
button,
input[type="button"],
input[type="reset"],
input[type="submit"],
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: .4em;
	padding: .7em 1.4em;
	border: 0;
	border-radius: var(--elsbach-radius);
	background: var(--elsbach-accent);
	color: #fff;
	font: inherit;
	font-size: .85rem;
	font-weight: 700;
	letter-spacing: .06em;
	line-height: 1.2;
	text-transform: uppercase;
	cursor: pointer;
	transition: filter .2s ease;
}

/* Echte Buttons: blauer Rahmen, damit beim Hover nichts springt. */
.button,
input[type="button"],
input[type="reset"],
input[type="submit"],
.wp-block-button__link,
.search-submit {
	padding: calc(.7em - 2px) calc(1.4em - 2px);
	border: 2px solid var(--elsbach-accent);
	transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

/* Bereits besuchte Links sehen aus wie normale Buttons. */
.button:visited,
.wp-block-button__link:visited {
	background: var(--elsbach-accent);
	color: #fff;
}

/* Hover/Fokus: invertiert – weiß mit blauer Schrift und blauem Rahmen. */
.button:hover,
.button:focus-visible,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover,
input[type="submit"]:focus-visible,
.wp-block-button__link:hover,
.wp-block-button__link:focus-visible,
.search-submit:hover {
	border-color: var(--elsbach-accent);
	background: #fff;
	color: var(--elsbach-accent);
	text-decoration: none;
	filter: none;
}

/* Sonstige Schaltflächen (z. B. im Kommentarbereich). */
button:hover {
	text-decoration: none;
}

.button .icon {
	width: 16px;
	height: 16px;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
textarea,
select {
	width: 100%;
	max-width: 100%;
	padding: .65em .8em;
	border: 1px solid var(--elsbach-line);
	border-radius: var(--elsbach-radius);
	background: #fff;
	color: var(--elsbach-text);
	font: inherit;
}

.search-form {
	display: flex;
	gap: 6px;
}

.search-form label {
	flex: 1;
}

/* ==========================================================================
   3. Kopfbereich
   ========================================================================== */

.site-branding {
	padding: 40px 0 34px;
	background-color: #fff;
	background-position: center top;
	background-repeat: no-repeat;
	background-size: cover;
	text-align: center;
}

.site-logo {
	display: inline-block;
	max-width: 100%;
	margin: 0;
	padding: 0;
	font-family: var(--elsbach-font-head);
	font-size: 2.6rem;
	font-weight: 400;
	line-height: 1;
	text-transform: uppercase;
}

.site-logo:has(.site-logo-text)::after {
	display: block;
	width: 50%;
	min-width: 30px;
	height: 1px;
	margin: 12px auto 10px;
	background: currentColor;
	content: "";
}

.site-logo-link,
.site-logo-link:hover {
	color: var(--elsbach-heading);
	text-decoration: none;
}

.site-logo-img {
	display: block;
	max-width: min(420px, 80vw);
	height: auto;
	margin: 0 auto;
}

.site-description {
	margin: 0;
	color: var(--elsbach-accent);
	font-size: 1.05rem;
	font-style: italic;
	font-weight: 300;
}

/* Menü */

.main-navigation {
	position: relative;
	z-index: 50;
	border-top: 1px solid var(--elsbach-line);
	border-bottom: 1px solid var(--elsbach-line);
	background: #fff;
}

.has-sticky-menu .main-navigation {
	position: sticky;
	top: 0;
}

.admin-bar.has-sticky-menu .main-navigation {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar.has-sticky-menu .main-navigation {
		top: 0;
	}
}

.main-navigation ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.main-navigation .menu {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
}

.main-navigation li {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}

.main-navigation a {
	position: relative;
	display: block;
	padding: 16px 14px;
	color: var(--elsbach-heading);
	font-size: 1.04rem;
	font-weight: 600;
	letter-spacing: .06em;
	text-decoration: none;
	text-transform: uppercase;
}

.main-navigation .menu > li > a::before {
	position: absolute;
	right: 50%;
	bottom: -1px;
	left: 50%;
	height: 3px;
	background: var(--elsbach-accent);
	content: "";
	transition: left .2s ease-out, right .2s ease-out;
}

.main-navigation .menu > li:hover > a::before,
.main-navigation .menu > li:focus-within > a::before,
.main-navigation .menu > .current-menu-item > a::before,
.main-navigation .menu > .current_page_item > a::before,
.main-navigation .menu > .current-menu-ancestor > a::before,
.main-navigation .menu > .current_page_ancestor > a::before {
	right: 0;
	left: 0;
}

.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a,
.main-navigation .current-menu-ancestor > a,
.main-navigation li:hover > a {
	color: var(--elsbach-accent);
}

.submenu-toggle {
	display: inline-flex;
	margin: 0 6px 0 -10px;
	padding: 4px;
	background: none;
	color: inherit;
}

.submenu-toggle:hover {
	filter: none;
	color: var(--elsbach-accent);
}

.main-navigation .sub-menu,
.main-navigation .children {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 99;
	min-width: 230px;
	padding: 8px 0;
	background: #fafafa;
	box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity .2s, transform .2s, visibility .2s;
}

.main-navigation .sub-menu .sub-menu,
.main-navigation .children .children {
	top: -8px;
	left: 100%;
}

.main-navigation li:hover > .sub-menu,
.main-navigation li:focus-within > .sub-menu,
.main-navigation li.is-open > .sub-menu,
.main-navigation li:hover > .children,
.main-navigation li:focus-within > .children,
.main-navigation li.is-open > .children {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.main-navigation .sub-menu li,
.main-navigation .children li {
	width: 100%;
}

.main-navigation .sub-menu a,
.main-navigation .children a {
	flex: 1;
	padding: 11px 18px;
	font-size: 1rem;
	letter-spacing: .02em;
	text-transform: none;
}

.menu-toggle {
	display: none;
	margin: 0 auto;
	padding: 14px 18px;
	background: none;
	color: var(--elsbach-heading);
}

.menu-toggle:hover {
	filter: none;
	color: var(--elsbach-accent);
}

.menu-toggle .icon-close,
.main-navigation.is-open .menu-toggle .icon-menu {
	display: none;
}

.main-navigation.is-open .menu-toggle .icon-close {
	display: inline-block;
}

@media (max-width: 800px) {
	.main-navigation .container {
		padding: 0;
	}

	.menu-toggle {
		display: flex;
	}

	.main-navigation .menu {
		display: none;
		flex-direction: column;
		border-top: 1px solid var(--elsbach-line);
	}

	.main-navigation.is-open .menu {
		display: flex;
	}

	.main-navigation li {
		border-bottom: 1px solid #eee;
	}

	.main-navigation a {
		flex: 1;
		padding: 13px 20px;
	}

	.main-navigation .menu > li > a::before {
		display: none;
	}

	.submenu-toggle {
		margin: 0 10px;
		padding: 8px;
	}

	.main-navigation .sub-menu,
	.main-navigation .children {
		position: static;
		display: none;
		width: 100%;
		min-width: 0;
		padding: 0 0 0 16px;
		background: none;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	.main-navigation li:hover > .sub-menu,
	.main-navigation li:focus-within > .sub-menu,
	.main-navigation li:hover > .children,
	.main-navigation li:focus-within > .children {
		display: none;
	}

	.main-navigation li.is-open > .sub-menu,
	.main-navigation li.is-open > .children {
		display: block;
	}

	.main-navigation li.is-open > .submenu-toggle .icon,
	.main-navigation li.is-open > .submenu-toggle svg {
		transform: rotate(180deg);
	}
}

/* ==========================================================================
   4. Slider
   ========================================================================== */

.hero {
	position: relative;
	overflow: hidden;
	background: #1d1d1d;
}

.hero-track {
	display: flex;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.hero-track::-webkit-scrollbar {
	display: none;
}

.hero picture {
	display: block;
}

.hero-slide {
	position: relative;
	flex: 0 0 100%;
	scroll-snap-align: start;
}

.hero-image {
	width: 100%;
	height: auto;
	aspect-ratio: 1900 / 445;
	object-fit: cover;
}

.hero-banner {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	pointer-events: none;
}

.hero-banner-content {
	max-width: 470px;
	padding: 24px 28px;
	background: color-mix(in srgb, var(--elsbach-accent) 75%, transparent);
	color: #fff;
	pointer-events: auto;
}

@supports not (background: color-mix(in srgb, red 50%, transparent)) {
	.hero-banner-content {
		background: rgba(0, 92, 169, .75);
	}
}

.hero-title {
	margin: 0 0 .35em;
	color: #fff;
	font-size: 1.9rem;
}

.hero-excerpt {
	margin-bottom: 1em;
	font-size: .95rem;
	line-height: 1.5;
}

/* Button im Slider: auf Blau umgekehrt – weiß, beim Hover blau mit weißem Rahmen. */
.hero-button,
.hero-button:visited {
	border-color: #fff;
	background: #fff;
	color: var(--elsbach-accent);
}

.hero-button:hover,
.hero-button:focus-visible {
	border-color: #fff;
	background: var(--elsbach-accent);
	color: #fff;
}

.hero-nav {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .85);
	color: var(--elsbach-accent);
	transform: translateY(-50%);
}

.hero-nav:hover {
	background: #fff;
	color: var(--elsbach-accent);
	filter: none;
}

.hero-prev {
	left: 14px;
}

.hero-next {
	right: 14px;
}

.hero-dots {
	position: absolute;
	right: 0;
	bottom: 14px;
	left: 0;
	z-index: 2;
	display: flex;
	justify-content: center;
	gap: 8px;
}

.hero-dot {
	width: 12px;
	height: 12px;
	padding: 0;
	border: 2px solid #fff;
	border-radius: 50%;
	background: transparent;
}

.hero-dot[aria-current="true"],
.hero-dot:hover {
	background: #fff;
	filter: none;
}

@media (max-width: 767px) {
	.hero-image {
		aspect-ratio: 16 / 9;
	}

	.hero-banner {
		position: static;
		display: block;
	}

	.hero-banner .container {
		padding: 0;
	}

	.hero-banner-content {
		max-width: none;
		background: var(--elsbach-accent);
	}

	.hero-title {
		font-size: 1.35rem;
	}

	.hero-nav {
		top: 28vw;
		width: 36px;
		height: 36px;
	}

	.hero-dots {
		display: none;
	}
}

/* ==========================================================================
   5. Inhalt und Seitenleiste
   ========================================================================== */

.content-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: var(--elsbach-gap);
	padding-top: 40px;
	padding-bottom: 40px;
}

.sidebar-left .content-layout {
	grid-template-columns: 320px minmax(0, 1fr);
}

.sidebar-left .content-layout .site-main {
	order: 2;
}

.sidebar-none .content-layout,
.content-layout.is-full-width {
	grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 991px) {
	.content-layout,
	.sidebar-left .content-layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.sidebar-left .content-layout .site-main {
		order: 0;
	}
}

.entry {
	margin-bottom: var(--elsbach-gap);
	background: var(--elsbach-surface);
}

.entry-thumbnail {
	margin: 0;
}

.entry-thumbnail img {
	width: 100%;
	height: auto;
}

.entry-thumbnail a {
	display: block;
	overflow: hidden;
}

.entry-thumbnail a img {
	transition: transform .4s ease;
}

.entry-thumbnail a:hover img {
	transform: scale(1.03);
}

.entry-body {
	padding: 30px 34px;
}

@media (max-width: 600px) {
	.entry-body {
		padding: 22px 18px;
	}
}

.entry-title {
	margin-bottom: .5em;
}

.entry-title a {
	color: var(--elsbach-heading);
}

.entry-title a:hover {
	color: var(--elsbach-accent);
	text-decoration: none;
}

.entry-meta {
	margin: -.2em 0 1em;
	color: var(--elsbach-muted);
	font-size: .85rem;
}

.entry-meta-item + .entry-meta-item::before {
	margin: 0 .5em;
	content: "·";
}

.entry-content::after {
	display: table;
	clear: both;
	content: "";
}

.entry-content > *:last-child {
	margin-bottom: 0;
}

.entry-footer {
	margin-top: 1.5em;
}

.is-single .entry-footer {
	padding-top: 1.25em;
	border-top: 1px solid var(--elsbach-accent);
}

.page-header {
	margin-bottom: var(--elsbach-gap);
	padding: 24px 34px;
	border-bottom: 5px solid var(--elsbach-accent);
	background: #fff;
}

.page-title {
	margin: 0;
}

.taxonomy-description {
	margin-top: .75em;
}

/* Beitragsnavigation */

.post-navigation .nav-links {
	display: flex;
	justify-content: space-between;
	gap: 20px;
}

.post-navigation .nav-next {
	margin-left: auto;
	text-align: right;
}

.post-nav-label {
	display: block;
	color: var(--elsbach-muted);
	font-size: .75rem;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.post-nav-title {
	font-weight: 600;
}

/* Seitenzahlen */

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 10px;
	background: #fff;
	color: var(--elsbach-heading);
	font-weight: 600;
}

.pagination .page-numbers.current,
.pagination a.page-numbers:hover {
	background: var(--elsbach-accent);
	color: #fff;
	text-decoration: none;
}

.page-links {
	clear: both;
	margin-top: 1.5em;
}

/* Seitenleiste */

.widget {
	margin-bottom: var(--elsbach-gap);
	padding: 26px 26px 22px;
	background: #fff;
}

.widget:last-child {
	margin-bottom: 0;
}

.widget-title {
	position: relative;
	margin-bottom: 1em;
	padding-bottom: .55em;
	font-size: 1.15rem;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.widget-title::after {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 40px;
	height: 3px;
	background: var(--elsbach-accent);
	content: "";
}

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

.widget li {
	padding: 6px 0;
	border-bottom: 1px solid #eee;
}

.widget li:last-child {
	border-bottom: 0;
}

.widget img {
	height: auto;
}

.custom-box-about img {
	width: 100%;
	margin-bottom: 1em;
}

.follow-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.widget .follow-list li {
	padding: 0;
	border: 0;
}

.follow-list a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background: var(--elsbach-accent);
	color: #fff;
}

.follow-list a:hover {
	filter: brightness(.88);
}

/* ==========================================================================
   6. Fußbereich
   ========================================================================== */

.footer-widget-area {
	padding: 40px 0 10px;
	background: #fff;
}

.footer-columns {
	display: grid;
	grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
	gap: var(--elsbach-gap);
}

.footer-columns-1 { --cols: 1; }
.footer-columns-2 { --cols: 2; }

@media (max-width: 767px) {
	.footer-columns {
		grid-template-columns: minmax(0, 1fr);
	}
}

.footer-widget-area .widget {
	padding: 0;
	background: none;
}

.site-info {
	padding: 18px 0;
	background: var(--elsbach-accent);
	color: #fff;
	font-size: .9rem;
}

.site-info .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.site-info a {
	color: #fff;
	text-decoration: underline;
}

.back-top-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 40px;
	height: 40px;
	border: 1px solid rgba(255, 255, 255, .6);
	color: #fff;
}

.site-info .back-top-btn {
	text-decoration: none;
}

.back-top-btn:hover {
	background: rgba(255, 255, 255, .15);
}

/* ==========================================================================
   7. WordPress-Standardklassen
   ========================================================================== */

.alignleft {
	float: left;
	margin: .3em 1.5em 1em 0;
}

.alignright {
	float: right;
	margin: .3em 0 1em 1.5em;
}

.aligncenter {
	display: block;
	margin-right: auto;
	margin-left: auto;
}

.wp-caption {
	max-width: 100%;
}

.wp-caption-text,
figcaption {
	padding: .5em .75em;
	background: var(--elsbach-accent);
	color: #fff;
	font-size: .85rem;
}

.gallery {
	display: grid;
	grid-template-columns: repeat(var(--gallery-cols, 3), minmax(0, 1fr));
	gap: 10px;
	margin-bottom: 1.5em;
}

.gallery-columns-2 { --gallery-cols: 2; }
.gallery-columns-4 { --gallery-cols: 4; }
.gallery-columns-5 { --gallery-cols: 5; }

.sticky .entry-title::before {
	margin-right: .4em;
	color: var(--elsbach-accent);
	content: "★";
}

.bypostauthor,
.wp-block-image,
.wp-block-embed {
	max-width: 100%;
}

/* ==========================================================================
   8. Blöcke im Inhalt (Ersatz für Elementor)
   ========================================================================== */

.entry-content > * + * {
	margin-top: 0;
}

.entry-content .wp-block-columns {
	gap: var(--elsbach-gap);
	margin-bottom: 1.5em;
}

.entry-content .wp-block-image {
	margin-bottom: 1.5em;
}

.entry-content .wp-block-image img {
	height: auto;
}

.entry-content .wp-block-separator {
	width: 100%;
	max-width: none;
	margin: 2em 0;
	border: 0;
	border-top: 1px solid var(--elsbach-line);
	opacity: 1;
}

.entry-content .wp-block-gallery {
	margin-bottom: 1.5em;
}

.entry-content .wp-block-embed,
.entry-content .wp-block-video {
	margin-bottom: 1.5em;
}

.entry-content .wp-block-quote {
	margin-left: 0;
	padding-left: 1.25em;
	border-left: 4px solid var(--elsbach-accent);
}

.entry-content .wp-block-quote p:last-child {
	margin-bottom: 0;
}

.content-menu {
	margin-bottom: 1.5em;
}

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

.content-menu-list li {
	padding: 6px 0;
	border-bottom: 1px solid #eee;
}

.content-menu-list .sub-menu {
	margin: 6px 0 0;
	padding-left: 1.1em;
	list-style: none;
}

.content-menu-list a::before {
	margin-right: .45em;
	color: var(--elsbach-accent);
	content: "›";
}


/* ==========================================================================
   9. Gestaltung Inhaltsbereich (ab 1.2.0)
   ========================================================================== */

:root {
	--elsbach-accent-soft: #e8f1f9;
	--elsbach-shadow: 0 1px 2px rgba(16, 36, 64, .06), 0 6px 24px rgba(16, 36, 64, .06);
	--elsbach-round: 6px;
}

body {
	font-size: 1rem;
	line-height: 1.75;
}

.content-layout {
	padding-top: 48px;
	padding-bottom: 64px;
}

/* Karten: weiche Schatten, leicht gerundete Ecken */
.entry,
.widget-area .widget,
.page-header,
.comments-area,
.pagination .page-numbers {
	border-radius: var(--elsbach-round);
	box-shadow: var(--elsbach-shadow);
}

.entry {
	overflow: hidden;
	margin-bottom: 36px;
}

.entry-body {
	padding: 40px 48px 44px;
}

@media (max-width: 600px) {
	.entry-body {
		padding: 26px 20px 30px;
	}
}

/* Seiten- und Beitragstitel mit blauer Linie darunter */
.is-page .entry-header,
.is-single .entry-header {
	position: relative;
	margin-bottom: 2em;
	padding-bottom: .9em;
}

.is-page .entry-header::after,
.is-single .entry-header::after {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 64px;
	height: 4px;
	border-radius: 2px;
	background: var(--elsbach-accent);
	content: "";
}

.is-page .entry-title,
.is-single .entry-title {
	margin: 0;
	font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.4rem);
	letter-spacing: -.01em;
}

/* Überschriften im Text */
.entry-content h1,
.entry-content h2 {
	margin-top: 1.4em;
	color: var(--elsbach-heading);
	font-size: 1.6rem;
}

.entry-content h3 {
	margin-top: 1.4em;
	color: var(--elsbach-accent);
	font-size: 1.3rem;
}

.entry-content h4,
.entry-content h5,
.entry-content h6 {
	margin-top: 1.2em;
	color: var(--elsbach-accent);
	font-size: 1.15rem;
}

.entry-content > :is(h1, h2, h3, h4, h5, h6):first-child,
.entry-content .wp-block-column > :is(h1, h2, h3, h4, h5, h6):first-child {
	margin-top: 0;
}

.entry-content p,
.entry-content li {
	color: var(--elsbach-text);
}

.entry-content a:not(.wp-block-button__link):not(.button) {
	text-decoration: underline;
	text-decoration-color: rgba(0, 92, 169, .35);
	text-decoration-thickness: 1px;
	text-underline-offset: .18em;
	transition: text-decoration-color .2s ease;
}

.entry-content a:not(.wp-block-button__link):not(.button):hover {
	text-decoration-color: currentColor;
}

/* Bilder */
.entry-content .wp-block-image img,
.entry-content .wp-block-gallery img,
.entry-content .wp-block-embed iframe,
.entry-content .wp-block-video video {
	border-radius: var(--elsbach-round);
}

.entry-content .wp-block-image:has(figcaption) img {
	border-radius: var(--elsbach-round) var(--elsbach-round) 0 0;
}

.entry-content .wp-block-image figcaption,
.entry-content figcaption,
.wp-caption-text {
	margin: 0;
	padding: .65em 1em;
	border-radius: 0 0 var(--elsbach-round) var(--elsbach-round);
	font-size: .875rem;
	line-height: 1.5;
	text-align: left;
}

/* Spalten: oben bündig, auf Mobilgeräten mit Abstand */
.entry-content .wp-block-columns {
	gap: 40px;
	margin-bottom: 2em;
}

@media (max-width: 781px) {
	.entry-content .wp-block-columns {
		gap: 24px;
	}
}

.entry-content .wp-block-column > *:last-child {
	margin-bottom: 0;
}

/* Zitat als hellblaue Box */
.entry-content .wp-block-quote,
.entry-content blockquote {
	margin: 2em 0;
	padding: 1.25em 1.5em;
	border-left: 4px solid var(--elsbach-accent);
	border-radius: 0 var(--elsbach-round) var(--elsbach-round) 0;
	background: var(--elsbach-accent-soft);
	font-size: 1.05rem;
}

.entry-content .wp-block-quote cite {
	display: block;
	margin-top: .5em;
	color: var(--elsbach-muted);
	font-size: .875rem;
	font-style: normal;
}

/* Tabellen */
.entry-content table th {
	background: var(--elsbach-accent);
	border-color: var(--elsbach-accent);
	color: #fff;
}

.entry-content table tr:nth-child(even) td {
	background: #f7f9fb;
}

/* Liste mit blauen Punkten */
.entry-content ul:not([class]) li::marker,
.entry-content .wp-block-list li::marker {
	color: var(--elsbach-accent);
}

/* Beitragsübersicht */
.is-loop .entry-body {
	padding: 32px 40px 36px;
}

@media (max-width: 600px) {
	.is-loop .entry-body {
		padding: 24px 20px 28px;
	}
}

.is-loop .entry-title {
	font-size: 1.45rem;
}

.is-loop .entry-content {
	color: var(--elsbach-muted);
}

.is-loop {
	transition: box-shadow .25s ease, transform .25s ease;
}

.is-loop:hover {
	box-shadow: 0 2px 4px rgba(16, 36, 64, .08), 0 14px 34px rgba(16, 36, 64, .12);
	transform: translateY(-2px);
}

.is-loop .entry-footer {
	margin-top: 1.25em;
}

/* Beitragsnavigation als zwei Kacheln */
.is-single .entry-footer {
	margin-top: 2.5em;
	padding-top: 0;
	border-top: 0;
}

.post-navigation .nav-links > div {
	flex: 1 1 0;
}

.post-navigation a {
	display: block;
	height: 100%;
	padding: 16px 20px;
	border-radius: var(--elsbach-round);
	background: var(--elsbach-accent-soft);
	transition: background-color .2s ease, color .2s ease;
}

.post-navigation a:hover {
	background: var(--elsbach-accent);
	color: #fff;
	text-decoration: none;
}

.post-navigation a:hover .post-nav-label {
	color: rgba(255, 255, 255, .8);
}

@media (max-width: 600px) {
	.post-navigation .nav-links {
		flex-direction: column;
	}
	.post-navigation .nav-next {
		text-align: left;
	}
}

/* Seitenleiste */
.widget-area .widget {
	padding: 28px 28px 24px;
}

.widget-area .widget li a {
	display: block;
	transition: color .2s ease, padding-left .2s ease;
}

.widget-area .widget li a:hover {
	padding-left: 4px;
	text-decoration: none;
}

.page-header {
	padding: 28px 40px;
	border-bottom-width: 4px;
}

/* Kommentarbereich wie die Inhaltskarte */
.comments-area {
	padding: 40px 48px;
}

@media (max-width: 600px) {
	.comments-area {
		padding: 26px 20px;
	}
}

/* Fußbereich */
.footer-widget-area {
	padding: 52px 0 24px;
	border-top: 1px solid #e6e9ee;
}

/* ==========================================================================
   10. Blaue Flächen: Schrift immer weiß
   ========================================================================== */

body .site-info,
body .site-info :is(p, li, span, strong, em, a, a:visited),
body figcaption,
body figcaption :is(p, span, strong, em, a, a:visited),
body .wp-element-caption,
body .wp-element-caption :is(a, a:visited),
body .wp-caption-text,
body .wp-caption-text :is(a, a:visited),
body .hero-banner-content,
body .hero-banner-content :is(h1, h2, h3, h4, p, span, strong, em, a:not(.hero-button)),
body .follow-list a,
body .follow-list a:visited,
body .pagination .page-numbers.current,
body .pagination a.page-numbers:hover,
body .post-navigation a:hover,
body .post-navigation a:hover *,
body .entry-content table th,
body .has-accent-background-color,
body .has-accent-background-color :is(h1, h2, h3, h4, h5, h6, p, li, span, strong, em, a, a:visited, cite),
body .has-stiftungsblau-background-color,
body .has-stiftungsblau-background-color :is(h1, h2, h3, h4, h5, h6, p, li, span, strong, em, a, a:visited, cite),
body :is([style*="background-color:#005ca9" i], [style*="background-color: #005ca9" i], [style*="background:#005ca9" i]),
body :is([style*="background-color:#005ca9" i], [style*="background-color: #005ca9" i], [style*="background:#005ca9" i]) :is(h1, h2, h3, h4, h5, h6, p, li, span, strong, em, a, a:visited, cite) {
	color: #fff !important;
}

body figcaption a,
body .wp-element-caption a,
body .has-accent-background-color a,
body .has-stiftungsblau-background-color a {
	text-decoration-color: rgba(255, 255, 255, .6) !important;
}

/* Buttons auf blauer Fläche: weiß, beim Hover umgekehrt */
body .has-accent-background-color .wp-block-button__link,
body .has-stiftungsblau-background-color .wp-block-button__link {
	border-color: #fff;
	background: #fff;
	color: var(--elsbach-accent) !important;
}

body .has-accent-background-color .wp-block-button__link:hover,
body .has-stiftungsblau-background-color .wp-block-button__link:hover {
	background: transparent;
	color: #fff !important;
}

/* Gruppen-Blöcke mit Hintergrund bekommen Innenabstand */
.entry-content .has-background:not(.wp-block-button__link):not(th):not(td) {
	padding: 1.5em 1.75em;
	border-radius: var(--elsbach-round);
}


/* Kommentare */

.comments-area {
	padding: 30px 34px;
	background: #fff;
}

.comment-list {
	padding-left: 0;
	list-style: none;
}

.comment-list .children {
	list-style: none;
}

.comment-body {
	margin-bottom: 1.5em;
	padding-bottom: 1.5em;
	border-bottom: 1px solid #eee;
}

.comment-author img {
	float: left;
	margin-right: 12px;
	border-radius: 50%;
}

/* Elementor: volle Breite ohne Theme-Abstände */

.elementor-page .content-layout.is-full-width,
.page-template-elementor_header_footer .site-content {
	padding-top: 0;
	padding-bottom: 0;
}

.elementor-page .is-full-width .entry,
.elementor-page .is-full-width .entry-body {
	padding: 0;
	background: none;
}

/* Druck */

@media print {
	.main-navigation,
	.hero,
	.widget-area,
	.footer-widget-area,
	.back-top-btn,
	.entry-footer {
		display: none !important;
	}

	body {
		background: #fff;
		color: #000;
	}

	.content-layout {
		display: block;
	}
}

/* ==========================================================================
   11. Anpassungen 1.2.1: Buttons, PDF, Videos
   ========================================================================== */

/*
 * Buttons gegen fremde Link-Farben absichern (Zusätzliches CSS, Elementor).
 * Die höhere Gewichtung sorgt dafür, dass Schrift und Hintergrund nie gleich sind.
 */
html body a.button,
html body a.button:visited,
html body .wp-block-button__link,
html body .wp-block-button__link:visited,
html body .wp-block-file .wp-block-file__button,
html body .wp-block-file .wp-block-file__button:visited {
	border: 2px solid var(--elsbach-accent);
	background: var(--elsbach-accent);
	color: #fff;
	text-decoration: none;
}

html body a.button:hover,
html body a.button:focus-visible,
html body .wp-block-button__link:hover,
html body .wp-block-button__link:focus-visible,
html body .wp-block-file .wp-block-file__button:hover,
html body .wp-block-file .wp-block-file__button:focus-visible {
	border-color: var(--elsbach-accent);
	background: #fff;
	color: var(--elsbach-accent);
	text-decoration: none;
}

/* Button im Slider: weiß mit blauem Rahmen und blauer Schrift, beim Hover umgekehrt */
html body .hero-banner-content a.hero-button,
html body .hero-banner-content a.hero-button:visited {
	border: 2px solid var(--elsbach-accent);
	background: #fff;
	color: var(--elsbach-accent) !important;
}

html body .hero-banner-content a.hero-button:hover,
html body .hero-banner-content a.hero-button:focus-visible {
	border-color: #fff;
	background: var(--elsbach-accent);
	color: #fff !important;
}

/* PDF direkt auf der Seite */
.entry-content .wp-block-file {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 20px;
	margin: 0 0 1.75em;
	padding: 18px 20px;
	border: 1px solid var(--elsbach-line);
	border-left: 4px solid var(--elsbach-accent);
	border-radius: var(--elsbach-round);
	background: #fff;
}

.entry-content .wp-block-file > a:not(.wp-block-file__button) {
	flex: 1 1 auto;
	font-weight: 600;
}

.entry-content .wp-block-file > a:not(.wp-block-file__button)::before {
	display: inline-block;
	margin-right: .5em;
	padding: .15em .45em;
	border-radius: 3px;
	background: var(--elsbach-accent);
	color: #fff;
	font-size: .7rem;
	font-weight: 700;
	letter-spacing: .06em;
	vertical-align: middle;
	content: "PDF";
}

.entry-content .wp-block-file:not(.has-pdf-preview) > a:not(.wp-block-file__button)::before {
	content: "DATEI";
}

.entry-content .wp-block-file .wp-block-file__embed {
	flex: 0 0 100%;
	width: 100%;
	height: min(85vh, 1000px) !important;
	min-height: 420px;
	margin: 0 0 4px;
	border: 1px solid var(--elsbach-line);
	background: #f6f6f6;
}

.entry-content .wp-block-file .wp-block-file__button {
	margin: 0;
	padding: calc(.6em - 2px) calc(1.2em - 2px);
	border-radius: var(--elsbach-round);
	font-size: .8rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.elsbach-pdf-fallback {
	margin: 0;
	padding: 24px;
}

/* Videos: Platzhalter vor dem Laden (Stiftungsblau, Schrift weiß) */
.elsbach-video {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	width: 100%;
	aspect-ratio: 16 / 9;
	padding: 24px;
	overflow: hidden;
	border-radius: var(--elsbach-round);
	background: var(--elsbach-accent);
	color: #fff;
	text-align: center;
}

.wp-has-aspect-ratio .wp-block-embed__wrapper .elsbach-video {
	position: absolute;
	inset: 0;
	height: 100%;
	aspect-ratio: auto;
}

.elsbach-video.is-playing {
	padding: 0;
	background: #000;
}

.elsbach-video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

html body .elsbach-video .elsbach-video-play {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 0;
	border: 0;
	background: none;
	color: #fff;
	font-size: .95rem;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: none;
	cursor: pointer;
}

.elsbach-video-play .icon {
	box-sizing: content-box;
	width: 34px;
	height: 34px;
	padding: 20px 18px 20px 22px;
	border: 3px solid #fff;
	border-radius: 50%;
	transition: background-color .2s ease, color .2s ease;
}

html body .elsbach-video .elsbach-video-play:hover .icon,
html body .elsbach-video .elsbach-video-play:focus-visible .icon {
	background: #fff;
	color: var(--elsbach-accent);
}

.elsbach-video-play:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 6px;
}

html body .elsbach-video .elsbach-video-note,
html body .elsbach-video .elsbach-video-note a {
	max-width: 34em;
	margin: 0;
	color: #fff !important;
	font-size: .8rem;
	line-height: 1.5;
}

html body .elsbach-video .elsbach-video-note a {
	text-decoration: underline;
}

@media (max-width: 480px) {
	html body .elsbach-video .elsbach-video-note,
	html body .elsbach-video .elsbach-video-note a {
		font-size: .7rem;
	}
	.elsbach-video {
		gap: 8px;
		padding: 12px 16px;
	}
	.elsbach-video-play .icon {
		width: 24px;
		height: 24px;
		padding: 14px 12px 14px 16px;
	}
}

.entry-content .wp-block-video video {
	width: 100%;
	border-radius: var(--elsbach-round);
	background: #000;
}

.entry-content > .elsbach-video,
.entry-content .wp-block-embed {
	margin-bottom: 1.5em;
}

/*
 * Bereits besuchte Links sehen aus wie unbesuchte.
 * (Das Zusätzliche CSS färbt „a:visited“ blau – das würde Menü und
 * Beitragstitel nach dem ersten Klick umfärben.)
 */
body .main-navigation a,
body .entry-title a,
body a.site-logo-link {
	color: var(--elsbach-heading);
}

body .site-info a,
body .follow-list a,
body a.back-top-btn,
body .hero-banner-content a:not(.button) {
	color: #fff;
}

/* ==========================================================================
   12. Mobile Ansicht
   ========================================================================== */

@media (max-width: 767px) {
	/* Kopf etwas kompakter, Logo kleiner */
	.site-branding {
		padding: 22px 0 18px;
	}

	.site-logo-img {
		max-width: min(260px, 72vw);
	}

	/* Slider auf dem Handy ausblenden */
	.hero {
		display: none !important;
	}

	/* (falls wieder eingeblendet:) alle Folien gleich hoch */
	.hero {
		background: var(--elsbach-accent);
	}

	.hero-slide {
		display: flex;
		flex-direction: column;
	}

	.hero-banner {
		flex: 1 0 auto;
	}

	.hero-banner .container,
	.hero-banner-content {
		height: 100%;
	}

	.hero-banner-content {
		padding: 20px 20px 24px;
	}

	.hero-excerpt {
		font-size: .95rem;
	}

	/* Inhalt: etwas mehr Luft an den Rändern der Karte */
	.content-layout {
		gap: 24px;
		padding-top: 24px;
		padding-bottom: 40px;
	}

	.entry {
		margin-bottom: 24px;
	}

	/* Spalten mit Abstand untereinander */
	.entry-content .wp-block-columns {
		gap: 20px;
	}

	/* PDF: Handys zeigen eingebettete PDFs kaum an – dort nur Name und Buttons */
	.entry-content .wp-block-file .wp-block-file__embed {
		display: none;
	}

	.entry-content .wp-block-file {
		padding: 14px 16px;
	}

	.entry-content .wp-block-file .wp-block-file__button {
		flex: 1 0 100%;
		justify-content: center;
		text-align: center;
	}

	/* Tabellen seitlich scrollbar statt gequetscht */
	.entry-content table {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	/* Fußleiste: Text und Nach-oben-Knopf sauber umbrechen */
	.site-info .container {
		align-items: flex-start;
	}
}

/* ==========================================================================
   13. Fußbereich (ab 1.2.1)
   ========================================================================== */

.footer-widget-area {
	padding: 56px 0 40px;
	border-top: 4px solid var(--elsbach-accent);
	background: #fff;
}

.footer-grid {
	display: grid;
	grid-template-columns: minmax(220px, 1fr) minmax(0, 2.4fr);
	gap: 48px;
	align-items: start;
}

.footer-grid.is-brand-only {
	grid-template-columns: minmax(0, 1fr);
	justify-items: center;
	text-align: center;
}

.footer-grid .footer-columns {
	gap: 40px;
}

.footer-logo {
	display: inline-block;
}

.footer-logo-img {
	width: auto;
	max-width: 220px;
	max-height: 90px;
	height: auto;
}

.footer-logo-text {
	color: var(--elsbach-heading);
	font-size: 1.6rem;
	font-weight: 700;
}

.footer-tagline {
	margin: 14px 0 0;
	color: var(--elsbach-accent);
	font-style: italic;
}

.footer-widget-area .widget-title {
	position: relative;
	margin-bottom: 1em;
	padding-bottom: .6em;
	font-size: .95rem;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.footer-widget-area .widget-title::after {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 32px;
	height: 3px;
	background: var(--elsbach-accent);
	content: "";
}

.footer-widget-area .widget {
	color: var(--elsbach-text);
	font-size: .95rem;
	line-height: 1.7;
}

.footer-widget-area .widget p:last-child {
	margin-bottom: 0;
}

.footer-widget-area .widget li {
	padding: 4px 0;
	border: 0;
}

/* Blaue Leiste */
.site-info {
	padding: 20px 0;
	font-size: .88rem;
}

.site-info .container {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 28px;
}

.site-info-text {
	margin-right: auto;
}

.footer-links-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 22px;
	margin: 0;
	padding: 0;
	list-style: none;
}

html body .site-info .footer-links a,
html body .site-info .footer-links a:visited {
	border-bottom: 1px solid rgba(255, 255, 255, .45);
	color: #fff;
	text-decoration: none;
	transition: border-color .2s ease;
}

html body .site-info .footer-links a:hover,
html body .site-info .footer-links a:focus-visible {
	border-bottom-color: #fff;
}

.site-info .back-top-btn {
	border-radius: var(--elsbach-round);
	transition: background-color .2s ease, color .2s ease;
}

html body .site-info a.back-top-btn:hover {
	background: #fff;
	color: var(--elsbach-accent) !important;
}

@media (max-width: 900px) {
	.footer-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 36px;
	}
}

@media (max-width: 767px) {
	.footer-widget-area {
		padding: 40px 0 28px;
	}

	.site-info .container {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.site-info-text {
		margin-right: 0;
	}

	.footer-links-list {
		justify-content: center;
	}
}


/* Kontakt im Fußbereich */
.footer-contact-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer-contact-list li,
.footer-contact-list-item {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	margin: 0 0 .7em;
	color: var(--elsbach-text);
	font-size: .95rem;
	line-height: 1.6;
}

.footer-contact-list .icon,
.footer-contact-list-item .icon {
	flex: none;
	width: 18px;
	height: 18px;
	margin-top: .2em;
	color: var(--elsbach-accent);
}

.footer-contact-list address {
	font-style: normal;
}
