/* Herbstbiathlon – Gestaltung auf theme-base. Farben/Schriften als Token aus theme.json (--wp--preset--…).
   CI aus dem Logo: Blau #0000FF (Schriftzug), Hellblau #0084D1 („seit 2008“, nah am NSR-Cyan), roter Lichthof als
   Treffer-Akzent, schwarze Silhouetten. Schriften Roboto/Roboto Slab wie NSR. Docs: docs/ci.md. */
:root {
	--hb-brand: var(--wp--preset--color--brand, #0000ff);
	--hb-sky: var(--wp--preset--color--sky, #0084d1);
	--hb-target: var(--wp--preset--color--target, #d90a0a);
	--hb-ink: var(--wp--preset--color--ink, #111);
	--hb-muted: var(--wp--preset--color--muted, #4a4f5c);
	--hb-night: var(--wp--preset--color--night, #08094a);
	--hb-mist: var(--wp--preset--color--mist, #eef0ff);
	--hb-line: var(--wp--preset--color--line, #d7dbf3);
	--hb-radius: 14px;
	--tb-bg: #fff;
	--tb-fg: var(--hb-ink);
	--tb-focus: var(--hb-sky);
	--tb-header-height: 80px;
	--tb-accent: var(--hb-brand);   /* Schnellsuche (theme-base) */
	--tb-line: var(--hb-line);
	--tb-muted: var(--hb-muted);
}
body { font-family: var(--wp--preset--font-family--sans); -webkit-font-smoothing: antialiased; }
a { text-underline-offset: .18em; text-decoration-thickness: 1px; }

/* ---------- Absender-Zeile NSR */
.hb-nsr-bar { background: var(--hb-night); color: #fff; font-size: .82rem; text-align: center; }
.hb-nsr-bar a { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem var(--tb-gutter); color: #fff; text-decoration: none; }
.hb-nsr-bar img { height: 22px; width: auto; background: #fff; border-radius: 4px; padding: 2px 4px; }
.hb-nsr-bar a:hover strong { text-decoration: underline; }

/* ---------- Kopfzeile */
.tb-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.97); backdrop-filter: saturate(1.4) blur(8px);
	border-bottom: 3px solid var(--hb-brand); }
.admin-bar .tb-header { top: 32px; }
.hb-brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--hb-ink); }
.hb-brand__badge { width: 56px; height: 56px; }
.hb-brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.hb-brand__name { font-weight: 900; font-size: 1.45rem; letter-spacing: .04em; text-transform: uppercase; color: var(--hb-brand);
	font-style: italic; text-shadow: 2px 2px 0 rgba(0,0,0,.18); }
.hb-brand__claim { font-size: .78rem; color: var(--hb-muted); font-weight: 500; }
.tb-menu a { color: var(--hb-ink); text-decoration: none; font-weight: 500; font-size: .98rem; }
.tb-menu a:hover, .tb-menu .current-menu-item > a { color: var(--hb-brand); }
.tb-menu > li > a { display: inline-block; padding: .5rem 0; border-bottom: 3px solid transparent; }
.tb-menu > .current-menu-item > a { border-bottom-color: var(--hb-target); }
.tb-nav-toggle { font: inherit; font-weight: 700; color: #fff; background: var(--hb-brand); border: 0; border-radius: 999px; padding: .55rem 1.1rem; cursor: pointer; }
.hb-header-cta { margin-left: 1rem; white-space: nowrap; }
@media (min-width: 961px) { .tb-nav .tb-menu { flex-wrap: nowrap; gap: 1.4rem; } .tb-menu > li > a { white-space: nowrap; } }
@media (min-width: 961px) and (max-width: 1100px) {   /* schmaler Desktop: Menü + Lupe der Schnellsuche passen in eine Zeile */
	.tb-header__inner { gap: 1rem; }
	.tb-nav .tb-menu { gap: .9rem; }
	.hb-brand__name { font-size: 1.2rem; }
	.hb-brand__claim { display: none; }
}
@media (max-width: 1260px) { .tb-header .hb-header-cta { display: none; } }   /* darunter fehlt neben Menü und Lupe der Platz */
@media (max-width: 960px) {
	:root { --tb-header-height: 66px; }
	.hb-brand__badge { width: 44px; height: 44px; }
	.hb-brand__name { font-size: 1.15rem; }
	.hb-brand__claim { display: none; }
}
@media (max-width: 420px) {   /* Platz für die Lupe der Schnellsuche neben „Menü“ */
	.hb-brand { gap: .45rem; }
	.hb-brand__badge { width: 36px; height: 36px; }
	.hb-brand__name { font-size: .98rem; letter-spacing: .02em; }
	.tb-nav-toggle { padding: .5rem .85rem; }
}
@media (max-width: 960px) {
	.tb-nav { border-bottom: 1px solid var(--hb-line); box-shadow: 0 16px 30px rgba(8,9,74,.12); padding-block: .5rem 1.5rem; }
	.tb-nav .tb-menu > li { border-bottom: 1px solid var(--hb-line); }
	.tb-nav .tb-menu a { display: block; padding: .7rem 0; min-height: 44px; font-size: 1.05rem; font-weight: 700; border-bottom: 0; }
}

/* ---------- Buttons */
.hb-button { display: inline-block; padding: .7em 1.4em; border-radius: 999px; font-weight: 700; text-decoration: none; line-height: 1.2;
	background: var(--hb-brand); color: #fff; border: 2px solid var(--hb-brand); transition: background .15s, color .15s; }
.hb-button:hover { background: var(--hb-night); border-color: var(--hb-night); color: #fff; }
.hb-button--light { background: #fff; color: var(--hb-brand); border-color: #fff; }
.hb-button--light:hover { background: var(--hb-mist); border-color: var(--hb-mist); color: var(--hb-night); }
.hb-button--ghost { background: transparent; border-color: rgba(255,255,255,.7); color: #fff; }
.hb-button--ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }

/* ---------- Hero der Startseite: Nachtblau, Logo mit rotem Lichthof wie im Original */
.hb-hero { position: relative; color: #fff; background: linear-gradient(135deg, var(--hb-night) 0%, #0b0fa8 70%, var(--hb-brand) 100%); overflow: hidden; isolation: isolate; }
.hb-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 48px; background: #fff;
	clip-path: polygon(0 100%, 100% 30%, 100% 100%); }   /* schräge Kante wie die Schussbahn */
.hb-hero__inner { max-width: 1200px; margin: 0 auto; padding: clamp(2.5rem, 6vw, 5rem) var(--tb-gutter) clamp(4rem, 8vw, 6.5rem);
	display: grid; grid-template-columns: 1.25fr 1fr; gap: 2.5rem; align-items: center; }
.hb-hero__kicker { margin: 0 0 .6rem; font-size: .85rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #9fd6ff; }
.hb-hero__title { margin: 0 0 1rem; color: #fff; font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.08; }
.hb-hero__lead { margin: 0 0 1.6rem; font-size: 1.15rem; max-width: 34em; color: #e6e9ff; }
.hb-hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin: 0; }
.hb-hero__logo { position: relative; justify-self: center; width: min(360px, 100%); }
.hb-hero__logo::before { content: ""; position: absolute; inset: -18%; z-index: -1; border-radius: 50%;
	background: radial-gradient(circle, rgba(255,40,40,.55) 0%, rgba(255,40,40,.18) 40%, rgba(255,40,40,0) 68%); }
.hb-hero__logo img { display: block; width: 100%; height: auto; border-radius: 50%; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.hb-hero__jubel { position: absolute; z-index: 1; right: -4%; top: 2%; display: grid; place-content: center; width: 7.2rem; aspect-ratio: 1;
	margin: 0; border-radius: 50%; background: var(--hb-target); color: #fff; text-align: center; line-height: 1.05; font-weight: 700;
	font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; transform: rotate(10deg); box-shadow: 0 10px 28px rgba(0,0,0,.35); }
.hb-hero__jubel strong { font-family: var(--wp--preset--font-family--slab); font-size: 2.6rem; letter-spacing: 0; }
.hb-hero__jubel span { font-size: .7rem; letter-spacing: .02em; }
@media (max-width: 760px) {
	.hb-hero__jubel { width: 5.6rem; font-size: .8rem; }
	.hb-hero__jubel strong { font-size: 2rem; }
	.hb-hero__inner { grid-template-columns: 1fr; text-align: left; }
	.hb-hero__logo { order: -1; width: 58vw; max-width: 260px; }
}

/* ---------- Inhalt */
.tb-entry__title { margin-top: 2rem; }
.tb-entry__content h2 { margin-top: 2.4rem; }
.tb-entry__content h2::after { content: ""; display: block; width: 3rem; height: 4px; margin-top: .5rem; background: var(--hb-target); border-radius: 2px; }
.has-text-align-center::after, .hb-center::after { margin-inline: auto; }
.hb-note { background: var(--hb-mist); border-left: 5px solid var(--hb-brand); border-radius: 0 var(--hb-radius) var(--hb-radius) 0; padding: 1.4rem 1.6rem; }
.hb-note p:last-child { margin-bottom: 0; }
.hb-sign { font-weight: 900; letter-spacing: .4em; color: var(--hb-brand); }
.hb-todo { background: #fff3cd; padding: .6rem 1rem; border-radius: 8px; }

/* Shortcode-Ausgaben: Wrapper trägt die Inhaltsbreite (theme-base), die Liste darin ist frei gestaltet */
.hb-wrap > * { margin-block: 1.5rem; }

/* Disziplinen mit Silhouetten */
.hb-disziplinen { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
.hb-disziplinen li { background: #fff; border: 1px solid var(--hb-line); border-radius: var(--hb-radius); padding: 1.2rem 1rem 1rem; text-align: center; }
.hb-disziplinen img { height: 92px; width: auto; max-width: 100%; object-fit: contain; }
.hb-disziplinen h3 { margin: .6rem 0 .3rem; font-size: 1.1rem; }
.hb-disziplinen p { margin: 0; font-size: .92rem; color: var(--hb-muted); }

/* Chronik als Zeitleiste */
.hb-chronik { list-style: none; padding: 0; margin: 1.5rem 0; border-left: 3px solid var(--hb-line); }
.hb-chronik__jahr { position: relative; padding: 0 0 1.4rem 1.6rem; }
.hb-chronik__jahr::before { content: ""; position: absolute; left: -9px; top: .45rem; width: 15px; height: 15px; border-radius: 50%;
	background: #fff; border: 3px solid var(--hb-brand); box-shadow: 0 0 0 4px rgba(217,10,10,.12); }
.hb-chronik__jahr.is-abgesagt::before { border-color: var(--hb-line); box-shadow: none; }
.hb-chronik__zahl { font-family: var(--wp--preset--font-family--slab); font-weight: 700; font-size: 1.5rem; color: var(--hb-brand); }
.is-abgesagt .hb-chronik__zahl { color: var(--hb-muted); }
.hb-chronik__status { display: inline-block; margin-left: .6rem; padding: .1rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 700;
	text-transform: uppercase; letter-spacing: .06em; background: var(--hb-mist); color: var(--hb-night); vertical-align: .35em; }
.is-abgesagt .hb-chronik__status { background: #f1f1f3; color: var(--hb-muted); }
.hb-chronik__body p { margin: .2rem 0 0; }
.hb-chronik__links { display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .95rem; }
.hb-chronik__nsr::after { content: " ↗"; }
.hb-chronik--kompakt { columns: 2 260px; column-gap: 2rem; border-left: 0; }
.hb-chronik--kompakt .hb-chronik__jahr { break-inside: avoid; border-left: 3px solid var(--hb-line); }

/* Ergebnistabellen (Classic-Inhalt aus 2008–2017) */
.hb-table-scroll { overflow-x: auto; margin: 1.2rem 0; border: 1px solid var(--hb-line); border-radius: 10px; }
.hb-table-scroll table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: .9rem; margin: 0; }
.hb-table-scroll th, .hb-table-scroll td { padding: .4rem .6rem; border-bottom: 1px solid var(--hb-line); text-align: left; vertical-align: top; }
.hb-table-scroll tr:first-child td, .hb-table-scroll th { background: var(--hb-mist); font-weight: 700; }
.hb-table-scroll tr:nth-child(even) td { background: #fafbff; }
.tb-entry__content img { max-width: 100%; height: auto; }
.tb-entry__content .alignleft { float: left; margin: .3rem 1.2rem .8rem 0; }
.tb-entry__content .alignright { float: right; margin: .3rem 0 .8rem 1.2rem; }
.tb-entry__content .aligncenter { display: block; margin-inline: auto; }

/* FAQ (details) */
.tb-entry__content details { border: 1px solid var(--hb-line); border-radius: 10px; padding-block: .2rem; margin-block: .6rem; background: #fff; }
.tb-entry__content details[open] { background: var(--hb-mist); }
.tb-entry__content summary { cursor: pointer; font-weight: 700; padding: .6rem 0; }

/* Comeback-Block + Formular */
.hb-comeback { background: var(--hb-night); color: #fff; border-radius: var(--hb-radius); padding: clamp(1.4rem, 4vw, 2.4rem); }
.hb-comeback h2, .hb-comeback h3 { color: #fff; }
.hb-comeback a:not(.hb-button) { color: #9fd6ff; }
.hb-form .forminator-ui.forminator-custom-form { margin: 0 !important; }
.hb-comeback .hb-form { background: #fff; color: var(--hb-ink); border-radius: 10px; padding: 1.2rem; margin-top: 1rem; }

/* ---------- Footer */
.tb-footer { background: var(--hb-night); color: #d9ddff; margin-top: 4rem; border-top: 4px solid var(--hb-brand); padding-block: 2.5rem 1.5rem; }
.tb-footer a { color: #fff; }
.hb-footer__org { display: flex; gap: 1rem; align-items: flex-start; max-width: 46rem; }
.hb-footer__org img { flex: none; border-radius: 50%; background: #fff; }
.hb-footer__org p { margin: 0; line-height: 1.6; }
.tb-footer .tb-menu a { color: #fff; }

/* Fotos: Streifen auf der Startseite (ein Bild je Jahr), Vorschaubilder in der Chronik */
.tb-entry__content > .hb-wrap--wide { max-width: min(1100px, 100%); }
.hb-fotostreifen { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; }
.hb-fotostreifen figure { position: relative; margin: 0; }
.hb-fotostreifen img { display: block; width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; border-radius: 6px; }
.hb-fotostreifen figcaption { position: absolute; left: .4rem; bottom: .4rem; padding: .05rem .45rem; border-radius: 4px; background: var(--hb-brand);
	color: #fff; font-family: var(--wp--preset--font-family--slab); font-weight: 700; font-size: .9rem; }
.hb-chronik__bilder { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; margin-top: .7rem; max-width: 640px; }
.hb-chronik__bilder img { display: block; width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; border-radius: 4px; }
@media (max-width: 520px) { .hb-chronik__bilder { grid-template-columns: repeat(2, 1fr); } }
