/*
 Theme Name:        sgh_twentytwentyfive_child
 Theme URI:         https://www.eltern-sgh.de/
 Description:       Child-Theme des Elternbeirats am Schickhardt-Gymnasium Herrenberg auf Basis von Twenty Twenty-Five. Gestaltung angelehnt an www.schickhardt.net.
 Author:            Elternbeirat am Schickhardt-Gymnasium Herrenberg
 Author URI:        https://www.eltern-sgh.de/
 Template:          twentytwentyfive
 Version:           1.3.1
 Requires at least: 6.8
 Requires PHP:      7.4
 Tags:              light, two-columns, right-sidebar, full-site-editing, accessibility-ready
 Text Domain:       sgh_twentytwentyfive_child
*/

/*
 * Design-Werte (Farben, Schrift, Größen, Breiten) stehen in theme.json.
 * Hier nur, was theme.json nicht ausdrücken kann: Sticky-Header, Grid, mobiles Menü,
 * Footer-Zeile, Breakpoints (1100 / 800 / 600 / 400 px wie sgh_twentyeleven_child).
 */

:root {
	--sgh-container: var(--wp--style--global--wide-size, 1108px);
	--sgh-gutter: var(--wp--custom--gutter);
	--sgh-brand-row: var(--wp--custom--brand-row); /* Höhe Logo-Zeile inkl. Trennlinie (Desktop) */
}

/* =Grundlayout
-------------------------------------------------------------- */

/* Header, Inhalt und Footer ohne Abstand untereinander */
.wp-site-blocks > * {
	margin-block-start: 0;
}
:focus-visible {
	outline: 2px solid var(--wp--preset--color--black);
	outline-offset: 2px;
}
strong, b {
	font-weight: 700;
}
h1, h2, h3, h4, h5, h6 {
	hyphens: auto;
	overflow-wrap: break-word;
}

/* Skip-Link (von WordPress erzeugt) sichtbar beim Fokussieren */
.skip-link.screen-reader-text:focus {
	background: var(--wp--preset--color--yellow);
	color: var(--wp--preset--color--black);
	font-weight: 700;
}

/* =Header
-------------------------------------------------------------- */

/* Sticky: negativer top = Höhe der Logo-Zeile → beim Scrollen bleibt nur die Menüleiste oben */
.sgh-header {
	background: #fff;
	border-bottom: 1px solid var(--wp--preset--color--border);
	position: sticky;
	top: calc(-1 * var(--sgh-brand-row));
	z-index: 9999;
}
.admin-bar .sgh-header {
	top: calc(32px - var(--sgh-brand-row));
}
html {
	scroll-padding-top: 72px; /* Anker nicht unter der Menüleiste verstecken */
}
.sgh-header__inner {
	align-items: center;
	box-sizing: border-box;
	column-gap: 24px;
	display: grid;
	grid-template-areas:
		"brand search"
		"nav   nav";
	grid-template-columns: 1fr auto;
	margin: 0 auto;
	max-width: calc(var(--sgh-container) + 2 * var(--sgh-gutter));
	padding: 0 var(--sgh-gutter);
}
.sgh-header__inner > *,
.sgh-panel > * {
	margin: 0;
}
.sgh-panel {
	display: contents;
}

/* Logo + zweizeiliger Titel (Header und Footer) */
.wp-block-group.sgh-brand {
	align-items: center;
	gap: 20px;
	max-width: 100%;
	position: relative;
	width: fit-content; /* Klickfläche des Links (::after) nur über Logo + Titel */
}
.sgh-header .sgh-brand {
	grid-area: brand;
	min-width: 0; /* Titel darf schrumpfen statt in Suche/Menü-Button zu laufen (WCAG 1.4.12) */
	padding: 16px 0;
}
.sgh-brand .sgh-brand__logo {
	flex: none;
	margin: 0;
}
.sgh-brand .sgh-brand__logo img {
	display: block;
	height: 120px;
	object-fit: contain;
	width: 120px;
}
.sgh-brand .sgh-brand__text {
	margin: 0;
}
.sgh-brand__text a {
	color: var(--wp--preset--color--black);
	display: flex;
	flex-direction: column;
	text-decoration: none;
}
/* Ein Link für Logo + Titel: Klickfläche und Fokusrahmen über die ganze Gruppe */
.sgh-brand__text a::after {
	content: "";
	inset: 0;
	position: absolute;
}
.sgh-brand__text a:focus-visible {
	outline: none;
}
.sgh-brand__text a:focus-visible::after {
	inset: 4px -8px; /* oben/unten innerhalb des Headers (sonst am Fensterrand abgeschnitten), seitlich Luft zum Text */
	outline: 2px solid var(--wp--preset--color--black);
}
.sgh-brand__line1 {
	font-size: 44px;
	font-weight: 900;
	hyphens: auto; /* nur wenn der Platz nicht reicht, z. B. bei vergrößerten Textabständen */
	overflow-wrap: break-word;
}
.sgh-brand__line2 {
	font-size: 24px;
	font-weight: 700;
}

/* Suche: Feld + gelber Button wie „Suche“ auf schickhardt.net */
.sgh-header .sgh-search {
	grid-area: search;
}
.sgh-search .wp-block-search__inside-wrapper {
	gap: 8px;
}
.wp-block-search .wp-block-search__input {
	background: #fff;
	border: 1px solid var(--wp--preset--color--border-strong); /* ≥ 3:1 (WCAG 1.4.11) */
	border-radius: var(--wp--custom--radius);
	box-sizing: border-box;
	color: var(--wp--preset--color--black);
	font-size: 16px;
	min-height: 38px; /* min-height: Text darf bei größerem Zeilenabstand wachsen (WCAG 1.4.12) */
	padding: 6px 12px;
	transition: border-color .15s ease;
}
.sgh-header .wp-block-search__input {
	flex: none;
	width: 220px;
}
.wp-block-search .wp-block-search__input::placeholder {
	color: var(--wp--preset--color--muted);
	opacity: 1;
}
.wp-block-search .wp-block-search__input:focus {
	border-color: var(--wp--preset--color--text);
}
.wp-block-search .wp-block-search__button {
	background: var(--wp--preset--color--yellow);
	min-height: 38px;
	margin-left: 0;
	padding: 6px 16px;
}
.wp-block-search .wp-block-search__button:hover {
	background: var(--wp--preset--color--black);
	color: #fff;
}
.sgh-search--content {
	max-width: 480px;
}

/* =Hauptnavigation (Navigation-Block mit dem klassischen Menü „primary“)
-------------------------------------------------------------- */

.sgh-header nav.wp-block-navigation.sgh-nav {
	border-top: 1px solid var(--wp--preset--color--border);
	grid-area: nav;
}
.wp-block-navigation.sgh-nav .wp-block-navigation__container {
	gap: 0;
	margin: 0 -10px;
}
.wp-block-navigation.sgh-nav .wp-block-navigation-item__content {
	color: var(--wp--preset--color--text);
	font-weight: 700;
	line-height: 24px;
	padding: 14px 10px;
}
.wp-block-navigation.sgh-nav .wp-block-navigation-item__content:hover,
.wp-block-navigation.sgh-nav .wp-block-navigation-item__content:focus {
	color: var(--wp--preset--color--black);
}
/* Pfeil bei Einträgen mit Untermenü */
.wp-block-navigation.sgh-nav .has-child > .wp-block-navigation-item__content {
	padding-right: 0;
}
/* Klickfläche 24 × 24 px (WCAG 2.5.8), Pfeil bleibt 6 px; Gesamtbreite wie vorher 28 px */
.wp-block-navigation.sgh-nav .wp-block-navigation__container > .has-child > .wp-block-navigation__submenu-icon {
	align-items: center;
	display: inline-flex;
	height: 24px;
	justify-content: center;
	margin: 0 2px;
	opacity: .6;
	padding: 0;
	width: 24px;
}
.wp-block-navigation.sgh-nav .wp-block-navigation__submenu-icon svg {
	display: none;
}
.wp-block-navigation.sgh-nav .wp-block-navigation__submenu-icon::after {
	border-bottom: 2px solid currentColor;
	border-right: 2px solid currentColor;
	content: "";
	display: block;
	height: 6px;
	margin-top: -4px;
	transform: rotate(45deg);
	width: 6px;
}
/* Aktiver Eintrag / Hover: Unterstrich in SGH-Gelbgrün */
.wp-block-navigation.sgh-nav .wp-block-navigation__container > .wp-block-navigation-item {
	box-shadow: inset 0 -3px 0 transparent;
	transition: box-shadow .15s ease;
}
.wp-block-navigation.sgh-nav .wp-block-navigation__container > .wp-block-navigation-item:hover,
.wp-block-navigation.sgh-nav .wp-block-navigation__container > .wp-block-navigation-item:focus-within,
.wp-block-navigation.sgh-nav .wp-block-navigation__container > .current-menu-item,
.wp-block-navigation.sgh-nav .wp-block-navigation__container > .current-menu-ancestor {
	box-shadow: inset 0 -3px 0 var(--wp--preset--color--lime);
}

/* Dropdowns: weiße Karte mit Schatten wie auf schickhardt.net */
.wp-block-navigation.sgh-nav .has-child .wp-block-navigation__submenu-container {
	background: #fff;
	border: 0 !important;
	border-radius: var(--wp--custom--radius-lg);
	box-shadow: var(--wp--custom--shadow-menu);
	padding: 8px 0;
	z-index: 99999;
}
.wp-block-navigation.sgh-nav .has-child:not(.open-on-click):hover > .wp-block-navigation__submenu-container,
.wp-block-navigation.sgh-nav .has-child:not(.open-on-click):focus-within > .wp-block-navigation__submenu-container,
.wp-block-navigation.sgh-nav .has-child .wp-block-navigation-submenu__toggle[aria-expanded="true"] ~ .wp-block-navigation__submenu-container {
	height: auto;
	min-width: 260px;
	opacity: 1;
	overflow: visible;
	visibility: visible;
	width: auto;
}
.wp-block-navigation.sgh-nav .wp-block-navigation__submenu-container .wp-block-navigation-item {
	margin: 0;
}
.wp-block-navigation.sgh-nav .has-child .wp-block-navigation__submenu-container .wp-block-navigation-item > .wp-block-navigation-item__content {
	color: var(--wp--custom--menu-text);
	font-weight: 500;
	padding: 8px 16px;
	width: 100%;
}
.wp-block-navigation.sgh-nav .has-child .wp-block-navigation__submenu-container .wp-block-navigation-item > .wp-block-navigation-item__content:hover,
.wp-block-navigation.sgh-nav .has-child .wp-block-navigation__submenu-container .wp-block-navigation-item > .wp-block-navigation-item__content:focus,
.wp-block-navigation.sgh-nav .has-child .wp-block-navigation__submenu-container .current-menu-item.wp-block-navigation-item > .wp-block-navigation-item__content {
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--black);
}
.wp-block-navigation.sgh-nav .has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container {
	left: 100%;
	top: -8px;
}

/* Menü-Button (nur mobil) */
.sgh-menu-toggle {
	align-items: center;
	background: #fff;
	border: 1px solid var(--wp--preset--color--border-strong); /* ≥ 3:1 (WCAG 1.4.11) */
	border-radius: var(--wp--custom--radius-lg);
	color: var(--wp--preset--color--black);
	cursor: pointer;
	display: none;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	gap: 8px;
	grid-area: toggle;
	min-height: 40px;
	padding: 0 12px;
}
/* Link „Termine“ unter dem Menü-Button (nur mobil): Sprung zur Termine-Box bzw. zur Terminliste */
.sgh-termine-jump {
	display: none;
}
/* „Menü“ nur für Screenreader – sichtbar ist nur das Symbol */
.sgh-menu-toggle__label {
	position: absolute !important;
	clip: rect(1px, 1px, 1px, 1px);
	height: 1px;
	overflow: hidden;
	width: 1px;
}
.sgh-menu-toggle:focus:not(:focus-visible) {
	outline: none;
}
.sgh-menu-toggle__icon,
.sgh-menu-toggle__icon::before,
.sgh-menu-toggle__icon::after {
	background: currentColor;
	border-radius: 1px;
	display: block;
	height: 2px;
	position: relative;
	transition: transform .2s ease, background .2s ease;
	width: 18px;
}
.sgh-menu-toggle__icon::before,
.sgh-menu-toggle__icon::after {
	content: "";
	position: absolute;
}
.sgh-menu-toggle__icon::before { top: -6px; }
.sgh-menu-toggle__icon::after { top: 6px; }
.sgh-menu-toggle[aria-expanded="true"] .sgh-menu-toggle__icon { background: transparent; }
.sgh-menu-toggle[aria-expanded="true"] .sgh-menu-toggle__icon::before { transform: translateY(6px) rotate(45deg); }
.sgh-menu-toggle[aria-expanded="true"] .sgh-menu-toggle__icon::after { transform: translateY(-6px) rotate(-45deg); }

/* =Inhalt + rechte Sidebar
-------------------------------------------------------------- */

.sgh-main {
	box-sizing: border-box;
	margin: 0 auto;
	max-width: calc(var(--sgh-container) + 2 * var(--sgh-gutter));
	padding: 48px var(--sgh-gutter) 80px;
}
.sgh-main > * {
	margin-block-start: 0;
}
/* Grid: Inhalt | Sidebar */
.sgh-layout--sidebar {
	--sgh-sidebar: 300px;
	align-items: start;
	column-gap: 64px;
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--sgh-sidebar);
}
.sgh-content {
	min-width: 0;
}

/* Einzelseiten/-beiträge (ohne Sidebar): lesbare Spaltenbreite */
.sgh-singular {
	margin: 0 auto;
	max-width: var(--wp--style--global--content-size, 860px);
}

/* =Überschriften
-------------------------------------------------------------- */

.sgh-entry__title {
	padding: 0 0 8px;
}
.sgh-entry__title a {
	color: var(--wp--preset--color--black);
}
.sgh-entry__title a:hover,
.sgh-entry__title a:focus,
.sgh-entry__title a:active {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--lime);
	text-decoration-thickness: 4px !important; /* TT5 setzt 1px !important */
	text-underline-offset: 6px;
}
.sgh-page-title {
	font-size: var(--wp--preset--font-size--xx-large);
	font-weight: 900;
	margin: 0 0 32px;
}
.sgh-entry__content h1 {
	margin: 16px 0 32px;
}
.sgh-entry__content h2 {
	margin: 12px 0 24px;
}
.sgh-entry__content h3 {
	margin: 24px 0 12px;
}

/* =Beiträge
-------------------------------------------------------------- */

.sgh-post-list > li,
.sgh-posts .wp-block-query-no-results {
	border-bottom: 1px solid var(--wp--preset--color--border);
	margin: 0 0 48px;
	padding: 0 0 48px;
}
.sgh-entry > * {
	margin-block-start: 0;
}
.sgh-entry__meta {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
	line-height: 20px;
}
.sgh-entry__meta > *,
.sgh-entry__meta p {
	margin: 0;
}
.sgh-entry__meta a,
.sgh-entry__terms a {
	font-weight: 600;
	text-decoration: underline; /* Links im Fließtext nicht nur über Farbe/Stärke erkennbar (WCAG 1.4.1) */
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}
.sgh-entry .sgh-entry__content {
	padding: 24px 0 0;
}
.sgh-entry .sgh-entry__terms {
	line-height: 20px;
	margin-top: 16px;
}
/* Textlinks: dunkel, unterstrichen (wie „mehr erfahren“); auch Fließtext der Vorlagen (404) */
.sgh-entry__content a,
.sgh-singular > p a,
.sgh-termin-details a,
.sgh-archive-meta a,
.wp-block-comment-content a {
	color: var(--wp--preset--color--text);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.sgh-entry__content a:hover,
.sgh-entry__content a:focus,
.sgh-singular > p a:hover,
.sgh-termin-details a:hover,
.sgh-archive-meta a:hover,
.wp-block-comment-content a:hover {
	color: var(--wp--preset--color--black);
	text-decoration-color: var(--wp--preset--color--lime);
	text-decoration-thickness: 3px !important;
}
.sgh-entry__content .wp-block-button__link,
.sgh-entry__content .wp-block-button__link:hover {
	text-decoration: none;
}
.sgh-entry__content .more-link {
	display: inline;
	font-weight: 700;
}
.sgh-archive-header > * {
	margin-block-start: 0;
}
.sgh-archive-meta {
	background-color: var(--wp--preset--color--surface);
	border-radius: var(--wp--custom--radius-lg);
	margin: 0 0 48px;
	padding: 24px;
}
.sgh-archive-meta p:last-child {
	margin-bottom: 0;
}

/* Listen wie Twenty Eleven */
.sgh-entry__content ul {
	list-style: square;
}

/* Bilder */
.sgh-entry__content img {
	border-radius: var(--wp--custom--radius-lg);
	height: auto;
	max-width: 100%;
}
.wp-caption {
	background: var(--wp--preset--color--surface);
	border-radius: var(--wp--custom--radius-lg);
	max-width: 100%;
}
.wp-caption .wp-caption-text,
.gallery-caption {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}
/* Klassische Ausrichtungen aus alten Beiträgen */
.alignleft { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }

/* Tabellen (inkl. TablePress) */
.sgh-entry__content table,
.tablepress {
	font-size: 15px;
}
.sgh-entry__content th,
.tablepress thead th {
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--black);
	font-weight: 700;
}

/* Formularfelder */
input[type="text"],
input[type="email"],
input[type="search"],
input[type="url"],
input[type="tel"],
input[type="password"],
textarea,
select {
	background: #fff;
	border: 1px solid var(--wp--preset--color--border-strong); /* ≥ 3:1 (WCAG 1.4.11) */
	border-radius: var(--wp--custom--radius);
	box-shadow: none;
	color: var(--wp--preset--color--black);
	font-family: inherit;
	font-size: 16px;
	padding: 8px 12px;
}
input:focus,
textarea:focus,
select:focus {
	border-color: var(--wp--preset--color--text);
}

/* Newsletter-Anmeldung (Plugin „Newsletter“): Felder mit sichtbarem Rahmen (WCAG 1.4.11),
   größere Checkbox (2.5.8), Pflichtfelder auch im Text markiert */
.tnp-subscription input.tnp-name,
.tnp-subscription input.tnp-email {
	background: #fff;
	border: 1px solid var(--wp--preset--color--border-strong);
	border-radius: var(--wp--custom--radius);
	color: var(--wp--preset--color--black);
}
.tnp-subscription input.tnp-privacy {
	height: 20px;
	max-width: none; /* Plugin begrenzt auf 1em */
	vertical-align: middle;
	width: 20px;
}
.tnp-subscription .tnp-field-checkbox label {
	display: inline;
}
.tnp-subscription .tnp-field:has(input[required]) > label::after {
	content: " (Pflichtfeld)";
	font-weight: 400;
}

/* Blätter-Navigation */
.sgh-pagination,
.sgh-post-nav {
	font-size: 16px;
}
.sgh-pagination a,
.sgh-post-nav a {
	color: var(--wp--preset--color--text);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.sgh-pagination a:hover,
.sgh-post-nav a:hover {
	text-decoration-color: var(--wp--preset--color--lime);
	text-decoration-thickness: 3px !important;
}
.sgh-singular > .sgh-post-nav {
	margin-top: 48px;
}

/* =Sidebar: helle Karten (wie die Twenty-Eleven-Widgets)
-------------------------------------------------------------- */

.sgh-sidebar > * {
	margin-block-start: 0;
}
.sgh-widget {
	background: var(--wp--preset--color--surface);
	border-radius: var(--wp--custom--radius-lg);
	margin: 0 0 24px;
	padding: 24px;
}
.sgh-widget > * {
	margin-block-start: 0;
}
.sgh-widget .sgh-widget__title {
	color: var(--wp--preset--color--text);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
	line-height: 28px;
	margin: 0 0 12px;
}
.sgh-widget .wp-block-latest-posts {
	color: var(--wp--preset--color--muted); /* war #777 (≈ 4,0:1 auf Fläche) */
	font-size: 13px;
	line-height: 1.5;
	list-style: none;
	margin: 0;
	padding: 0;
}
.sgh-widget .wp-block-latest-posts li {
	border-top: 1px solid var(--wp--preset--color--border);
	margin: 0;
	padding: 10px 0;
}
.sgh-widget .wp-block-latest-posts li:first-child {
	border-top: 0;
	padding-top: 0;
}
.sgh-widget .wp-block-latest-posts li:last-child {
	padding-bottom: 0;
}
.sgh-widget a {
	color: var(--wp--preset--color--text);
	font-weight: 500;
	text-decoration: none;
}
.sgh-widget a:hover,
.sgh-widget a:focus,
.sgh-widget a:active {
	color: var(--wp--preset--color--black);
	text-decoration: underline;
}
.sgh-widget select {
	max-width: 100%;
	width: 100%;
}

/* =Termine (inc/termine.php): Sidebar-Box, Liste auf Seiten, Termin-Seite
-------------------------------------------------------------- */

.sgh-termine {
	list-style: none;
	margin: 0;
	padding: 0;
}
.sgh-termine__item {
	border-top: 1px solid var(--wp--preset--color--border);
	margin: 0;
	padding: 10px 0;
}
.sgh-termine__item:first-child {
	border-top: 0;
	padding-top: 0;
}
.sgh-termine__date,
.sgh-termine__title,
.sgh-termine__ort,
.sgh-termine__link {
	display: block;
}
.sgh-termine__date,
.sgh-termine__ort {
	color: var(--wp--preset--color--muted);
}
.sgh-termine__empty {
	margin: 0;
}

/* in der Sidebar: Rhythmus und Größe wie „Neueste Beiträge“ */
.sgh-widget .sgh-termine,
.sgh-widget .sgh-termine__empty {
	font-size: 13px;
	line-height: 1.5;
}
.sgh-widget .sgh-termine__title {
	font-size: 15px;
	margin: 2px 0;
}
.sgh-widget > .sgh-widget__more {
	border-top: 1px solid var(--wp--preset--color--border);
	font-size: 13px;
	margin: 10px 0 0;
	padding-top: 10px;
}
.sgh-widget > .sgh-widget__more a {
	font-weight: 700;
}

/* auf Seiten ([sgh_termine] im Inhalt) – ohne die Quadrat-Aufzählung der Inhaltslisten */
.sgh-entry__content ul.sgh-termine {
	list-style: none;
	margin-block: 24px;
	padding-left: 0;
}
.sgh-entry__content .sgh-termine__item {
	padding: 16px 0;
}
.sgh-entry__content .sgh-termine__date {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
}
.sgh-entry__content .sgh-termine__title {
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
	line-height: 1.4;
	margin: 4px 0;
}
.sgh-entry__content .sgh-termine__ort {
	font-size: var(--wp--preset--font-size--small);
}
.sgh-entry__content .sgh-termine__link {
	font-size: var(--wp--preset--font-size--small);
	margin-top: 4px;
}

/* Termin-Seite (templates/single-sgh_termin.html) */
.sgh-termin-details__past {
	background: var(--wp--preset--color--surface);
	border-left: 4px solid var(--wp--preset--color--border-strong);
	font-weight: 700;
	margin: 0 0 24px;
	padding: 12px 16px;
}
.sgh-termin-details {
	display: grid;
	gap: 8px 24px;
	grid-template-columns: max-content minmax(0, 1fr);
	margin: 0 0 32px;
}
.sgh-termin-details dt {
	font-weight: 700;
}
.sgh-termin-details dd {
	margin: 0;
	overflow-wrap: anywhere;
}
.sgh-termin-back {
	margin-top: 48px;
}

/* Kalenderdatei: Symbol-Link in den Listen (unten rechts neben der letzten, kurzen Zeile –
   Ort bzw. „Weitere Informationen“ –, damit die Einträge nicht höher werden), Button auf der Termin-Seite */
.sgh-termine__item {
	position: relative;
}
.sgh-termine__item > :nth-last-child(2) {
	padding-right: 36px;
}
.sgh-ics {
	align-items: center;
	border-radius: var(--wp--custom--radius);
	bottom: 6px; /* Mitte der letzten Zeile */
	color: var(--wp--preset--color--text);
	display: inline-flex;
	height: 28px; /* Klickfläche ≥ 24 × 24 px */
	justify-content: center;
	position: absolute;
	right: 0;
	width: 28px;
}
.sgh-entry__content .sgh-ics {
	bottom: 12px; /* größerer Abstand der Einträge auf Seiten */
}
.sgh-ics:hover {
	background: var(--wp--preset--color--lime);
	color: var(--wp--preset--color--black);
}
.sgh-ics__icon {
	display: block;
	flex: none;
}
.sgh-termin-details__ics {
	margin: -8px 0 32px;
}
.sgh-termin-details__ics .sgh-button {
	align-items: center;
	background: var(--wp--preset--color--lime);
	border-radius: var(--wp--custom--radius);
	box-sizing: border-box;
	color: var(--wp--preset--color--black);
	display: inline-flex;
	font-weight: 700;
	gap: 8px;
	line-height: 24px;
	min-height: 44px;
	padding: 10px 20px;
	text-decoration: none;
}
.sgh-termin-details__ics .sgh-button:hover {
	background: var(--wp--preset--color--black);
	color: var(--wp--preset--color--white, #fff);
}

/* =Footer (hellblau wie schickhardt.net)
-------------------------------------------------------------- */

.sgh-footer {
	background: var(--wp--preset--color--blue);
	color: var(--wp--preset--color--black);
}
.sgh-footer__inner {
	box-sizing: border-box;
	margin: 0 auto;
	max-width: calc(var(--sgh-container) + 2 * var(--sgh-gutter));
	padding: 64px var(--sgh-gutter) 32px;
}
.sgh-footer .sgh-brand .sgh-brand__logo img {
	height: 96px;
	width: 96px;
}
.sgh-footer .sgh-brand__line1 {
	font-size: 24px;
}
.sgh-footer .sgh-brand__line2 {
	font-size: 24px;
}
.sgh-footer__inner > .sgh-footer__bottom {
	align-items: baseline;
	border-top: 1px solid var(--wp--preset--color--black);
	gap: 8px 24px;
	line-height: 24px;
	margin-top: 48px;
	padding: 24px 0 0;
}
.sgh-footer__bottom > * {
	margin: 0;
}
.sgh-footer__legal {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	list-style: none;
	padding: 0;
}
.sgh-footer__legal li {
	margin: 0;
}
.sgh-footer__legal a {
	color: var(--wp--preset--color--text);
	font-weight: 400;
	text-decoration: none;
}
.sgh-footer__legal a:hover,
.sgh-footer__legal a:focus {
	color: var(--wp--preset--color--black);
	text-decoration: underline;
}

/* =Tablet / Mobil
-------------------------------------------------------------- */

@media (max-width: 1100px) {
	.sgh-layout--sidebar {
		--sgh-sidebar: 260px;
		column-gap: 48px;
	}
	/* Logo-Zeile: Titel und Suche etwas kleiner, damit alles nebeneinander passt */
	.sgh-brand__line1 {
		font-size: 36px;
	}
	.sgh-brand__line2 {
		font-size: 20px;
	}
	.sgh-header .wp-block-search__input {
		width: 180px;
	}
}

@media (max-width: 800px) {
	:root {
		--sgh-gutter: 16px;
	}

	/* Header: Logo + Menü-Button, Panel klappt darunter auf */
	.sgh-header {
		top: 0;
	}
	html {
		scroll-padding-top: 170px; /* ganzer Header bleibt mobil stehen (je nach Breite bis ca. 155 px) */
	}
	.sgh-header__inner {
		grid-template-areas:
			"brand toggle"
			"brand jump"
			"panel panel";
		grid-template-columns: 1fr auto;
	}
	.sgh-header .sgh-brand {
		grid-row: 1 / span 2;
	}
	.sgh-menu-toggle {
		align-self: end;
		justify-self: end;
	}
	/* Symbol über kurzer Beschriftung: nicht breiter als der Menü-Button, damit der Titel nicht umbricht */
	.sgh-termine-jump {
		align-items: center;
		align-self: start;
		color: var(--wp--preset--color--black);
		display: inline-flex;
		flex-direction: column;
		font-size: 12px;
		font-weight: 600;
		gap: 2px;
		grid-area: jump;
		justify-self: end;
		line-height: 1.2;
		margin-top: 6px;
		min-width: 44px; /* Klickfläche ≥ 24 px */
		padding: 2px 0;
		text-decoration: underline;
		text-underline-offset: 2px;
	}
	.sgh-termine-jump:hover {
		text-decoration-color: var(--wp--preset--color--lime);
		text-decoration-thickness: 2px;
	}
	.sgh-termine-jump__icon {
		flex: none;
	}
	.wp-block-group.sgh-header .sgh-brand,
	.sgh-header .wp-block-group.sgh-brand {
		gap: 12px;
	}
	.sgh-header .sgh-brand .sgh-brand__logo img {
		height: 80px;
		width: 80px;
	}
	.sgh-header .sgh-brand__line1 {
		font-size: 30px;
	}
	.sgh-header .sgh-brand__line2 {
		font-size: 15px;
	}
	.sgh-menu-toggle {
		display: inline-flex;
	}
	.sgh-panel {
		border-top: 1px solid var(--wp--preset--color--border);
		display: block;
		grid-area: panel;
		max-height: calc(100vh - 115px);
		max-height: calc(100dvh - 115px);
		overflow-y: auto;
		overscroll-behavior: contain;
		padding: 16px 0 8px;
	}
	.js .sgh-panel:not(.is-open) {
		display: none;
	}
	.sgh-header .sgh-search {
		margin-bottom: 8px;
	}
	.sgh-header .wp-block-search__input {
		flex: 1 1 auto;
		width: auto;
	}

	/* Menü untereinander, Untermenüs eingerückt und immer sichtbar */
	.sgh-header .wp-block-navigation.sgh-nav {
		border-top: 0;
		display: block;
	}
	.wp-block-navigation.sgh-nav .wp-block-navigation__container,
	.wp-block-navigation.sgh-nav .wp-block-navigation__container .wp-block-navigation-item {
		display: block;
		margin: 0;
	}
	.wp-block-navigation.sgh-nav .wp-block-navigation-item__content {
		border-bottom: 1px solid var(--wp--preset--color--border);
		display: block;
		padding: 12px 0;
	}
	.wp-block-navigation.sgh-nav .has-child > .wp-block-navigation-item__content {
		padding-right: 0;
	}
	.wp-block-navigation.sgh-nav .wp-block-navigation__submenu-icon {
		display: none !important;
	}
	.wp-block-navigation.sgh-nav .wp-block-navigation__container > .wp-block-navigation-item,
	.wp-block-navigation.sgh-nav .wp-block-navigation__container > .wp-block-navigation-item:hover,
	.wp-block-navigation.sgh-nav .wp-block-navigation__container > .wp-block-navigation-item:focus-within {
		box-shadow: none;
	}
	.wp-block-navigation.sgh-nav .current-menu-item > .wp-block-navigation-item__content {
		box-shadow: inset 4px 0 0 var(--wp--preset--color--lime);
		padding-left: 12px;
	}
	.wp-block-navigation.sgh-nav .has-child .wp-block-navigation__submenu-container,
	.wp-block-navigation.sgh-nav .has-child:not(.open-on-click):hover > .wp-block-navigation__submenu-container,
	.wp-block-navigation.sgh-nav .has-child:not(.open-on-click):focus-within > .wp-block-navigation__submenu-container {
		border-radius: 0;
		box-shadow: none;
		height: auto;
		min-width: 0;
		opacity: 1;
		overflow: visible;
		padding: 0;
		position: static;
		visibility: visible;
		width: auto;
	}
	.wp-block-navigation.sgh-nav .has-child .wp-block-navigation__submenu-container .wp-block-navigation-item > .wp-block-navigation-item__content {
		border-bottom: 0;
		padding: 10px 0 10px 20px;
	}
	.wp-block-navigation.sgh-nav .has-child .wp-block-navigation__submenu-container .current-menu-item.wp-block-navigation-item > .wp-block-navigation-item__content {
		background: transparent;
		padding-left: 24px;
	}
	.wp-block-navigation.sgh-nav .has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container .wp-block-navigation-item > .wp-block-navigation-item__content {
		padding-left: 40px;
	}

	/* Inhalt einspaltig, Sidebar darunter */
	.sgh-main {
		padding-bottom: 48px;
		padding-top: 32px;
	}
	.sgh-layout--sidebar {
		display: block;
	}
	.sgh-layout--sidebar > .sgh-sidebar {
		margin-top: 48px;
	}

	/* Überschriften mobil (schickhardt.net: H1 34px, H2 30px) */
	h1,
	.sgh-page-title {
		font-size: 34px !important;
	}
	h2 {
		font-size: 30px !important;
	}
	.sgh-widget .sgh-widget__title {
		font-size: var(--wp--preset--font-size--large) !important;
	}
	.sgh-post-list > li {
		margin-bottom: 32px;
		padding-bottom: 32px;
	}

	.sgh-footer__inner {
		padding-top: 48px;
	}
	.sgh-footer .sgh-brand .sgh-brand__logo img {
		height: 72px;
		width: 72px;
	}
	.sgh-footer .sgh-brand__line1 {
		font-size: 20px;
	}
	.sgh-footer .sgh-brand__line2 {
		font-size: 14px;
	}
	.sgh-footer__inner > .sgh-footer__bottom {
		flex-direction: column;
		margin-top: 32px;
	}
}

/* Mobil: Kopfzeile unter der Admin-Leiste (nur für eingeloggte Nutzer) */
@media (max-width: 800px) {
	.admin-bar .sgh-header { top: 32px; }
}
@media (max-width: 782px) {
	.admin-bar .sgh-header { top: 46px; }
}
@media (max-width: 600px) {
	.admin-bar .sgh-header { top: 0; }
}

@media (max-width: 400px) {
	.sgh-header__inner {
		column-gap: 12px;
	}
	.sgh-header .sgh-brand .sgh-brand__logo img {
		height: 72px;
		width: 72px;
	}
	.sgh-header .sgh-brand__line2 {
		font-size: 14px;
	}
}

/* Einzelseiten auf breiten Bildschirmen linksbündig wie auf schickhardt.net */
@media (min-width: 1240px) {
	.sgh-singular {
		margin-left: 0;
		max-width: 800px;
	}
}

@media (max-width: 340px) {
	.sgh-header .sgh-brand .sgh-brand__logo img {
		height: 56px;
		width: 56px;
	}
	.sgh-header .sgh-brand__line1 {
		font-size: 24px;
	}
	.sgh-header .sgh-brand__line2 {
		font-size: 12px;
	}
}

@media print {
	.sgh-menu-toggle,
	.sgh-panel,
	.sgh-footer .sgh-brand__logo {
		display: none !important;
	}
	.sgh-main,
	.sgh-layout--sidebar {
		display: block;
		padding: 0;
	}
}
