/*
Theme Name: Top Video Film
Description: Dunkles Galerie-Theme für Turnierfotografie. Stellt die Seiten des TvfUploaders (Bildereinsicht, Turniere, Reiter) als Bildraster mit Lightbox und Merkliste dar.
Version: 1.2.2
Requires at least: 6.3
Requires PHP: 7.4
Author: Michael Berneburg
Text Domain: topvideofilm
*/

/* ==========================================================================
   Tokens
   ========================================================================== */

:root {
	--bg: #0d0d0e;
	--surface: #161618;
	--surface-2: #1e1e21;
	--line: #2a2a2e;
	--text: #ece8e1;
	--muted: #9b968d;
	--accent: #c9a66b;
	--accent-strong: #e0bf86;
	--accent-ink: #15120c;
	--danger: #e07a6b;

	--serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
	--sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

	--radius: 4px;
	--gutter: clamp(16px, 4vw, 40px);
	--max: 1320px;
	--header-h: 72px;
	--ease: cubic-bezier(.2, .7, .2, 1);
}

/* ==========================================================================
   Basis
   ========================================================================== */

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 400 17px/1.65 var(--sans);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration-color: color-mix(in srgb, var(--accent) 60%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }

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

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0 0 .5em; letter-spacing: .005em; }

::selection { background: var(--accent); color: var(--accent-ink); }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

.skip-link {
	position: absolute; left: 16px; top: -100px; z-index: 100;
	background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: var(--radius);
}
.skip-link:focus { top: 16px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { width: 100%; max-width: 760px; margin-inline: auto; padding-inline: var(--gutter); }

.icon { width: 1.25em; height: 1.25em; flex: none; }

/* ==========================================================================
   Buttons, Eingaben
   ========================================================================== */

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	min-height: 46px; padding: 0 22px;
	border: 1px solid var(--line); border-radius: var(--radius);
	background: var(--surface-2); color: var(--text);
	font: 500 15px/1 var(--sans); letter-spacing: .04em; text-decoration: none;
	cursor: pointer; transition: background .2s, border-color .2s, color .2s, transform .2s var(--ease);
}
.btn:hover { border-color: var(--accent); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--accent-ink); }
.btn-ghost { background: transparent; border-color: color-mix(in srgb, var(--text) 35%, transparent); }
.btn .icon { width: 18px; height: 18px; }

.icon-btn {
	display: inline-grid; place-items: center; width: 44px; height: 44px;
	border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer;
}
.icon-btn:hover { color: var(--accent); }

input[type="search"], input[type="text"], input[type="email"], input[type="tel"], textarea, select {
	width: 100%; min-height: 48px; padding: 12px 14px;
	background: var(--surface); color: var(--text);
	border: 1px solid var(--line); border-radius: var(--radius);
	font: inherit; font-size: 16px;
	transition: border-color .2s, background .2s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); background: var(--surface-2); }
::placeholder { color: var(--muted); opacity: 1; }

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

.site-header {
	position: sticky; top: 0; z-index: 50;
	background: color-mix(in srgb, var(--bg) 82%, transparent);
	backdrop-filter: blur(14px) saturate(140%);
	-webkit-backdrop-filter: blur(14px) saturate(140%);
	border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }

.header-inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }

.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1.1; margin-right: auto; }
.brand:hover { color: var(--text); }
.brand-name { font-family: var(--serif); font-size: 26px; letter-spacing: .02em; }
.brand-tag { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); margin-top: 3px; }
.brand-logo { max-height: 48px; width: auto; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav .menu { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav .menu > li { position: relative; }
.site-nav .menu a {
	display: block; padding: 10px 12px; text-decoration: none;
	font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
	transition: color .2s;
}
.site-nav .menu a:hover,
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a,
.site-nav .current-menu-ancestor > a { color: var(--text); }
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a { box-shadow: inset 0 -1px 0 var(--accent); }

.site-nav .sub-menu {
	position: absolute; top: 100%; left: 0; min-width: 210px; list-style: none; margin: 0; padding: 8px 0;
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s var(--ease);
}
.site-nav li:hover > .sub-menu, .site-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.site-nav .sub-menu a { padding: 10px 18px; text-transform: none; letter-spacing: .02em; font-size: 15px; }

.nav-search { position: relative; width: 220px; }
.nav-search input { min-height: 40px; padding: 8px 40px 8px 14px; font-size: 14px; border-radius: 40px; background: var(--surface); }
.nav-search .icon-btn { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; color: var(--muted); }

.nav-toggle { display: none; }

@media (max-width: 960px) {
	.nav-toggle { display: inline-grid; margin-right: -10px; }
	.site-nav {
		position: fixed; inset: var(--header-h) 0 auto 0; z-index: 49;
		flex-direction: column; align-items: stretch; gap: 16px;
		max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
		padding: 16px var(--gutter) 28px;
		background: var(--bg); border-bottom: 1px solid var(--line);
		opacity: 0; visibility: hidden; transform: translateY(-8px); transition: .25s var(--ease);
	}
	.admin-bar .site-nav { top: calc(var(--header-h) + 46px); }
	.nav-open .site-nav { opacity: 1; visibility: visible; transform: none; }
	.site-nav .menu { flex-direction: column; }
	.site-nav .menu a { padding: 14px 0; font-size: 18px; border-bottom: 1px solid var(--line); }
	.site-nav .sub-menu a { font-size: 17px; }
	.site-nav .current-menu-item > a, .site-nav .current_page_item > a { box-shadow: none; color: var(--accent); }
	/* visibility: inherit – sonst bleibt das Untermenü bei geschlossenem Menü unsichtbar, aber antippbar (fängt Tipps auf der Startseite ab). */
	.site-nav .sub-menu,
	.site-nav li:hover > .sub-menu,
	.site-nav li:focus-within > .sub-menu { position: static; opacity: 1; visibility: inherit; transform: none; background: none; border: 0; padding: 0 0 0 16px; }
	.nav-search { width: 100%; }
	.nav-search input { min-height: 48px; font-size: 16px; }
}

/* ==========================================================================
   Seitenkopf, Typografie
   ========================================================================== */

.site-main { min-height: 60vh; }

.page-head { padding-top: clamp(40px, 7vw, 88px); padding-bottom: clamp(24px, 4vw, 40px); }
.page-title { font-size: clamp(38px, 6vw, 68px); margin-bottom: .2em; }
.page-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; color: var(--muted); font-size: 15px; letter-spacing: .04em; }
.page-meta span + span::before { content: "·"; margin-right: 18px; color: var(--line); }

.eyebrow {
	margin: 0 0 14px; color: var(--accent);
	font-size: 12px; font-weight: 600; letter-spacing: .26em; text-transform: uppercase;
}
.page-title .eyebrow { display: block; font-family: var(--sans); line-height: 1.4; }
.lead { max-width: 640px; color: var(--muted); font-size: 18px; margin: 0 0 28px; }
.page-intro { margin: 18px 0 0; font-size: 17px; }
.page-intro .icon { display: inline; width: 1em; height: 1em; vertical-align: -2px; color: var(--accent); }

.breadcrumb { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.breadcrumb a { text-decoration: none; color: var(--accent); }
.breadcrumb a:hover { color: var(--accent-strong); }

.notice {
	max-width: 760px; margin: 22px 0 0; padding: 14px 16px;
	background: var(--surface); border-left: 2px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0;
	color: var(--muted); font-size: 15px;
}
.notice .icon { display: inline; width: 1em; height: 1em; vertical-align: -2px; color: var(--accent); }

.prose { font-size: 17px; }
.prose > * + * { margin-top: 1.1em; }
.prose p { margin: 0; }
.prose p + p { margin-top: .9em; }
.prose strong { color: var(--text); font-weight: 600; }
.prose h2, .prose h3 { margin-top: 1.6em; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.2em 0; }
.prose ul, .prose ol { padding-left: 1.2em; margin: .6em 0 0; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--accent); }
.prose img { border-radius: var(--radius); }
.prose a:not(.btn) { color: var(--accent); }
/* Alte Inline-Farben aus dem Editor (z. B. blauer Link im Impressum) an das dunkle Design anpassen */
.prose [style*="color"] { color: inherit !important; }
.prose a[style*="color"] { color: var(--accent) !important; }
.prose em { color: var(--muted); }

/* Preisseite */
.price { color: var(--accent-strong); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.page-default .prose > p > strong:only-child {
	display: block; margin-top: .4em; font-family: var(--serif); font-weight: 500; font-size: 30px;
}
.page-default .prose > p:first-child > strong:only-child { margin-top: 0; }
/* Lange Einzelwörter (z. B. „Datenschutzerklärung“) auf dem Handy trennen statt abschneiden. */
.page-default .page-title { overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }

/* Preiskarten */
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: clamp(16px, 2vw, 28px); align-items: start; }
.price-card {
	padding: clamp(24px, 3vw, 36px); background: var(--surface);
	border: 1px solid var(--line); border-top: 2px solid var(--accent); border-radius: var(--radius);
}
.price-card-title { font-size: clamp(28px, 3vw, 36px); margin-bottom: 22px; }
.price-list { list-style: none; margin: 0; padding: 0; }
.price-row {
	display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; column-gap: 10px;
	padding: 14px 0; border-bottom: 1px solid var(--line);
}
.price-row:last-child { border-bottom: 0; }
.price-label { font-size: 17px; }
.price-detail {
	display: inline-block; margin-left: 6px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 20px;
	font-size: 12px; letter-spacing: .04em; color: var(--muted); white-space: nowrap; vertical-align: 2px;
}
.price-dots { border-bottom: 1px dotted color-mix(in srgb, var(--muted) 45%, transparent); transform: translateY(-4px); min-width: 12px; }
.price-value { font-family: var(--serif); font-size: 26px; line-height: 1; color: var(--accent-strong); white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
.price-value small, .price-sub small { font-family: var(--sans); font-size: 13px; color: var(--muted); margin-left: 4px; }
.price-sub { grid-column: 1 / -1; list-style: none; margin: 10px 0 0; padding: 0 0 0 14px; border-left: 1px solid var(--line); }
.price-sub li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 15px; color: var(--muted); }
.price-sub li > span:last-child { color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.price-note { margin: 18px 0 0; font-size: 14px; color: var(--muted); font-style: italic; }

.price-cta {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
	margin-top: clamp(32px, 5vw, 56px); padding: clamp(24px, 3vw, 36px);
	border: 1px solid var(--line); border-radius: var(--radius);
}
.price-cta h2 { font-size: 30px; margin-bottom: 8px; }
.price-cta p { max-width: 620px; margin: 0; color: var(--muted); }
.price-cta .icon { display: inline; width: 1em; height: 1em; vertical-align: -2px; color: var(--accent); }
.price-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ==========================================================================
   Filter, Chips, Suche
   ========================================================================== */

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 28px; }

.filter { position: relative; flex: 1 1 320px; max-width: 460px; }
.filter .icon { position: absolute; z-index: 1; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.filter input { padding-left: 46px; border-radius: 48px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
	padding: 8px 16px; border: 1px solid var(--line); border-radius: 40px;
	font-size: 14px; letter-spacing: .06em; text-decoration: none; color: var(--muted);
	transition: border-color .2s, color .2s;
}
.chip:hover { border-color: var(--accent); color: var(--text); }

.rider-search { margin-top: 26px; max-width: 520px; }
.rider-search label { display: block; margin-bottom: 8px; font-size: 14px; color: var(--muted); }
.rider-search-row { display: flex; gap: 8px; }
.rider-search-row input { flex: 1; }

.filter-empty { color: var(--muted); padding: 40px 0; }

/* ==========================================================================
   Karten & Raster
   ========================================================================== */

.grid { display: grid; gap: clamp(14px, 2vw, 24px); }
.grid-tournaments { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.grid-riders { grid-template-columns: repeat(auto-fill, minmax(min(46%, 200px), 1fr)); }
.grid-photos { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }

.year-group { padding-bottom: clamp(40px, 6vw, 72px); }
.year-group[hidden] { display: none; }
.year-title {
	display: flex; align-items: baseline; gap: 12px;
	font-size: clamp(30px, 4vw, 42px); padding-bottom: 14px; margin-bottom: 24px; border-bottom: 1px solid var(--line);
}
.count { font-family: var(--sans); font-size: 14px; color: var(--muted); letter-spacing: .08em; }

.card { position: relative; }
.card[hidden] { display: none; }
.card-link { display: block; height: 100%; text-decoration: none; color: inherit; }
.card-link:hover { color: inherit; }

.card-media {
	position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--surface);
	border-radius: var(--radius);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease), filter .4s; filter: brightness(.92); }
.card-link:hover .card-media img { transform: scale(1.045); filter: brightness(1); }
.placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--line); }
.placeholder .icon { width: 44px; height: 44px; }

.card-body { padding: 14px 2px 4px; }
.card-title { font-size: 24px; margin: 0 0 4px; transition: color .2s; }
.card-link:hover .card-title { color: var(--accent-strong); }
.card-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; font-size: 14px; color: var(--muted); }
.card-meta span + span::before { content: "·"; margin-right: 14px; color: var(--line); }

.card-rider .card-title { font-family: var(--sans); font-size: 16px; font-weight: 500; letter-spacing: .01em; }
.card-rider .card-body { padding-top: 10px; }

/* Handy: Turniere als kompakte Zeilen, damit viele auf einen Blick passen */
@media (max-width: 600px) {
	.grid-tournaments { gap: 0; }
	.card-tournament { border-bottom: 1px solid var(--line); }
	.card-tournament .card-link { display: grid; grid-template-columns: 112px 1fr auto; align-items: center; gap: 14px; padding: 12px 0; }
	.card-tournament .card-link::after {
		content: ""; width: 9px; height: 9px; margin-right: 4px;
		border-top: 1.5px solid var(--muted); border-right: 1.5px solid var(--muted); transform: rotate(45deg);
	}
	.card-tournament .card-media { aspect-ratio: 3 / 2; }
	.card-tournament .card-body { padding: 0; min-width: 0; }
	.card-tournament .card-title { font-size: 21px; margin-bottom: 2px; }
	.card-tournament .card-meta { display: block; font-size: 13px; }
	.card-tournament .card-meta span { display: block; }
	.card-tournament .card-meta span + span::before { content: none; }
	.year-title { margin-bottom: 4px; }
}

/* Filterleiste bleibt auf langen Listen beim Scrollen sichtbar */
.filter-bar {
	position: sticky; top: var(--header-h); z-index: 20; margin-bottom: 20px; padding: 10px 0;
	background: color-mix(in srgb, var(--bg) 88%, transparent);
	backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.admin-bar .filter-bar { top: calc(var(--header-h) + 32px); }
@media (max-width: 782px) { .admin-bar .filter-bar { top: var(--header-h); } }
.filter-bar .filter { max-width: 460px; }
.tvf-tournament .page-head { padding-bottom: 12px; }

/* ==========================================================================
   Fotos (Reiterseite)
   ========================================================================== */

.photo { margin: 0; }
.photo-link { display: block; overflow: hidden; border-radius: var(--radius); background: var(--surface); cursor: zoom-in; }
.grid-photos .photo-link img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .6s var(--ease); }
.photo-link:hover img { transform: scale(1.03); }
.photo figcaption { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0 0; }
.photo-name { font-size: 13px; color: var(--muted); letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.fav {
	display: inline-flex; align-items: center; justify-content: center; flex: none;
	width: 44px; height: 44px; margin-right: -8px; border: 0; border-radius: 50%;
	background: transparent; color: var(--muted); cursor: pointer; transition: color .2s, transform .2s var(--ease);
}
.fav:hover { color: var(--text); }
.fav[aria-pressed="true"] { color: var(--accent); }
.fav[aria-pressed="true"] .icon { fill: currentColor; }
.fav:active { transform: scale(.88); }

.pager {
	display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
	margin: clamp(40px, 6vw, 72px) 0; padding-top: 28px; border-top: 1px solid var(--line);
}
.pager a { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.pager small { display: block; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.pager-next { justify-self: end; text-align: right; }
.pager-up { padding: 10px 18px; border: 1px solid var(--line); border-radius: 40px; font-size: 14px; }
.pager-up:hover { border-color: var(--accent); }
@media (max-width: 600px) {
	.pager { grid-template-columns: 1fr 1fr; }
	.pager-up { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
}

/* ==========================================================================
   Lightbox
   ========================================================================== */

.lightbox {
	position: fixed; inset: 0; z-index: 200; display: grid; grid-template-rows: auto 1fr auto;
	background: rgba(6, 6, 7, .97); color: var(--text);
	opacity: 0; transition: opacity .25s;
}
.lightbox.is-open { opacity: 1; }
.lightbox[hidden] { display: none; }
.lb-top, .lb-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; }
.lb-counter { font-size: 14px; color: var(--muted); letter-spacing: .1em; padding-left: 8px; }
.lb-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 64px; touch-action: pan-y; }
/* Höhe fest an den Bildschirm koppeln (abzüglich Kopf-/Fußleiste), damit Hochformate nicht abgeschnitten werden. */
.lb-stage img { max-width: 100%; max-height: calc(100vh - 136px); max-height: calc(100dvh - 136px); width: auto; height: auto; object-fit: contain; user-select: none; -webkit-user-drag: none; transition: opacity .2s; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; background: rgba(255,255,255,.06); }
.lb-prev { left: 8px; } .lb-next { right: 8px; }
.lb-prev .icon, .lb-next .icon { width: 28px; height: 28px; }
.lb-name { font-size: 14px; color: var(--muted); padding-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-fav { width: auto; height: 44px; margin: 0; padding: 0 16px; gap: 8px; border: 1px solid var(--line); border-radius: 40px; font: 500 14px var(--sans); }
.lb-fav[aria-pressed="true"] { border-color: var(--accent); }
.lb-fav[hidden] { display: none; }
@media (max-width: 600px) {
	.lb-stage { padding: 0; }
	.lb-prev, .lb-next { display: none; }
}

/* ==========================================================================
   Merkliste
   ========================================================================== */

.order-bar {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
	background: color-mix(in srgb, var(--surface) 92%, transparent);
	backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
	border-top: 1px solid var(--line);
	padding-bottom: env(safe-area-inset-bottom);
	transform: translateY(100%); transition: transform .3s var(--ease);
}
.order-bar.is-visible { transform: none; }
.order-bar[hidden] { display: none; }
.order-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.order-bar-text { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); }
.order-bar-text .icon { color: var(--accent); fill: currentColor; }
.order-bar-text strong { color: var(--text); }
body.has-order-bar { padding-bottom: 72px; }
.order-bar-text, .order-bar-link { white-space: nowrap; }
@media (max-width: 420px) {
	.order-bar-inner { gap: 10px; }
	.order-bar-text { gap: 6px; font-size: 14px; }
	.order-bar-link { min-height: 44px; padding: 0 14px; font-size: 14px; letter-spacing: .02em; }
}

.order-box {
	margin: 0 0 32px; padding: 20px 22px; background: var(--surface);
	border: 1px solid var(--line); border-left: 2px solid var(--accent); border-radius: var(--radius);
}
.order-box h2 { font-size: 26px; margin: 0 0 10px; }.order-box ol { margin: 0 0 14px; padding-left: 1.3em; color: var(--muted); font-size: 15px; }
.order-box li { margin: 4px 0; }
.order-box li strong { color: var(--text); font-weight: 500; }
.order-box .remove { margin-left: 8px; border: 0; background: none; color: var(--muted); cursor: pointer; text-decoration: underline; font-size: 13px; }
.order-box .remove:hover { color: var(--danger); }
.order-box > .remove { margin: 0; padding: 4px 0; }
.order-box-note { margin: -4px 0 12px; font-size: 14px; color: var(--muted); }
.order-box ol + .order-box-note { margin: 4px 0 10px; }
.order-box li { margin: 0; padding: 12px 0; border-top: 1px solid var(--line); }
.order-box li:first-child { border-top: 0; padding-top: 4px; }
.order-item { display: block; }
.format-pick { display: block; margin-top: 8px; }
.format-pick select {
	min-height: 44px; padding: 8px 40px 8px 12px; font-size: 15px; color: var(--text); cursor: pointer;
	appearance: none; -webkit-appearance: none;
	background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9a66b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 18px;
}
.format-hint { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }

/* ==========================================================================
   Kontaktformular (Contact Form 7)
   ========================================================================== */

.wpcf7 form p { margin: 0 0 18px; }
.wpcf7 label { display: block; font-size: 14px; color: var(--muted); letter-spacing: .02em; }
.wpcf7 label br { display: none; }
.wpcf7 .wpcf7-form-control-wrap { display: block; margin-top: 6px; }
.wpcf7 textarea { min-height: 180px; resize: vertical; }
.wpcf7 form .form-privacy { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.wpcf7 form .form-privacy a { color: var(--accent); }
.wpcf7 .wpcf7-submit {
	min-height: 50px; padding: 0 32px; border: 0; border-radius: var(--radius);
	background: var(--accent); color: var(--accent-ink); font: 600 15px var(--sans); letter-spacing: .06em; cursor: pointer;
}
.wpcf7 .wpcf7-submit:hover { background: var(--accent-strong); }
.wpcf7 .wpcf7-not-valid-tip { color: var(--danger); font-size: 13px; margin-top: 4px; }
.wpcf7 form .wpcf7-response-output { margin: 18px 0 0; padding: 12px 16px; border-radius: var(--radius); border-color: var(--line); }
.wpcf7 form.sent .wpcf7-response-output { border-color: var(--accent); }

/* ==========================================================================
   Startseite
   ========================================================================== */

.hero {
	position: relative; display: grid; align-items: end;
	min-height: min(88vh, 860px); margin-top: calc(var(--header-h) * -1);
	overflow: hidden; isolation: isolate;
}
.hero-media { position: absolute; inset: 0; z-index: -1; background: var(--surface); }
/* Bildausschnitt: groß etwas mehr vom oberen Bildrand (Pferdekopf), auf dem Handy Bild etwas höher. */
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 41%; animation: hero-zoom 18s var(--ease) both; }
@media (max-width: 700px) {
	.hero-media img { position: relative; top: -8%; height: 108%; }
}
.hero-media::after {
	content: ""; position: absolute; inset: 0;
	background:
		linear-gradient(180deg, rgba(13,13,14,.55) 0%, rgba(13,13,14,0) 30%),
		linear-gradient(90deg, rgba(13,13,14,.7) 0%, rgba(13,13,14,.25) 50%, rgba(13,13,14,0) 75%),
		linear-gradient(0deg, var(--bg) 0%, rgba(13,13,14,.7) 35%, rgba(13,13,14,.1) 75%);
}
@keyframes hero-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero-content { padding-top: calc(var(--header-h) + 80px); padding-bottom: clamp(48px, 9vw, 110px); }
.hero-title { max-width: 14ch; font-size: clamp(46px, 8.5vw, 104px); line-height: 1; margin-bottom: 22px; }
.hero-text { max-width: 520px; margin: 0 0 32px; font-size: clamp(17px, 1.6vw, 20px); color: color-mix(in srgb, var(--text) 80%, transparent); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 22px; }

/* Schnellzugriff im Hero: aktuelles Turnier + Namenssuche */
.quick { display: grid; gap: 12px; max-width: 560px; }
.quick-latest {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	min-height: 76px; padding: 14px 20px; border-radius: var(--radius);
	background: var(--accent); color: var(--accent-ink); text-decoration: none;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .35); transition: background .2s, transform .2s var(--ease);
}
.quick-latest:hover { background: var(--accent-strong); color: var(--accent-ink); }
.quick-latest:active { transform: scale(.99); }
.quick-latest small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; opacity: .7; }
.quick-latest strong { font-family: var(--serif); font-size: 26px; font-weight: 600; line-height: 1.15; margin-right: 8px; }
.quick-latest-text > span { font-size: 15px; white-space: nowrap; }
.quick-latest > .icon { width: 26px; height: 26px; flex: none; }

.quick-search { position: relative; display: flex; gap: 8px; }
.quick-search > .icon { position: absolute; z-index: 1; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.quick-search input {
	flex: 1; min-height: 56px; padding-left: 48px;
	background: rgba(13, 13, 14, .72); border-color: color-mix(in srgb, var(--text) 25%, transparent);
	backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.quick-search .btn { min-height: 56px; }

.section { padding-block: clamp(64px, 10vw, 128px); }
.section-alt { background: var(--surface); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-title { font-size: clamp(34px, 5vw, 56px); margin: 0; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--accent); font-size: 15px; letter-spacing: .06em; }
.link-arrow .icon { transition: transform .25s var(--ease); }
.link-arrow:hover .icon { transform: translateX(4px); }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: clamp(24px, 4vw, 56px); list-style: none; margin: 0; padding: 0; }
.steps li { border-top: 1px solid var(--line); padding-top: 22px; }
.step-no { display: block; margin-bottom: 18px; font-family: var(--serif); font-size: 44px; line-height: 1; color: var(--accent); }
.steps h3 { font-size: 28px; }
.steps p { margin: 0; color: var(--muted); }

.showcase { columns: 3 300px; column-gap: clamp(12px, 1.6vw, 20px); }
.showcase-item { display: block; margin: 0; margin-bottom: clamp(12px, 1.6vw, 20px); break-inside: avoid; overflow: hidden; border-radius: var(--radius); background: var(--surface-2); }
.showcase-item img { width: 100%; transition: transform .8s var(--ease), filter .4s; filter: brightness(.9); }
.showcase-item:hover img { filter: brightness(1); }
.showcase .photo-link { border-radius: 0; }
.section-showcase { padding-top: clamp(40px, 6vw, 72px); }
/* Hinweis: Herz = bestellen */
.heart-hint {
	display: flex; align-items: flex-start; gap: 12px; max-width: 760px; margin: calc(clamp(28px, 4vw, 48px) * -0.4) 0 clamp(28px, 4vw, 44px);
	padding: 14px 18px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: var(--radius);
	background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--muted); font-size: 16px;
}
.heart-hint strong { color: var(--text); font-weight: 600; }
.heart-hint > .icon { margin-top: 3px; color: var(--accent); fill: currentColor; }
.steps p .icon { display: inline; width: 1em; height: 1em; vertical-align: -2px; color: var(--accent); }

/* Handy: Eindrücke als Wisch-Galerie */
@media (max-width: 700px) {
	.section-showcase .showcase {
		display: flex; gap: 10px; columns: auto;
		margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter);
		overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
		-webkit-overflow-scrolling: touch; scrollbar-width: none;
	}
	.section-showcase .showcase::-webkit-scrollbar { display: none; }
	.section-showcase .showcase { align-items: flex-start; }
	.section-showcase .showcase-item { flex: 0 0 82%; margin: 0; scroll-snap-align: start; }
	/* Einheitlich 3:2. Der Rahmen gibt die Größe vor, weil das Lazy-Load von Smush dem Bild sonst
	   sein eigenes Seitenverhältnis aufzwingt (Hochformat → hohe Karte, graue Fläche unter den anderen). */
	.section-showcase .showcase .photo-link { position: relative; aspect-ratio: 3 / 2; }
	.section-showcase .showcase .photo-link img {
		position: absolute; inset: 0;
		width: 100% !important; height: 100% !important; max-width: none; aspect-ratio: auto !important; object-fit: cover;
	}
}

.showcase-title { display: block; padding: 40px 20px; font-family: var(--serif); font-size: 24px; }

.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(28px, 6vw, 96px); align-items: start; }
.about-since { margin: 12px 0 0; font-family: var(--serif); font-style: italic; font-size: 24px; color: var(--accent); }
.about .prose { color: color-mix(in srgb, var(--text) 85%, transparent); font-size: 18px; }
.about-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px !important; }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } }

.single-media { margin-bottom: 40px; }
.single-media img { width: 100%; max-height: 82vh; object-fit: contain; }

.link-list { list-style: none; padding: 0; margin: 0; }
.link-list a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; }

.pagination .nav-links { display: flex; justify-content: center; gap: 6px; margin: 48px 0; }
.pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.pagination .current { border-color: var(--accent); color: var(--accent); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer { margin-top: clamp(48px, 8vw, 96px); border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.section-alt:last-of-type + .site-footer, .site-main:has(> .section:last-child) + .site-footer { margin-top: 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding-block: 40px 24px; }
.footer-brand .brand-name { color: var(--text); }
.footer-brand p { margin: 4px 0 0; }
.footer-nav .menu { display: flex; flex-wrap: wrap; gap: 6px 24px; list-style: none; margin: 0; padding: 0; }
.footer-nav a, .footer-social { text-decoration: none; }
.footer-social { display: inline-flex; align-items: center; gap: 8px; }
.footer-copy { padding-block: 0 32px; font-size: 13px; }

/* ==========================================================================
   Bewegung reduzieren
   ========================================================================== */

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