/*
 * Startseite im Kampagnendesign "Wolfram Günther, OBM-Wahl Leipzig 2027"
 * Gilt nur für Seiten mit der Vorlage "Kampagnen-Startseite" und die Editor-Vorschau.
 *
 * Schrift: Obviously (OH no Type Company), lokal eingebunden.
 * Schnitte wie im Figma-Entwurf:
 *   Black (900)   Logo und Name im Kopfbereich
 *   Bold (700)    alle übrigen Überschriften, Zitat, Bänder, Buttons
 *   Regular (400) Fließtext, Menü, Formular, Fußzeile
 * Größen entsprechen dem Entwurf bei 1440 px Breite und wachsen darüber mit.
 */

@font-face {
	font-family: "WG Obviously";
	src: url("../fonts/obviously-regular.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "WG Obviously";
	src: url("../fonts/obviously-bold.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "WG Obviously";
	src: url("../fonts/obviously-black.woff2") format("woff2");
	font-weight: 900;
	font-style: normal;
	font-display: swap;
}

:root {
	--wg-tanne: #002c2d;
	--wg-petrol: #003c40;
	--wg-petrol-hell: #004c50;
	--wg-lime: #c8da20;
	--wg-lime-hell: #e3ec8f;
	--wg-pink: #ffd2e8;
	--wg-weiss: #ffffff;
	--wg-schrift-titel: "WG Obviously", "Arial Black", Arial, sans-serif;
	--wg-schrift-text: "WG Obviously", Arial, sans-serif;
	--wg-rand: clamp(20px, 5.56vw, 144px);
	--wg-abstand: clamp(48px, 5.56vw, 144px);
	--wg-text: clamp(16px, 1.111vw, 22px);
	--wg-titel-s: clamp(19px, 1.528vw, 40px);
	--wg-titel-m: clamp(22px, 2.083vw, 54px);
	--wg-titel-l: clamp(30px, 3.472vw, 90px);
	/* Höhe der fixierten Kopfzeile, auch Abstand für Sprungziele */
	--wg-kopf: clamp(64px, 5.56vw, 150px);
}

/* ---------- Grundlagen ---------- */

body.wg-startseite {
	margin: 0;
	background: var(--wg-weiss);
	color: var(--wg-petrol);
	font-family: var(--wg-schrift-text);
	-webkit-font-smoothing: antialiased;
}

.wg-section,
.wg-header,
.wg-footer {
	box-sizing: border-box;
	color: var(--wg-petrol);
	font-family: var(--wg-schrift-text);
	font-size: var(--wg-text);
	line-height: 1.5625;
	font-weight: 400;
	font-kerning: normal;
	font-synthesis: none;
	text-rendering: optimizeLegibility;
}

.wg-section *,
.wg-header *,
.wg-footer * {
	box-sizing: border-box;
}

/*
 * Schriften gegen Vorgaben von Astra oder alten Child-Theme-Regeln absichern
 * (z. B. eigene Schrift für p, a oder Menülinks).
 */
.wg-section,
.wg-header,
.wg-footer {
	font-family: var(--wg-schrift-text) !important;
}

.wg-section :is(p, ul, ol, li, a, span, label, cite, strong, em, figcaption, blockquote),
.wg-header :is(nav, ul, li, a, span),
.wg-footer :is(nav, ul, li, a, p, span) {
	font-family: inherit !important;
}

.wg-section :is(input, textarea, select) {
	font-family: var(--wg-schrift-text) !important;
}

.wg-section :is(h1, h2, h3, h4, .wg-hero__kicker),
.wg-zitat .wg-zitat__quote p,
.wg-header .wg-header__logo {
	font-family: var(--wg-schrift-titel) !important;
}

.wg-section h1,
.wg-section h2,
.wg-section h3,
.wg-section .wg-hero__kicker {
	font-family: var(--wg-schrift-titel);
	font-weight: 700;
	letter-spacing: 0;
	line-height: 1.2;
	color: inherit;
	margin: 0;
	text-transform: none;
}

.wg-section h2,
.wg-section h3 {
	font-size: var(--wg-titel-s);
}

.wg-section p {
	margin: 0 0 1.4em;
	color: inherit;
	font-size: inherit;
	line-height: inherit;
}

.wg-section p:last-child {
	margin-bottom: 0;
}

.wg-section a:not(.wp-block-button__link) {
	color: inherit;
}

.wg-section .wp-block-image {
	margin: 0;
}

/*
 * Klassische Themes (wie Astra) packen Gruppen-Blöcke in einen zusätzlichen
 * Container. Der wird hier "durchsichtig" gemacht, damit Raster und Abstände
 * unabhängig davon funktionieren.
 */
.wg-section .wp-block-group__inner-container,
.wg-section.wp-block-group > .wp-block-group__inner-container {
	display: contents;
}

/*
 * Schutz gegen Theme-Regeln, die Blöcke schmal und mittig setzen.
 * Bewusst mit !important, gilt aber nur innerhalb der Startseiten-Abschnitte.
 */
.wg-start .wg-section,
.wg-section .wp-block-group,
.wg-section .wp-block-image,
.wg-section .wp-block-columns,
.wg-section .wp-block-quote,
.editor-styles-wrapper .wg-section {
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

.editor-styles-wrapper .wg-section,
.wg-section.block-editor-block-list__block,
.wg-section .wp-block-group,
.wg-section .wp-block-image,
.wg-section .wp-block-columns {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}

.wg-section .wp-block-group__inner-container > * {
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

/*
 * Sprungziele aus dem Menü nicht unter der fixierten Kopfzeile verstecken.
 * WordPress setzt für eingeloggte Nutzer selbst einen Abstand für die
 * Admin-Leiste (scroll-padding). Den schalten wir auf dieser Seite ab und
 * rechnen die Leiste unten selbst ein, sonst zählt sie doppelt.
 */
html:has(> body.wg-startseite) {
	scroll-padding-top: 0 !important;
}

/*
 * 2 px Überlappung: Die Kopfzeilenhöhe ist oft kein ganzer Pixel, der Browser
 * scrollt aber nur in ganzen Pixeln. So bleibt nie ein dünner Streifen stehen.
 */

.wg-section[id] {
	scroll-margin-top: calc(var(--wg-kopf) - 2px);
}

.admin-bar .wg-section[id] {
	scroll-margin-top: calc(var(--wg-kopf) + 30px);
}

@media (max-width: 1279px) {
	:root {
		--wg-kopf: 64px;
	}
}

@media (max-width: 782px) {
	.admin-bar .wg-section[id] {
		scroll-margin-top: calc(var(--wg-kopf) + 44px);
	}
}

/* Unter 600 px scrollt die WordPress-Leiste mit, die Kopfzeile sitzt dann ganz oben */
@media (max-width: 600px) {
	.admin-bar .wg-section[id] {
		scroll-margin-top: calc(var(--wg-kopf) - 2px);
	}
}

/* Ausgewogene Zeilenumbrüche: keine einzelnen Wörter in der letzten Zeile */
.wg-section h1,
.wg-section h2,
.wg-section h3,
.wg-zitat .wg-zitat__quote p {
	text-wrap: balance;
}

.wg-section p {
	text-wrap: pretty;
}

/* Abschnitte laufen immer über die volle Breite */
.wg-start {
	display: block;
	overflow-x: clip;
}

.wg-start > .wg-section,
.wg-start > .alignfull {
	margin: 0 !important;
	width: 100%;
	max-width: none;
}

.wg-start > * + * {
	margin-block-start: 0 !important;
}

.wg-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	background: var(--wg-lime);
	color: var(--wg-petrol);
	padding: 12px 16px;
}

.wg-skip-link:focus {
	left: 8px;
	top: 8px;
}

/* ---------- Kopfzeile ---------- */

.wg-header {
	position: sticky;
	top: 0;
	z-index: 50;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: var(--wg-kopf);
	padding: 0 var(--wg-rand);
	background: var(--wg-tanne);
	color: var(--wg-weiss);
}

.admin-bar .wg-header {
	top: 32px;
}

.wg-header__logo,
.wg-header__logo:hover,
.wg-header__logo:visited {
	font-family: var(--wg-schrift-titel);
	font-weight: 900;
	font-size: clamp(20px, 2.083vw, 54px);
	line-height: 1;
	color: var(--wg-lime);
	text-decoration: none;
	white-space: nowrap;
}

.wg-menu {
	display: flex;
	gap: clamp(24px, 4.167vw, 108px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.wg-menu li {
	margin: 0;
	padding: 0;
}

.wg-header .wg-menu a {
	color: var(--wg-weiss);
	text-decoration: none;
	font-size: clamp(16px, 1.111vw, 28px);
	font-weight: 400;
	letter-spacing: 0;
	white-space: nowrap;
}

.wg-header .wg-menu a:hover,
.wg-header .wg-menu a:focus-visible {
	color: var(--wg-lime);
}

.wg-header__toggle {
	display: none;
}

/* ---------- Kopfbereich (Hero) ---------- */

.wg-hero {
	display: grid;
	grid-template-columns: 1fr 1fr;
	background: var(--wg-petrol);
}

.wg-hero__text {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: clamp(520px, 46.5vw, 760px);
	padding: clamp(28px, 3.47vw, 90px) var(--wg-rand) clamp(40px, 5vw, 130px);
	background: var(--wg-petrol) url("../img/hero-chevrons.svg") right top / auto 100% repeat-x;
	color: var(--wg-weiss);
}

.wg-hero .wg-social {
	gap: clamp(24px, 2.85vw, 74px);
	margin: 0;
	padding: 0;
}

.wg-hero .wg-social .wp-social-link {
	color: var(--wg-weiss);
	background: none;
}

.wg-hero .wg-social .wp-social-link a {
	padding: 0;
	color: var(--wg-weiss);
}

.wg-hero .wg-social .wp-social-link svg {
	width: clamp(38px, 3.53vw, 92px);
	height: clamp(38px, 3.53vw, 92px);
	fill: currentColor;
}

.wg-hero .wg-social .wp-social-link:hover {
	color: var(--wg-lime);
	transform: none;
}

.wg-section .wg-hero__text .wg-hero__claim {
	margin-top: auto !important;
	margin-bottom: auto !important;
	padding-top: 0;
	text-align: center;
}

.wg-section .wg-hero__kicker {
	color: var(--wg-pink);
	font-size: clamp(26px, 2.778vw, 72px);
	line-height: 1.2;
	margin-bottom: 0.4em;
}

.wg-section h1.wg-hero__name {
	color: var(--wg-weiss);
	font-weight: 900;
	font-size: clamp(52px, 6.25vw, 162px);
	line-height: 1;
	letter-spacing: 0;
}

.wg-section .wg-hero__sub {
	margin-top: 1.4em;
	font-size: clamp(18px, 1.528vw, 40px);
	line-height: 1.364;
	letter-spacing: 0;
}

.wg-hero__bild,
.wg-hero__bild img {
	height: 100% !important;
	width: 100% !important;
}

.wg-hero__bild img {
	display: block;
	object-fit: cover;
	object-position: 50% 0;
}

/* ---------- Bänder mit Pfeilen ---------- */

.wg-band {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: clamp(110px, 9.72vw, 250px);
	padding: 24px var(--wg-rand);
	text-align: center;
	background-repeat: repeat-x;
	background-position: left center;
	background-size: auto 100%;
}

.wg-band--lime {
	background-color: var(--wg-lime);
	background-image: url("../img/band-lime.svg");
}

.wg-band--dunkel {
	background-color: var(--wg-petrol);
	background-image: url("../img/band-dunkel.svg");
	color: var(--wg-weiss);
}

.wg-section .wg-band__titel {
	font-size: var(--wg-titel-l);
	line-height: 1.1;
}

.wg-band--lime .wg-band__titel {
	color: var(--wg-petrol);
}

/* ---------- Vorstellung ---------- */

.wg-intro {
	padding: clamp(36px, 3.6vw, 96px) var(--wg-rand) clamp(44px, 4.8vw, 124px);
}

.wg-section .wg-intro__titel {
	margin-bottom: clamp(32px, 3.4vw, 48px);
	text-align: center;
	font-size: var(--wg-titel-s);
}

.wg-intro .wg-spalten {
	gap: clamp(24px, 3.4vw, 48px);
	margin: 0;
}

/* ---------- Zitat ---------- */

.wg-zitat {
	padding: clamp(30px, 2.9vw, 76px) max(var(--wg-rand), 11.1vw) clamp(32px, 3vw, 78px);
	background: var(--wg-lime-hell);
	text-align: center;
}

/*
 * WordPress und Astra geben Zitaten einen Balken links und einen Einzug
 * (u. a. ".wp-block-quote:not(.is-large):not(.is-style-large)"), deshalb !important.
 */
.wg-zitat .wg-zitat__quote,
.wg-zitat blockquote.wp-block-quote {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: none !important;
	box-shadow: none !important;
	font-style: normal;
	quotes: none;
}

.wg-zitat .wg-zitat__quote::before,
.wg-zitat .wg-zitat__quote::after {
	content: none;
}

.wg-zitat .wg-zitat__quote p {
	margin: 0;
	font-family: var(--wg-schrift-titel);
	font-weight: 700;
	font-style: normal;
	font-size: var(--wg-titel-m);
	line-height: 1.333;
	letter-spacing: 0;
	color: var(--wg-petrol);
}

.wg-zitat .wg-zitat__quote cite {
	display: block;
	margin-top: 1.5em;
	font-size: var(--wg-text);
	font-style: normal;
	color: var(--wg-petrol);
}

/* ---------- Zweispalter Text/Bild ---------- */

.wg-split {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: stretch;
	/* Auf breiten Bildschirmen wächst die Höhe mit, damit Fotos kein Panorama werden */
	min-height: min(35vw, 900px);
}

.wg-split__text {
	padding: clamp(36px, 3.6vw, 96px) var(--wg-rand) clamp(48px, 5.3vw, 136px);
	align-self: start;
}

.wg-section .wg-split__text > *,
.wg-section .wg-split__text > .wp-block-group__inner-container > * {
	max-width: max(500px, 34.7vw) !important;
}

.wg-split__text h2 {
	margin-bottom: clamp(20px, 2.2vw, 58px) !important;
}

.wg-split__bild {
	width: 100%;
	min-height: 100%;
	position: relative;
}

.wg-split__bild img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	/* Bildausschnitt eher oben halten: Köpfe bleiben sichtbar */
	object-position: 50% 15%;
	display: block;
}

/*
 * Bildausschnitt pro Foto anpassen: im Editor beim Bild unter
 * Erweitert > "Zusätzliche CSS-Klasse(n)" eintragen.
 */
.wg-split__bild.wg-fokus-oben img {
	object-position: 50% 0;
}

.wg-split__bild.wg-fokus-mitte img {
	object-position: 50% 50%;
}

.wg-split__bild.wg-fokus-unten img {
	object-position: 50% 100%;
}

.wg-split--bild-links .wg-split__text {
	padding-left: clamp(20px, 4.5vw, 64px);
}

.wg-split .wp-block-buttons {
	margin-top: clamp(40px, 4.8vw, 70px);
}

/* ---------- Kacheln "Das habe ich vor" ---------- */

.wg-kacheln {
	display: grid;
	grid-template-columns: 1fr 1fr;
}

.wg-kachel {
	padding: clamp(32px, 3.6vw, 96px) clamp(20px, 5vw, 128px) clamp(40px, 4.8vw, 124px) var(--wg-rand);
	background: var(--wg-lime-hell);
}

.wg-kachel:nth-child(even) {
	padding-left: clamp(20px, 4.5vw, 64px);
}

.wg-kachel:nth-child(4n + 2),
.wg-kachel:nth-child(4n + 3) {
	background: var(--wg-pink);
}

.wg-kachel h3 {
	margin-bottom: clamp(14px, 1.7vw, 44px) !important;
}

.wg-section .wg-kachel > *,
.wg-section .wg-kachel > .wp-block-group__inner-container > * {
	max-width: max(535px, 37.2vw) !important;
}

/* ---------- Banner ---------- */

.wg-banner {
	padding: clamp(28px, 2.5vw, 66px) var(--wg-rand);
	background: var(--wg-lime);
	text-align: center;
}

.wg-section .wg-banner__titel {
	font-size: var(--wg-titel-m);
	line-height: 1.333;
}

.wg-section .wg-banner__link {
	margin: clamp(10px, 0.9vw, 24px) 0 0;
	font-family: var(--wg-schrift-titel) !important;
	font-weight: 700;
	font-size: var(--wg-titel-s);
	line-height: 1.3;
}

.wg-section .wg-banner__link a,
.wg-section .wg-banner__link a:visited {
	color: var(--wg-petrol);
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 5px;
}

.wg-section .wg-banner__link a:hover,
.wg-section .wg-banner__link a:focus-visible {
	text-decoration-thickness: 3px;
}

/* ---------- Termine ---------- */

.wg-termine {
	padding: clamp(36px, 3.6vw, 96px) var(--wg-rand) clamp(44px, 4.8vw, 124px);
	background: var(--wg-lime-hell);
}

.wg-section .wg-termine__titel {
	text-align: center;
	font-size: var(--wg-titel-l);
	line-height: 1.1;
}

.wg-termine__liste {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: clamp(28px, 3.4vw, 88px) clamp(20px, 3.4vw, 88px);
	margin-top: clamp(28px, 3vw, 72px) !important;
}

.wg-termin {
	padding-top: clamp(14px, 1.1vw, 28px);
	border-top: 2px solid var(--wg-petrol);
}

.wg-section .wg-termin p {
	margin: 0;
}

.wg-section .wg-termin__datum {
	font-weight: 700;
}

.wg-section .wg-termin__titel {
	margin: clamp(8px, 0.7vw, 18px) 0 clamp(4px, 0.4vw, 10px);
	font-size: var(--wg-titel-s);
}

/* ---------- Buttons ---------- */

.wg-section .wp-block-buttons {
	gap: 16px;
}

.wg-section .wg-btn .wp-block-button__link,
.wg-section .wg-btn .wp-block-button__link:visited {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: max(305px, 21.2vw);
	min-height: max(60px, 4.17vw);
	padding: 12px 36px;
	border: 0 !important;
	border-radius: 999px !important;
	background: var(--wg-pink) !important;
	color: var(--wg-petrol) !important;
	font-family: var(--wg-schrift-titel) !important;
	font-weight: 700 !important;
	font-size: clamp(16px, 1.111vw, 28px) !important;
	line-height: 1.1;
	text-decoration: none !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	box-shadow: none !important;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.wg-section .wg-btn .wp-block-button__link:hover,
.wg-section .wg-btn .wp-block-button__link:focus-visible {
	background: var(--wg-lime) !important;
	color: var(--wg-petrol) !important;
}

.wg-section .wg-btn .wp-block-button__link:focus-visible {
	outline: 3px solid var(--wg-petrol);
	outline-offset: 3px;
}

/* ---------- Formular ---------- */

.wg-form {
	margin-top: clamp(28px, 3.4vw, 48px);
}

.wg-section .wg-form__feld {
	margin: 0 0 clamp(14px, 1.1vw, 28px);
}

.wg-form__feld label {
	display: block;
	font-size: var(--wg-text);
}

.wg-section .wg-form input[type="text"],
.wg-section .wg-form input[type="email"],
.wg-section .wg-form textarea {
	display: block;
	width: 100%;
	margin: 0;
	padding: 8px 0 6px;
	border: 0;
	border-bottom: 1px solid var(--wg-tanne);
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: var(--wg-petrol);
	font-family: var(--wg-schrift-text);
	font-size: var(--wg-text);
	line-height: 1.5625;
}

.wg-section .wg-form textarea {
	min-height: 170px;
	resize: vertical;
}

.wg-section .wg-form input:focus,
.wg-section .wg-form textarea:focus {
	outline: none;
	border-bottom: 2px solid var(--wg-petrol);
	background: rgba(200, 218, 32, 0.12);
}

.wg-section .wg-form__einwilligung {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin: 6px 0 0;
	font-size: 14px;
	line-height: 1.4;
}

.wg-form__einwilligung input {
	flex: none;
	width: 18px;
	height: 18px;
	margin: 1px 0 0;
	accent-color: var(--wg-petrol);
}

.wg-section .wg-form__absenden {
	display: block;
	margin: clamp(32px, 3.4vw, 48px) 0 0;
}

.wg-form__falle {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.wg-section .wg-form__meldung {
	margin: 24px 0 0;
	padding: 14px 18px;
	border-radius: 8px;
	font-size: 16px;
}

.wg-form__meldung--ok {
	background: var(--wg-lime-hell);
}

.wg-form__meldung--fehler {
	background: var(--wg-pink);
}

/* ---------- Fußzeile ---------- */

.wg-footer {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px clamp(32px, 7.8vw, 200px);
	min-height: clamp(64px, 5.56vw, 120px);
	padding: 20px var(--wg-rand);
	background: var(--wg-tanne);
	color: var(--wg-weiss);
}

.wg-footer__nav {
	flex: 1 1 auto;
}

.wg-footer .wg-menu {
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 12px clamp(32px, 7.8vw, 200px);
}

.wg-footer .wg-menu li:first-child:not(:only-child) {
	margin-right: auto;
}

.wg-footer .wg-menu li:first-child a {
	text-decoration: underline !important;
	text-underline-offset: 3px;
}

.wg-footer a,
.wg-footer a:visited {
	color: var(--wg-weiss);
	text-decoration: none;
	font-size: var(--wg-text);
}

.wg-footer a:hover {
	color: var(--wg-lime);
}

.wg-footer__copy {
	margin: 0;
	font-size: var(--wg-text);
	white-space: nowrap;
}

/* ---------- Astra-Button "Nach oben" im Kampagnendesign ---------- */

body.wg-startseite #ast-scroll-top {
	right: 14px;
	bottom: 14px;
	width: 52px;
	height: 52px;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background-color: var(--wg-pink) !important;
	color: var(--wg-petrol) !important;
	box-shadow: 0 4px 14px rgba(0, 44, 45, 0.3);
	font-size: 0;
	line-height: 0;
	transition: background-color 0.15s ease;
}

body.wg-startseite #ast-scroll-top:hover,
body.wg-startseite #ast-scroll-top:focus-visible {
	background-color: var(--wg-lime) !important;
	color: var(--wg-petrol) !important;
}

body.wg-startseite #ast-scroll-top:focus-visible {
	outline: 3px solid var(--wg-lime);
	outline-offset: 3px;
}

body.wg-startseite #ast-scroll-top .ast-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

body.wg-startseite #ast-scroll-top svg {
	width: 20px !important;
	height: 20px !important;
	margin: 0 !important;
	transform: rotate(180deg) !important;
	fill: currentColor !important;
}

body.wg-startseite #ast-scroll-top svg path {
	fill: currentColor !important;
}

/* ---------- Texte nur für Smartphone bzw. ab Tablet ---------- */

/*
 * Klasse "wg-nur-mobil": nur unter 768 px Breite sichtbar (Smartphone).
 * Klasse "wg-ab-tablet": nur ab 768 px Breite sichtbar (Tablet, Desktop).
 * Im Editor sind beide Varianten immer sichtbar und beschriftet.
 */
.wg-nur-mobil {
	display: none;
}

@media (max-width: 767px) {
	.wg-nur-mobil {
		display: block;
	}

	.wg-ab-tablet {
		display: none !important;
	}
}

.wg-nur-mobil.block-editor-block-list__block,
.wg-ab-tablet.block-editor-block-list__block {
	position: relative;
	padding-top: 30px !important;
	outline: 2px dashed rgba(0, 60, 64, 0.35);
	outline-offset: 6px;
}

.wg-nur-mobil.block-editor-block-list__block {
	display: block !important;
	margin-bottom: 40px !important;
}

.wg-ab-tablet.block-editor-block-list__block {
	display: flex !important;
}

.wg-nur-mobil.block-editor-block-list__block::before,
.wg-ab-tablet.block-editor-block-list__block::before {
	position: absolute;
	top: 0;
	left: 0;
	padding: 2px 8px;
	border-radius: 4px;
	background: var(--wg-pink);
	color: var(--wg-petrol);
	font: 700 12px/1.4 var(--wg-schrift-text);
}

.wg-nur-mobil.block-editor-block-list__block::before {
	content: "Kurzfassung: nur auf dem Smartphone sichtbar";
}

.wg-ab-tablet.block-editor-block-list__block::before {
	content: "Langfassung: ab Tablet sichtbar";
}

/* ---------- Tablet und Smartphone ---------- */

@media (max-width: 1279px) {
	.wg-header__toggle {
		display: inline-flex;
		align-items: center;
		gap: 10px;
		padding: 10px 0 !important;
		border: 0 !important;
		border-radius: 0 !important;
		background: none !important;
		box-shadow: none !important;
		color: var(--wg-weiss) !important;
		font-family: var(--wg-schrift-text) !important;
		font-size: 16px !important;
		font-weight: 400 !important;
		line-height: 1 !important;
		text-transform: none !important;
		letter-spacing: 0 !important;
		flex: none;
		cursor: pointer;
	}

	.wg-header__toggle:focus:not(:focus-visible) {
		outline: none;
	}

	.wg-header__toggle:focus-visible {
		outline: 2px solid var(--wg-lime);
		outline-offset: 4px;
	}

	.wg-header__toggle-bars,
	.wg-header__toggle-bars::before,
	.wg-header__toggle-bars::after {
		display: block;
		width: 22px;
		height: 2px;
		background: currentColor;
		position: relative;
	}

	.wg-header__toggle-bars::before,
	.wg-header__toggle-bars::after {
		content: "";
		position: absolute;
		left: 0;
	}

	.wg-header__toggle-bars::before {
		top: -7px;
	}

	.wg-header__toggle-bars::after {
		top: 7px;
	}

	.wg-header {
		flex-wrap: wrap;
		gap: 0 16px;
		min-height: var(--wg-kopf);
		padding-top: 10px;
		padding-bottom: 10px;
	}

	/* Logo und Menü-Schalter bleiben auf dem Smartphone in einer Zeile */
	.wg-header .wg-header__logo {
		flex: 0 1 auto;
		min-width: 0;
		font-size: clamp(18px, 5vw, 26px);
	}

	.admin-bar .wg-header {
		top: 46px;
	}

	.wg-header__nav {
		display: none;
		flex-basis: 100%;
		padding: 14px 0 12px;
	}

	.wg-header.is-open .wg-header__nav {
		display: block;
	}

	.wg-header .wg-menu {
		flex-direction: column;
		gap: 14px;
	}

	.wg-header .wg-menu a {
		font-size: 20px;
	}
}

@media (max-width: 781px) {
	.wg-hero,
	.wg-split,
	.wg-kacheln {
		grid-template-columns: 1fr;
	}

	.wg-hero__text {
		min-height: 0;
		background-size: auto 520px;
	}

	.wg-section .wg-hero__text .wg-hero__claim {
		padding: 48px 0 24px;
	}

	.wg-hero__bild,
	.wg-hero__bild img {
		height: auto;
	}

	.wg-hero__bild img {
		aspect-ratio: 720 / 670;
	}

	.wg-split__bild {
		min-height: 0;
	}

	.wg-split {
		min-height: 0;
	}

	.wg-split__bild img {
		position: static;
		height: auto !important;
	}

	/* Auf dem Smartphone steht das Bild immer über dem Text */
	.wg-split .wg-split__bild {
		order: -1;
	}

	/*
	 * Nur sehr lange Wörter in Überschriften trennen (z. B. "Oberbürgermeisters"),
	 * damit nichts über den Rand läuft. Fließtext bleibt ungetrennt.
	 */
	.wg-section h1,
	.wg-section h2,
	.wg-section h3 {
		hyphens: auto;
		-webkit-hyphens: auto;
		hyphenate-limit-chars: 12 5 5;
		-webkit-hyphenate-limit-before: 5;
		-webkit-hyphenate-limit-after: 5;
		overflow-wrap: break-word;
	}

	.wg-split--bild-links .wg-split__text,
	.wg-kachel:nth-child(even) {
		padding-left: var(--wg-rand);
	}

	.wg-kachel:nth-child(4n + 2),
	.wg-kachel:nth-child(4n + 3) {
		background: var(--wg-lime-hell);
	}

	.wg-kachel:nth-child(even) {
		background: var(--wg-pink);
	}

	.wg-section .wg-btn .wp-block-button__link {
		min-width: 0;
		width: 100%;
	}

	.wg-section .wg-btn,
	.wg-section .wp-block-buttons {
		width: 100%;
	}

	.wg-footer {
		flex-direction: column;
		align-items: flex-start;
	}

	.wg-footer .wg-menu {
		flex-direction: column;
		gap: 10px;
	}
}

@media (max-width: 600px) {
	.admin-bar .wg-header {
		top: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wg-section .wg-btn .wp-block-button__link {
		transition: none;
	}
}
