/* ==========================================================================
   HSG Annen-Rüdinghausen – Theme-Styles
   1 Tokens · 2 Basis · 3 Layout · 4 Buttons · 5 Header · 6 Kopfbereich
   7 Spielbetrieb (Spiele, Ergebnisse, Termine, Tabelle) · 8 Beiträge
   9 Teams · 10 Seiten & Inhalte · 11 Footer · 12 Extras

   Gestaltung: gerade Kanten, Linien statt Schatten, Tabellen statt Karten –
   eher Sportzeitung als App.
   ========================================================================== */

/* 1 · Tokens ---------------------------------------------------------------- */

:root {
	/* Vereinsfarben (werden per Customizer überschrieben). */
	--hsg-primary: #043c6c;
	--hsg-accent: #1592e6;
	--hsg-primary-dark: color-mix(in srgb, var(--hsg-primary) 78%, #000);
	--hsg-primary-deep: color-mix(in srgb, var(--hsg-primary) 60%, #000);
	--hsg-accent-strong: color-mix(in srgb, var(--hsg-accent) 78%, #000);
	--hsg-tint: color-mix(in srgb, var(--hsg-primary) 7%, #fff);

	--ink: #16202c;
	--muted: #5d6b7a;
	--line: #dde3ea;
	--surface: #f3f5f8;
	--win: #1e7d45;
	--loss: #b8322a;
	--draw: #7a8594;

	--font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-display: "Barlow Condensed", "Bahnschrift SemiCondensed", Bahnschrift, "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;

	--container: 1200px;
	--content: 760px;
	--wide: 1200px;
	--gutter: clamp(1rem, 4vw, 2rem);
	--header-h: 72px;
	--radius: 4px;
}

/* 2 · Basis ----------------------------------------------------------------- */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
	margin: 0;
	background: #fff;
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

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

a {
	color: var(--hsg-accent-strong);
	text-underline-offset: .15em;
}

a:hover {
	color: var(--hsg-primary);
}

:focus-visible {
	outline: 3px solid var(--hsg-accent);
	outline-offset: 2px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 .5em;
	color: var(--hsg-primary);
	font-family: var(--font-display);
	font-weight: 700;
	line-height: 1.1;
}

p {
	margin: 0 0 1em;
}

[hidden] {
	display: none !important;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	border: 0;
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	top: -100px;
	left: 1rem;
	z-index: 1000;
	padding: .75rem 1rem;
	background: var(--hsg-primary);
	color: #fff;
	font-weight: 700;
}

.skip-link:focus {
	top: 1rem;
	color: #fff;
}

.icon {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

/* 3 · Layout ---------------------------------------------------------------- */

.container {
	width: min(100% - 2 * var(--gutter), var(--container));
	margin-inline: auto;
}

.container--narrow {
	width: min(100% - 2 * var(--gutter), var(--content));
}

.container--wide {
	width: min(100% - 2 * var(--gutter), var(--wide));
}

.section {
	padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.section--grey,
.section--surface {
	background: var(--surface);
}

.section--content {
	padding-block: clamp(2rem, 5vw, 3rem) clamp(3rem, 6vw, 4.5rem);
}

/* Abschnittskopf wie in der Sportzeitung: Titel, Linie, Link rechts. */
.section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: .25rem 1.5rem;
	margin-bottom: 1rem;
	padding-bottom: .35rem;
	border-bottom: 3px solid var(--hsg-primary);
}

.section-title {
	margin: 0;
	font-size: clamp(1.6rem, 3vw, 2rem);
	text-transform: uppercase;
	letter-spacing: .01em;
}

.section-link {
	color: var(--hsg-primary);
	font-size: .9rem;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}

.section-link:hover {
	text-decoration: underline;
}

.eyebrow {
	margin: 0 0 .4rem;
	color: var(--hsg-accent-strong);
	font-size: .9rem;
	font-weight: 700;
}

.lead {
	color: var(--muted);
	font-size: 1.2rem;
}

.display {
	font-size: clamp(2.2rem, 5.5vw, 3.5rem);
	text-transform: uppercase;
	text-wrap: balance;
}

.empty-note {
	margin: .75rem 0;
	color: var(--muted);
	font-size: .9375rem;
}

/* 4 · Buttons --------------------------------------------------------------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5em;
	padding: .7em 1.25em;
	border: 2px solid var(--hsg-primary);
	border-radius: 3px;
	background: var(--hsg-primary);
	color: #fff;
	font: 700 1rem/1.15 var(--font-body);
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .15s, border-color .15s, color .15s;
}

.btn:hover {
	border-color: var(--hsg-primary-dark);
	background: var(--hsg-primary-dark);
	color: #fff;
}

.btn--light {
	border-color: #fff;
	background: #fff;
	color: var(--hsg-primary);
}

.btn--light:hover {
	border-color: var(--surface);
	background: var(--surface);
	color: var(--hsg-primary);
}

.btn--outline-light {
	border-color: rgb(255 255 255 / .8);
	background: transparent;
	color: #fff;
}

.btn--outline-light:hover {
	border-color: #fff;
	background: #fff;
	color: var(--hsg-primary);
}

.btn--outline {
	background: transparent;
	color: var(--hsg-primary);
}

.btn--outline:hover {
	background: var(--hsg-primary);
	color: #fff;
}

.btn--sm {
	padding: .5em .9em;
	font-size: .9rem;
}

.btn--lg {
	padding: .85em 1.5em;
	font-size: 1.05rem;
}

/* 5 · Header ---------------------------------------------------------------- */

.matchday-bar {
	background: var(--hsg-primary-deep);
	color: #fff;
	font-size: .875rem;
}

.matchday-bar__inner {
	display: flex;
	align-items: center;
	gap: .75rem;
	min-height: 38px;
	padding-block: .35rem;
}

.matchday-bar__label {
	flex-shrink: 0;
	color: #9fd0f7;
	font-weight: 800;
}

.matchday-bar__text {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.matchday-bar__link {
	flex-shrink: 0;
	color: #fff;
	font-weight: 700;
	text-decoration: none;
}

.matchday-bar__link:hover {
	color: #fff;
	text-decoration: underline;
}

.nav-open .matchday-bar {
	display: none;
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	border-bottom: 1px solid var(--line);
	/* Bewusst ohne backdrop-filter: der würde das fixierte Mobilmenü an den Header binden. */
	background: #fff;
	transition: box-shadow .2s;
}

.site-header.is-scrolled {
	box-shadow: 0 2px 10px rgb(0 0 0 / .06);
}

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

.site-header__inner {
	position: relative;
	display: flex;
	align-items: center;
	gap: 1.25rem;
	min-height: var(--header-h);
}

.site-brand {
	flex-shrink: 0;
	margin-right: auto;
}

.site-brand .custom-logo-link {
	display: block;
}

.site-brand .custom-logo {
	display: block;
	width: auto;
	height: 48px;
}

.site-brand__name {
	color: var(--hsg-primary);
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 800;
	text-decoration: none;
	text-transform: uppercase;
}

.site-header__actions {
	display: flex;
	align-items: center;
	gap: .5rem;
}

.icon-btn,
.nav-toggle {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: var(--radius);
	background: transparent;
	color: var(--hsg-primary);
	cursor: pointer;
}

.icon-btn:hover,
.nav-toggle {
	background: var(--surface);
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
	position: relative;
	display: block;
	width: 20px;
	height: 2px;
	background: var(--hsg-primary);
	transition: transform .2s, background-color .2s;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
	content: "";
	position: absolute;
	left: 0;
}

.nav-toggle__bars::before {
	top: -6px;
}

.nav-toggle__bars::after {
	top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars {
	background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
	transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
	transform: translateY(-6px) rotate(-45deg);
}

.primary-nav .menu,
.primary-nav .sub-menu {
	margin: 0;
	padding: 0;
	list-style: none;
}

.primary-nav a {
	color: var(--ink);
	text-decoration: none;
	cursor: pointer;
}

.submenu-toggle {
	display: inline-grid;
	place-items: center;
	width: 1.6rem;
	height: 1.6rem;
	padding: 0;
	border: 0;
	background: transparent;
	color: currentColor;
	cursor: pointer;
}

.submenu-toggle::before {
	content: "";
	width: .45rem;
	height: .45rem;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
	transition: transform .15s;
}

.is-open > .submenu-toggle::before {
	transform: translateY(2px) rotate(225deg);
}

.site-search {
	padding: 1rem 0;
	border-top: 1px solid var(--line);
	background: #fff;
}

.search-form {
	display: flex;
	align-items: center;
	max-width: 560px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: #fff;
}

.search-form:focus-within {
	border-color: var(--hsg-primary);
}

.search-form__input {
	flex: 1;
	min-width: 0;
	padding: .65rem .85rem;
	border: 0;
	outline: none;
	background: transparent;
	color: var(--ink);
	font: inherit;
}

.search-form__submit {
	display: grid;
	place-items: center;
	align-self: stretch;
	width: 48px;
	border: 0;
	border-radius: 0 3px 3px 0;
	background: var(--hsg-primary);
	color: #fff;
	cursor: pointer;
}

/* Desktop-Navigation */
@media (min-width: 1100px) {
	.nav-toggle,
	.site-nav__extras {
		display: none;
	}

	.primary-nav .menu {
		display: flex;
		gap: .1rem;
	}

	.primary-nav .menu > li {
		position: relative;
		display: flex;
		align-items: center;
	}

	.primary-nav .menu > li > a {
		display: block;
		padding: .6rem .7rem;
		font-size: .96rem;
		font-weight: 650;
	}

	.primary-nav .menu > li > .submenu-toggle {
		margin-left: -.55rem;
	}

	.primary-nav .menu > li:hover > a,
	.primary-nav .menu > li.is-open > a {
		color: var(--hsg-primary);
	}

	.primary-nav .menu > .current-menu-item > a,
	.primary-nav .menu > .current-menu-ancestor > a,
	.primary-nav .menu > .current-page-ancestor > a {
		color: var(--hsg-primary);
		box-shadow: inset 0 -3px 0 var(--hsg-primary);
	}

	.primary-nav .menu > li > .sub-menu {
		position: absolute;
		top: calc(100% + 8px);
		left: 0;
		z-index: 10;
		min-width: 250px;
		padding: .4rem 0;
		border: 1px solid var(--line);
		border-top: 3px solid var(--hsg-primary);
		background: #fff;
		box-shadow: 0 10px 30px rgb(0 0 0 / .12);
		opacity: 0;
		visibility: hidden;
		transition: opacity .15s, visibility 0s linear .15s;
	}

	/* Unsichtbare Brücke, damit das Menü beim Überfahren offen bleibt. */
	.primary-nav .menu > li > .sub-menu::before {
		content: "";
		position: absolute;
		inset: -12px 0 auto;
		height: 12px;
	}

	.primary-nav .menu > li:hover > .sub-menu,
	.primary-nav .menu > li:focus-within > .sub-menu,
	.primary-nav .menu > li.is-open > .sub-menu {
		opacity: 1;
		visibility: visible;
		transition-delay: 0s;
	}

	.primary-nav .sub-menu a {
		display: block;
		padding: .45rem 1rem;
		font-size: .9375rem;
		line-height: 1.35;
	}

	.primary-nav .sub-menu a:hover,
	.primary-nav .sub-menu .current-menu-item > a {
		background: var(--surface);
		color: var(--hsg-primary);
	}

	.primary-nav .sub-menu .submenu-toggle {
		display: none;
	}

	/* Mega-Menü: Punkte mit dritter Ebene (z. B. Teams → Jugend → …). */
	.primary-nav .menu > li.is-mega,
	.primary-nav .menu > li:has(.sub-menu .sub-menu) {
		position: static;
	}

	.primary-nav .menu > li.is-mega > .sub-menu,
	.primary-nav .menu > li:has(.sub-menu .sub-menu) > .sub-menu {
		top: 100%;
		right: 0;
		display: grid;
		grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
		gap: .5rem 1.5rem;
		padding: 1.25rem 1.5rem 1.5rem;
	}

	.primary-nav .menu > li.is-mega > .sub-menu > li > a,
	.primary-nav .menu > li:has(.sub-menu .sub-menu) > .sub-menu > li > a {
		padding-inline: 0;
		border-bottom: 1px solid var(--line);
		color: var(--hsg-primary);
		font-family: var(--font-display);
		font-size: 1.15rem;
		font-weight: 700;
		text-transform: uppercase;
	}

	.primary-nav .menu > li.is-mega > .sub-menu > li > a:hover {
		background: none;
	}

	.primary-nav .sub-menu .sub-menu {
		padding: .25rem 0 0;
	}

	.primary-nav .sub-menu .sub-menu a {
		padding: .3rem 0;
		color: var(--muted);
	}

	.primary-nav .sub-menu .sub-menu a:hover {
		background: none;
		color: var(--hsg-primary);
		text-decoration: underline;
	}
}

/* Mobile Navigation */
@media (max-width: 1099.98px) {
	.site-nav {
		position: fixed;
		inset: var(--header-h) 0 0;
		z-index: 99;
		padding: .5rem var(--gutter) 2.5rem;
		overflow-y: auto;
		background: #fff;
		overscroll-behavior: contain;
		visibility: hidden;
		transform: translateX(100%);
		transition: transform .25s ease-out, visibility 0s linear .25s;
	}

	.admin-bar .site-nav {
		top: calc(var(--header-h) + 32px);
	}

	.nav-open {
		overflow: hidden;
	}

	.nav-open .site-nav {
		visibility: visible;
		transform: none;
		transition-delay: 0s;
	}

	.primary-nav .menu li {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
	}

	.primary-nav .menu > li {
		border-bottom: 1px solid var(--line);
	}

	.primary-nav .menu a {
		flex: 1;
		padding: .9rem .25rem;
		font-size: 1.125rem;
		font-weight: 650;
	}

	.primary-nav .submenu-toggle {
		width: 44px;
		height: 44px;
	}

	.primary-nav .sub-menu {
		display: none;
		width: 100%;
		padding: 0 0 .6rem .9rem;
	}

	.primary-nav .is-open > .sub-menu {
		display: block;
	}

	.primary-nav .sub-menu a {
		padding: .5rem .25rem;
		font-size: 1rem;
		font-weight: 500;
	}

	.site-nav__extras {
		display: grid;
		gap: 1.25rem;
		margin-top: 1.5rem;
	}

	.site-nav__extras .social-links a {
		background: var(--surface);
		color: var(--hsg-primary);
	}

	.site-header__search-btn {
		display: none;
	}
}

@media (max-width: 782px) {
	.admin-bar .site-header {
		top: 46px;
	}

	.admin-bar .site-nav {
		top: calc(var(--header-h) + 46px);
	}
}

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

@media (max-width: 420px) {
	.site-header__cta {
		display: none;
	}

	.site-brand .custom-logo {
		height: 42px;
	}
}

/* 6 · Kopfbereich & Spielbox ------------------------------------------------ */

.hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding: clamp(2.5rem, 6vw, 4.5rem) 0;
	background: var(--hsg-primary);
	color: #fff;
}

.hero__image {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 30%;
}

/* Dunkel nur so weit, dass Schrift auf dem Foto lesbar bleibt. */
.hero.has-image::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(90deg, rgb(3 24 44 / .88) 0%, rgb(3 24 44 / .6) 55%, rgb(3 24 44 / .25) 100%);
}

.hero__inner {
	display: grid;
	align-items: center;
	gap: 2rem;
}

@media (min-width: 960px) {
	.hero__inner {
		grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
		gap: 3rem;
	}
}

.hero__kicker {
	margin: 0 0 .75rem;
	color: #bcdcf5;
	font-weight: 700;
}

.hero__title {
	margin: 0 0 1rem;
	color: #fff;
	font-size: clamp(2.4rem, 6vw, 4.25rem);
	font-weight: 800;
	line-height: .98;
	text-transform: uppercase;
	text-wrap: balance;
}

.hero__text {
	max-width: 34rem;
	margin: 0 0 1.5rem;
	color: rgb(255 255 255 / .88);
	font-size: clamp(1.05rem, 1.5vw, 1.2rem);
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: .75rem;
}

/* Spielbox „Nächstes Heimspiel“ */
.matchbox {
	padding: 1.1rem 1.35rem 1.25rem;
	border-top: 4px solid var(--hsg-accent);
	border-radius: var(--radius);
	background: #fff;
	color: var(--ink);
	box-shadow: 0 8px 28px rgb(0 0 0 / .18);
}

.matchbox__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
}

.matchbox__label {
	color: var(--hsg-primary);
	font-weight: 800;
}

.matchbox__rel {
	display: inline-block;
	color: var(--hsg-accent-strong);
	font-weight: 700;
}

.matchbox__rel::first-letter {
	text-transform: uppercase;
}

.matchbox__team {
	margin: .1rem 0 .8rem;
	color: var(--muted);
	font-size: .9rem;
}

.matchbox__teams {
	margin: 0 0 1rem;
	padding: 0;
	list-style: none;
}

.matchbox__teams li {
	display: flex;
	align-items: baseline;
	gap: .75rem;
	padding: .35rem 0;
	font: 700 1.45rem/1.15 var(--font-display);
	text-transform: uppercase;
}

.matchbox__teams li + li {
	border-top: 1px solid var(--line);
}

.matchbox__teams .is-us {
	color: var(--hsg-primary);
}

.matchbox__side {
	flex: 0 0 2.6rem;
	color: var(--muted);
	font: 600 .75rem/1 var(--font-body);
	text-transform: none;
}

.matchbox__facts {
	display: grid;
	gap: .3rem;
	margin: 0 0 1.1rem;
	font-size: .9375rem;
}

.matchbox__facts div {
	display: grid;
	grid-template-columns: 4.5rem minmax(0, 1fr);
	gap: .5rem;
}

.matchbox__facts dt {
	color: var(--muted);
}

.matchbox__facts dd {
	margin: 0;
	font-weight: 600;
}

.matchbox__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem 1.25rem;
}

.matchbox__actions a:not(.btn) {
	font-size: .9rem;
	font-weight: 700;
}

.matchbox--empty p {
	margin: .5rem 0 1rem;
	color: var(--muted);
}

.hsg-next-game .matchbox {
	border: 1px solid var(--line);
	border-top: 4px solid var(--hsg-accent);
	box-shadow: none;
}

/* 7 · Spielbetrieb ---------------------------------------------------------- */

.play__grid {
	display: grid;
	gap: 2.5rem 3rem;
}

@media (min-width: 900px) {
	.play__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.play__col--dates {
		grid-column: 1 / -1;
	}

	.play__col--dates .dates {
		columns: 2;
		column-gap: 3rem;
	}
}

@media (min-width: 1180px) {
	.play__grid {
		grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, .8fr);
	}

	.play__col--dates {
		grid-column: auto;
	}

	.play__col--dates .dates {
		columns: 1;
	}
}

/* Filter als schlichte Textreiter */
.filter {
	display: flex;
	gap: 1.25rem;
	margin: -.5rem 0 .5rem;
	overflow-x: auto;
	scrollbar-width: none;
}

.filter button {
	flex-shrink: 0;
	padding: .45rem 0;
	border: 0;
	border-bottom: 2px solid transparent;
	background: none;
	color: var(--muted);
	font: 600 .9rem var(--font-body);
	cursor: pointer;
}

.filter button:hover {
	color: var(--ink);
}

.filter button[aria-pressed="true"] {
	border-bottom-color: var(--hsg-primary);
	color: var(--hsg-primary);
}

/* Spielliste */
.fixtures__day + .fixtures__day {
	margin-top: .9rem;
}

/* Doppelte Klasse, damit die Stile für Seiteninhalte (h3) nicht greifen. */
.fixtures .fixtures__date {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: .35rem;
	margin: 0;
	padding: .4rem 0;
	border-bottom: 1px solid var(--line);
	color: var(--ink);
	font: 700 .9375rem/1.3 var(--font-body);
}

.fixtures__rel:not(:empty)::before {
	content: "· ";
	color: var(--muted);
}

.fixtures__rel {
	color: var(--hsg-accent-strong);
}

.fixtures__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* In Seiteninhalten (Teamseiten, Shortcodes) keine Listen-Einrückung. */
.entry-content .fixtures__list,
.entry-content .dates {
	padding-left: 0;
}

.entry-content .fixtures__list li + li,
.entry-content .dates li + li {
	margin-top: 0;
}

.fixture {
	position: relative;
	display: grid;
	grid-template-columns: 3.1rem minmax(0, 1fr);
	column-gap: .75rem;
	padding: .55rem .25rem;
	border-bottom: 1px solid var(--line);
}

.fixture:hover {
	background: var(--surface);
}

.fixture__time {
	grid-row: span 2;
	font: 700 1.05rem/1.35 var(--font-display);
	font-variant-numeric: tabular-nums;
}

.fixture__match {
	font-weight: 600;
	line-height: 1.35;
}

.pairing__us {
	color: var(--hsg-primary);
	font-weight: 800;
}

.fixture__meta {
	color: var(--muted);
	font-size: .8125rem;
}

.fixture__state {
	color: var(--loss);
	font-weight: 700;
}

.fixture.is-cancelled .fixture__time,
.fixture.is-cancelled .fixture__match {
	opacity: .6;
	text-decoration: line-through;
}

.fixture__link {
	position: absolute;
	inset: 0;
}

/* Ergebnisse */
.results__summary {
	margin: -.35rem 0 .6rem;
	color: var(--muted);
	font-size: .9rem;
}

.results__summary strong {
	color: var(--ink);
}

.hsg-table {
	width: 100%;
	border-collapse: collapse;
	font-variant-numeric: tabular-nums;
}

.results {
	font-size: .9375rem;
}

.results td {
	padding: .55rem .35rem;
	border-bottom: 1px solid var(--line);
	vertical-align: top;
}

.results td:first-child {
	padding-left: 0;
}

.result__date {
	width: 3.3rem;
	color: var(--muted);
	font-size: .875rem;
	white-space: nowrap;
}

.result__match {
	line-height: 1.35;
}

.result__score {
	font: 700 1.15rem/1.25 var(--font-display);
	text-align: right;
	white-space: nowrap;
}

.result__score a {
	color: inherit;
	text-decoration: none;
}

.result__score a:hover {
	text-decoration: underline;
}

.result__mark {
	width: 1.9rem;
	text-align: right;
}

.mark {
	display: inline-grid;
	place-items: center;
	width: 1.35rem;
	height: 1.35rem;
	border-radius: 3px;
	color: #fff;
	font-size: .72rem;
	font-weight: 800;
	line-height: 1;
}

.mark--win {
	background: var(--win);
}

.mark--loss {
	background: var(--loss);
}

.mark--draw {
	background: var(--draw);
}

/* Termine */
.dates {
	margin: 0;
	padding: 0;
	list-style: none;
}

.date-item {
	position: relative;
	display: grid;
	grid-template-columns: 3.1rem minmax(0, 1fr);
	gap: .85rem;
	padding: .65rem 0;
	border-bottom: 1px solid var(--line);
	break-inside: avoid;
}

.date-item__cal {
	align-self: start;
	padding: .25rem 0 .3rem;
	border: 1px solid var(--line);
	border-top: 4px solid var(--hsg-primary);
	border-radius: 3px;
	line-height: 1;
	text-align: center;
}

.date-item--heimspieltag .date-item__cal {
	border-top-color: var(--hsg-accent);
}

.date-item__day {
	display: block;
	color: var(--ink);
	font: 800 1.45rem/1 var(--font-display);
}

.date-item__month {
	display: block;
	margin-top: .15rem;
	color: var(--muted);
	font-size: .7rem;
	font-weight: 700;
	text-transform: uppercase;
}

.date-item__title {
	display: block;
	color: var(--ink);
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
}

a.date-item__title::after {
	content: "";
	position: absolute;
	inset: 0;
}

a.date-item__title:hover {
	color: var(--hsg-primary);
	text-decoration: underline;
}

.date-item__meta {
	display: block;
	margin-top: .1rem;
	color: var(--muted);
	font-size: .8125rem;
}

/* Tabelle */
.standings-wrap {
	overflow-x: auto;
}

.standings {
	font-size: .9375rem;
}

.standings th {
	padding: .45rem .4rem;
	border-bottom: 2px solid var(--hsg-primary);
	color: var(--muted);
	font-size: .75rem;
	font-weight: 700;
	text-align: left;
	text-transform: uppercase;
}

.standings td {
	padding: .5rem .4rem;
	border-bottom: 1px solid var(--line);
}

.standings .num {
	text-align: right;
}

.standings__pos {
	width: 2.4rem;
}

.standings tr.is-us td {
	background: var(--hsg-tint);
	color: var(--hsg-primary);
	font-weight: 800;
}

.standings abbr {
	text-decoration: none;
}

.standings__note {
	margin: .6rem 0 0;
	color: var(--muted);
	font-size: .8125rem;
}

@media (max-width: 600px) {
	.standings .hide-sm {
		display: none;
	}
}

/* Block auf den Teamseiten: Ergebnisse, Tabelle, Spiele */
.team-games {
	display: grid;
	gap: 2.25rem;
}

.team-games__title {
	margin: 0 0 .5rem;
	font-size: 1.4rem;
}

.hsg-notice {
	padding: .9rem 1.1rem;
	border-left: 4px solid var(--hsg-primary);
	background: var(--surface);
}

/* 8 · Beiträge -------------------------------------------------------------- */

.news-grid {
	display: grid;
	gap: 1.75rem;
}

@media (min-width: 900px) {
	.news-grid {
		grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
		gap: 2.5rem;
	}
}

.post-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
	gap: 2rem 1.5rem;
}

.post-card {
	position: relative;
}

.post-card__media {
	aspect-ratio: 3 / 2;
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--surface);
}

.post-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.post-card__placeholder {
	display: grid;
	place-items: center;
	height: 100%;
	color: color-mix(in srgb, var(--hsg-primary) 30%, transparent);
}

.post-card__placeholder .icon {
	width: 40px;
	height: 40px;
}

.post-card__body {
	padding-top: .75rem;
}

.post-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: .2rem .6rem;
	margin-bottom: .3rem;
	color: var(--muted);
	font-size: .8125rem;
}

.post-card__cat {
	color: var(--hsg-accent-strong);
	font-weight: 700;
}

.post-card__title {
	margin: 0;
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 1.1rem;
	font-weight: 700;
	line-height: 1.3;
}

.post-card__title a {
	color: inherit;
	text-decoration: none;
}

.post-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.post-card:hover .post-card__title a {
	text-decoration: underline;
	text-decoration-thickness: 2px;
}

.post-card__excerpt {
	margin: .4rem 0 0;
	color: var(--muted);
	font-size: .9375rem;
}

.post-card--featured .post-card__title {
	font-family: var(--font-display);
	font-size: clamp(1.6rem, 2.6vw, 2.1rem);
	line-height: 1.1;
}

.post-card--compact {
	display: grid;
	grid-template-columns: 7.5rem minmax(0, 1fr);
	gap: 1rem;
	padding: .9rem 0;
	border-bottom: 1px solid var(--line);
}

.post-card--compact:first-child {
	padding-top: 0;
}

.post-card--compact .post-card__media {
	aspect-ratio: 4 / 3;
}

.post-card--compact .post-card__body {
	padding-top: 0;
}

.post-card--compact .post-card__title {
	font-size: 1rem;
}

.cat-chip {
	color: var(--hsg-accent-strong);
	font-weight: 700;
	text-decoration: none;
}

.cat-chip:hover {
	text-decoration: underline;
}

.single__header {
	padding: clamp(2.5rem, 6vw, 4rem) 0 1.75rem;
}

.single__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .4rem 1rem;
	margin-bottom: .9rem;
	color: var(--muted);
	font-size: .875rem;
}

.single__title {
	margin: 0;
	font-size: clamp(2rem, 4.5vw, 3.1rem);
	text-wrap: balance;
}

.single__image {
	margin-block: 0;
}

.single__image img {
	display: block;
	width: 100%;
	max-height: 640px;
	border-radius: var(--radius);
	object-fit: cover;
}

.single__footer {
	padding-bottom: clamp(2.5rem, 6vw, 4rem);
}

.tag-list {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	margin-bottom: 1.5rem;
}

.tag-list a {
	padding: .25rem .6rem;
	border: 1px solid var(--line);
	border-radius: 3px;
	color: var(--muted);
	font-size: .8125rem;
	text-decoration: none;
}

.post-navigation .nav-links {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--line);
}

.post-navigation a {
	display: flex;
	flex-direction: column;
	gap: .25rem;
	color: var(--ink);
	font-weight: 700;
	line-height: 1.35;
	text-decoration: none;
}

.post-navigation a:hover .post-nav__title {
	color: var(--hsg-primary);
	text-decoration: underline;
}

.post-navigation .nav-next {
	grid-column: 2;
	text-align: right;
}

.post-nav__label {
	color: var(--muted);
	font-size: .8125rem;
	font-weight: 600;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .4rem;
	margin-top: 2.5rem;
}

.page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 42px;
	height: 42px;
	padding: 0 .8rem;
	border: 1px solid var(--line);
	border-radius: 3px;
	color: var(--ink);
	font-weight: 700;
	text-decoration: none;
}

.page-numbers.current {
	border-color: var(--hsg-primary);
	background: var(--hsg-primary);
	color: #fff;
}

.page-numbers.dots {
	border: 0;
}

/* 9 · Teams ----------------------------------------------------------------- */

.teams__group {
	margin: 2rem 0 .9rem;
	color: var(--ink);
	font-size: 1.3rem;
}

.teams__group:first-of-type {
	margin-top: .5rem;
}

.team-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
	gap: 1.5rem 1.25rem;
}

.team-tile__link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.team-tile__media {
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--hsg-primary);
}

.team-tile__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.team-tile__placeholder {
	display: grid;
	place-items: center;
	height: 100%;
	color: rgb(255 255 255 / .35);
}

.team-tile__placeholder .icon {
	width: 44px;
	height: 44px;
}

.team-tile__name {
	position: absolute;
	bottom: 0;
	left: 0;
	margin: 0;
	padding: .3rem .75rem .25rem;
	border-top-right-radius: var(--radius);
	background: var(--hsg-primary);
	color: #fff;
	font-size: 1.25rem;
}

a.team-tile__link:hover .team-tile__name {
	background: var(--hsg-accent-strong);
}

.team-tile__next {
	margin: .5rem 0 0;
	color: var(--muted);
	font-size: .875rem;
	line-height: 1.4;
}

.team-tile__next strong {
	color: var(--ink);
}

.join {
	padding-block: clamp(2.5rem, 6vw, 4rem);
	background: var(--hsg-primary);
	color: #fff;
}

.join__inner {
	display: grid;
	align-items: center;
	gap: 1.5rem;
}

@media (min-width: 800px) {
	.join__inner {
		grid-template-columns: 1fr auto;
		gap: 3rem;
	}
}

.join__title {
	margin: 0 0 .5rem;
	color: #fff;
	font-size: clamp(1.9rem, 4vw, 2.75rem);
	text-transform: uppercase;
}

.join__text {
	max-width: 42rem;
	margin: 0;
	color: rgb(255 255 255 / .88);
	font-size: 1.1rem;
}

/* 10 · Seiten & Inhalte ----------------------------------------------------- */

.page-header {
	padding: clamp(2.25rem, 6vw, 4rem) 0;
	background: var(--hsg-primary);
	color: #fff;
}

.page-header--image {
	padding-block: clamp(5rem, 14vw, 9rem) clamp(2.25rem, 5vw, 3.5rem);
	background:
		linear-gradient(0deg, rgb(3 24 44 / .85) 0%, rgb(3 24 44 / .35) 70%),
		var(--page-header-image) center 35% / cover no-repeat;
}

.page-header__kicker {
	margin: 0 0 .4rem;
	color: #bcdcf5;
	font-weight: 700;
}

.page-header__title {
	margin: 0;
	color: #fff;
	font-size: clamp(2.2rem, 5.5vw, 3.75rem);
	text-transform: uppercase;
	text-wrap: balance;
}

.page-header__text {
	max-width: 46rem;
	margin-top: .75rem;
	color: rgb(255 255 255 / .88);
}

.page-header__text p {
	margin: 0;
}

.entry-content > * {
	width: min(100% - 2 * var(--gutter), var(--content));
	margin-block: 0;
	margin-inline: auto;
}

.entry-content > * + * {
	margin-top: 1.25rem;
}

.entry-content > .alignwide {
	width: min(100% - 2 * var(--gutter), var(--wide));
}

.entry-content > .alignfull {
	width: 100%;
}

.entry-content > .alignleft {
	float: left;
	width: auto;
	max-width: min(50%, 360px);
	margin: .3rem 1.5rem 1rem max(var(--gutter), (100% - var(--content)) / 2);
}

.entry-content > .alignright {
	float: right;
	width: auto;
	max-width: min(50%, 360px);
	margin: .3rem max(var(--gutter), (100% - var(--content)) / 2) 1rem 1.5rem;
}

.entry-content::after {
	content: "";
	display: table;
	clear: both;
}

.entry-content h2 {
	margin-top: 2.2em;
	padding-bottom: .3rem;
	border-bottom: 3px solid var(--hsg-primary);
	font-size: clamp(1.6rem, 3.2vw, 2.1rem);
	text-transform: uppercase;
}

.entry-content h3 {
	margin-top: 1.8em;
	font-size: clamp(1.35rem, 2.5vw, 1.65rem);
}

.entry-content h4 {
	margin-top: 1.5em;
	font-size: 1.25rem;
}

.entry-content > :first-child {
	margin-top: 0;
}

.entry-content img {
	border-radius: var(--radius);
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.3em;
}

.entry-content li + li {
	margin-top: .35em;
}

.entry-content blockquote {
	padding: .25rem 0 .25rem 1.25rem;
	border-left: 4px solid var(--hsg-primary);
	color: var(--hsg-primary);
	font-size: 1.2rem;
}

.entry-content figure {
	margin-inline: auto;
}

.entry-content figcaption {
	margin-top: .5rem;
	color: var(--muted);
	font-size: .875rem;
}

.entry-content hr,
.wp-block-separator {
	border: 0;
	border-top: 1px solid var(--line);
}

.wp-block-table {
	overflow-x: auto;
}

.entry-content table:not(.hsg-table) {
	width: 100%;
	border-collapse: collapse;
	font-size: .9375rem;
}

.entry-content table:not(.hsg-table) th,
.entry-content table:not(.hsg-table) td {
	padding: .6rem .75rem;
	border: 0;
	border-bottom: 1px solid var(--line);
	text-align: left;
	vertical-align: top;
}

.entry-content table:not(.hsg-table) thead th {
	border-bottom: 2px solid var(--hsg-primary);
	color: var(--hsg-primary);
	font-weight: 700;
}

.entry-content table:not(.hsg-table) tbody tr:nth-child(even) {
	background: var(--surface);
}

.wp-block-button__link {
	border-radius: 3px;
	font-weight: 700;
}

.error-404 {
	text-align: center;
}

.error-404 .search-form {
	margin: 1.75rem auto;
}

.empty-state {
	padding: 3rem 1rem;
	color: var(--muted);
	text-align: center;
}

.empty-state .search-form {
	margin: 1rem auto 0;
}

/* 11 · Footer --------------------------------------------------------------- */

.sponsors {
	padding-block: clamp(2.25rem, 5vw, 3.25rem);
	border-top: 1px solid var(--line);
	background: #fff;
}

.sponsors__title {
	margin-bottom: 1.5rem;
	color: var(--muted);
	font-size: 1rem;
	text-align: center;
}

.sponsors__logos,
.sponsors .wp-block-gallery {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 1.5rem 3rem;
}

.sponsors figure {
	margin: 0;
}

.sponsors .wp-block-gallery .wp-block-image {
	width: auto !important;
	flex-grow: 0 !important;
}

.sponsors img {
	width: auto !important;
	max-height: 64px;
	filter: grayscale(1);
	opacity: .75;
	transition: filter .2s, opacity .2s;
}

.sponsors a:hover img,
.sponsors img:hover {
	filter: none;
	opacity: 1;
}

.site-footer {
	padding-top: clamp(3rem, 6vw, 4rem);
	background: var(--hsg-primary-deep);
	color: rgb(255 255 255 / .78);
	font-size: .9375rem;
}

.site-footer a {
	color: #fff;
	text-decoration: none;
}

.site-footer a:hover {
	color: #fff;
	text-decoration: underline;
}

.site-footer__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 2rem 3rem;
	padding-bottom: 2.5rem;
}

.site-footer__brand {
	max-width: 380px;
}

.site-footer__logo {
	display: inline-block;
	margin-bottom: 1rem;
	padding: .6rem .9rem;
	border-radius: var(--radius);
	background: #fff;
}

.site-footer__logo .custom-logo {
	display: block;
	width: auto;
	height: 52px;
}

.site-footer__name {
	color: #fff;
	font-family: var(--font-display);
	font-size: 1.6rem;
	font-weight: 800;
	text-transform: uppercase;
}

.site-footer__title {
	margin: 0 0 .9rem;
	color: #fff;
	font-family: var(--font-display);
	font-size: 1.15rem;
	text-transform: uppercase;
}

.site-footer__links,
.site-footer__legal {
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer__links {
	display: grid;
	gap: .5rem;
}

.site-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: .75rem 1.5rem;
	padding-block: 1.25rem;
	border-top: 1px solid rgb(255 255 255 / .12);
	font-size: .8125rem;
}

.site-footer__bottom p {
	margin: 0;
}

.site-footer__legal {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem 1.25rem;
}

.social-links {
	display: flex;
	gap: .5rem;
	margin: 1rem 0 0;
	padding: 0;
	list-style: none;
}

.social-links a {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: var(--radius);
	background: rgb(255 255 255 / .1);
	color: #fff;
}

.social-links a:hover {
	background: var(--hsg-accent-strong);
	color: #fff;
}

/* 12 · Extras --------------------------------------------------------------- */

.is-today {
	color: var(--hsg-accent-strong);
}

.is-live {
	color: var(--loss);
}

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

@media print {
	.matchday-bar,
	.site-header,
	.sponsors,
	.site-footer,
	.filter {
		display: none !important;
	}

	.page-header,
	.hero {
		background: none !important;
		color: #000;
	}
}
