/* ==========================================================================
   GAG Schulwebsite – Gestaltung
   Farben und Schriften nach dem GAG-Dokumentdesign.
   ========================================================================== */

:root {
	--ink: #23262b;
	--muted: #5d6570;
	--navy: #27355a;
	--blue: #2b6f9e;
	--teal: #2f9fb8;
	--green: #4f8f45;
	--red: #c9473d;
	--tint-blue: #eef4f9;
	--tint-green: #eef6ef;
	--tint-red: #fbefee;
	--tint-gold: #fdf5e8;
	--line: #dde2e8;
	--line-soft: #e3e7ec;
	--band: #f6f8fa;
	--radius: 12px;
	--font-head: 'Poppins', 'Segoe UI', Arial, sans-serif;
	--font-body: 'Lato', 'Segoe UI', Arial, sans-serif;
	--gutter: 40px;
	--shadow: 0 8px 24px rgba(39, 53, 90, .10);
}

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

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

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }

body {
	margin: 0;
	background: #fff;
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

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

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--navy); }

:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
.gag-main:focus { outline: none; }

button { font: inherit; }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute !important; word-wrap: normal !important;
}
.skip-link:focus {
	clip: auto; clip-path: none; height: auto; width: auto; margin: 0;
	position: fixed !important; top: 12px; left: 12px; z-index: 1000;
	background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 8px;
	font-family: var(--font-head); font-weight: 600; text-decoration: none;
}

.gag-container {
	width: 100%;
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--gutter);
	padding-right: var(--gutter);
}

/* ---------- Farbstreifen ---------- */

.gag-strip { display: flex; height: 6px; }
.gag-strip span { flex: 1 1 0; }
.gag-strip--card { height: 5px; }
.gag-strip--footer { height: 6px; }

/* ---------- Servicezeile ---------- */

.gag-servicebar {
	background: var(--band);
	border-bottom: 1px solid var(--line-soft);
	font-size: 13px;
	color: var(--muted);
}
.gag-servicebar__inner {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	min-height: 36px;
}
.gag-servicebar__links { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0; padding: 0; list-style: none; }
.gag-servicebar a { color: var(--muted); text-decoration: none; }
.gag-servicebar a:hover { color: var(--navy); text-decoration: underline; }
.gag-servicebar a.is-strong { color: var(--navy); font-weight: 700; }

/* ---------- Kopf ---------- */

.gag-header__inner {
	display: flex; align-items: center; justify-content: space-between; gap: 24px;
	padding-top: 18px; padding-bottom: 18px;
}
.gag-logo { display: block; flex: none; }
.gag-logo__img { height: 92px; width: auto; }
.gag-header__tools { display: flex; align-items: center; gap: 8px; }
/* Netzwerk-Logos neben dem Schullogo, etwas kleiner */
.gag-badges { display: flex; align-items: center; gap: 26px; margin: 0 auto 0 4px; padding: 0 0 0 28px; list-style: none; border-left: 1px solid var(--line-soft); min-width: 0; }
.gag-badges li { display: flex; align-items: center; }
.gag-badges a { display: flex; align-items: center; }
.gag-badges img { height: auto; max-height: 72px; width: auto; max-width: 150px; object-fit: contain; }
/* Variante: links neben dem Suchfeld */
.gag-badges--suche { margin: 0 22px 0 0; padding: 0 26px 0 0; border-left: 0; border-right: 1px solid var(--line-soft); }
@media (max-width: 1100px) {
	.gag-badges { gap: 18px; padding-left: 20px; } .gag-badges img { max-height: 60px; max-width: 120px; }
	.gag-badges--suche { padding: 0 18px 0 0; margin-right: 14px; }
}

.gag-search {
	display: flex; align-items: center; height: 44px;
	border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff;
}
.gag-search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 159, 184, .25); }
.gag-search__input {
	border: 0; outline: 0; height: 44px; padding: 0 14px; width: 220px;
	font-family: var(--font-body); font-size: 15px; color: var(--ink); background: transparent;
}
.gag-search__btn {
	width: 44px; height: 44px; border: 0; background: var(--navy); color: #fff;
	display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.gag-search__btn:hover { background: var(--blue); }

.gag-iconbtn {
	width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line);
	background: #fff; color: var(--navy);
	display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.gag-iconbtn--solid { background: var(--navy); border-color: var(--navy); color: #fff; }
.gag-only-mobile { display: none; }

/* ---------- Hauptmenü: drei dauerhafte Zeilen ---------- */

.gag-nav__list { display: flex; flex-wrap: wrap; margin: 0 auto; list-style: none; }
.gag-nav__link { display: flex; align-items: center; text-decoration: none; font-family: var(--font-head); }
/* Menüpunkte ohne eigene Seite (Schaltflächen statt Links) sehen aus wie die übrigen. */
button.gag-nav__link, button.gag-drawer__link { margin: 0; border: 0; background: transparent; line-height: inherit; text-align: left; cursor: pointer; }

.gag-nav__row--1 { border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.gag-nav__row--1 .gag-nav__list { gap: 4px; }
.gag-nav__row--1 .gag-nav__link {
	height: 40px; padding: 0 18px; border-radius: 8px 8px 0 0;
	font-size: 15px; font-weight: 500; color: var(--navy);
}
.gag-nav__row--1 .gag-nav__link:hover { background: var(--tint-blue); color: var(--navy); }
/* Zusatzmenü („Hauptmenü rechts“): rechtsbündig in derselben Zeile. Reicht der Platz nicht, entfernt main.js die
   Lücke (Klasse is-eng) und beide Menüs laufen als eines weiter. */
.gag-nav__row--1 .gag-nav__rechts--erster { margin-left: auto; }
.gag-nav__row--1 .gag-nav__list.is-eng .gag-nav__rechts--erster { margin-left: 0; }
.gag-nav__row--1 .gag-nav__link.is-active { background: var(--navy); color: #fff; font-weight: 700; }
.gag-nav__row--1:has(~ .gag-nav__row--2), .gag-nav.is-flying .gag-nav__row--1 { border-bottom-color: var(--navy); }
.gag-nav__row--1 .gag-nav__link.is-hover:not(.is-active) { background: var(--navy); color: #fff; }

.gag-nav__row--2 { background: var(--navy); }
.gag-nav__row--2 .gag-nav__list { gap: 2px 2px; padding-top: 4px; padding-bottom: 4px; }
.gag-nav__row--2 .gag-nav__link {
	min-height: 32px; padding: 0 12px; border-radius: 6px;
	font-size: 14px; font-weight: 400; color: #dfe5ee;
}
.gag-nav__row--2 .gag-nav__link:hover { background: rgba(255, 255, 255, .10); color: #fff; }
.gag-nav__row--2 .gag-nav__link.is-active { background: var(--blue); color: #fff; font-weight: 700; }
/* „Überblick“: erster Eintrag einer Unterzeile (die Seite des Oberpunkts), durch einen Strich abgesetzt. */
.gag-nav__overview { display: flex; align-items: center; }
.gag-nav__overview::after { content: ''; width: 1px; height: 18px; margin: 0 6px 0 8px; background: rgba(255, 255, 255, .35); }
.gag-nav__row--3 .gag-nav__overview::after { background: rgba(39, 53, 90, .25); }

.gag-nav__row--3 { background: var(--tint-blue); border-bottom: 1px solid var(--line); }
.gag-nav__row--3 .gag-nav__list { gap: 2px; padding-top: 4px; padding-bottom: 4px; }
.gag-nav__row--3 .gag-nav__link {
	min-height: 30px; padding: 0 13px; border-radius: 6px;
	font-size: 13.5px; font-weight: 400; color: var(--navy);
}
.gag-nav__row--3 .gag-nav__link:hover { background: #fff; }
.gag-nav__row--3 .gag-nav__link.is-active { background: #fff; color: var(--blue); font-weight: 700; }

/* Aufklappen per Mauszeiger: Vorschau-Zeilen liegen über den Zeilen darunter */
.gag-nav { position: relative; z-index: 40; }
.gag-nav__flywrap { position: relative; height: 0; }
.gag-nav__flyout { position: absolute; left: 0; right: 0; top: 0; box-shadow: 0 14px 30px rgba(20, 26, 40, .18); }
.gag-nav__flyout[hidden], .gag-nav__flyout .gag-nav__row[hidden] { display: none; }
.gag-nav.is-flying > .gag-nav__row--2, .gag-nav.is-flying > .gag-nav__row--3 { visibility: hidden; }
.gag-nav.is-flying .gag-nav__row--1 .gag-nav__link.is-active:not(.is-hover) { background: var(--tint-blue); color: var(--navy); }
.gag-nav__row--2 .gag-nav__link.is-hover:not(.is-active) { background: rgba(255, 255, 255, .10); color: #fff; }
.gag-nav__row--3 .gag-nav__link.is-hover:not(.is-active) { background: #fff; }

.gag-nav__hint { margin: 0 auto; padding-top: 12px; padding-bottom: 12px; font-size: 14px; color: var(--red); }

/* ---------- Kompakte Leiste und Schublade (kleine Bildschirme) ---------- */

.gag-mobilebar { display: none; background: var(--navy); padding: 10px 0 10px; }
.gag-mobilebar__path { padding: 0 var(--gutter); font-family: var(--font-head); font-size: 12.5px; color: #c9d3e1; }
.gag-mobilebar__path a { color: #c9d3e1; text-decoration: none; }
.gag-mobilebar__path a.is-strong { color: #fff; font-weight: 600; }
.gag-mobilebar__chips ul {
	position: relative; display: flex; gap: 6px; margin: 8px 0 0; padding: 0 var(--gutter); list-style: none;
	overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.gag-mobilebar__chips ul::-webkit-scrollbar { display: none; }
.gag-chip {
	display: inline-flex; align-items: center; white-space: nowrap; height: 36px; padding: 0 13px;
	border-radius: 18px; background: rgba(255, 255, 255, .10); color: #dfe5ee;
	font-family: var(--font-head); font-size: 13px; text-decoration: none;
}
.gag-chip.is-active { background: #fff; color: var(--navy); font-weight: 700; }
.gag-chip--overview:not(.is-active) { border-style: dashed; }

.gag-drawer {
	position: fixed; inset: 0; z-index: 900; background: #fff;
	display: flex; flex-direction: column; overflow: hidden;
}
.gag-drawer[hidden] { display: none; }
.gag-drawer__head {
	flex: none; display: flex; align-items: center; justify-content: space-between;
	padding: 12px var(--gutter); border-bottom: 1px solid var(--line-soft);
	border-top: 5px solid var(--navy);
}
.gag-drawer__logo .gag-drawer__logo__img, .gag-drawer__logo img { height: 54px; width: auto; }
.gag-drawer__body { flex: 1 1 auto; overflow-y: auto; }
.js .gag-drawer__panel { display: none; }
.js .gag-drawer__panel.is-open { display: block; }
.gag-drawer__back {
	display: flex; align-items: center; gap: 6px; width: 100%; height: 48px; padding: 0 var(--gutter);
	border: 0; border-bottom: 1px solid var(--line-soft); background: #fff; color: var(--blue);
	font-family: var(--font-head); font-size: 14px; cursor: pointer; text-align: left;
}
.gag-drawer__title {
	display: block; padding: 16px var(--gutter) 8px; font-family: var(--font-head); font-weight: 700;
	font-size: 22px; color: var(--navy); text-decoration: none;
}
.gag-drawer__list { margin: 0; padding: 0; list-style: none; }
.gag-drawer__list li { display: flex; align-items: stretch; border-bottom: 1px solid var(--line-soft); }
.gag-drawer__list li.is-active { background: var(--tint-blue); }
/* Zusatzmenü in der Schublade: mit Abstand unter den Hauptpunkten. */
.gag-drawer__list li.gag-drawer__rechts { margin-top: 28px; border-top: 2px solid var(--line); }
.gag-drawer__link {
	flex: 1 1 auto; display: flex; align-items: center; min-height: 48px; padding: 8px var(--gutter);
	font-family: var(--font-head); font-size: 15px; color: var(--navy); text-decoration: none;
}
.gag-drawer__list li.is-active > .gag-drawer__link { font-weight: 700; }
.gag-drawer__overview { border-bottom: 2px solid var(--line, #dfe5ee); }
p.gag-drawer__title { margin: 0; }
.gag-drawer__open {
	flex: none; width: 56px; border: 0; border-left: 1px solid var(--line-soft); background: transparent;
	color: var(--blue); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.gag-drawer__quick {
	flex: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
	padding: 12px var(--gutter) 14px; background: var(--band); border-bottom: 1px solid var(--line-soft);
}
.gag-drawer__quick a {
	display: flex; align-items: center; justify-content: center; height: 48px; border-radius: 10px;
	background: var(--navy); color: #fff; font-family: var(--font-head); font-weight: 600; text-decoration: none;
}
html.gag-drawer-open, html.gag-drawer-open body { overflow: hidden; }

/* Variante „Alles aufgeklappt“: drei Ebenen untereinander, über Schrift, Gewicht und Einzug unterschieden. */
.gag-drawer__body { position: relative; }
.gag-drawer__baum, .gag-drawer__baum ul { margin: 0; padding: 0; list-style: none; }
.gag-drawer__gruppe { padding: 14px var(--gutter) 12px; border-bottom: 1px solid var(--line-soft); }
.gag-drawer__gruppe--rechts { margin-top: 18px; border-top: 2px solid var(--line); }
.gag-drawer__e1, .gag-drawer__e2, .gag-drawer__e3 { display: flex; align-items: center; color: var(--navy); text-decoration: none; border-radius: 6px; }
.gag-drawer__e1 { position: relative; min-height: 44px; padding: 4px 8px 4px 16px; font-family: var(--font-head); font-weight: 600; font-size: 19px; line-height: 1.25; }
.gag-drawer__e1::before { content: ''; position: absolute; left: 0; top: 11px; bottom: 11px; width: 5px; border-radius: 3px; background: var(--akzent, var(--navy)); }
.gag-drawer__e2list { margin-top: 2px !important; }
.gag-drawer__e2 { min-height: 42px; padding: 6px 8px 6px 16px; font-family: var(--font-body); font-weight: 700; font-size: 16px; line-height: 1.3; }
.gag-drawer__e3list { margin: 0 0 6px 24px !important; padding-left: 10px !important; border-left: 2px solid color-mix(in srgb, var(--akzent, var(--navy)) 35%, #fff); }
.gag-drawer__e3 { min-height: 40px; padding: 6px 8px; font-family: var(--font-body); font-weight: 400; font-size: 15.5px; line-height: 1.3; color: var(--ink); }
.gag-drawer__baum .is-label { color: var(--navy); }
.gag-drawer__e3.is-label { color: var(--muted); }
.gag-drawer__e3.is-kopf, .gag-drawer__e2.is-kopf, .gag-drawer__e1.is-kopf { cursor: default; }
.gag-drawer__baum a:hover, .gag-drawer__baum a:active { background: var(--band); }
.gag-drawer__baum a:focus-visible { outline: 3px solid var(--blue); outline-offset: -1px; }
/* Bereich der aktuellen Seite und die Seite selbst */
.gag-drawer__baum a.is-active { color: var(--navy); }
.gag-drawer__e3.is-active { font-weight: 700; }
.gag-drawer__baum a[aria-current="page"] { background: var(--tint-blue); box-shadow: inset 3px 0 0 var(--navy); }

@media (max-width: 959px) {
	.gag-servicebar { display: none; }
	.gag-header__inner { padding-top: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); }
	.gag-logo__img { height: 54px; }
	.gag-header .gag-search { display: none; }
	.gag-badges { display: none; }
	.gag-only-mobile { display: inline-flex; }
	.js .gag-nav { display: none; }
	.gag-mobilebar { display: block; }
	.no-js .gag-nav__row--1 .gag-nav__link { height: 44px; padding: 0 12px; }
}
@media (min-width: 960px) {
	.gag-drawer { display: none !important; }
}

/* ---------- Kleine Bausteine ---------- */

.gag-kicker {
	margin: 0; font-family: var(--font-head); font-weight: 500; font-size: 12px;
	letter-spacing: .18em; text-transform: uppercase; color: var(--blue);
}
.gag-kicker--muted { color: var(--muted); }

.gag-square { display: inline-block; flex: none; width: 14px; height: 14px; border-radius: 3px; background: var(--blue); }

.gag-sectionhead { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.gag-sectiontitle {
	display: flex; align-items: center; gap: 12px; margin: 0;
	font-family: var(--font-head); font-weight: 600; font-size: 26px; line-height: 1.25; color: var(--navy);
}
.gag-more {
	font-family: var(--font-head); font-weight: 500; font-size: 14px; text-decoration: none;
	padding: 12px 0; white-space: nowrap;
}

.gag-button, .wp-block-button__link, .wp-element-button {
	display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px;
	border-radius: 8px; background: var(--blue); color: #fff;
	font-family: var(--font-head); font-weight: 600; font-size: 14px; text-decoration: none; border: 0;
}
.gag-button:hover, .wp-block-button__link:hover, .wp-element-button:hover { background: var(--navy); color: #fff; }
.is-style-outline .wp-block-button__link { background: transparent; color: var(--blue); box-shadow: inset 0 0 0 2px var(--blue); }

.gag-roundbtn {
	width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #fff;
	color: var(--navy); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.gag-roundbtn:hover { border-color: var(--blue); color: var(--blue); }

.gag-tint--blue { background: var(--tint-blue); }
.gag-tint--green { background: var(--tint-green); }
.gag-tint--red { background: var(--tint-red); }
.gag-tint--gold { background: var(--tint-gold); }

.gag-box {
	border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 20px 22px;
}
.gag-box__title { margin: 0 0 12px; font-family: var(--font-head); font-weight: 600; font-size: 18px; color: var(--navy); }

/* ---------- Startseite: Slider ---------- */

.gag-hero { position: relative; display: grid; }
/* Alle Folien liegen übereinander; die Höhe richtet sich nach der höchsten, so springt beim Wechsel nichts. */
.gag-hero__slide { position: relative; grid-area: 1 / 1; min-width: 0; }
.gag-hero__slide[hidden] { display: block; visibility: hidden; }
/* Festes Format 3,2 : 1 (Höhe wächst mit der Breite, höchstens 620 px). Auf sehr breiten Monitoren wird das Bild nicht
   weiter beschnitten, sondern bleibt mittig stehen; die Ränder füllt das Dunkelblau. */
.gag-hero__media { position: relative; height: clamp(340px, calc(100vw / 3.2), 620px); overflow: hidden; background: var(--navy); }
.gag-hero__media img { display: block; width: 100%; max-width: 1984px; height: 100%; margin: 0 auto; object-fit: cover; }
/* Karte halb auf dem Bild, halb darunter (die Kartenhöhe misst das Skript, sonst ein Näherungswert) */
.gag-hero__frame { position: relative; margin-top: calc(var(--gag-card-h, 150px) / -2); }
.gag-hero__card {
	width: min(720px, 100%); background: #fff; border-radius: 14px; overflow: hidden;
	border: 1px solid var(--line-soft); box-shadow: 0 14px 40px rgba(20, 26, 40, .16);
}
.gag-hero__body { padding: 18px 28px 18px; }
.gag-hero__title {
	margin: 0 0 12px; font-family: var(--font-head); font-weight: 700; font-size: 25px; line-height: 1.2;
	letter-spacing: -.01em; color: var(--navy);
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.gag-hero__title a { color: inherit; text-decoration: none; }
.gag-hero__title a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.gag-hero__actions { display: flex; align-items: center; gap: 16px; }
.gag-hero__actions .gag-button { flex: none; min-height: 40px; padding-top: 0; padding-bottom: 0; display: inline-flex; align-items: center; }
.gag-hero__meta { flex: 1 1 auto; min-width: 0; margin: 0 !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gag-hero__controls { flex: none; display: flex; align-items: center; gap: 4px; margin-left: auto; }
.gag-hero__count { padding: 0 8px; font-family: var(--font-head); font-size: 13px; color: var(--muted); }

@media (max-width: 720px) {
	.gag-hero__media { height: 56vw; max-height: 340px; }
	.gag-hero__frame { margin-top: 0; padding: 0 var(--gutter); }
	.gag-hero__card { width: 100%; border: 0; border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--line-soft); }
	.gag-hero__body { padding: 14px 0 16px; }
	.gag-hero__title { font-size: 20px; margin-bottom: 10px; }
	.gag-hero__actions { gap: 10px; }
	.gag-hero__meta { font-size: 10.5px; letter-spacing: .1em; }
	.gag-hero__count { display: none; }
	.gag-hero__rubrik { display: none; }
}

/* ---------- Startseite: Schnellzugriff ---------- */

.gag-tiles {
	display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 48px;
}
.gag-tile {
	display: flex; align-items: center; gap: 18px; padding: 20px 22px; border: 1px solid var(--line);
	border-radius: var(--radius); background: #fff; color: var(--ink); text-decoration: none;
	transition: box-shadow .15s ease, border-color .15s ease;
}
.gag-tile:hover { border-color: var(--blue); box-shadow: 0 6px 20px rgba(39, 53, 90, .08); color: var(--ink); }
.gag-tile > .gag-icon { flex: none; color: var(--blue); }
.gag-tile__mark {
	flex: none; width: 60px; height: 60px; border-radius: 12px; background: var(--tint-blue); color: var(--navy);
	display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.gag-tile__mark img { width: 48px; height: 48px; object-fit: contain; }
.gag-tile--untis .gag-tile__mark { background: var(--tint-gold); }
.gag-tile--extra .gag-tile__mark { background: var(--green); color: #fff; }
.gag-tile--extra .gag-tile__mark .gag-icon { width: 28px; height: 28px; }
.gag-tile__initial { font-family: var(--font-head); font-weight: 700; font-size: 26px; }
.gag-tile__text { flex: 1 1 auto; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.gag-tile__title { font-family: var(--font-head); font-weight: 600; font-size: 18px; color: var(--navy); }
.gag-tile__sub { font-size: 14px; line-height: 1.4; color: var(--muted); }

@media (max-width: 959px) {
	.gag-tiles { grid-template-columns: 1fr; gap: 12px; margin-top: 28px; }
	.gag-tile { padding: 14px 16px; }
	.gag-tile__mark { width: 48px; height: 48px; }
}

.gag-front-content { margin-top: 56px; }

/* ---------- Spaltenlayout ---------- */

.gag-layout {
	display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 56px; align-items: start;
	padding-top: 28px; padding-bottom: 88px;
}
.gag-layout--front { margin-top: 72px; padding-top: 0; gap: 48px; }
.gag-front-uebanner--mobile { display: none; }
/* Am Computer beginnt die rechte Spalte direkt unter dem Sliderbild – neben dem Kasten, der halb auf dem Slider liegt. */
@media (min-width: 960px) {
	.gag-layout--lift > .gag-sidebar { margin-top: -124px; }
	/* Der Kasten auf dem Slider ist dann genau so breit wie die Nachrichten-Spalte darunter. */
	body:has(.gag-layout--lift) .gag-hero__card { width: calc(100% - 408px); }
}
@media (max-width: 959px) {
	.gag-front-uebanner--mobile { display: block; margin-bottom: 28px; }
	.gag-uebanner-mobil { margin-bottom: -16px; }
	.gag-front-uebanner--side { display: none; }
}
.gag-sidebar { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
/* Banner in der Seitenspalte: zum nächsten Kasten derselbe Abstand wie zwischen zwei Bannern (20 px). */
.gag-front-uebanner--side > :last-child { margin-bottom: -4px; }
.gag-layout--single { grid-template-columns: minmax(0, 1fr); }
.gag-layout--single .gag-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 959px) { .gag-layout--single .gag-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .gag-layout--single .gag-cards { grid-template-columns: 1fr; } }

@media (max-width: 1023px) {
	.gag-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
	.gag-layout--front { margin-top: 48px; }
	.gag-sidebar { max-width: 560px; }
}

/* ---------- News-Kacheln ---------- */

.gag-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.gag-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; transition: box-shadow .15s ease, transform .15s ease; }
.gag-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.gag-card__link { display: flex; flex-direction: column; height: 100%; color: var(--ink); text-decoration: none; }
.gag-card__link:hover { color: var(--ink); }
.gag-card__media { aspect-ratio: 760 / 440; overflow: hidden; }
.gag-card__media img { width: 100%; height: 100%; object-fit: cover; }
.gag-card__body { padding: 16px 20px 16px; display: flex; flex-direction: column; flex: 1 1 auto; }
.gag-card__date { font-family: var(--font-head); font-size: 12px; color: var(--muted); }
.gag-card__title {
	margin: 0 0 12px; font-family: var(--font-head); font-weight: 600; font-size: 18px; line-height: 1.3;
	color: var(--navy); overflow-wrap: break-word; -webkit-hyphens: manual; hyphens: manual;
}
.gag-card__foot { margin: auto 0 0; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.gag-card__foot .gag-card__more { margin-left: auto; white-space: nowrap; }
.gag-cards__all { margin: 28px 0 0; text-align: center; }
.gag-allbtn {
	display: inline-flex; align-items: center; gap: 8px; padding: 9px 20px; border: 1px solid var(--line); border-radius: 999px;
	background: #fff; font-family: var(--font-head); font-weight: 500; font-size: 14px; color: var(--navy); text-decoration: none;
}
.gag-allbtn:hover { border-color: var(--blue); color: var(--blue); }
/* Silbentrennung nur dort, wo ein Wort sonst nicht in die Zeile passt (die Klasse setzt main.js nach dem Ausmessen). */
.gag-trennen { -webkit-hyphens: auto !important; hyphens: auto !important; hyphenate-limit-chars: 10 4 4; overflow-wrap: break-word; }
.gag-card__excerpt { margin: 0 0 12px; font-size: 15px; line-height: 1.5; color: #3d434b; }
.gag-card__more { margin-top: auto; font-family: var(--font-head); font-weight: 500; font-size: 13px; color: var(--blue); }

@media (max-width: 640px) {
	.gag-cards { grid-template-columns: 1fr; }
}

/* ---------- Seitenkopf ---------- */

.gag-pagehead { padding-top: 36px; padding-bottom: 8px; }
.gag-crumbs ol { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; font-family: var(--font-head); font-size: 13px; color: var(--muted); }
.gag-crumbs li + li::before { content: '›'; padding: 0 8px; color: var(--muted); }
.gag-crumbs a { color: var(--muted); text-decoration: none; }
.gag-crumbs a:hover { color: var(--navy); text-decoration: underline; }
.gag-pagehead__title {
	margin: 8px 0 0; font-family: var(--font-head); font-weight: 700; font-size: 38px; line-height: 1.15;
	letter-spacing: -.01em; color: var(--navy); overflow-wrap: break-word; -webkit-hyphens: manual; hyphens: manual;
}
.gag-pagehead__intro { margin: 10px 0 0; font-size: 18px; color: var(--muted); max-width: 760px; }

@media (max-width: 720px) {
	.gag-pagehead { padding-top: 24px; }
	.gag-crumbs { display: none; }
	.gag-pagehead__title { font-size: 30px; margin-top: 0; }
}

/* ---------- Fließtext (Inhalte aus dem Editor) ---------- */

.entry-content { max-width: 760px; min-width: 0; }
.entry-content--wide { max-width: none; padding-top: 28px; padding-bottom: 88px; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content p, .entry-content ul, .entry-content ol { margin: 0 0 1.1em; }
.entry-content h2, .entry-content h3, .entry-content h4 { font-family: var(--font-head); color: var(--navy); line-height: 1.25; }
.entry-content h2 { font-weight: 600; font-size: 26px; margin: 1.6em 0 .6em; }
.entry-content h3 { font-weight: 600; font-size: 20px; margin: 1.5em 0 .5em; }
.entry-content h4 { font-weight: 600; font-size: 17px; margin: 1.4em 0 .4em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: .35em; }
.entry-content li::marker { color: var(--blue); }
.entry-content strong { font-weight: 700; }
.entry-content hr, .entry-content .wp-block-separator { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.entry-content blockquote, .entry-content .wp-block-quote {
	margin: 1.6em 0; padding: 18px 24px 18px 26px; background: var(--tint-blue); border-radius: var(--radius);
	position: relative; border: 0;
}
.entry-content blockquote::before, .entry-content .wp-block-quote::before {
	content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 3px 3px 0; background: var(--teal);
}
.entry-content blockquote p { font-family: var(--font-head); font-weight: 500; font-size: 18px; color: var(--navy); margin-bottom: .5em; }
.entry-content blockquote cite { font-size: 14px; font-style: normal; color: var(--muted); }
.entry-content img { border-radius: 8px; }
.entry-content figure { margin: 1.6em 0; }
.entry-content figcaption, .entry-content .wp-element-caption, .gag-featured figcaption {
	margin-top: 8px; font-size: 14px; color: var(--muted); text-align: left;
}
.entry-content table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 1.6em 0; }
.entry-content th, .entry-content td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.entry-content th { font-family: var(--font-head); font-weight: 600; color: var(--navy); background: var(--tint-blue); }
.entry-content .wp-block-table { overflow-x: auto; }
.entry-content .wp-block-file {
	position: relative; display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap;
	margin: 0 0 12px; padding: 12px 14px 12px 64px; min-height: 64px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
}
/* Kleines Dateisymbol mit Typ (PDF, DOCX …) links */
.entry-content .wp-block-file::before {
	content: attr(data-ext); position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
	width: 38px; height: 46px; border-radius: 4px 12px 4px 4px; background: var(--red); color: #fff;
	display: flex; align-items: flex-end; justify-content: center; padding-bottom: 7px; box-sizing: border-box;
	font-family: var(--font-head); font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.entry-content .wp-block-file:not([data-ext="pdf"])::before { background: var(--blue); }
.entry-content .wp-block-file a:not(.wp-block-file__button):not(.gag-file-view) { flex: 1 1 220px; min-width: 0; font-family: var(--font-head); font-weight: 600; color: var(--navy); text-decoration: none; overflow-wrap: anywhere; }
.entry-content .wp-block-file a:not(.wp-block-file__button):not(.gag-file-view):hover { text-decoration: underline; }
.entry-content .wp-block-file__button, .entry-content .gag-file-view {
	display: inline-flex; align-items: center; gap: 6px; margin: 0 !important; border-radius: 8px; padding: 8px 14px;
	font-family: var(--font-head); font-size: 14px; font-weight: 600; text-decoration: none !important; cursor: pointer; line-height: 1.2;
}
.entry-content .wp-block-file__button { background: var(--blue); color: #fff !important; border: 1px solid var(--blue); }
.entry-content .wp-block-file__button::before { content: '↓'; font-weight: 700; }
.entry-content .gag-file-view { background: #fff; color: var(--blue) !important; border: 1px solid var(--blue); }
.entry-content .wp-block-file__button:hover { filter: brightness(1.1); }
.entry-content .gag-file-view:hover { background: var(--tint-blue); }
@media (max-width: 560px) { .entry-content .wp-block-file { padding-left: 62px; } }
/* PDF-Fenster */
.gag-pdfdlg { width: min(1000px, 94vw); height: 92vh; max-width: none; max-height: none; padding: 0; border: 0; border-radius: 14px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
.gag-pdfdlg::backdrop { background: rgba(15, 20, 35, .7); }
.gag-pdfdlg__bar { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 8px 0 18px; background: var(--navy); color: #fff; }
.gag-pdfdlg__title { flex: 1; min-width: 0; font-family: var(--font-head); font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gag-pdfdlg__bar a, .gag-pdfdlg__bar button { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .35); background: transparent; color: #fff !important; font: 600 14px var(--font-head); text-decoration: none; cursor: pointer; }
.gag-pdfdlg__bar a:hover, .gag-pdfdlg__bar button:hover { background: rgba(255, 255, 255, .12); }
.gag-pdfdlg iframe { display: block; width: 100%; height: calc(100% - 52px); border: 0; background: #525659; }
.entry-content .wp-block-gallery { gap: 12px; }
.entry-content .wp-block-embed iframe { max-width: 100%; }
.entry-content .alignleft { float: left; margin: .3em 1.5em 1em 0; max-width: 50%; }
.entry-content .alignright { float: right; margin: .3em 0 1em 1.5em; max-width: 50%; }
.entry-content .aligncenter { margin-left: auto; margin-right: auto; }
.entry-content::after { content: ''; display: table; clear: both; }
.entry-content .has-text-align-center { text-align: center; }

/* Hinweiskasten (Block „Gruppe“ mit Stil „Hinweis“ oder Klasse gag-hinweis) */
.entry-content .gag-hinweis, .entry-content .is-style-hinweis {
	margin: 1.6em 0; padding: 16px 20px; border: 1.2px solid #e6c7c3; background: #fbf1ef; border-radius: 10px;
}
.entry-content .gag-hinweis > *:last-child, .entry-content .is-style-hinweis > *:last-child { margin-bottom: 0; }
.entry-content .gag-wichtig { font-weight: 700; color: var(--red); }

@media (max-width: 720px) {
	body { font-size: 16.5px; }
	.entry-content h2 { font-size: 22px; }
	.entry-content .alignleft, .entry-content .alignright { float: none; margin: 1em 0; max-width: 100%; }
}

/* ---------- Einzelner Beitrag ---------- */

.gag-meta { margin: 0 0 18px; font-family: var(--font-head); font-size: 14px; color: var(--muted); }
.gag-meta a { color: var(--blue); text-decoration: none; }
.gag-featured { margin: 0 0 28px; }
.gag-featured img { width: 100%; border-radius: var(--radius); }
.gag-postnav {
	display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 16px; align-items: stretch; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line);
}
.gag-postnav a {
	display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius);
	font-family: var(--font-head); font-weight: 600; font-size: 15px; color: var(--navy); text-decoration: none;
}
.gag-postnav a:hover { border-color: var(--blue); }
.gag-postnav span { font-weight: 400; font-size: 12px; color: var(--muted); }
.gag-postnav__prev { grid-column: 1; }
.gag-postnav__next { grid-column: 3; text-align: right; }
.gag-postnav a.gag-postnav__random { grid-column: 2; flex-direction: row; align-items: center; justify-content: center; gap: 10px; padding: 10px 16px; background: var(--tint-blue, #eef4f9); border-color: transparent; white-space: nowrap; }
.gag-postnav a.gag-postnav__random:hover { border-color: var(--blue); }
.gag-postnav__random svg { width: 18px; height: 18px; flex: none; }
.gag-postnav__random span { font-family: var(--font-head); font-weight: 600; font-size: 14px; line-height: 1.25; color: var(--navy); text-align: left; }
@media (max-width: 640px) {
	.gag-postnav { grid-template-columns: 1fr; }
	.gag-postnav__prev, .gag-postnav__next, .gag-postnav a.gag-postnav__random { grid-column: 1; text-align: left; }
	.gag-postnav a.gag-postnav__random { justify-content: flex-start; }
	.gag-postnav__random br { display: none; }
}

/* ---------- Seitenzahlen, Suche ---------- */

.pagination { margin-top: 36px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 12px;
	border: 1px solid var(--line); border-radius: 8px; font-family: var(--font-head); font-size: 14px; color: var(--navy); text-decoration: none;
}
.pagination .page-numbers.current { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 700; }
.pagination .page-numbers.dots { border: 0; }

.gag-searchpage { margin-bottom: 32px; }
.gag-searchpage .gag-search { max-width: 520px; }
.gag-searchpage .gag-search__input { width: 100%; flex: 1 1 auto; }

/* ---------- Logo-Band ---------- */

.gag-networks { background: var(--band); border-top: 1px solid var(--line-soft); padding: 40px 0 44px; }
.gag-networks__head--notitle { justify-content: flex-end; }
.gag-networks__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.gag-networks__list {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none;
}
.gag-networks__list li {
	height: 96px; display: flex; align-items: center; justify-content: center; padding: 12px 16px;
	background: #fff; border: 1px solid var(--line-soft); border-radius: 10px;
}
.gag-networks__list a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.gag-networks__list img { max-height: 64px; width: auto; max-width: 100%; object-fit: contain; }
/* Logos, die schon im Kopf stehen, fehlen am Computer im Band (auf dem Handy bleiben sie, ganz vorn) */
@media (min-width: 960px) {
	.gag-networks__list .is-kopf, .gag-networks--kopf { display: none; }
}

/* ---------- Footer ---------- */

.gag-footer { background: var(--navy); color: #dfe5ee; font-size: 14px; line-height: 1.7; }
.gag-footer a { color: #fff; }
.gag-footer__grid { display: flex; flex-wrap: wrap; align-items: flex-end; column-gap: 72px; row-gap: 24px; padding-top: 48px; padding-bottom: 28px; }
.gag-footer__menu { flex: none; }
.gag-footer p { margin: 0; }
.gag-footer__name { font-family: var(--font-head); font-weight: 600; font-size: 17px; color: #fff; margin-bottom: 10px !important; }
.gag-footer__head { font-family: var(--font-head); font-weight: 600; color: #fff; margin-bottom: 10px !important; }
.gag-footer__menu ul { margin: 0; padding: 0; list-style: none; }
.gag-footer__menu a { color: #dfe5ee; text-decoration: none; }
.gag-footer__menu a:hover { color: #fff; text-decoration: underline; }
.gag-footer__bottom { padding-top: 18px; padding-bottom: 22px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: 13px; color: #b9c3d2; }
@media (max-width: 959px) {
	.gag-footer__grid { column-gap: 48px; row-gap: 24px; padding-top: 32px; }
	.gag-footer__contact { flex: 0 0 100%; }
}

/* ---------- Bewegung reduzieren ---------- */

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


/* ---------- Breitbild (ab 1600 px Fensterbreite) ---------- */
.gag-card--wide-only { display: none; }
@media (min-width: 1600px) {
	.gag-container { max-width: 1520px; }
	.gag-cards--front { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.gag-card--wide-only { display: block; }
	.gag-layout--single .gag-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.entry-content:not(.entry-content--wide) { max-width: 840px; }
	/* Seiten mit Kachel-Bausteinen (Bus, AGs, Kollegium, Themen, ABC …) nutzen die ganze Spaltenbreite für die Kacheln;
	   normaler Text daneben bleibt in der gut lesbaren Breite. */
	.entry-content:has(> .gagf-busbox, > .gagf-ags, > .gagf-kol, > .gagf-themen, > .gagf-abc, > .gagf-faecher, > .gagf-sdg, > .gagf-spon, > .gagf-vcards, > .gagf-lb, > .gagf-ahnen) { max-width: none; }
	.entry-content:has(> .gagf-busbox, > .gagf-ags, > .gagf-kol, > .gagf-themen, > .gagf-abc, > .gagf-faecher, > .gagf-sdg, > .gagf-spon, > .gagf-vcards, > .gagf-lb, > .gagf-ahnen) > :not([class*="gagf-"]):not(.gag-toc) { max-width: 840px; }
	/* Bilder, Galerien und Tabellen dürfen etwas breiter werden als der Text. */
	.entry-content > .alignwide { width: calc(100% + 200px); max-width: none; }
	/* Text-Seiten: etwas breitere Seitenspalte, etwas größere Schrift und breiterer Text – damit zwischen Text und
	   Seitenspalte keine große Lücke bleibt. Startseite und Seiten ohne Seitenspalte sind nicht betroffen. */
	.gag-layout:not(.gag-layout--front):not(.gag-layout--single):has(.entry-content) { grid-template-columns: minmax(0, 1fr) 440px; gap: 72px; }
	.gag-layout:not(.gag-layout--front) .entry-content > :is(p, ul, ol) { font-size: 18px; }
	.gag-layout:not(.gag-layout--front):not(.gag-layout--single) .entry-content > .alignwide { width: calc(100% + 88px); }
	.entry-content:has(> .gagf-busbox, > .gagf-ags, > .gagf-kol, > .gagf-themen, > .gagf-abc, > .gagf-faecher, > .gagf-sdg, > .gagf-spon, > .gagf-vcards, > .gagf-lb, > .gagf-ahnen) > .alignwide { width: 100%; }
}

/* ---------- „Auf dieser Seite“: Inhaltsverzeichnis neben langen Textseiten (nur sehr breite Bildschirme) ---------- */
.gag-toc { display: none; }
@media (min-width: 1600px) {
	.entry-content.has-toc { position: relative; }
	/* Das Inhaltsverzeichnis bekommt eine eigene Spalte rechts im Textbereich: Text und Bausteine werden dafür schmaler,
	   so kann es weder über Kacheln noch über die Seitenspalte rutschen. */
	.entry-content.has-toc { max-width: none; padding-right: 256px; }
	.entry-content.has-toc > .alignwide { width: 100%; }
	.gag-toc { display: block; position: absolute; top: 0; bottom: 0; right: 0; left: auto; width: 220px; }
	.gag-toc__in { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow: auto; padding: 16px 0 16px 18px; border-left: 3px solid var(--line); }
	.gag-toc__title { margin: 0 0 10px; font-family: var(--font-head); font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
	.gag-toc ol { margin: 0; padding: 0; list-style: none; }
	.gag-toc li { margin: 0; padding: 0; }
	.gag-toc li::before { content: none; }
	.gag-toc a { position: relative; display: block; padding: 5px 0; font-family: var(--font-head); font-size: 14px; line-height: 1.35; color: var(--muted); text-decoration: none; }
	.gag-toc li.is-sub a { padding-left: 14px; font-size: 13px; }
	.gag-toc a:hover { color: var(--blue); }
	.gag-toc a.is-active { color: var(--navy); font-weight: 600; }
	.gag-toc.is-empty { visibility: hidden; }
	.gag-toc__thema { margin: 0 0 12px; }
	.gag-toc__thema a { padding: 0; font-weight: 600; font-size: 15px; color: var(--navy); }
	.gag-toc a.is-active::before { content: ''; position: absolute; left: -18px; top: 4px; bottom: 4px; width: 3px; border-radius: 2px; background: var(--blue); }
}
