/*
Theme Name:   HRS Saterland
Description:  Child-Theme für die Haupt- und Realschule Saterland auf Basis von Blocksy. Inhalte, Menüs, Kopf- und Fußbereich werden vollständig in WordPress gepflegt; das Theme liefert nur Farben, Blockstile und Vorlagen.
Template:     blocksy
Version:      1.6.0
Requires at least: 6.6
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:  hrs-saterland
*/

/* ==========================================================================
   Farben
   Die hellen Schulfarben sind für Flächen, Balken und Tönungen gedacht.
   Für Text, Links und Buttons gibt es abgedunkelte Varianten (mind. 4,5:1).
   ========================================================================== */

:root {
	--hrs-ink: #313233;
	--hrs-muted: #5f6061;
	--hrs-paper: #fffdf8;
	--hrs-white: #ffffff;
	--hrs-line: rgba(49, 50, 51, 0.14);

	--hrs-green: #98c2a9;
	--hrs-green-dark: #79ab8c;
	--hrs-green-ink: #123326;
	--hrs-blue: #74cee4;
	--hrs-blue-dark: #54bad8;
	--hrs-yellow: #edbf47;
	--hrs-yellow-ink: #5c3f00;   /* ≥ 4,5:1 auch auf dem violetten Ende des Fußbereich-Verlaufs */
	--hrs-red: #e35730;          /* nur Deko (Balken, Linien) */
	--hrs-red-button: #c44a28;   /* Buttons mit weißer Schrift: 4,8:1 */
	--hrs-red-text: #ab4224;     /* roter Text, auch auf Tönungen: ≥ 5:1 */
	--hrs-violet: #c389ce;
	--hrs-orange: #ec774b;
	--hrs-cream: #fff4d6;

	--hrs-rainbow: linear-gradient(90deg, var(--hrs-green), var(--hrs-blue), var(--hrs-yellow), var(--hrs-red), var(--hrs-violet));
	--hrs-rainbow-vertical: linear-gradient(180deg, var(--hrs-green-dark), var(--hrs-blue-dark), var(--hrs-yellow), var(--hrs-red));
	--hrs-pastel: linear-gradient(90deg, rgba(152, 194, 169, 0.16), rgba(116, 206, 228, 0.13) 32%, rgba(237, 191, 71, 0.15) 68%, rgba(227, 87, 48, 0.08));

	--hrs-radius: 8px;
	--hrs-shadow: 0 24px 70px rgba(49, 50, 51, 0.16);
	--hrs-shadow-soft: 0 16px 42px rgba(49, 50, 51, 0.07);
}

body {
	background-color: var(--hrs-paper);
}

.entry-content :where(h1, h2, h3, h4) {
	font-weight: 800;
}

/* ==========================================================================
   Barrierefreiheit
   ========================================================================== */

/*
 * Fokusrahmen. Das vorangestellte „html“ hebt die Gewichtung über Blocksys
 * „a:focus-visible, button:focus-visible“ (2 px Rot) – sonst greift der
 * dunkle 3-px-Rahmen nicht und auf dunklen Flächen wäre Rot zu kontrastarm.
 */
html :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--hrs-ink);
	outline-offset: 2px;
}

/* Auf dunklen Flächen und Bildern: gelber Rahmen (≥ 7:1 auf Anthrazit). */
html :is(.is-style-hrs-flaeche-dunkel, .is-style-hrs-hero, .hrs-menu-intro) :focus-visible,
html .hrs-menu-intro > a:focus-visible {
	outline-color: var(--hrs-yellow);
}

html {
	scroll-padding-top: 120px;
}

/* Links im Fließtext sind unterstrichen, nicht nur farbig (WCAG 1.4.1). */
.entry-content :where(p, li, td, dd, figcaption) a:not(.wp-block-button__link, .wp-block-read-more) {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

.entry-content :where(p, li, td, dd, figcaption) a:not(.wp-block-button__link, .wp-block-read-more):hover {
	text-decoration-thickness: 2px;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		transition: none !important;
		animation: none !important;
	}
}

/* ==========================================================================
   Kopfbereich: Kontaktleiste
   ========================================================================== */

#header [data-row*="top"] {
	background:
		linear-gradient(90deg, rgba(152, 194, 169, 0.28), rgba(116, 206, 228, 0.24) 28%, rgba(237, 191, 71, 0.25) 56%, rgba(227, 87, 48, 0.14) 78%, rgba(195, 137, 206, 0.2)),
		var(--hrs-white);
	border-bottom: 1px solid rgba(49, 50, 51, 0.08);
	color: var(--hrs-ink);
	font-size: 0.8rem;
	font-weight: 750;
}

#header [data-row*="top"] p {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.2rem 0;
	margin: 0;
}

#header [data-row*="top"] a {
	color: var(--hrs-ink);
	font-weight: inherit;
	text-decoration: none;
}

/*
 * Blocksy setzt den Text der Leiste in ein Element mit der Klasse
 * „entry-content“. Regeln für den Seiteninhalt (z. B. „erster Absatz größer“
 * in seiten.css/news.css) dürfen hier nicht greifen – sonst ist die Leiste
 * auf Unterseiten größer und fetter als auf der Startseite.
 */
#header [data-row*="top"] .entry-content {
	font-size: var(--theme-font-size, 15px);
	line-height: var(--theme-line-height, 1.3);
}

#header [data-row*="top"] p {
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
}

#header [data-row*="top"] a:hover {
	color: var(--hrs-red-text);
	text-decoration: underline;
}

/* Einträge der Leiste mit farbigem Punkt und Trennstrich. */
.hrs-tb {
	display: inline-flex;
	align-items: center;
	padding: 0.1rem 0.8rem;
	white-space: nowrap;
}

.hrs-tb + .hrs-tb {
	border-left: 1px solid rgba(49, 50, 51, 0.16);
}

.hrs-tb::before {
	content: "";
	width: 7px;
	height: 7px;
	margin-right: 0.48rem;
	background: var(--hrs-green-dark);
	border-radius: 50%;
}

.hrs-tb:nth-child(2)::before {
	background: var(--hrs-blue-dark);
}

.hrs-tb:nth-child(3)::before {
	background: var(--hrs-red);
}

/* ==========================================================================
   Kopfbereich: Logo-Zeile und Hauptmenü (Pills)
   ========================================================================== */

#header [data-row*="middle"] {
	background: rgba(255, 253, 248, 0.94);
	border-bottom: 1px solid var(--hrs-line);
	backdrop-filter: blur(18px);
}

#header [data-row*="middle"] .ct-container {
	position: relative;
}

#header [data-id="menu"] > ul {
	gap: 0.35rem;
}

#header [data-id="menu"] > ul > li {
	align-items: center;
	margin: 0;
}

#header [data-id="menu"] > ul > li > a.ct-menu-link {
	height: auto;
	padding: 0.62rem 0.9rem;
	background: rgba(152, 194, 169, 0.18);
	border: 1px solid rgba(121, 171, 140, 0.28);
	border-radius: 999px;
	color: var(--hrs-ink);
	font-size: 0.95rem;
	font-weight: 850;
	letter-spacing: 0;
	text-transform: none;
}

#header [data-id="menu"] > ul > li:nth-child(6n + 2) > a.ct-menu-link {
	background: rgba(116, 206, 228, 0.2);
	border-color: rgba(84, 186, 216, 0.32);
}

#header [data-id="menu"] > ul > li:nth-child(6n + 3) > a.ct-menu-link {
	background: rgba(237, 191, 71, 0.24);
	border-color: rgba(228, 167, 45, 0.34);
}

#header [data-id="menu"] > ul > li:nth-child(6n + 4) > a.ct-menu-link {
	background: rgba(227, 87, 48, 0.14);
	border-color: rgba(227, 87, 48, 0.3);
}

#header [data-id="menu"] > ul > li:nth-child(6n + 5) > a.ct-menu-link {
	background: rgba(195, 137, 206, 0.2);
	border-color: rgba(172, 122, 181, 0.32);
}

#header [data-id="menu"] > ul > li:nth-child(6n + 6) > a.ct-menu-link {
	background: rgba(236, 119, 75, 0.16);
	border-color: rgba(236, 119, 75, 0.3);
}

#header [data-id="menu"] > ul > li:hover > a.ct-menu-link,
#header [data-id="menu"] > ul > li:focus-within > a.ct-menu-link,
#header [data-id="menu"] > ul > li.current-menu-item > a.ct-menu-link,
#header [data-id="menu"] > ul > li.current-menu-ancestor > a.ct-menu-link {
	background: var(--hrs-ink);
	border-color: var(--hrs-ink);
	color: var(--hrs-white);
}

#header [data-id="menu"] > ul > li > a.ct-menu-link::before,
#header [data-id="menu"] > ul > li > a.ct-menu-link::after {
	display: none;
}

#header [data-id="menu"] .ct-toggle-dropdown-desktop svg {
	fill: currentColor;
}

/* ==========================================================================
   Mega-Menü
   ========================================================================== */

/* Untermenü nicht unter dem Menüpunkt, sondern mittig unter dem ganzen Header. */
#header [data-id="menu"],
#header [data-id="menu"] > ul,
#header [data-id="menu"] > ul > li[class*="animated-submenu"] {
	position: static;
}

#header [data-id="menu"] > ul > li > .sub-menu {
	display: grid;
	grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(0, 1.5fr));
	align-items: start;
	gap: 0.7rem;
	left: 0;
	right: 0;
	width: min(1040px, 100%);
	margin-inline: auto;
	padding: 1rem;
	background: var(--hrs-white);
	border: 1px solid var(--hrs-line);
	border-radius: var(--hrs-radius);
	box-shadow: var(--hrs-shadow);
}

/* Unsichtbare Brücke, damit das Menü beim Hinunterfahren mit der Maus offen bleibt. */
#header [data-id="menu"] > ul > li > .sub-menu::before {
	height: 1.6rem;
}

#header [data-id="menu"] .sub-menu > li {
	margin: 0;
	border: 0;
}

#header [data-id="menu"] .sub-menu > li > a.ct-menu-link {
	display: block;
	height: 100%;
	padding: 0.85rem;
	background: rgba(152, 194, 169, 0.13);
	border: 1px solid var(--hrs-line);
	border-radius: var(--hrs-radius);
	color: var(--hrs-ink);
	font-size: 0.95rem;
	font-weight: 850;
	line-height: 1.25;
}

#header [data-id="menu"] .sub-menu > li:nth-child(4n + 3) > a.ct-menu-link {
	background: rgba(116, 206, 228, 0.13);
}

#header [data-id="menu"] .sub-menu > li:nth-child(4n + 4) > a.ct-menu-link {
	background: rgba(237, 191, 71, 0.16);
}

#header [data-id="menu"] .sub-menu > li:nth-child(4n + 5) > a.ct-menu-link {
	background: rgba(195, 137, 206, 0.13);
}

#header [data-id="menu"] .sub-menu > li > a.ct-menu-link:hover {
	border-color: var(--hrs-red);
	color: var(--hrs-ink);
}

.hrs-menu-desc {
	display: block;
	margin-top: 0.2rem;
	color: var(--hrs-muted);
	font-size: 0.8rem;
	font-weight: 650;
	line-height: 1.35;
}

/* Dunkle Intro-Karte links im Mega-Menü. */
#header [data-id="menu"] .sub-menu > li.hrs-menu-intro {
	grid-column: 1;
	grid-row: 1 / span 3;
	align-self: stretch;
}

#header [data-id="menu"] .sub-menu > li.hrs-menu-intro > a.ct-menu-link {
	min-height: 128px;
	padding: 1.1rem 1.2rem;
	background: var(--hrs-ink);
	border: 0;
	border-top: 6px solid var(--hrs-intro-bar, var(--hrs-green));
	color: var(--hrs-white);
}

#header [data-id="menu"] .sub-menu > li.hrs-menu-intro > a.ct-menu-link:hover {
	background: #1f2021;
	color: var(--hrs-white);
}

.hrs-menu-intro .hrs-menu-title {
	display: block;
	margin-bottom: 0.5rem;
	font-size: 1.25rem;
	line-height: 1.15;
}

.hrs-menu-intro .hrs-menu-desc {
	color: rgba(255, 255, 255, 0.85);
	font-size: 0.92rem;
	font-weight: 500;
}

#header [data-id="menu"] > ul > li:nth-child(6n + 2) { --hrs-intro-bar: var(--hrs-blue-dark); }
#header [data-id="menu"] > ul > li:nth-child(6n + 3) { --hrs-intro-bar: var(--hrs-yellow); }
#header [data-id="menu"] > ul > li:nth-child(6n + 4) { --hrs-intro-bar: var(--hrs-red); }
#header [data-id="menu"] > ul > li:nth-child(6n + 5) { --hrs-intro-bar: var(--hrs-violet); }
#header [data-id="menu"] > ul > li:nth-child(6n + 6) { --hrs-intro-bar: var(--hrs-orange); }

/* ==========================================================================
   Kopfbild (Cover-Block, Stil „Startseite“)
   ========================================================================== */

.wp-block-cover.is-style-hrs-hero {
	min-height: 410px;
	align-items: flex-end;
	padding-block: 3rem 3.4rem;
}

.wp-block-cover.is-style-hrs-hero .wp-block-cover__background {
	background: linear-gradient(90deg, rgba(49, 50, 51, 0.9), rgba(49, 50, 51, 0.62) 50%, rgba(49, 50, 51, 0.2)) !important;
	opacity: 1 !important;
}

/* Inhalt des Kopfbilds bündig mit dem übrigen Seiteninhalt (Blocksy-Containerbreite). */
.wp-block-cover.is-style-hrs-hero .wp-block-cover__inner-container {
	width: var(--theme-container-width, 90%);
	max-width: var(--theme-block-max-width, var(--theme-normal-container-max-width, 1180px));
	margin-inline: auto;
}

.wp-block-cover.is-style-hrs-hero .wp-block-cover__inner-container > * {
	max-width: 760px;
}

.wp-block-cover.is-style-hrs-hero h1 {
	margin-block: 0 1rem;
	color: var(--hrs-white);
	font-size: clamp(2.35rem, 5.5vw, 4rem);
	font-weight: 850;
	line-height: 1.02;
}

.wp-block-cover.is-style-hrs-hero p {
	color: rgba(255, 255, 255, 0.92);
	font-size: 1.15rem;
}

.wp-block-cover.is-style-hrs-hero .is-style-hrs-dachzeile {
	color: var(--hrs-yellow);
}

/* Umriss-Button auf dem dunklen Bild weiß statt rot. */
.wp-block-cover.is-style-hrs-hero .is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--hrs-white);
	border-color: var(--hrs-white);
}

.wp-block-cover.is-style-hrs-hero .is-style-outline .wp-block-button__link:hover {
	background: var(--hrs-white);
	color: var(--hrs-ink);
}

/* Gemeinsamer Seitenkopf aller Unterseiten (synchronisierte Vorlage, siehe inc/seitenkopf.php). */
.hrs-seitenkopf .wp-block-cover.is-style-hrs-hero {
	min-height: 300px;
	margin: 0;
	padding-block: 3rem 2.6rem;
}

.hrs-seitenkopf-titel,
.wp-block-cover.is-style-hrs-hero p.hrs-seitenkopf-titel {
	position: relative;
	margin: 0;
	padding-bottom: 1rem;
	color: var(--hrs-white);
	font-size: clamp(2.1rem, 5vw, 3.6rem);
	font-weight: 850;
	line-height: 1.02;
}

.hrs-seitenkopf-titel::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	width: min(225px, 60%);
	height: 6px;
	background: var(--hrs-rainbow);
	border-radius: 999px;
}

/* Button-Stil „Instagram“: Glas-Optik mit Regenbogen-Kante und Kamera-Symbol. */
.wp-block-button.is-style-hrs-instagram .wp-block-button__link {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 0.85rem;
	overflow: hidden;
	padding: 0.8rem 1.1rem 0.72rem;
	background: rgba(255, 255, 255, 0.13);
	border: 1px solid rgba(255, 255, 255, 0.5);
	color: var(--hrs-white);
	font-size: 1rem;
}

.wp-block-button.is-style-hrs-instagram .wp-block-button__link::after {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: 4px;
	background: linear-gradient(90deg, var(--hrs-violet), var(--hrs-red), var(--hrs-yellow), var(--hrs-blue));
}

.wp-block-button.is-style-hrs-instagram .wp-block-button__link::before {
	content: "";
	/* Blocksys Schatten-Effekt an Buttons zurücksetzen. */
	position: static;
	z-index: auto;
	display: block;
	opacity: 1;
	filter: none;
	border-radius: 0;
	transition: none;
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='3' width='18' height='18' rx='5'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Ccircle cx='17.5' cy='6.5' r='1' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='3' width='18' height='18' rx='5'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Ccircle cx='17.5' cy='6.5' r='1' fill='black'/%3E%3C/svg%3E") center / contain no-repeat;
}

.wp-block-button.is-style-hrs-instagram .wp-block-button__link:hover {
	background: var(--hrs-white);
	color: var(--hrs-ink);
}

/* ==========================================================================
   Dachzeile (kleine Überschrift über einem Titel)
   ========================================================================== */

.entry-content .is-style-hrs-dachzeile + :is(h1, h2, h3),
.is-style-hrs-dachzeile + :is(h1, h2, h3) {
	margin-top: 0;
}

.entry-content .is-style-hrs-dachzeile,
.is-style-hrs-dachzeile {
	margin-bottom: 0.35rem;
	color: var(--hrs-red-text);
	font-size: 0.78rem;
	font-weight: 850;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

/* ==========================================================================
   Abschnittskopf: Leiste mit Pastell-Verlauf und Regenbogen-Linie
   ========================================================================== */

.wp-block-group.is-style-hrs-abschnittskopf {
	position: relative;
	gap: 1rem;
	min-height: 54px;
	margin-bottom: 1.4rem;
	padding: 0.55rem 0.7rem 0.55rem 0.9rem;
	background: var(--hrs-pastel), var(--hrs-white);
	border: 1px solid var(--hrs-line);
	border-radius: var(--hrs-radius);
	box-shadow: var(--hrs-shadow-soft);
}

.wp-block-group.is-style-hrs-abschnittskopf::after {
	content: "";
	position: absolute;
	right: 1rem;
	bottom: -5px;
	left: 1rem;
	height: 5px;
	background: var(--hrs-rainbow);
	border-radius: 999px;
}

.is-style-hrs-abschnittskopf > * {
	margin-block: 0 !important;
}

.is-style-hrs-abschnittskopf :is(h2, h3) {
	font-size: clamp(1.05rem, 1.7vw, 1.35rem);
}

/* Link-Button im Abschnittskopf als kleiner roter Chip. */
.wp-block-group.is-style-hrs-abschnittskopf .wp-block-button .wp-block-button__link {
	padding: 0.4rem 0.6rem;
	background: rgba(227, 87, 48, 0.12);
	border: 1px solid rgba(227, 87, 48, 0.22);
	color: var(--hrs-red-text);
	font-size: 0.82rem;
}

.wp-block-group.is-style-hrs-abschnittskopf .wp-block-button .wp-block-button__link:hover {
	background: var(--hrs-ink);
	border-color: var(--hrs-ink);
	color: var(--hrs-white);
}

/* ==========================================================================
   Hinweisleiste (z. B. Anmeldung Klasse 5)
   ========================================================================== */

.wp-block-group.is-style-hrs-hinweisleiste {
	position: relative;
	gap: 0.6rem 1.25rem;
	padding: 0.85rem 1rem 0.85rem 1.6rem;
	background:
		linear-gradient(90deg, rgba(152, 194, 169, 0.2), rgba(116, 206, 228, 0.15) 42%, rgba(237, 191, 71, 0.16)),
		var(--hrs-white);
	border: 1px solid var(--hrs-line);
	border-radius: var(--hrs-radius);
	box-shadow: 0 14px 34px rgba(49, 50, 51, 0.07);
}

.wp-block-group.is-style-hrs-hinweisleiste::before {
	content: "";
	position: absolute;
	top: 0.8rem;
	bottom: 0.8rem;
	left: 0.8rem;
	width: 6px;
	background: var(--hrs-rainbow-vertical);
	border-radius: 999px;
}

.is-style-hrs-hinweisleiste > * {
	margin-block: 0 !important;
}

.is-style-hrs-hinweisleiste p {
	font-size: 0.92rem;
}

.is-style-hrs-hinweisleiste .is-style-hrs-dachzeile {
	font-size: 0.7rem;
}

.is-style-hrs-hinweisleiste a {
	color: var(--hrs-ink);
	font-weight: 850;
	text-decoration: none !important;
	border-bottom: 2px solid var(--hrs-red);
}

.is-style-hrs-hinweisleiste a:hover {
	color: var(--hrs-red-text);
	border-color: var(--hrs-blue-dark);
}

/* ==========================================================================
   Einleitung mit Farbbalken (z. B. „Die Schule“)
   ========================================================================== */

.wp-block-group.is-style-hrs-einleitung {
	position: relative;
	padding: 1.15rem 1.3rem 1.15rem 2.4rem;
	background:
		linear-gradient(90deg, rgba(152, 194, 169, 0.15), rgba(116, 206, 228, 0.11) 55%, rgba(237, 191, 71, 0.13)),
		var(--hrs-white);
	border: 1px solid var(--hrs-line);
	border-radius: var(--hrs-radius);
}

.wp-block-group.is-style-hrs-einleitung::before {
	content: "";
	position: absolute;
	top: 1rem;
	bottom: 1rem;
	left: 1.1rem;
	width: 8px;
	background: var(--hrs-rainbow-vertical);
	border-radius: 999px;
}

.is-style-hrs-einleitung > :first-child {
	margin-top: 0;
}

.is-style-hrs-einleitung > :last-child {
	margin-bottom: 0;
}

.is-style-hrs-einleitung p {
	font-size: clamp(1rem, 1.5vw, 1.15rem);
	font-weight: 750;
	line-height: 1.55;
}

/* ==========================================================================
   Spalten-Stile
   ========================================================================== */

/* Schnellzugriff: weiße Kacheln, ragen in das Kopfbild hinein. */
.wp-block-columns.is-style-hrs-schnellzugriff {
	position: relative;
	z-index: 2;
	gap: 0;
	margin-top: -2rem;
	overflow: hidden;
	background: var(--hrs-white);
	border: 1px solid var(--hrs-line);
	border-radius: var(--hrs-radius);
	box-shadow: var(--hrs-shadow);
}

.is-style-hrs-schnellzugriff > .wp-block-column {
	position: relative;
	padding: 0.72rem 1rem;
	border-top: 5px solid var(--hrs-bar, var(--hrs-green));
}

.is-style-hrs-schnellzugriff > .wp-block-column + .wp-block-column {
	border-left: 1px solid var(--hrs-line);
}

.is-style-hrs-schnellzugriff > .wp-block-column p {
	margin: 0;
}

.is-style-hrs-schnellzugriff > .wp-block-column p:first-child {
	color: var(--hrs-muted);
	font-size: 0.72rem;
	font-weight: 800;
	text-transform: uppercase;
}

.is-style-hrs-schnellzugriff > .wp-block-column p:last-child {
	font-size: 1.12rem;
	font-weight: 850;
}

/* Ganze Kachel klickbar machen. */
.is-style-hrs-schnellzugriff > .wp-block-column a {
	color: var(--hrs-ink);
	text-decoration: none !important;
}

.is-style-hrs-schnellzugriff > .wp-block-column a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.is-style-hrs-schnellzugriff > .wp-block-column:hover {
	background: var(--hrs-paper);
}

/* Kartenreihe: getönte Karten mit Farbbalken und Kreis (Profil, Ansprechpersonen). */
.wp-block-columns.is-style-hrs-kartenreihe {
	gap: 1.2rem;
}

.wp-block-columns.is-style-hrs-kartenreihe > .wp-block-column {
	position: relative;
	z-index: 0;
	overflow: hidden;
	min-height: 200px;
	padding: 1.3rem;
	background: linear-gradient(135deg, var(--hrs-tint, rgba(152, 194, 169, 0.28)), rgba(255, 255, 255, 0.88) 64%), var(--hrs-white);
	border: 1px solid var(--hrs-tint-border, rgba(121, 171, 140, 0.32));
	border-radius: var(--hrs-radius);
	box-shadow: 0 18px 44px rgba(49, 50, 51, 0.08);
}

.wp-block-columns.is-style-hrs-kartenreihe > .wp-block-column::before {
	content: "";
	display: block;
	width: 54px;
	height: 10px;
	margin-bottom: 1.2rem;
	background: var(--hrs-bar, var(--hrs-green-dark));
	border-radius: 999px;
}

.wp-block-columns.is-style-hrs-kartenreihe > .wp-block-column::after {
	content: "";
	position: absolute;
	z-index: -1;
	top: -32px;
	right: -32px;
	width: 92px;
	height: 92px;
	background: var(--hrs-circle, rgba(121, 171, 140, 0.16));
	border-radius: 999px;
}

.wp-block-columns.is-style-hrs-kartenreihe > .wp-block-column :where(h2, h3, h4) {
	margin-top: 0;
	font-size: 1.15rem;
}

.wp-block-columns.is-style-hrs-kartenreihe > .wp-block-column :where(h2, h3, h4) a {
	color: var(--hrs-ink);
	text-decoration: none;
}

.wp-block-columns.is-style-hrs-kartenreihe > .wp-block-column :where(h2, h3, h4) a:hover {
	color: var(--hrs-red-text);
	text-decoration: underline;
}

.wp-block-columns.is-style-hrs-kartenreihe > .wp-block-column p {
	font-size: 0.95rem;
	font-weight: 700;
}

/* Letzter Absatz mit Link wird zum „Mehr erfahren“-Link. */
.wp-block-columns.is-style-hrs-kartenreihe > .wp-block-column > p:last-child > a:only-child {
	color: var(--hrs-red-text);
	font-weight: 850;
	text-decoration: none;
}

.wp-block-columns.is-style-hrs-kartenreihe > .wp-block-column > p:last-child > a:only-child:hover {
	text-decoration: underline;
}

/* Farben wechseln automatisch: Grün, Blau, Gelb, Rot, Violett. */
:is(.is-style-hrs-schnellzugriff, .is-style-hrs-kartenreihe) > .wp-block-column:nth-child(5n + 2) {
	--hrs-bar: var(--hrs-blue-dark);
	--hrs-tint: rgba(116, 206, 228, 0.32);
	--hrs-tint-border: rgba(84, 186, 216, 0.34);
	--hrs-circle: rgba(84, 186, 216, 0.16);
}

:is(.is-style-hrs-schnellzugriff, .is-style-hrs-kartenreihe) > .wp-block-column:nth-child(5n + 3) {
	--hrs-bar: var(--hrs-yellow);
	--hrs-tint: rgba(237, 191, 71, 0.34);
	--hrs-tint-border: rgba(228, 167, 45, 0.34);
	--hrs-circle: rgba(237, 191, 71, 0.18);
}

:is(.is-style-hrs-schnellzugriff, .is-style-hrs-kartenreihe) > .wp-block-column:nth-child(5n + 4) {
	--hrs-bar: var(--hrs-red);
	--hrs-tint: rgba(227, 87, 48, 0.22);
	--hrs-tint-border: rgba(227, 87, 48, 0.3);
	--hrs-circle: rgba(227, 87, 48, 0.13);
}

:is(.is-style-hrs-schnellzugriff, .is-style-hrs-kartenreihe) > .wp-block-column:nth-child(5n + 5) {
	--hrs-bar: var(--hrs-violet);
	--hrs-tint: rgba(195, 137, 206, 0.28);
	--hrs-tint-border: rgba(172, 122, 181, 0.34);
	--hrs-circle: rgba(195, 137, 206, 0.16);
}

/* ==========================================================================
   Gruppen-Stile (Flächen und Karten)
   ========================================================================== */

:where(.is-style-hrs-karte, .is-style-hrs-flaeche-gruen, .is-style-hrs-flaeche-dunkel, .is-style-hrs-flaeche-gelb) {
	padding: clamp(1.25rem, 3vw, 2.25rem);
	border-radius: var(--hrs-radius);
}

:where(.is-style-hrs-karte, .is-style-hrs-flaeche-gruen, .is-style-hrs-flaeche-dunkel, .is-style-hrs-flaeche-gelb) > :first-child {
	margin-top: 0;
}

:where(.is-style-hrs-karte, .is-style-hrs-flaeche-gruen, .is-style-hrs-flaeche-dunkel, .is-style-hrs-flaeche-gelb) > :last-child {
	margin-bottom: 0;
}

.is-style-hrs-karte {
	background: rgba(255, 255, 255, 0.74);
	border: 1px solid var(--hrs-line);
}

.is-style-hrs-flaeche-gruen {
	background: var(--hrs-green);
	color: var(--hrs-green-ink);
}

.is-style-hrs-flaeche-gruen :where(h1, h2, h3, h4, a:not(.wp-block-button__link), .is-style-hrs-dachzeile) {
	color: var(--hrs-green-ink);
}

.is-style-hrs-flaeche-dunkel {
	background: var(--hrs-ink);
	color: var(--hrs-white);
}

.is-style-hrs-flaeche-dunkel :where(h1, h2, h3, h4, a:not(.wp-block-button__link), .is-style-hrs-dachzeile) {
	color: var(--hrs-white);
}

.is-style-hrs-flaeche-gelb {
	background: var(--hrs-yellow);
	color: var(--hrs-ink);
}

.is-style-hrs-flaeche-gelb :where(h1, h2, h3, h4, a:not(.wp-block-button__link)) {
	color: var(--hrs-ink);
}

.is-style-hrs-flaeche-gelb .is-style-hrs-dachzeile {
	color: var(--hrs-yellow-ink);
}

.is-style-hrs-hinweis {
	padding: 1rem 1.25rem;
	background: var(--hrs-cream);
	border-left: 5px solid var(--hrs-yellow);
	border-radius: var(--hrs-radius);
}

.is-style-hrs-hinweis > :first-child {
	margin-top: 0;
}

.is-style-hrs-hinweis > :last-child {
	margin-bottom: 0;
}

/* Redaktionshinweis: nur für angemeldete Redakteure sichtbar (siehe functions.php). */
.is-style-hrs-redaktion {
	position: relative;
	padding: 2rem 1.25rem 1rem;
	background: repeating-linear-gradient(135deg, #fff8e6 0 12px, #fff3d6 12px 24px);
	border: 2px dashed #b88a00;
	border-radius: var(--hrs-radius);
}

.is-style-hrs-redaktion::before {
	content: "Nur für die Redaktion sichtbar";
	position: absolute;
	top: 0.55rem;
	left: 1.25rem;
	color: #6b4f00;
	font-size: 0.72rem;
	font-weight: 850;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.is-style-hrs-redaktion > :last-child {
	margin-bottom: 0;
}

/* Eine einzelne Karte in einer Reihe nicht über die volle Breite ziehen. */
@media (min-width: 782px) {
	.wp-block-columns.is-style-hrs-kartenreihe > .wp-block-column:only-child {
		flex: 0 1 calc(50% - 0.6rem);
		max-width: calc(50% - 0.6rem);
	}
}

/* Lange Wörter in Kartenüberschriften sauber trennen. */
.wp-block-columns.is-style-hrs-kartenreihe > .wp-block-column :where(h2, h3, h4),
.wp-block-query.is-style-hrs-news .wp-block-post-title {
	-webkit-hyphens: auto;
	hyphens: auto;
	overflow-wrap: break-word;
}

/*
 * Tablet (782–1099 px): Kartenreihen mit vier oder mehr Karten zweispaltig,
 * sonst werden die Karten so schmal, dass Wörter wie „Berufsorientierung“
 * mitten im Wort umbrechen. WordPress erzwingt ab 782 px „nowrap“ mit
 * !important, daher hier ebenfalls !important.
 */
@media (min-width: 782px) and (max-width: 1099px) {
	.wp-block-columns.is-style-hrs-kartenreihe:has(> .wp-block-column:nth-child(4)) {
		flex-wrap: wrap !important;
	}

	.wp-block-columns.is-style-hrs-kartenreihe:has(> .wp-block-column:nth-child(4)) > .wp-block-column {
		flex: 0 0 calc(50% - 0.6rem) !important;
	}
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.wp-block-button__link,
.wp-block-read-more {
	border-radius: 6px;
	font-weight: 850;
}

.wp-block-button:not([class*="is-style-hrs"], .is-style-outline) .wp-block-button__link {
	background-color: var(--hrs-red-button);
	color: var(--hrs-white);
}

.wp-block-button:not([class*="is-style-hrs"], .is-style-outline) .wp-block-button__link:hover {
	background-color: var(--hrs-ink);
	color: var(--hrs-white);
}

.wp-block-button.is-style-hrs-hell .wp-block-button__link {
	background: rgba(255, 255, 255, 0.62);
	border: 1px solid rgba(49, 50, 51, 0.14);
	color: var(--hrs-ink);
}

.wp-block-button.is-style-hrs-hell .wp-block-button__link:hover {
	background: var(--hrs-white);
	color: var(--hrs-ink);
}

.wp-block-button.is-style-outline .wp-block-button__link {
	border: 2px solid currentColor;
}

/* ==========================================================================
   Neuigkeiten (Abfrage-Loop)
   ========================================================================== */

.wp-block-query.is-style-hrs-news .wp-block-post-template {
	gap: 1.2rem;
}

.wp-block-query.is-style-hrs-news .wp-block-post {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: linear-gradient(135deg, rgba(152, 194, 169, 0.18), rgba(255, 255, 255, 0.94) 58%), var(--hrs-white);
	border: 1px solid rgba(121, 171, 140, 0.28);
	border-radius: var(--hrs-radius);
	box-shadow: 0 18px 44px rgba(49, 50, 51, 0.08);
}

.wp-block-query.is-style-hrs-news .wp-block-post:nth-child(3n + 2) {
	background: linear-gradient(135deg, rgba(116, 206, 228, 0.18), rgba(255, 255, 255, 0.94) 58%), var(--hrs-white);
}

.wp-block-query.is-style-hrs-news .wp-block-post:nth-child(3n + 3) {
	background: linear-gradient(135deg, rgba(237, 191, 71, 0.22), rgba(255, 255, 255, 0.94) 58%), var(--hrs-white);
}

.wp-block-query.is-style-hrs-news .wp-block-post > :not(.wp-block-post-featured-image) {
	margin-inline: 1.1rem;
}

.wp-block-query.is-style-hrs-news .wp-block-post-featured-image {
	margin: 0 0 1rem;
}

.wp-block-query.is-style-hrs-news .wp-block-post-featured-image img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

.wp-block-query.is-style-hrs-news .wp-block-post-date {
	margin-bottom: 0.3rem;
	color: var(--hrs-red-text);
	font-size: 0.8rem;
	font-weight: 800;
	text-transform: uppercase;
}

.wp-block-query.is-style-hrs-news .hrs-news-meta {
	gap: 0.2rem 0.9rem;
	margin-bottom: 0.3rem;
}

.wp-block-query.is-style-hrs-news .hrs-news-meta .wp-block-post-date {
	margin-bottom: 0;
}

.wp-block-query.is-style-hrs-news .wp-block-post-author-name {
	color: var(--hrs-muted);
	font-size: 0.8rem;
	font-weight: 700;
}

.wp-block-query.is-style-hrs-news .wp-block-post-author-name::before {
	content: "von ";
}

.wp-block-query.is-style-hrs-news .wp-block-post-title {
	margin: 0.2rem 0 0.6rem;
	font-size: 1.18rem;
	line-height: 1.18;
}

.wp-block-query.is-style-hrs-news .wp-block-post-title a {
	color: var(--hrs-ink);
	text-decoration: none;
}

.wp-block-query.is-style-hrs-news .wp-block-post-title a:hover {
	text-decoration: underline;
}

.wp-block-query.is-style-hrs-news .wp-block-post-excerpt {
	margin-bottom: 1rem;
	color: var(--hrs-muted);
	font-size: 0.95rem;
}

.wp-block-query.is-style-hrs-news .wp-block-post-excerpt__more-text {
	display: none;
}

.wp-block-query.is-style-hrs-news .wp-block-read-more {
	align-self: flex-start;
	margin-top: auto;
	margin-bottom: 1.2rem;
	padding: 0.62rem 0.85rem;
	background: var(--hrs-red-button);
	color: var(--hrs-white);
	font-size: 0.92rem;
	text-decoration: none;
}

.wp-block-query.is-style-hrs-news .wp-block-read-more:hover {
	background: var(--hrs-ink);
	color: var(--hrs-white);
}

/* Fotogalerie-Übersicht: Kacheln ohne Auszug, Titel schließt die Karte ab. */
.wp-block-query.hrs-fotogalerien .wp-block-post-title {
	margin-bottom: 1.1rem;
}

.wp-block-query.hrs-fotogalerien .wp-block-query-pagination {
	gap: 0.4rem 0.8rem;
	margin-top: 1.8rem;
	font-weight: 700;
}

.wp-block-query.hrs-fotogalerien .wp-block-query-pagination .current {
	color: var(--hrs-red-text);
}

/* ==========================================================================
   Inhalte: Tabellen, Dateien, Bilder, Listen
   ========================================================================== */

.entry-content .wp-block-table table {
	width: 100%;
	border-collapse: collapse;
	background: var(--hrs-white);
	font-size: 0.97rem;
}

.entry-content .wp-block-table :where(th, td) {
	padding: 0.6rem 0.8rem;
	border: 0;
	border-bottom: 1px solid var(--hrs-line);
	text-align: left;
	vertical-align: top;
}

.entry-content .wp-block-table thead th {
	background: var(--hrs-ink);
	color: var(--hrs-white);
	font-weight: 800;
}

.entry-content .wp-block-table tbody tr:nth-child(even) {
	background: rgba(152, 194, 169, 0.1);
}

.entry-content .wp-block-table figcaption {
	color: var(--hrs-muted);
	font-size: 0.9rem;
}

/* Datei-Block als Download-Zeile */
.entry-content .wp-block-file:not(:has(.wp-block-file__embed)) {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1rem;
	align-items: center;
	justify-content: space-between;
	padding: 0.85rem 1rem;
	background: var(--hrs-white);
	border: 1px solid var(--hrs-line);
	border-left: 5px solid var(--hrs-green);
	border-radius: var(--hrs-radius);
}

.entry-content .wp-block-file > a:first-child {
	font-weight: 700;
}

.entry-content .wp-block-file .wp-block-file__button {
	margin: 0;
	padding: 0.5rem 1rem;
	background: var(--hrs-red-button);
	color: var(--hrs-white);
	border-radius: 6px;
	font-size: 0.9rem;
	font-weight: 800;
	text-decoration: none;
}

.entry-content .wp-block-file .wp-block-file__button:hover {
	background: var(--hrs-ink);
}

.entry-content .wp-block-file + .wp-block-file {
	margin-top: 0.6rem;
}

.entry-content :where(.wp-block-image, .wp-block-gallery) img {
	border-radius: var(--hrs-radius);
}

/* Galerie im Rahmen (z. B. „Die Schule“ auf der Startseite). */
.wp-block-gallery.is-style-hrs-bildleiste {
	padding: 1rem;
	background: rgba(255, 255, 255, 0.74);
	border: 1px solid var(--hrs-line);
	border-radius: var(--hrs-radius);
}

.wp-block-gallery.is-style-hrs-bildleiste img {
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

/* ==========================================================================
   Reiter (Core-Block „Tabs“), z. B. für Downloads nach Kategorien
   ========================================================================== */

.wp-block-tab-list {
	gap: 0.45rem;
	margin-bottom: 1.2rem;
}

.wp-block-tab-list button {
	padding: 0.6rem 1rem;
	background: rgba(152, 194, 169, 0.18);
	border: 1px solid rgba(121, 171, 140, 0.32);
	border-radius: 999px;
	color: var(--hrs-ink);
	font-weight: 850;
	line-height: 1.25;
}

.wp-block-tab-list button:nth-child(5n + 2) {
	background: rgba(116, 206, 228, 0.2);
	border-color: rgba(84, 186, 216, 0.34);
}

.wp-block-tab-list button:nth-child(5n + 3) {
	background: rgba(237, 191, 71, 0.24);
	border-color: rgba(228, 167, 45, 0.36);
}

.wp-block-tab-list button:nth-child(5n + 4) {
	background: rgba(195, 137, 206, 0.2);
	border-color: rgba(172, 122, 181, 0.34);
}

.wp-block-tab-list button:nth-child(5n + 5) {
	background: rgba(227, 87, 48, 0.14);
	border-color: rgba(227, 87, 48, 0.3);
}

.wp-block-tab-list button:hover {
	border-color: var(--hrs-ink);
}

.wp-block-tab-list button[aria-selected="true"] {
	background: var(--hrs-ink);
	border-color: var(--hrs-ink);
	color: var(--hrs-white);
}

.wp-block-tab-list button[aria-selected="true"]::before {
	display: none;
}

.wp-block-tab-list button:focus-visible {
	outline: 3px solid var(--hrs-ink);
	outline-offset: 2px;
}

.wp-block-tab-panel {
	padding: clamp(1rem, 2.5vw, 1.5rem);
	background: var(--hrs-white);
	border: 1px solid var(--hrs-line);
	border-radius: var(--hrs-radius);
}

.wp-block-tab-panel > :first-child {
	margin-top: 0;
}

.wp-block-tab-panel > :last-child {
	margin-bottom: 0;
}

/* Stil „Register links“: Kategorien als Menü links, Inhalt rechts. */
.wp-block-tabs.is-style-hrs-register {
	display: grid;
	grid-template-columns: minmax(190px, 250px) minmax(0, 1fr);
	gap: 1.4rem;
	align-items: start;
}

.wp-block-tabs.is-style-hrs-register > * {
	margin: 0;
}

.is-style-hrs-register .wp-block-tab-list {
	position: sticky;
	top: 110px;
	flex-direction: column;
	flex-wrap: nowrap;
	gap: 0.5rem;
	margin: 0;
	padding: 1rem;
	background:
		linear-gradient(160deg, rgba(152, 194, 169, 0.35), rgba(116, 206, 228, 0.22) 45%, rgba(237, 191, 71, 0.22)),
		var(--hrs-white);
	border: 1px solid var(--hrs-line);
	border-radius: var(--hrs-radius);
	box-shadow: var(--hrs-shadow-soft);
}

.is-style-hrs-register .wp-block-tab-list button {
	width: 100%;
	padding: 0.7rem 0.9rem;
	background: rgba(255, 255, 255, 0.85);
	border: 1px solid var(--hrs-line);
	border-left: 5px solid var(--hrs-green-dark);
	border-radius: var(--hrs-radius);
	text-align: left;
}

.is-style-hrs-register .wp-block-tab-list button:nth-child(5n + 2) { border-left-color: var(--hrs-blue-dark); }
.is-style-hrs-register .wp-block-tab-list button:nth-child(5n + 3) { border-left-color: var(--hrs-yellow); }
.is-style-hrs-register .wp-block-tab-list button:nth-child(5n + 4) { border-left-color: var(--hrs-violet); }
.is-style-hrs-register .wp-block-tab-list button:nth-child(5n + 5) { border-left-color: var(--hrs-red); }

.is-style-hrs-register .wp-block-tab-list button[aria-selected="true"] {
	background: var(--hrs-ink);
	border-color: var(--hrs-ink);
	color: var(--hrs-white);
}

@media (max-width: 781px) {
	.wp-block-tabs.is-style-hrs-register {
		grid-template-columns: minmax(0, 1fr);
		gap: 0.9rem;
	}

	/*
	 * Auf dem Handy: Kategorien als Pills, die umbrechen. Kein waagerechtes
	 * Wischen: sonst sind Reiter abgeschnitten und bei 320 px bzw. 400 % Zoom
	 * nicht sichtbar (WCAG 1.4.10 Reflow).
	 */
	.is-style-hrs-register .wp-block-tab-list {
		position: static;
		flex-direction: row;
		flex-wrap: wrap;
		padding: 0.6rem;
	}

	.is-style-hrs-register .wp-block-tab-list button {
		flex: 0 1 auto;
		width: auto;
		max-width: 100%;
		border-radius: 999px;
	}
}

/* Liste „Schnellzugriffe“: Link-Kacheln untereinander mit farbiger Kante (Seitenleiste). */
ul.is-style-hrs-schnellzugriffe {
	display: grid;
	gap: 0.55rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

ul.is-style-hrs-schnellzugriffe > li {
	margin: 0;
}

ul.is-style-hrs-schnellzugriffe a {
	display: block;
	padding: 0.7rem 0.9rem;
	background: rgba(255, 255, 255, 0.85);
	border: 1px solid var(--hrs-line);
	border-left: 5px solid var(--hrs-green-dark);
	border-radius: var(--hrs-radius);
	color: var(--hrs-ink);
	font-weight: 850;
	text-decoration: none !important;
}

ul.is-style-hrs-schnellzugriffe > li:nth-child(5n + 2) a { border-left-color: var(--hrs-blue-dark); }
ul.is-style-hrs-schnellzugriffe > li:nth-child(5n + 3) a { border-left-color: var(--hrs-yellow); }
ul.is-style-hrs-schnellzugriffe > li:nth-child(5n + 4) a { border-left-color: var(--hrs-violet); }
ul.is-style-hrs-schnellzugriffe > li:nth-child(5n + 5) a { border-left-color: var(--hrs-red); }

ul.is-style-hrs-schnellzugriffe a:hover {
	background: var(--hrs-ink);
	border-color: var(--hrs-ink);
	color: var(--hrs-white);
}

/* Liste „Schnellleiste“: dieselben Link-Kacheln als Buttons nebeneinander (z. B. über den Neuigkeiten). */
ul.is-style-hrs-schnellleiste {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

ul.is-style-hrs-schnellleiste > li {
	margin: 0;
}

ul.is-style-hrs-schnellleiste a {
	display: block;
	padding: 0.65rem 1.15rem;
	background: var(--hrs-white);
	border: 1px solid var(--hrs-line);
	border-left: 5px solid var(--hrs-green-dark);
	border-radius: var(--hrs-radius);
	box-shadow: 0 6px 18px rgba(49, 50, 51, 0.06);
	color: var(--hrs-ink);
	font-weight: 850;
	line-height: 1.3;
	text-decoration: none !important;
}

ul.is-style-hrs-schnellleiste > li:nth-child(5n + 2) a { border-left-color: var(--hrs-blue-dark); }
ul.is-style-hrs-schnellleiste > li:nth-child(5n + 3) a { border-left-color: var(--hrs-yellow); }
ul.is-style-hrs-schnellleiste > li:nth-child(5n + 4) a { border-left-color: var(--hrs-violet); }
ul.is-style-hrs-schnellleiste > li:nth-child(5n + 5) a { border-left-color: var(--hrs-red); }

ul.is-style-hrs-schnellleiste a:hover,
ul.is-style-hrs-schnellleiste a:focus-visible {
	background: var(--hrs-ink);
	border-color: var(--hrs-ink);
	color: var(--hrs-white);
}

/* Handy: zwei gleich breite Spalten statt ungleicher Zeilen. */
@media (max-width: 600px) {
	ul.is-style-hrs-schnellleiste {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Kasten um Seitenleisten-Widgets (Pastell-Verlauf wie v3). */
.wp-block-group.is-style-hrs-leistenkasten {
	position: relative;
	padding: 1rem;
	overflow: hidden;
	background:
		linear-gradient(160deg, rgba(152, 194, 169, 0.35), rgba(116, 206, 228, 0.22) 45%, rgba(237, 191, 71, 0.22)),
		var(--hrs-white);
	border: 1px solid var(--hrs-line);
	border-radius: var(--hrs-radius);
	box-shadow: var(--hrs-shadow-soft);
}

.wp-block-group.is-style-hrs-leistenkasten::before {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: 4px;
	background: var(--hrs-rainbow);
}

.is-style-hrs-leistenkasten > :first-child {
	margin-top: 0.3rem;
}

.is-style-hrs-leistenkasten > :last-child {
	margin-bottom: 0;
}

.is-style-hrs-leistenkasten :is(h2, h3) {
	margin-bottom: 0.8rem;
	font-size: 1.1rem;
	font-weight: 850;
}

/* Liste als Link-Pills (z. B. im Fußbereich). */
ul.is-style-hrs-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

ul.is-style-hrs-pills > li {
	margin: 0;
}

ul.is-style-hrs-pills a {
	display: inline-flex;
	padding: 0.55rem 0.85rem;
	background: rgba(255, 255, 255, 0.72);
	border: 1px solid rgba(49, 50, 51, 0.14);
	border-radius: 999px;
	color: var(--hrs-ink);
	font-weight: 850;
	text-decoration: none !important;
}

ul.is-style-hrs-pills > li:nth-child(3n) a {
	color: var(--hrs-red-text);
}

ul.is-style-hrs-pills a:hover {
	background: var(--hrs-ink);
	color: var(--hrs-white);
}

/* ==========================================================================
   Fußbereich: Pastell-Verlauf
   ========================================================================== */

#footer {
	position: relative;
	overflow: hidden;
	margin-top: clamp(3rem, 6vw, 5.5rem);
	background:
		linear-gradient(135deg, rgba(152, 194, 169, 0.95), rgba(116, 206, 228, 0.72) 34%, rgba(237, 191, 71, 0.8) 68%, rgba(195, 137, 206, 0.72)),
		var(--hrs-white);
	border-radius: var(--hrs-radius) var(--hrs-radius) 0 0;
	color: var(--hrs-ink);
}

#footer::before,
#footer::after {
	content: "";
	position: absolute;
	pointer-events: none;
	border-radius: 999px;
}

#footer::before {
	top: 1.2rem;
	right: 2rem;
	width: 92px;
	height: 18px;
	background: var(--hrs-red);
}

/* Direkt an der Unterkante, damit er nie die Copyright-Zeile überdeckt. */
#footer::after {
	bottom: 0;
	left: 2rem;
	width: 64px;
	height: 8px;
	border-radius: 999px 999px 0 0;
	background: var(--hrs-violet);
}

#footer [data-row],
#footer [data-row] > div {
	background: transparent;
	border-color: rgba(49, 50, 51, 0.12);
}

#footer :where(p, li, a, h2, h3, h4, .ct-footer-copyright) {
	color: var(--hrs-ink);
}

#footer .ct-widget :is(h2, h3, h4) {
	margin-top: 0;
	font-size: 1.3rem;
	font-weight: 850;
	line-height: 1.25;
}

#footer .is-style-hrs-dachzeile {
	color: var(--hrs-yellow-ink);
}

#footer .ct-widget :is(p, li):not(:where(.is-style-hrs-pills li)) a {
	font-weight: 850;
	text-decoration: underline;
	text-underline-offset: 0.18em;
}

#footer [data-id="menu"] a {
	font-weight: 850;
	text-transform: none;
}

/* ==========================================================================
   Kleine Bildschirme
   ========================================================================== */

@media (max-width: 999px) {
	#header [data-id="menu"] > ul > li > .sub-menu {
		grid-template-columns: minmax(200px, 1fr) minmax(0, 1.5fr);
	}
}

@media (max-width: 781px) {
	.wp-block-columns.is-style-hrs-schnellzugriff {
		margin-top: -1.5rem;
	}

	.is-style-hrs-schnellzugriff > .wp-block-column + .wp-block-column {
		border-left: 0;
	}

	.wp-block-group.is-style-hrs-abschnittskopf {
		flex-wrap: wrap;
	}

	/*
	 * Kopfbild: Auf schmalen Bildschirmen reicht der weiße Text bis an den
	 * rechten, sonst fast unabgedunkelten Bildrand. Gleichmäßig abdunkeln,
	 * damit der Kontrast überall mindestens 4,5:1 erreicht.
	 */
	.wp-block-cover.is-style-hrs-hero .wp-block-cover__background {
		background: linear-gradient(90deg, rgba(49, 50, 51, 0.88), rgba(49, 50, 51, 0.72)) !important;
	}
}

/*
 * Menü-Knopf (Handy/Tablet): Das Symbol ist nur 18 px groß. Eine unsichtbare
 * Fläche vergrößert die Trefferfläche auf 44 × 44 px, ohne das Layout zu ändern.
 */
#header .ct-header-trigger {
	position: relative;
}

#header .ct-header-trigger::after {
	content: "";
	position: absolute;
	inset: -13px;
}

/* ==========================================================================
   Druck
   ========================================================================== */

@media print {
	#header,
	#footer,
	.ct-back-to-top,
	.wp-block-cover.is-style-hrs-hero {
		display: none !important;
	}

	.entry-content a[href^="http"]::after {
		content: " (" attr(href) ")";
		font-size: 0.85em;
	}
}
