/*
Theme Name:   TSV Schönberg
Theme URI:    https://www.tsvschoenberg.de/
Description:  Child Theme für GeneratePress (mit GP Premium) – Vereinsdesign des TSV Schönberg von 1863 e.V. mit überstehendem Wappen, Nachrichtenkacheln, Abteilungs- und Artikelseiten.
Author:       TSV Schönberg von 1863 e.V.
Template:     generatepress
Version:      1.3.0
Requires at least: 6.3
Requires PHP: 7.4
License:      GPL-2.0-or-later
Text Domain:  tsv
*/

/* ---------------------------------------------------------------
   Design-Tokens
---------------------------------------------------------------- */
:root {
	--tsv-red: #b3121b;
	--tsv-red-text: #a3141c;
	--tsv-ink: #1d1b1a;
	--tsv-ink-2: #3d3936;
	--tsv-muted: #5c5753;
	--tsv-sand: #f4f2ef;
	--tsv-line: #e0dcd7;
	--tsv-white: #ffffff;
	--tsv-radius: 12px;
	--tsv-max: 1240px;
	--tsv-gutter: 24px;
	--tsv-crest: 150px;          /* wird aus dem Customizer überschrieben */
	--tsv-header-h: 92px;
	/* Systemschriften: keine externen Schriftdateien, schnell und datenschutzfreundlich */
	--tsv-font-display: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--tsv-font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
	font-family: var(--tsv-font-body);
	color: var(--tsv-ink);
	background: var(--tsv-white);
	font-size: 18px;
	line-height: 1.55;
}
a { color: var(--tsv-red-text); }
a:hover, a:focus { color: var(--tsv-ink); }
h1, h2, h3, h4 { color: var(--tsv-ink); }
:focus-visible { outline: 3px solid var(--tsv-red); outline-offset: 2px; }

.tsv-container { max-width: var(--tsv-max); margin: 0 auto; padding-left: var(--tsv-gutter); padding-right: var(--tsv-gutter); box-sizing: border-box; }
.tsv-screen-reader { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* GeneratePress-Container für die eigenen Vorlagen auf volle Breite stellen */
.tsv-wide .site.grid-container { max-width: none; padding: 0; }
.tsv-wide .site-content { display: block; padding: 0; }
.tsv-wide #page { background: transparent; }

/* ---------------------------------------------------------------
   Header mit überstehendem Wappen
---------------------------------------------------------------- */
.tsv-header { position: relative; z-index: 50; background: var(--tsv-white); border-bottom: 3px solid var(--tsv-red); }
.tsv-header__inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; min-height: var(--tsv-header-h); }

.tsv-brand { display: flex; align-items: flex-start; gap: 20px; text-decoration: none; color: var(--tsv-ink); align-self: flex-start; }
.tsv-brand:hover, .tsv-brand:focus { color: var(--tsv-ink); }
.tsv-brand__crest {
	display: block;
	height: var(--tsv-crest);
	width: auto;
	max-width: none;
	margin-top: 10px;
	/* Das Wappen ragt um alles über die Headerhöhe hinaus nach unten */
	margin-bottom: calc(var(--tsv-header-h) - var(--tsv-crest) - 10px);
	filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .18));
	position: relative;
	z-index: 2;
}
.tsv-brand__text { display: flex; flex-direction: column; justify-content: center; min-height: var(--tsv-header-h); line-height: 1; }
.tsv-brand__name { font-family: var(--tsv-font-display); font-weight: 600; font-size: 21px; letter-spacing: .12em; text-transform: uppercase; }
.tsv-brand__sub { font-size: 14px; color: var(--tsv-muted); margin-top: 6px; letter-spacing: .02em; }

.tsv-nav { display: flex; align-items: center; gap: 28px; }
.tsv-nav ul { list-style: none; margin: 0; padding: 0; }
.tsv-nav__menu { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 26px; }
.tsv-nav__menu > li { position: relative; }
.tsv-nav__menu a { display: inline-flex; align-items: center; min-height: 44px; color: var(--tsv-ink); font-weight: 500; font-size: 17px; text-decoration: none; }
.tsv-nav__menu a:hover, .tsv-nav__menu a:focus,
.tsv-nav__menu .current-menu-item > a, .tsv-nav__menu .current-menu-ancestor > a, .tsv-nav__menu .current_page_parent > a { color: var(--tsv-red-text); }
.tsv-nav__menu .current-menu-item > a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* Untermenüs */
.tsv-nav__menu .sub-menu {
	position: absolute; top: 100%; left: -16px; min-width: 240px; padding: 8px 0;
	background: var(--tsv-white); border: 1px solid var(--tsv-line); border-radius: 10px;
	box-shadow: 0 12px 28px rgba(0, 0, 0, .12);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s;
}
.tsv-nav__menu li:hover > .sub-menu, .tsv-nav__menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.tsv-nav__menu .sub-menu a { display: flex; padding: 0 16px; font-size: 16px; }

.tsv-button {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 10px 22px; box-sizing: border-box;
	border-radius: 999px; border: 2px solid var(--tsv-red); background: var(--tsv-red);
	color: var(--tsv-white); font-weight: 700; font-size: 17px; line-height: 1.2; text-decoration: none; cursor: pointer;
}
.tsv-button:hover, .tsv-button:focus { background: #8e0f16; border-color: #8e0f16; color: var(--tsv-white); }
.tsv-button--ghost { background: transparent; color: var(--tsv-ink); border-color: var(--tsv-ink); }
.tsv-button--ghost:hover, .tsv-button--ghost:focus { background: var(--tsv-ink); border-color: var(--tsv-ink); color: var(--tsv-white); }

.tsv-nav__toggle {
	display: none; width: 44px; height: 44px; align-items: center; justify-content: center;
	border: 1px solid #cfcac4; border-radius: 10px; background: var(--tsv-white); color: var(--tsv-ink); cursor: pointer; padding: 0;
}
.tsv-nav__toggle:hover, .tsv-nav__toggle:focus { background: var(--tsv-sand); color: var(--tsv-ink); }
.tsv-nav__toggle .tsv-icon-close { display: none; }
.tsv-nav-open .tsv-nav__toggle .tsv-icon-open { display: none; }
.tsv-nav-open .tsv-nav__toggle .tsv-icon-close { display: block; }

@media (max-width: 1080px) {
	:root { --tsv-crest: 98px !important; --tsv-header-h: 68px; }
	.tsv-header { border-bottom-width: 3px; }
	.tsv-brand { gap: 12px; }
	.tsv-brand__crest { margin-top: 6px; margin-bottom: calc(var(--tsv-header-h) - var(--tsv-crest) - 6px); }
	.tsv-brand__name { font-size: 17px; }
	.tsv-brand__sub { font-size: 13px; }
	.tsv-nav__toggle { display: inline-flex; }
	.tsv-nav__panel {
		display: none; position: absolute; left: 0; right: 0; top: 100%;
		background: var(--tsv-white); border-bottom: 3px solid var(--tsv-red);
		box-shadow: 0 16px 30px rgba(0, 0, 0, .12); padding: 72px var(--tsv-gutter) 24px;
	}
	.tsv-nav-open .tsv-nav__panel { display: block; }
	.tsv-nav__menu { flex-direction: column; align-items: stretch; gap: 0; }
	.tsv-nav__menu > li { border-bottom: 1px solid var(--tsv-line); }
	.tsv-nav__menu a { min-height: 52px; font-size: 18px; }
	.tsv-nav__menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 8px 16px; min-width: 0; }
	.tsv-nav__panel .tsv-button { margin-top: 20px; width: 100%; }
}
@media (min-width: 1081px) {
	.tsv-nav__panel { display: flex; align-items: center; gap: 28px; }
}

/* ---------------------------------------------------------------
   Allgemeine Bausteine
---------------------------------------------------------------- */
.tsv-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--tsv-red-text); margin: 0; }
.tsv-display { font-family: var(--tsv-font-display); font-weight: 700; letter-spacing: -0.015em; line-height: 1.12; margin: 10px 0 0; }
.tsv-h1 { font-size: clamp(28px, 3vw, 40px); }
.tsv-h2 { font-size: clamp(24px, 2.2vw, 30px); }

/* Abstand unter dem Header, damit das Wappen nichts verdeckt */
.tsv-first { padding-top: calc(var(--tsv-crest) - var(--tsv-header-h) + 64px); }

.tsv-section { padding-top: 96px; padding-bottom: 96px; }
.tsv-section--sand { background: var(--tsv-sand); }
.tsv-section__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 32px; margin-bottom: 48px; }

.tsv-breadcrumb { font-size: 15px; color: var(--tsv-muted); margin: 0 0 12px; }
.tsv-breadcrumb a { color: var(--tsv-muted); }
.tsv-breadcrumb a:hover, .tsv-breadcrumb a:focus { color: var(--tsv-red-text); }
.tsv-breadcrumb span[aria-hidden] { margin: 0 6px; }

/* Sparten-Marker (Farbe pro Kategorie, siehe Beiträge › Kategorien) */
.tsv-chip {
	--chip: #8e1218;
	display: inline-block;
	font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; line-height: 1.4; text-decoration: none;
	color: var(--chip);
}
a.tsv-chip:hover, a.tsv-chip:focus { color: var(--chip); text-decoration: underline; }

/* Filter-Pillen */
.tsv-filters { display: flex; flex-wrap: wrap; gap: 0 28px; list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--tsv-line); }
.tsv-filters a {
	display: inline-flex; align-items: center; min-height: 44px; margin-bottom: -1px;
	border-bottom: 2px solid transparent; color: var(--tsv-muted); font-size: 16px; text-decoration: none;
}
.tsv-filters a:hover, .tsv-filters a:focus { color: var(--tsv-ink); }
.tsv-filters a[aria-current="page"] { color: var(--tsv-ink); border-bottom-color: var(--tsv-red); font-weight: 600; }

/* Dezenter Textlink mit Pfeil */
.tsv-link-more { font-weight: 600; color: var(--tsv-ink); text-decoration: none; white-space: nowrap; }
.tsv-link-more::after { content: " →"; color: var(--tsv-red); }
.tsv-link-more:hover, .tsv-link-more:focus { color: var(--tsv-red-text); }

/* ---------------------------------------------------------------
   Nachrichtenkacheln
---------------------------------------------------------------- */
.tsv-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 28px; margin: 0; padding: 0; list-style: none; }
@media (max-width: 960px) { .tsv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; } }

/* Kachel: leicht getönter Grund, feiner Rahmen, Bild bündig oben */
.tsv-card {
	--tsv-card-bg: #faf8f6;
	position: relative; display: flex; flex-direction: column; min-width: 0;
	background: var(--tsv-card-bg); border: 1px solid #e7e2dc; border-radius: 14px; overflow: hidden;
	transition: border-color .2s, box-shadow .2s, transform .2s;
}
.tsv-section--sand .tsv-card { --tsv-card-bg: #ffffff; }
.tsv-card:hover, .tsv-card:focus-within { border-color: #d6cfc7; box-shadow: 0 10px 28px rgba(29, 27, 26, .08); transform: translateY(-2px); }
.tsv-card__media { overflow: hidden; aspect-ratio: 3 / 2; background: #ece9e5; }
.tsv-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.tsv-card__media--empty { display: flex; align-items: center; justify-content: center; }
.tsv-card__media--empty img { width: auto; height: 60%; object-fit: contain; opacity: .35; }
.tsv-card__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 14px; color: var(--tsv-muted); margin: 0; padding: 20px 22px 0; }
.tsv-card__title { margin: 0; padding: 8px 22px 24px; font-family: var(--tsv-font-body); font-size: 19px; line-height: 1.35; font-weight: 600; }
.tsv-card__title a { color: var(--tsv-ink); text-decoration: none; }
/* ganze Kachel klickbar, ohne verschachtelte Links */
.tsv-card__title a::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }
.tsv-card:hover .tsv-card__title a, .tsv-card__title a:focus { color: var(--tsv-red-text); }
.tsv-card__title a:focus { outline: none; }
.tsv-card:focus-within { outline: 3px solid var(--tsv-red); outline-offset: 2px; }
.tsv-card:hover .tsv-card__media img { transform: scale(1.03); }
.tsv-card .tsv-chip { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .tsv-card, .tsv-card__media img { transition: none; } .tsv-card:hover { transform: none; } }

@media (max-width: 640px) {
	/* Smartphone: erste Meldung groß, Rest als kompakte Kacheln mit Bild links */
	.tsv-grid--news { grid-template-columns: minmax(0, 1fr); gap: 12px; }
	.tsv-grid--news .tsv-card { display: grid; grid-template-columns: 104px minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 14px; padding: 12px; border-radius: 12px; }
	.tsv-grid--news .tsv-card .tsv-card__media { grid-row: 1 / span 2; aspect-ratio: 1 / 1; border-radius: 8px; }
	.tsv-grid--news .tsv-card .tsv-card__meta { padding: 2px 0 0; font-size: 12px; }
	.tsv-grid--news .tsv-card .tsv-card__title { padding: 4px 0 0; font-size: 16px; }
	.tsv-grid--news .tsv-card:first-child { display: flex; padding: 0; border-radius: 14px; }
	.tsv-grid--news .tsv-card:first-child .tsv-card__media { aspect-ratio: 3 / 2; border-radius: 0; }
	.tsv-grid--news .tsv-card:first-child .tsv-card__meta { padding: 18px 18px 0; font-size: 13px; }
	.tsv-grid--news .tsv-card:first-child .tsv-card__title { padding: 6px 18px 20px; font-size: 19px; }
	.tsv-grid:not(.tsv-grid--news) { grid-template-columns: minmax(0, 1fr); }
}

.tsv-more { margin-top: 56px; display: flex; justify-content: center; }

/* Seitennummerierung */
.tsv-pagination { margin-top: 48px; }
.tsv-pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tsv-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 14px; box-sizing: border-box; border-radius: 999px; border: 1px solid #cfcac4; color: var(--tsv-ink); text-decoration: none; font-weight: 600; }
.tsv-pagination .page-numbers.current { background: var(--tsv-ink); border-color: var(--tsv-ink); color: var(--tsv-white); }

/* ---------------------------------------------------------------
   Startseite: Willkommen + Schnellzugriff
---------------------------------------------------------------- */
.tsv-welcome { display: flex; flex-wrap: wrap; gap: 40px; }
.tsv-welcome__text { flex: 1 1 320px; min-width: 0; }
.tsv-welcome__text p { color: var(--tsv-ink-2); }
.tsv-welcome__tiles { flex: 2 1 560px; min-width: 0; }
.tsv-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
@media (max-width: 640px) { .tsv-tiles { grid-template-columns: minmax(0, 1fr); } }
.tsv-tiles a {
	display: flex; justify-content: space-between; align-items: center; gap: 12px;
	min-height: 60px; padding: 16px 0; box-sizing: border-box;
	background: transparent; border: 0; border-top: 1px solid #d6d1cb; border-radius: 0;
	color: var(--tsv-ink); font-weight: 500; font-size: 17px; text-decoration: none;
}
.tsv-tiles a::after { content: "→"; color: var(--tsv-red); font-weight: 400; }
.tsv-tiles a:hover, .tsv-tiles a:focus { color: var(--tsv-red-text); }

/* ---------------------------------------------------------------
   Abteilungsseite
---------------------------------------------------------------- */
.tsv-hero { background: var(--tsv-sand); }
.tsv-hero__inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: center; padding-bottom: 56px; }
.tsv-hero__lead { font-size: 20px; line-height: 1.5; color: var(--tsv-ink-2); margin: 16px 0 0; max-width: 34em; }
.tsv-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.tsv-hero__media img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 16px; }
@media (max-width: 900px) {
	.tsv-hero__inner { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}

.tsv-dept { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 56px; align-items: start; }
@media (max-width: 960px) { .tsv-dept { grid-template-columns: minmax(0, 1fr); gap: 40px; } }

.tsv-facts { background: var(--tsv-white); border: 1px solid var(--tsv-line); border-radius: 16px; padding: 28px; position: sticky; top: 24px; }
.tsv-facts h2 { font-family: var(--tsv-font-display); font-size: 28px; margin: 0 0 16px; }
.tsv-facts h3 { font-size: 14px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--tsv-muted); margin: 20px 0 8px; }
.tsv-facts__times { list-style: none; margin: 0; padding: 0; }
.tsv-facts__times li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--tsv-line); font-size: 16px; }
.tsv-facts__times li span:first-child { font-weight: 700; }
.tsv-facts__times li span:last-child { color: var(--tsv-ink-2); text-align: right; }
.tsv-facts p { margin: 0; font-size: 16px; }
.tsv-facts .tsv-button { width: 100%; margin-top: 24px; }

/* ---------------------------------------------------------------
   Artikelseite
---------------------------------------------------------------- */
.tsv-article__head { max-width: 760px; margin: 0 auto; }
.tsv-article__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--tsv-muted); font-size: 15px; margin-bottom: 4px; }
.tsv-article__lead { font-size: 21px; line-height: 1.5; color: var(--tsv-ink-2); margin: 18px 0 0; }
.tsv-article__figure { max-width: 1040px; margin: 36px auto 0; }
.tsv-article__figure img { display: block; width: 100%; height: auto; border-radius: 16px; }
.tsv-article__figure figcaption { font-size: 15px; color: var(--tsv-muted); margin-top: 10px; }

.tsv-prose { max-width: 760px; margin: 40px auto 0; }
.tsv-prose > * { margin-top: 0; margin-bottom: 1.2em; }
.tsv-prose h2 { font-family: var(--tsv-font-display); font-size: 32px; line-height: 1.1; margin-top: 1.6em; }
.tsv-prose h3 { font-size: 22px; margin-top: 1.4em; }
.tsv-prose img { border-radius: 10px; height: auto; }
.tsv-prose figcaption { font-size: 15px; color: var(--tsv-muted); }
.tsv-prose blockquote { border: 0; margin-left: 0; padding: 0 0 0 0; font-family: var(--tsv-font-display); font-size: 28px; line-height: 1.2; color: var(--tsv-ink); }
.tsv-prose .alignwide { max-width: 1040px; margin-left: calc((760px - 1040px) / 2); margin-right: calc((760px - 1040px) / 2); }
@media (max-width: 1100px) { .tsv-prose .alignwide { margin-left: 0; margin-right: 0; } }

.tsv-dept-cta { max-width: 760px; margin: 48px auto 0; background: var(--tsv-sand); border-radius: 16px; padding: 28px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; }
.tsv-dept-cta p { margin: 0; }
.tsv-dept-cta strong { display: block; font-family: var(--tsv-font-display); font-size: 26px; line-height: 1.1; }

/* ---------------------------------------------------------------
   Block-Vorlagen
---------------------------------------------------------------- */
/* Ergebnis-Box */
.tsv-score { background: var(--tsv-ink); color: var(--tsv-white); border-radius: 16px; padding: 24px 28px !important; }
.tsv-score p { margin: 0; color: var(--tsv-white); }
.tsv-score .tsv-score__team { font-weight: 700; font-size: 18px; flex: 1 1 0; }
.tsv-score .tsv-score__team:last-of-type { text-align: right; }
.tsv-score .tsv-score__result { font-family: var(--tsv-font-display); font-weight: 700; font-size: 48px; line-height: 1; white-space: nowrap; }
.tsv-score .tsv-score__info { font-size: 14px; color: #cfcac4; text-align: center; }

/* Mannschafts-Karten */
.tsv-team { border: 1px solid var(--tsv-line); border-radius: 12px; padding: 20px 22px !important; height: 100%; box-sizing: border-box; }
.tsv-team h3 { font-family: var(--tsv-font-display); font-size: 24px; margin: 0 0 6px; }
.tsv-team p { margin: 0; font-size: 16px; color: var(--tsv-ink-2); }

/* Infokasten */
.tsv-infobox { background: var(--tsv-sand); border-radius: 16px; padding: 24px 28px !important; }
.tsv-infobox > *:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------
   Footer
---------------------------------------------------------------- */
.tsv-footer { background: var(--tsv-ink); color: #e9e6e2; font-size: 15px; }
.tsv-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 32px; padding-top: 36px; padding-bottom: 36px; }
.tsv-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.tsv-footer a { color: #e9e6e2; }
.tsv-footer a:hover, .tsv-footer a:focus { color: #ffffff; }

/* ---------------------------------------------------------------
   Ergänzungen
---------------------------------------------------------------- */
.tsv-related { margin-top: 72px; }
.tsv-dept .tsv-prose { margin: 0; max-width: none; }
.tsv-welcome__text h2 { font-family: var(--tsv-font-display); font-size: 34px; line-height: 1.1; margin: 0 0 12px; }
.tsv-score__row { gap: 16px; }

/* Block-Buttons im Vereinsstil */
.wp-block-button__link { border-radius: 999px; background: var(--tsv-red); color: var(--tsv-white); font-weight: 700; padding: 12px 24px; text-decoration: none; }
.wp-block-button__link:hover, .wp-block-button__link:focus { background: #8e0f16; color: var(--tsv-white); }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--tsv-ink); border: 2px solid var(--tsv-ink); }

/* ---------------------------------------------------------------
   Platz für das überstehende Wappen
---------------------------------------------------------------- */
/* Breite des Wappens (Seitenverhältnis 300 × 386) plus Abstand */
:root { --tsv-crest-w: calc(var(--tsv-crest) * 300 / 386); }

/* Inhalte direkt unter dem Header (z. B. Brotkrumen-Leiste aus GP-Elementen oder Yoast):
   Text beginnt rechts neben dem Wappen, auf Höhe des Vereinsnamens */
.tsv-after-header:empty { display: none; }
.tsv-after-header > * {
	box-sizing: border-box;
	padding-left: max(
		calc(var(--tsv-gutter) + var(--tsv-crest-w) + 20px),
		calc((100% - var(--tsv-max)) / 2 + var(--tsv-gutter) + var(--tsv-crest-w) + 20px)
	) !important;
	min-height: calc(var(--tsv-crest) - var(--tsv-header-h));
	display: flex;
	align-items: center;
}
.tsv-after-header > * > * { max-width: none; margin-left: 0; padding-left: 0; }
@media (max-width: 1080px) {
	.tsv-after-header > * { padding-left: calc(var(--tsv-gutter) + var(--tsv-crest-w) + 12px) !important; }
}

/* Die eigenen Vorlagen zeigen Brotkrumen selbst – fremde Leiste dort ausblenden */
.tsv-wide .tsv-after-header { display: none; }

/* Normale GeneratePress-Seiten (Impressum, Kontakt …): Inhalt beginnt unter dem Wappen */
body:not(.tsv-wide) .site.grid-container { margin-top: calc(var(--tsv-crest) - var(--tsv-header-h) - 10px); }
body:not(.tsv-wide) .tsv-after-header:not(:empty) + .site.grid-container { margin-top: 24px; }

/* ---------------------------------------------------------------
   Startseite unten: Verein, Sportangebote, Sponsoren & Partner
---------------------------------------------------------------- */
.tsv-section__head--stack { flex-direction: column; align-items: flex-start; gap: 0; }
.tsv-section__intro { margin: 12px 0 0; max-width: 46em; color: var(--tsv-ink-2); font-size: 18px; }

/* Vereinskacheln: 4 Spalten */
.tsv-tiles--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .tsv-tiles--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .tsv-tiles--4 { grid-template-columns: minmax(0, 1fr); } }

/* Sportangebote: Gruppenname links, Sportarten rechts */
.tsv-sports { display: flex; flex-direction: column; }
.tsv-sports__group { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px 32px; padding: 28px 0; border-top: 1px solid var(--tsv-line); }
.tsv-sports__group:first-child { border-top: 0; padding-top: 4px; }
.tsv-sports__title { margin: 0; padding-top: 4px; font-family: var(--tsv-font-display); font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.tsv-sports__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 20px 16px; }
.tsv-sport a { display: flex; flex-direction: column; gap: 8px; color: var(--tsv-ink); text-decoration: none; font-weight: 700; font-size: 16px; }
.tsv-sport__media { display: block; overflow: hidden; border-radius: 10px; aspect-ratio: 4 / 3; background: var(--tsv-sand); }
.tsv-sport__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.tsv-sport__media .tsv-sport__fallback { object-fit: contain; padding: 14%; box-sizing: border-box; opacity: .35; }
.tsv-sport a:hover, .tsv-sport a:focus { color: var(--tsv-red-text); }
.tsv-sport a:hover img { transform: scale(1.04); }
@media (max-width: 760px) {
	.tsv-sports__group { grid-template-columns: minmax(0, 1fr); }
	.tsv-sports__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Freier Inhalt der Startseite (Sponsoren, Partner …) */
.tsv-section--content { border-top: 1px solid var(--tsv-line); }
.tsv-content > * { margin-top: 0; margin-bottom: 1em; }
.tsv-content h2 { font-family: var(--tsv-font-display); font-weight: 800; letter-spacing: -0.02em; font-size: clamp(26px, 2.6vw, 32px); line-height: 1.1; margin-top: 1.4em; }
.tsv-content > h2:first-child { margin-top: 0; }
.tsv-content p { max-width: 46em; color: var(--tsv-ink-2); }

/* Block-Vorlage „Logo-Leiste“: Logos in gleich großen Feldern */
.wp-block-gallery.tsv-logos { gap: 16px; margin-bottom: 48px; }
.wp-block-gallery.tsv-logos .wp-block-image {
	flex-grow: 0 !important;
	width: calc((100% - 4 * 16px) / 5) !important;
	height: 120px; box-sizing: border-box; padding: 18px;
	display: flex !important; align-items: center; justify-content: center;
	background: var(--tsv-white); border: 1px solid var(--tsv-line); border-radius: 12px;
}
.wp-block-gallery.tsv-logos .wp-block-image img {
	width: auto !important; height: auto !important; max-width: 100%; max-height: 80px;
	object-fit: contain !important; flex: none !important; border-radius: 0;
}
.wp-block-gallery.tsv-logos .wp-block-image a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.wp-block-gallery.tsv-logos .wp-block-image figcaption { display: none; }
@media (max-width: 960px) { .wp-block-gallery.tsv-logos .wp-block-image { width: calc((100% - 2 * 16px) / 3) !important; } }
@media (max-width: 560px) { .wp-block-gallery.tsv-logos .wp-block-image { width: calc((100% - 16px) / 2) !important; height: 100px; } }

/* ---------------------------------------------------------------
   Footer-Widgets von GeneratePress im Vereinsstil
---------------------------------------------------------------- */
body .site-footer .footer-widgets { background: var(--tsv-ink); color: #e9e6e2; border-bottom: 1px solid #3a3634; font-size: 15px; }
body .site-footer .footer-widgets .widget { background: transparent; padding: 0; margin-bottom: 24px; }
body .site-footer .footer-widgets .widget-title { color: #ffffff; font-size: 14px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; margin-bottom: 12px; }
body .site-footer .footer-widgets a { color: #e9e6e2; text-decoration: none; }
body .site-footer .footer-widgets a:hover, body .site-footer .footer-widgets a:focus { color: #ffffff; text-decoration: underline; }
body .site-footer .footer-widgets ul { list-style: none; margin: 0; }
body .site-footer .footer-widgets li { margin: 0 0 6px; }
.tsv-footer { background: #151312; }
