/*
Theme Name: TKD Darts
Description: Vereinswebsite des TKD Dartteams. Block-Child-Theme auf Basis von Twenty Twenty-Five. Vereinsfarben Weiss/Blau. Struktur: Start, Verein, Mannschaften, Termine, Statistiken, News/Spielberichte, Kontakt.
Author: TKD
Version: 0.3.1
Requires at least: 6.7
Tested up to: 6.7
Requires PHP: 8.1
Template: twentytwentyfive
Text Domain: tkd
*/

/*
 * Farben, Schrift, Spacing und Buttons kommen aus theme.json.
 * Hier steht der Feinschliff: Kopfbereich, Hero, Karten, Tabellen, Fussbereich.
 * Vereinsfarben Weiss/Blau, sportlich-klarer Look.
 */

:root {
	--tkd-radius: 14px;
	--tkd-radius-sm: 10px;
	--tkd-shadow: 0 1px 2px rgba(7, 31, 56, 0.06), 0 10px 30px rgba(7, 31, 56, 0.08);
	--tkd-shadow-hover: 0 2px 6px rgba(7, 31, 56, 0.10), 0 18px 44px rgba(7, 31, 56, 0.14);
	--tkd-ring: 0 0 0 3px rgba(47, 134, 224, 0.45);
}

/* ============================================================
   Basis
   ============================================================ */
body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

:where(h1, h2, h3, .wp-block-heading, .wp-block-post-title) {
	overflow-wrap: break-word;
}

:where(.wp-site-blocks) {
	overflow-x: hidden;
}

/* etwas mehr Luft zwischen den Sektionen einer Seite */
.wp-site-blocks main > * {
	margin-block-start: clamp(1.75rem, 1.2rem + 2vw, 3rem);
}
.wp-site-blocks main > *:first-child {
	margin-block-start: 0;
}

/* ============================================================
   Eyebrow / Kicker – kleine Label ueber Ueberschriften
   ============================================================ */
.tkd-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.55em;
	margin: 0 0 0.6rem;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
}
.tkd-eyebrow::before {
	content: "";
	width: 1.8rem;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
}

/* ============================================================
   Kopfbereich / Navigation
   ============================================================ */
.tkd-site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	backdrop-filter: saturate(1.4) blur(8px);
	-webkit-backdrop-filter: saturate(1.4) blur(8px);
	background: rgba(255, 255, 255, 0.86) !important;
	border-bottom: 1px solid var(--wp--preset--color--border);
	transition: box-shadow 0.2s ease;
}
.tkd-site-header:has(.wp-block-navigation__responsive-container.is-menu-open) {
	background: var(--wp--preset--color--base) !important;
}
@supports not (selector(:has(*))) {
	.tkd-site-header { background: rgba(255, 255, 255, 0.94) !important; }
}

.wp-block-site-title a {
	text-decoration: none;
}

/* Logo im Kopfbereich als abgerundetes Badge (das Logo hat dunklen Hintergrund) */
.tkd-site-header .wp-block-site-logo img {
	border-radius: 9px;
	background: var(--wp--preset--color--primary-dark);
}

.wp-block-navigation {
	--wp--style--block-gap: 0.5rem;
}
.wp-block-navigation .wp-block-navigation-item__content {
	padding: 0.35rem 0.7rem;
	border-radius: 8px;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.wp-block-navigation .wp-block-navigation-item__content:hover {
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--primary-strong);
}
.wp-block-navigation .wp-block-navigation-item > a[aria-current="page"] {
	color: var(--wp--preset--color--primary);
	background: var(--wp--preset--color--surface);
}
.wp-block-navigation__submenu-container {
	border-color: var(--wp--preset--color--border) !important;
	box-shadow: var(--tkd-shadow);
	border-radius: var(--tkd-radius-sm);
	padding-block: 0.35rem;
	margin-top: 0.4rem !important;
}

/* ============================================================
   Hero (Startseite)
   ============================================================ */
.tkd-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	color: #fff;
	border-radius: 18px;
	background: var(--wp--preset--gradient--hero, linear-gradient(150deg, #071f38 0%, #0b5cad 60%, #2f86e0 100%));
}
/* wenn ein Hintergrundbild gesetzt ist: Farbverlauf als lesbare Auflage darueber */
.tkd-hero.has-background::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(150deg, rgba(7, 31, 56, 0.92) 0%, rgba(11, 92, 173, 0.78) 60%, rgba(47, 134, 224, 0.55) 100%);
}
.tkd-hero.has-background {
	background-size: cover !important;
	background-position: center !important;
}
/* Vereinslogo als grosses, dezentes Wasserzeichen (Kanten weichgezeichnet) */
.tkd-hero::after {
	content: "";
	position: absolute;
	right: -4rem;
	top: 50%;
	width: 24rem;
	height: 24rem;
	transform: translateY(-50%);
	background: url("https://darts.tkdduisburg.de/wp-content/themes/tkd/assets/logo.png") no-repeat center / contain;
	opacity: 0.12;
	-webkit-mask-image: radial-gradient(circle at 50% 50%, #000 42%, transparent 68%);
	mask-image: radial-gradient(circle at 50% 50%, #000 42%, transparent 68%);
	z-index: -1;
	pointer-events: none;
}
.tkd-hero.has-background::after {
	display: none;
}
.tkd-hero > * {
	position: relative;
}
.tkd-hero :where(h1, h2, p, a, li) {
	color: #fff;
}
.tkd-hero .tkd-eyebrow {
	color: rgba(255, 255, 255, 0.85);
}
.tkd-hero h1 {
	max-width: 16ch;
	text-wrap: balance;
}
.tkd-hero p {
	max-width: 46ch;
	color: rgba(255, 255, 255, 0.92);
}
.tkd-hero .wp-block-button.is-style-outline .wp-block-button__link {
	border-color: rgba(255, 255, 255, 0.7);
	color: #fff;
}
.tkd-hero .wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: rgba(255, 255, 255, 0.14);
	border-color: #fff;
}
.tkd-hero .wp-block-button.is-style-fill .wp-block-button__link,
.tkd-hero .wp-block-button:not(.is-style-outline) .wp-block-button__link {
	background: #fff;
	color: var(--wp--preset--color--primary-dark);
	border-color: #fff;
}
.tkd-hero .wp-block-button.is-style-fill .wp-block-button__link:hover,
.tkd-hero .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
	background: rgba(255, 255, 255, 0.9);
}

/* kleine Kennzahlen-Reihe, optional unter dem Hero-Text (Gruppe .tkd-hero-stats) */
.tkd-hero-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 2rem 2.75rem;
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid rgba(255, 255, 255, 0.22);
}
.tkd-hero-stats > * {
	margin: 0;
}
.tkd-hero-stats strong {
	display: block;
	font-size: 1.9rem;
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.02em;
}
.tkd-hero-stats span {
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: rgba(255, 255, 255, 0.8);
}

/* ============================================================
   Karten
   ============================================================ */
.tkd-card {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--tkd-radius);
	background: var(--wp--preset--color--base);
	padding: 1.4rem 1.5rem;
	box-shadow: var(--tkd-shadow);
	transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.tkd-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--tkd-shadow-hover);
	border-color: var(--wp--preset--color--primary-bright);
}
.tkd-card > :first-child { margin-top: 0; }
.tkd-card > :last-child { margin-bottom: 0; }

/* Karten, die komplett verlinkt sind (z. B. News-Grid) */
.tkd-card .wp-block-post-featured-image {
	margin: -1.4rem -1.5rem 1rem;
	border-radius: var(--tkd-radius) var(--tkd-radius) 0 0;
	overflow: hidden;
}
.tkd-card .wp-block-post-featured-image img {
	border-radius: 0;
	width: 100%;
}
.tkd-card .wp-block-post-title {
	letter-spacing: -0.02em;
}
.tkd-card .wp-block-post-title a {
	text-decoration: none;
}
.tkd-card .wp-block-post-title a:hover {
	color: var(--wp--preset--color--primary);
}

/* Schnellzugriff-Kacheln auf der Startseite */
.tkd-quicklinks .wp-block-column {
	display: flex;
}
.tkd-quicklinks .tkd-card {
	width: 100%;
}

/* ============================================================
   Kategorie-Label (post-terms) als Pill
   ============================================================ */
.wp-block-post-terms {
	display: inline-block;
}
.wp-block-post-terms a {
	display: inline-block;
	padding: 0.2em 0.7em;
	border-radius: 999px;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--primary-strong);
	text-decoration: none;
}
.wp-block-post-terms a:hover {
	background: var(--wp--preset--color--primary);
	color: #fff;
}

/* ============================================================
   Seitenkopf (Titelbereich einer Unterseite)
   ============================================================ */
.tkd-page-header {
	padding-bottom: 1.4rem;
	margin-bottom: 2.5rem;
	border-bottom: 1px solid var(--wp--preset--color--border);
}
.tkd-page-header > * { margin-block: 0.3rem; }
.tkd-page-header .wp-block-post-terms { margin-bottom: 0.6rem; }

/* ============================================================
   Meta (Kategorie / Datum) – fuer eigene Textbausteine
   ============================================================ */
.tkd-meta,
.tkd-meta a {
	color: var(--wp--preset--color--primary);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	text-decoration: none;
}
.tkd-date {
	color: var(--wp--preset--color--subtle);
	font-size: var(--wp--preset--font-size--small);
}

/* ============================================================
   Tabellen (Statistiken, Kader)
   ============================================================ */
.wp-block-table {
	border-radius: var(--tkd-radius-sm);
	border: 1px solid var(--wp--preset--color--border);
	overflow: hidden;
}
.wp-block-table table {
	border-collapse: collapse;
	width: 100%;
}
.wp-block-table th {
	background: var(--wp--preset--color--surface);
	text-align: left;
	font-weight: 700;
	font-size: 0.82rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--wp--preset--color--primary-strong);
}
.wp-block-table :where(td, th) {
	border-bottom: 1px solid var(--wp--preset--color--border);
	padding: 0.7rem 0.9rem;
}
.wp-block-table tbody tr:last-child :where(td) {
	border-bottom: 0;
}
.wp-block-table tbody tr:nth-child(even) td {
	background: var(--wp--preset--color--surface-2);
}

/* ============================================================
   Zitate / Bilder / Buttons
   ============================================================ */
.wp-block-quote {
	border-left: 4px solid var(--wp--preset--color--primary);
	padding: 0.4rem 0 0.4rem 1.25rem;
	font-style: normal;
	color: var(--wp--preset--color--primary-dark);
}
.wp-block-image img,
.wp-block-post-featured-image img {
	border-radius: var(--tkd-radius-sm);
}
figcaption {
	color: var(--wp--preset--color--subtle);
	font-size: var(--wp--preset--font-size--small);
}

.wp-element-button,
.wp-block-button__link {
	transition: transform 0.14s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}
.wp-element-button:hover,
.wp-block-button__link:hover {
	transform: translateY(-2px);
}
.wp-block-button.is-style-outline .wp-block-button__link {
	border-width: 2px;
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary-strong);
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--surface);
}
:where(a, .wp-element-button, button, input, .wp-block-navigation-item__content):focus-visible {
	outline: none;
	box-shadow: var(--tkd-ring);
	border-radius: 6px;
}

/* ============================================================
   Fussbereich
   ============================================================ */
.tkd-site-footer,
footer.wp-block-group {
	border-top: 4px solid var(--wp--preset--color--primary-bright);
}
footer.wp-block-group a {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 0.2em;
	text-decoration-color: rgba(255, 255, 255, 0.4);
}
footer.wp-block-group a:hover {
	text-decoration-color: #fff;
}
footer.wp-block-group .wp-block-heading {
	color: #bcd6f2;
	font-size: 1.05rem;
	letter-spacing: 0.02em;
}
footer.wp-block-group :where(p, li) {
	color: rgba(255, 255, 255, 0.82);
}

/* ============================================================
   3K-Darts-Einbettung + Platzhalter
   ============================================================ */
.tkd-3k-embed {
	margin-block: 1.5rem;
	border-radius: var(--tkd-radius-sm);
	overflow: hidden;
	border: 1px solid var(--wp--preset--color--border);
}
.tkd-3k-embed iframe {
	display: block;
	width: 100%;
}
@media (max-width: 600px) {
	.tkd-3k-embed iframe {
		height: 80vh;
		min-height: 520px;
	}
}
.tkd-embed-placeholder {
	border: 2px dashed var(--wp--preset--color--border);
	border-radius: var(--tkd-radius-sm);
	padding: 2.5rem 1.5rem;
	text-align: center;
	color: var(--wp--preset--color--primary-dark);
	background: var(--wp--preset--color--surface);
	font-weight: 600;
}

/* ============================================================
   Klein / mobil / Bewegung reduziert
   ============================================================ */
@media (max-width: 600px) {
	.tkd-hero::after { right: -9rem; width: 18rem; height: 18rem; opacity: 0.1; }
	.tkd-card .wp-block-post-featured-image { margin-inline: -1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
	.tkd-card:hover,
	.wp-element-button:hover,
	.wp-block-button__link:hover {
		transform: none;
	}
}
