/*
 * Layout „Kunterbunt Second Hand“
 * =================================
 *
 * Was:   Bildet das bisherige Design (World4You-Baukasten, Vorlage „cm_dh_091“)
 *        nach: weiße Kopfzeile mit Logo und Menü, grünes Band, Inhalt in 75 %
 *        Breite, Kontaktbox und grüne Fußzeile.
 * Warum: Die Website soll nach dem Umzug auf WordPress genau so aussehen wie
 *        vorher. Alle Maße stammen aus der Vermessung der Original-Seite
 *        (Stand 13.11.2026) und sind bei der jeweiligen Regel genannt.
 * Wie:   Farben, Schrift und Grundabstände kommen aus theme.json und werden
 *        hier über die CSS-Variablen von WordPress benutzt. Der Code ist nicht
 *        aus dem Original kopiert, sondern neu geschrieben.
 *
 * Bildschirmbreiten wie im Original:
 *   - Desktop:            ab 1251 px
 *   - kleiner Desktop:    1024 – 1250 px (Menü wird zum Burger-Knopf)
 *   - Tablet:             768 – 1023 px  (grünes Band untereinander)
 *   - Handy:              bis 767 px
 *
 * Ein „Leerzeile“-Abstand entspricht 25,2 px (18 px Schrift × 1,4 Zeilenhöhe).
 * Das ist der Grundabstand zwischen Blöcken (theme.json → blockGap).
 */

/* -------------------------------------------------------------------------
 * 1. Grundgerüst
 * ---------------------------------------------------------------------- */

html,
body {
	margin: 0;
	padding: 0;
}

/* Seite als Spalte: Inhalt wächst, Fußzeile bleibt unten (wie im Original). */
.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	padding: 0;
}

/* Zwischen den großen Seitenteilen (Kopf, Inhalt, Kontaktbox, Fuß) gibt es
   im Original keinen Abstand. WordPress würde sonst den Blockabstand setzen. */
.wp-site-blocks > * {
	margin-block: 0 !important;
}

.wp-site-blocks > main,
.wp-site-blocks > .kb-main {
	flex: 1 0 auto;
	background-color: var(--wp--preset--color--weiss);
}

.wp-site-blocks > footer {
	flex-shrink: 0;
}

/* Lange Wörter umbrechen statt die Seite zu verbreitern (Original: word-wrap). */
.wp-site-blocks {
	overflow-wrap: break-word;
	overflow-x: hidden;
}

/* Text nur für Bildschirmleser (z. B. „Menü öffnen“). */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

/* -------------------------------------------------------------------------
 * 2. Kopfzeile: Logo links, Menü rechts (weiß, 160 px hoch)
 * ---------------------------------------------------------------------- */

.kb-header {
	position: relative;
	display: flex;
	align-items: stretch;
	height: 160px;
	background-color: var(--wp--preset--color--weiss);
}

/* Logo-Feld 460 × 160 px; das quadratische Signet sitzt bei 89 % der Breite
   (Original: background-position 89% 50%, Höhe 100 %). */
body .kb-header .kb-header__logo {
	position: relative;
	flex: 0 0 460px;
	width: 460px;
	height: 160px;
	margin: 0;
	line-height: 0;
}

body .kb-header .kb-header__logo a {
	position: absolute;
	top: 0;
	left: calc((100% - 160px) * 0.89);
	display: block;
}

body .kb-header .kb-header__logo img {
	display: block;
	width: auto;
	height: 160px;
}

/* Hauptmenü: Einträge unten und mittig im restlichen Platz. */
body .kb-header .kb-header__navigation {
	flex: 1 1 auto;
	height: 160px;
	margin: 0;
}

body .kb-header .kb-header__navigation ul.wp-block-navigation__container {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: center;
	align-content: flex-end;
	align-items: flex-end;
	gap: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}

body .kb-header .kb-header__navigation li.wp-block-navigation-item {
	position: relative;
	display: block;
	align-self: flex-end;
	margin: 0;
	/* Original: padding 10px 0 35px; ergibt mit 25,2 px Zeile 70 px Höhe. */
	padding: 10px 0 35px;
	line-height: 1.4;
}

body .kb-header .kb-header__navigation a.wp-block-navigation-item__content.wp-block-navigation-item__content {
	display: inline;
	margin: 0 15px;
	padding: 0;
	color: var(--wp--preset--color--gruen);
	font-size: 18px;
	line-height: normal;
	text-decoration: none;
}

/* Grüner Unterstrich (3 px), der beim Überfahren aus der Mitte wächst und
   beim aktuellen Menüpunkt dauerhaft sichtbar ist. */
body .kb-header .kb-header__navigation li.wp-block-navigation-item::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 50%;
	display: block;
	width: 0;
	height: 3px;
	background-color: var(--wp--preset--color--gruen);
	opacity: 0;
	visibility: hidden;
	transition:
		width 0.3s cubic-bezier(0.5, 0.02, 0.38, 1.5),
		left 0.3s cubic-bezier(0.5, 0.02, 0.38, 1.5);
}

body .kb-header .kb-header__navigation li.wp-block-navigation-item:hover::after,
body .kb-header .kb-header__navigation li.wp-block-navigation-item:focus-within::after,
body .kb-header .kb-header__navigation li.current-menu-item::after {
	left: 0;
	width: 100%;
	opacity: 1;
	visibility: visible;
}

/* -------------------------------------------------------------------------
 * 3. Mobiles Menü: Burger-Knopf und Seitenleiste von links
 * ---------------------------------------------------------------------- */

/* Burger-Knopf (45 × 35 px, drei grüne Balken). Er bleibt beim Scrollen
   oben links stehen (Original: position fixed, 1 % vom Rand). */
.kb-menu-toggle {
	display: none;
	position: fixed;
	z-index: 302;
	top: calc(1vh + 7px);
	left: calc(1vw + 7px);
	width: 45px;
	height: 35px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

/* Größere Klickfläche als der sichtbare Knopf. */
.kb-menu-toggle::before {
	content: "";
	position: absolute;
	top: -30%;
	left: -25%;
	width: 150%;
	height: 160%;
}

.kb-menu-toggle__bar {
	position: absolute;
	left: 0;
	width: 100%;
	height: 4px;
	background-color: var(--wp--preset--color--gruen);
	opacity: 1;
	transform: rotate(0);
	transform-origin: center;
	transition:
		top 0.25s ease-in-out 0.25s,
		bottom 0.25s ease-in-out 0.25s,
		transform 0.25s ease-in-out,
		opacity 0.18s ease-in-out;
}

.kb-menu-toggle__bar--top {
	top: 0;
}

.kb-menu-toggle__bar--middle {
	top: 50%;
	transform: translateY(-50%);
}

.kb-menu-toggle__bar--bottom {
	bottom: 0;
}

/* Geöffnet: aus den drei Balken wird ein X. */
.kb-menu-is-open .kb-menu-toggle__bar--top {
	top: 50%;
	transform: rotate(45deg) translateY(-50%);
	transition: transform 0.25s ease-in-out 0.25s, top 0.25s ease-in-out;
}

.kb-menu-is-open .kb-menu-toggle__bar--middle {
	opacity: 0;
}

.kb-menu-is-open .kb-menu-toggle__bar--bottom {
	bottom: 50%;
	transform: rotate(-45deg) translateY(50%);
	transition: transform 0.25s ease-in-out 0.25s, bottom 0.25s ease-in-out;
}

/* Seitenleiste: weiß, gleitet von links herein. */
body .kb-mobile-menu {
	display: none;
	position: fixed;
	z-index: 300;
	top: 0;
	left: -101%;
	box-sizing: border-box;
	width: 40%;
	height: 100%;
	margin: 0 !important;
	padding: 105px 0 20px;
	overflow: auto;
	background-color: var(--wp--preset--color--weiss);
	visibility: hidden;
	transition: left 0.3s ease-in-out, visibility 0s linear 0.3s;
}

.kb-menu-is-open .kb-mobile-menu {
	left: 0;
	visibility: visible;
	transition: left 0.3s ease-in-out, visibility 0s linear 0s;
}

body .kb-mobile-menu .wp-block-navigation,
body .kb-mobile-menu ul.wp-block-navigation__container {
	display: block;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

body .kb-mobile-menu li.wp-block-navigation-item {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
}

/* Doppelte Klasse: WordPress setzt die Linkfarbe im Menü mit
   „.wp-block-navigation .wp-block-navigation-item__content.wp-block-navigation-item__content“
   auf „inherit“; diese Regel muss stärker sein. */
body .kb-mobile-menu .wp-block-navigation a.wp-block-navigation-item__content.wp-block-navigation-item__content {
	display: block;
	padding: 10px 10px 10px 20px;
	color: var(--wp--preset--color--gruen);
	font-size: 18px;
	line-height: normal;
	text-decoration: none;
}

body .kb-mobile-menu .wp-block-navigation li.current-menu-item > a.wp-block-navigation-item__content.wp-block-navigation-item__content {
	background-color: var(--wp--preset--color--gruen);
	color: var(--wp--preset--color--weiss);
}

/* Halbdurchsichtiger weißer Schleier über der Seite, solange das Menü offen ist. */
.kb-menu-backdrop {
	position: fixed;
	z-index: 299;
	inset: 0;
	background-color: rgba(255, 255, 255, 0.6);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.kb-menu-is-open .kb-menu-backdrop {
	opacity: 1;
	visibility: visible;
}

/* -------------------------------------------------------------------------
 * 4. Grünes Band unter der Kopfzeile
 * ---------------------------------------------------------------------- */

body .kb-head-band {
	margin: 0;
	background-color: var(--wp--preset--color--gruen);
}

/* Startseite: Diaschau links (65 %, 720 px hoch), Adresse rechts (35 %). */
body .kb-head-band--front {
	display: flex;
	align-items: flex-start;
}

body .kb-head-band--front > .kb-slideshow {
	flex: 0 0 65%;
	width: 65%;
	height: 720px;
	margin: 0;
}

body .kb-head-band__info {
	flex: 0 0 35%;
	box-sizing: border-box;
	max-height: 720px;
	margin: 0 0 0 auto;
	padding: 20px;
	overflow: auto;
	color: var(--wp--preset--color--weiss);
}

/* Die Adresszeilen stehen ohne Leerzeile direkt untereinander. */
body .kb-head-band__info > * {
	margin-block: 0;
}

body .kb-head-band__info a {
	color: var(--wp--preset--color--weiss);
}

/* Unterseiten: nur ein schmales grünes Band (20 px + eine Zeile + 20 px). */
body .kb-head-band--plain {
	height: 65.2px;
}

/* -------------------------------------------------------------------------
 * 5. Inhaltsbereich (75 % der Fensterbreite, mittig)
 *
 * Die Regeln gelten auch im Seiten-Editor, wenn dort nur der Inhalt (ohne
 * Vorlage) angezeigt wird: Dann fehlt der Rahmen .kb-content, und der
 * Inhalt steckt direkt in .is-root-container.wp-block-post-content.
 * :where() sorgt dafür, dass sich die Gewichtung der Regeln (Spezifität)
 * auf der Website nicht ändert.
 * ---------------------------------------------------------------------- */

body :is(.kb-content, :where(.is-root-container.wp-block-post-content)) {
	box-sizing: border-box;
	width: 75%;
	margin: 0 auto !important;
	/* Original: 3.75em oben und unten = 67,5 px. */
	padding: 3.75em 0;
}

/* Absätze haben unten keinen eigenen Abstand; den Abstand nach oben regelt
   WordPress als Blockabstand (eine Leerzeile). Darum hier bewusst nur
   margin-bottom – ein margin-top würde den Blockabstand überschreiben. */
body :is(.kb-content, :where(.is-root-container.wp-block-post-content)) p,
body .kb-contact-box p {
	margin-bottom: 0;
}

body :is(.kb-content, :where(.is-root-container.wp-block-post-content)) h1,
body :is(.kb-content, :where(.is-root-container.wp-block-post-content)) h2,
body :is(.kb-content, :where(.is-root-container.wp-block-post-content)) h3,
body :is(.kb-content, :where(.is-root-container.wp-block-post-content)) h4 {
	margin-bottom: 0;
}

/* Blocksatz – im Original für die meisten Fließtexte verwendet.
   Im Editor als Block-Stil „Blocksatz“ beim Absatz wählbar. */
.is-style-justify {
	text-align: justify;
}

/* Regel für Leerzeilen:
   - Zwischen zwei Blöcken steht automatisch genau eine Leerzeile (25,2 px).
   - Wo das Original mehr oder weniger Platz hat (oder am Anfang/Ende einer
     Spalte), steht ein Abstandhalter. Er ERSETZT dann den automatischen
     Abstand: Abstandhalter mit 50,4 px = genau zwei Leerzeilen.
   - Blöcke, die ganz ohne Abstand anschließen, bekommen die Klasse
     „kb-gap-none“ (Erweitert → Zusätzliche CSS-Klasse). */
body :is(.kb-content, :where(.is-root-container.wp-block-post-content)) .wp-block-spacer,
body :is(.kb-content, :where(.is-root-container.wp-block-post-content)) .wp-block-spacer + * {
	margin-block-start: 0 !important;
}

body :is(.kb-content, :where(.is-root-container.wp-block-post-content)) .kb-gap-none {
	margin-block-start: 0 !important;
}

/* Aufzählungen (z. B. Terminbuchung): Original 30 px Einzug, Punkte,
   10 px Abstand zwischen den Einträgen. */
body :is(.kb-content, :where(.is-root-container.wp-block-post-content)) .wp-block-list {
	margin-top: 0;
	margin-bottom: 0;
	padding-left: 30px;
}

body :is(.kb-content, :where(.is-root-container.wp-block-post-content)) .wp-block-list li {
	margin-bottom: 10px;
}

/* Bilder in Spalten: im Original teils 98,9 % bzw. 99,3 % der Spaltenbreite.
   Im Editor über „Breite“ in Prozent einstellbar; mittig ausgerichtet. */
body :is(.kb-content, :where(.is-root-container.wp-block-post-content)) .wp-block-image {
	text-align: center;
}

/* Zwei Spalten: im Original Tabellenzellen mit 50 % und 15–20 px Lücke. */
body .wp-block-columns {
	margin-bottom: 0;
}

/* Bilder: im Original hat jedes Bild 5 px Luft oben und unten. */
body :is(.kb-content, :where(.is-root-container.wp-block-post-content)) .wp-block-image {
	margin-bottom: 0;
	padding-block: 5px;
}

body :is(.kb-content, :where(.is-root-container.wp-block-post-content)) .wp-block-image img {
	vertical-align: top;
}

/* -------------------------------------------------------------------------
 * 6. Knöpfe (abgerundet, grün; beim Überfahren weiß mit grüner Schrift)
 * ---------------------------------------------------------------------- */

body .wp-block-buttons {
	gap: 0;
	padding-block: 5px;
}

body .wp-block-button__link,
body .wp-element-button.wp-block-button__link {
	box-sizing: border-box;
	display: block;
	width: 230px;
	max-width: 100%;
	padding: 15px;
	border: 1px solid var(--wp--preset--color--gruen);
	border-radius: 15px;
	background-color: var(--wp--preset--color--gruen);
	color: var(--wp--preset--color--weiss);
	font-size: 18px;
	line-height: 1.5;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.45s, color 0.35s;
}

body .wp-block-button__link:hover,
body .wp-block-button__link:focus-visible {
	background-color: var(--wp--preset--color--weiss);
	color: var(--wp--preset--color--gruen);
}

/* -------------------------------------------------------------------------
 * 7. Kontaktbox (auf jeder Seite über der Fußzeile)
 * ---------------------------------------------------------------------- */

body .kb-contact-box {
	margin: 0;
	background-color: var(--wp--preset--color--weiss);
}

body .kb-contact-box .kb-content > * {
	margin-block: 0;
}

/* Abstände aus dem Original nachgerechnet (oben 67,5 px Innenabstand):
   Schriftzug beginnt bei 125,9 px, Adresse bei 337,1 px usw. */
body .kb-contact-box .kb-contact-box__logo {
	/* Im Original steckt der Schriftzug in einer Tabelle mit -5 px Rand;
	   dadurch sitzt er 5 px links von der Mitte. */
	position: relative;
	left: -5px;
	display: block;
	width: 400px;
	/* Auf schmalen Bildschirmen 10 px schmaler als die Spalte (Original). */
	max-width: calc(100% - 10px);
	margin: 58.4px auto 0;
	padding: 0;
}

body .kb-contact-box .kb-contact-box__logo img {
	display: block;
	width: 100% !important;
	max-width: 100%;
	height: auto;
}

/* Auf dem Handy steht der Schriftzug links bündig (Original).
   !important nötig: WordPress zentriert Bilder mit
   „.is-layout-flow > .aligncenter { margin-left: auto !important }“. */
@media only screen and (max-width: 430px) {
	body .kb-contact-box .kb-contact-box__logo {
		left: 0;
		margin-left: 0 !important;
	}
}

body .kb-contact-box .kb-contact-box__address {
	margin-top: 40.2px;
}

/* Symbole für Instagram, Facebook, E-Mail, WhatsApp und Telefon.
   Schrift „FontAwesome 4.7“ (SIL OFL 1.1) liegt im Theme. */
@font-face {
	font-family: "FontAwesome";
	src: url("../fonts/fontawesome-webfont.woff2") format("woff2");
	font-weight: normal;
	font-style: normal;
	font-display: block;
}

body .kb-contact-box .kb-social-icons {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	/* 3 Leerzeilen + 5 px oben, 5 px + 2 Leerzeilen unten (Original). */
	margin: 80.6px 0 55.4px;
	padding: 0;
	font-size: 36px;
	line-height: 1.4;
	list-style: none;
}

.kb-social-icons li {
	width: 1.66em;
	height: 1.66em;
	margin: 0;
	padding: 0;
}

.kb-social-icons a {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: var(--kb-icon-color, inherit);
	text-decoration: none;
}

.kb-icon {
	display: block;
	width: 1em;
	height: 1em;
	margin: auto;
	font: normal normal normal 1em/1 FontAwesome;
	text-align: center;
	text-rendering: auto;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.kb-icon--instagram::before { content: "\f16d"; }
.kb-icon--facebook::before  { content: "\f09a"; }
.kb-icon--email::before     { content: "\f0e0"; }
.kb-icon--whatsapp::before  { content: "\f232"; }
.kb-icon--phone::before     { content: "\f095"; }

/* -------------------------------------------------------------------------
 * 8. Fußzeile (grün, weiße Links)
 * ---------------------------------------------------------------------- */

body .kb-footer {
	margin: 0;
	background-color: var(--wp--preset--color--gruen);
	color: var(--wp--preset--color--weiss);
}

body .kb-footer .kb-footer__links {
	max-width: 75%;
	margin: 0 auto;
	padding: 50px 0;
	text-align: center;
}

body .kb-footer a {
	color: var(--wp--preset--color--weiss);
	text-decoration: none;
}

/* -------------------------------------------------------------------------
 * 9. Overlay für Impressum, AGB und Datenschutz
 * ---------------------------------------------------------------------- */

.kb-legal-dialog {
	box-sizing: border-box;
	width: min(800px, calc(100% - 32px));
	max-width: none;
	max-height: calc(100vh - 64px);
	padding: 0;
	border: 0;
	border-radius: 15px;
	background-color: var(--wp--preset--color--weiss);
	color: var(--wp--preset--color--text);
	font-family: var(--wp--preset--font-family--krub);
	font-size: 18px;
	line-height: 1.4;
	box-shadow: 0 10px 40px rgba(29, 29, 27, 0.35);
	overflow: hidden;
}

.kb-legal-dialog[open] {
	display: flex;
	flex-direction: column;
}

.kb-legal-dialog::backdrop {
	background-color: rgba(29, 29, 27, 0.6);
}

.kb-legal-dialog__bar {
	display: flex;
	justify-content: flex-end;
	padding: 12px 12px 0;
}

.kb-legal-dialog__close {
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--wp--preset--color--gruen);
	border-radius: 50%;
	background-color: var(--wp--preset--color--gruen);
	color: var(--wp--preset--color--weiss);
	font-family: inherit;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.45s, color 0.35s;
}

.kb-legal-dialog__close:hover,
.kb-legal-dialog__close:focus-visible {
	background-color: var(--wp--preset--color--weiss);
	color: var(--wp--preset--color--gruen);
}

.kb-legal-dialog__body {
	padding: 0 40px 40px;
	overflow: auto;
}

/* Wie auf den Seiten: eine Leerzeile zwischen den Absätzen. */
.kb-legal-dialog__body > * {
	margin-top: 25.2px;
	margin-bottom: 0;
}

.kb-legal-dialog__body > :first-child {
	margin-top: 0;
}

.kb-legal-dialog__body h1,
.kb-legal-dialog__body h2,
.kb-legal-dialog__body h3 {
	margin-bottom: 0;
	color: var(--wp--preset--color--gruen);
	font-weight: 400;
	line-height: 1.4;
}

.kb-legal-dialog__body a {
	color: var(--wp--preset--color--gruen);
}

/* Während das Overlay offen ist, scrollt die Seite dahinter nicht mit. */
.kb-legal-is-open {
	overflow: hidden;
}

/* -------------------------------------------------------------------------
 * 10. Kleiner Desktop (1024 – 1250 px): Menü wird zum Burger-Knopf
 * ---------------------------------------------------------------------- */

@media only screen and (max-width: 1250px) {
	.kb-header {
		display: block;
		height: 70px;
	}

	/* Logo 70 px hoch, mittig (Original: 300 px Feld, Inhalt zentriert). */
	body .kb-header .kb-header__logo {
		width: 300px;
		height: 70px;
		margin: 0 auto;
	}

	body .kb-header .kb-header__logo a {
		left: calc(50% - 35px);
	}

	body .kb-header .kb-header__logo img {
		height: 70px;
	}

	body .kb-header .kb-header__navigation {
		display: none !important;
	}

	.kb-menu-toggle,
	body .kb-mobile-menu {
		display: block;
	}

	body .kb-head-band--front > .kb-slideshow {
		height: 515px;
	}

	body .kb-head-band__info {
		max-height: 515px;
		padding: 10px;
	}

	/* Ohne Diaschau rutscht im Original der Text 80 px nach unten, damit der
	   Burger-Knopf nichts verdeckt. */
	body .kb-head-band--plain {
		height: 145.2px;
	}

	body .kb-footer {
		padding: 30px 0;
	}
}

/* -------------------------------------------------------------------------
 * 11. Tablet (768 – 1023 px): grünes Band untereinander
 * ---------------------------------------------------------------------- */

@media only screen and (max-width: 1023px) {
	body .kb-head-band--front {
		display: block;
	}

	body .kb-head-band--front > .kb-slideshow {
		width: 100%;
		height: 576px;
	}

	body .kb-head-band__info {
		width: 95%;
		max-height: none;
		margin: 0 auto;
		padding: 40px 0;
		overflow: visible;
	}

	body :is(.kb-content, :where(.is-root-container.wp-block-post-content)) {
		width: 95%;
		padding: 1.875em 0;
	}

	body .kb-mobile-menu {
		width: 70%;
	}

	body .kb-footer {
		padding: 20px 0;
	}

	body .kb-footer .kb-footer__links {
		max-width: 95%;
	}
}

/* -------------------------------------------------------------------------
 * 12. Handy (bis 767 px)
 * ---------------------------------------------------------------------- */

@media only screen and (max-width: 767px) {
	/* Logo-Feld 280 px rechtsbündig (Original), Signet mittig darin. */
	body .kb-header .kb-header__logo {
		width: 280px;
		margin: 0 0 0 auto;
	}

	body .kb-head-band--front > .kb-slideshow {
		height: 430px;
	}

	body .kb-head-band__info {
		width: 90%;
	}

	body :is(.kb-content, :where(.is-root-container.wp-block-post-content)) {
		width: 90%;
	}

	body .kb-mobile-menu {
		width: 100%;
	}

	body .kb-footer .kb-footer__links {
		max-width: 90%;
	}

	.kb-legal-dialog {
		width: calc(100% - 16px);
		max-height: calc(100vh - 16px);
	}

	.kb-legal-dialog__body {
		padding: 0 20px 24px;
	}
}

/* Handy quer: Logo-Feld wieder mittig (Original). */
@media only screen and (min-width: 480px) and (max-width: 767px) and (orientation: landscape) {
	body .kb-header .kb-header__logo {
		width: 300px;
		margin: 0 auto;
	}

	body :is(.kb-content, :where(.is-root-container.wp-block-post-content)),
	body .kb-head-band__info {
		width: 95%;
	}
}

/* Wer Bewegung reduziert haben möchte, bekommt keine Animationen. */
@media (prefers-reduced-motion: reduce) {
	.kb-menu-toggle__bar,
	.kb-mobile-menu,
	.kb-menu-backdrop,
	.wp-block-button__link,
	.kb-header__navigation li::after {
		transition: none !important;
	}
}

/* -------------------------------------------------------------------------
 * 11. Hauptüberschrift, häufige Fragen, Schalter „Barrierefrei“ (ab 1.3.0)
 * ---------------------------------------------------------------------- */

/* Die erste Überschrift jeder Seite ist technisch eine H1 (für Google und
   Screenreader), sieht aber aus wie die übrigen Überschriften. */
h1.kb-main-heading {
	font-size: var(--wp--preset--font-size--ueberschrift);
}

/* Häufige Fragen (Warenannahme): aufklappbar, Frage in Grün. */
body .kb-faq .wp-block-details {
	margin-block-start: 0;
	padding-block: 12px;
	border-bottom: 1px solid #d9dccf;
}

body .kb-faq .wp-block-details summary {
	color: var(--wp--preset--color--gruen);
	font-size: 20px;
	cursor: pointer;
}

body .kb-faq .wp-block-details summary:focus-visible {
	outline: 3px solid var(--wp--preset--color--gruen);
	outline-offset: 3px;
}

body .kb-faq .wp-block-details > p {
	margin-top: 8px;
}

/* Schalter oben rechts in der Kopfzeile. */
.kb-a11y-toggle {
	position: absolute;
	z-index: 5;
	top: 12px;
	right: 16px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 36px;
	padding: 4px 14px 4px 10px;
	border: 2px solid var(--wp--preset--color--gruen);
	border-radius: 999px;
	background: var(--wp--preset--color--weiss);
	color: var(--wp--preset--color--gruen);
	font-family: inherit;
	font-size: 15px;
	line-height: 1.2;
	cursor: pointer;
}

.kb-a11y-toggle[aria-pressed="true"] {
	background: var(--wp--preset--color--gruen);
	color: var(--wp--preset--color--weiss);
}

.kb-a11y-toggle:focus-visible {
	outline: 3px solid var(--wp--preset--color--text);
	outline-offset: 2px;
}

.kb-a11y-toggle__icon {
	flex: none;
}

@media only screen and (max-width: 1250px) {
	.kb-a11y-toggle {
		top: 17px;
		right: 12px;
	}
}

/* Schmale Handys: nur das Symbol; die Beschriftung bleibt für Screenreader. */
@media only screen and (max-width: 480px) {
	.kb-a11y-toggle {
		padding: 6px;
	}

	.kb-a11y-toggle__label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}
}

/* -------------------------------------------------------------------------
 * 12. Barrierefreie Ansicht (Schalter) und Systemeinstellung „Mehr Kontrast“
 *
 * Kontraste (WCAG): dunkles Oliv #4A5237 mit Weiß 8,2 : 1 (statt 3,9 : 1),
 * Text #1D1D1B auf Weiß 16,9 : 1. Das Grün ist als Variable gesetzt, damit
 * Kopf, Band, Knöpfe, Links, Überschriften und Fußzeile gemeinsam wechseln.
 * ---------------------------------------------------------------------- */

html.kb-a11y {
	--wp--preset--color--gruen: #4a5237;
	--wp--preset--font-size--normal: 22px;
	--wp--preset--font-size--ueberschrift: 27px;
}

@media (prefers-contrast: more) {
	/* html:root ist stärker als das :root, mit dem WordPress die Farbe setzt. */
	html:root {
		--wp--preset--color--gruen: #4a5237;
	}
}

html.kb-a11y body {
	line-height: 1.6;
}

html.kb-a11y :is(h3, h4),
html.kb-a11y body .kb-faq .wp-block-details summary {
	font-size: 24px;
}

html.kb-a11y body .wp-block-button__link,
html.kb-a11y .kb-legal-dialog {
	font-size: 22px;
}

html.kb-a11y :is(h1, h2, h3, h4, summary, strong) {
	font-weight: 700;
}

/* Kein Blocksatz: ungleiche Wortabstände erschweren das Lesen. */
html.kb-a11y .is-style-justify {
	text-align: left;
}

/* Links deutlich unterstrichen (auch in der Fußzeile). */
html.kb-a11y a:not(.wp-block-button__link, .wp-block-navigation-item__content, .kb-slideshow__link) {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

/* Dicker Fokusrahmen, sichtbar auf Weiß und auf Grün. */
html.kb-a11y :focus-visible {
	outline: 3px solid #fff !important;
	outline-offset: 2px !important;
	box-shadow: 0 0 0 6px #1d1d1b !important;
}

/* Einspaltig: Bild und Text untereinander statt nebeneinander. */
html.kb-a11y body .wp-block-columns {
	flex-wrap: wrap !important;
}

html.kb-a11y body .wp-block-column {
	flex-basis: 100% !important;
}

html.kb-a11y body .kb-head-band--front {
	flex-wrap: wrap;
}

html.kb-a11y body .kb-head-band--front > .kb-slideshow,
html.kb-a11y body .kb-head-band__info {
	flex-basis: 100%;
	width: 100%;
	max-height: none;
}

/* Punkte der Diaschau immer sichtbar (nicht erst beim Überfahren). */
html.kb-a11y .kb-slideshow__dots {
	opacity: 1;
}

/* Sichtbare Bildbeschreibung unter jedem Bild. */
.kb-alt-caption {
	display: block;
	margin-top: 6px;
	padding: 6px 10px;
	border-left: 4px solid var(--wp--preset--color--gruen);
	background: #f2f3ee;
	color: #1d1d1b;
	font-size: 0.85em;
	line-height: 1.4;
	text-align: left;
}

.kb-head-band .kb-alt-caption {
	box-sizing: border-box;
	flex-basis: calc(100% - 40px);
	margin: 0 20px 12px;
}

html.kb-a11y body .kb-head-band__info {
	padding: 12px 20px;
}
