/* Klikusch Termine – Kacheln. Schrift und Textfarbe kommen vom Theme.
   Selektoren bewusst kräftig (.kt-termine .kt-card …), weil Kalium/WPBakery
   Absätze und Überschriften mit eigenen Abständen versieht. */
.kt-termine {
	--kt-line: #cfcfcf; /* helles Grau wie Kalium-Trennlinien */
	--kt-bg: #fff;
	--kt-img: 160px;
	--kt-num: 62px;
	--kt-gap: var(--kt-card-gap, 24px);
	--kt-pad: 18px;
	font-family: inherit;
	color: inherit;
	text-align: left;
	/* IM Fell DW Pica hat keinen Bold-Schnitt: kein künstliches Fett/Kursiv */
	font-synthesis: none;
	--kt-sc: "IM Fell DW Pica SC", "IM Fell DW Pica", serif;
}
.kt-termine * { box-sizing: border-box; }

.kt-termine .kt-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--kt-gap);
	align-items: start;
}

/* ---------- Kachel (2 Spalten): Bild links, rechts Datum / Infos / Links */
.kt-termine .kt-card {
	display: grid;
	grid-template-columns: var(--kt-img) minmax(0, 1fr);
	grid-template-areas: "img date" "img info";
	grid-template-rows: auto 1fr;
	background: var(--kt-bg);
	border: 1px solid var(--kt-line);
	border-radius: 0;
	overflow: hidden;
	min-width: 0;
	min-height: var(--kt-img);
}
.kt-termine .kt-card__img {
	grid-area: img;
	position: relative;
	width: var(--kt-img);
	background: #efe3cb;
}
.kt-termine--bild-quadrat .kt-card__img { height: var(--kt-img); align-self: start; }
.kt-termine--bild-hoch .kt-card__img { align-self: stretch; min-height: var(--kt-img); }
.kt-termine .kt-card__img img {
	position: absolute !important;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover;
	margin: 0 !important;
	border-radius: 0 !important;
}

.kt-termine .kt-date {
	grid-area: date;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px var(--kt-pad) 0;
	margin: 0 0 10px;
}
.kt-termine .kt-date__num {
	font-size: var(--kt-num);
	line-height: 0.8;
	font-weight: 400;
	font-variant-numeric: lining-nums;
	letter-spacing: -0.02em;
	white-space: nowrap;
}
.kt-termine .kt-date__meta {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding-left: 12px;
	border-left: 1px solid var(--kt-line);
}
.kt-termine .kt-date__month {
	font-family: var(--kt-sc);
	font-size: 24px;
	line-height: 1;
	font-weight: 400;
	letter-spacing: 0;
	white-space: nowrap;
}
.kt-termine .kt-date__sub {
	font-size: 15px;
	line-height: 1.2;
	white-space: nowrap;
}

.kt-termine .kt-card__info {
	grid-area: info;
	padding: 0 var(--kt-pad);
	min-width: 0;
}
.kt-termine .kt-card .kt-card__title {
	margin: 0 0 3px !important;
	padding: 0 !important;
	font-family: inherit;
	font-size: 21px !important;
	line-height: 1.2 !important;
	font-weight: 400;
	color: inherit;
	text-transform: none;
	letter-spacing: 0;
}
.kt-termine .kt-card .kt-card__title a {
	color: inherit !important;
	text-decoration: none !important;
}
.kt-termine .kt-card .kt-card__title a:hover,
.kt-termine .kt-card .kt-card__title a:focus-visible {
	text-decoration: underline !important;
	text-decoration-thickness: 1px !important;
	text-underline-offset: 4px;
}
/* Touch-Geräte (kein Hover): Titel-Links dezent dauerhaft unterstrichen */
@media (hover: none) {
	.kt-termine .kt-card .kt-card__title a {
		text-decoration: underline !important;
		text-decoration-thickness: 1px !important;
		text-decoration-color: currentColor !important;
		text-decoration-color: color-mix(in srgb, currentColor 45%, transparent) !important;
		text-underline-offset: 4px;
	}
}
.kt-termine .kt-card p {
	margin: 0 !important;
	padding: 0 !important;
	font-size: 16px;
	line-height: 1.35 !important;
}
.kt-termine .kt-card br { display: none; }
.kt-termine .kt-card p:empty { display: none; }
.kt-termine .kt-card .kt-card__times { font-family: var(--kt-sc); font-size: 17px; letter-spacing: 0; }
.kt-termine .kt-card .kt-card__moved s { opacity: 0.75; }
.kt-termine .kt-card .kt-card__flag {
	font-family: var(--kt-sc);
	letter-spacing: 0;
}
.kt-termine .kt-card--cancelled .kt-card__title,
.kt-termine .kt-card--cancelled .kt-date { text-decoration: line-through; }

/* Infobereich als Spalte: Titel oben, Links unten bündig */
.kt-termine .kt-card__info { display: flex; flex-direction: column; }
.kt-termine .kt-card .kt-card__links {
	margin-bottom: 0 !important;
	margin-top: auto;
	padding-top: 16px;
	display: flex;
	flex-wrap: wrap;
	gap: 4px 28px;
}
.kt-termine .kt-card .kt-card__links a {
	display: inline-block;
	padding: 4px 0;
	color: inherit;
	font-family: var(--kt-sc);
	font-size: 18px;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	text-decoration: none;
	white-space: nowrap;
}
.kt-termine .kt-card .kt-card__links a:hover,
.kt-termine .kt-card .kt-card__links a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
/* Abstand nach unten: am letzten Inhalt, egal ob Links vorhanden sind */
.kt-termine .kt-card::after { content: ""; grid-column: 2; height: 16px; }

.kt-termine .kt-empty { text-align: center; }

/* ---------- Zwischenüberschriften (Jahr, „Zuletzt gespielt“) – wie Kalium-Trenner „Das sagt die Presse“ */
.kt-termine .kt-sep {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	gap: 24px;
	margin: 32px 0 8px !important;
	padding: 0 !important;
	font-family: var(--kt-sc);
	font-size: 18px;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	text-align: center;
}
.kt-termine .kt-grid > .kt-sep:first-child { margin-top: 0 !important; }
/* Jahreszahl so groß wie die Kacheltitel */
.kt-termine .kt-sep--year { font-size: 28px; }
@media (max-width: 767px) { .kt-termine .kt-sep--year { font-size: 21px; } }
.kt-termine .kt-sep::before,
.kt-termine .kt-sep::after {
	content: "";
	flex: 1;
	border-top: 1px dotted var(--kt-line);
}
/* Nur das Bild zurücknehmen – Text bleibt voll lesbar (Kontrast) */
.kt-termine .kt-card--past .kt-card__img img { filter: grayscale(1); opacity: 0.55; }
.kt-termine .kt-card--past .kt-card__img { background: #efe9dd; }

/* ---------- Volle Breite (Zonen): Bild | Datum | Infos | Links */
@media (min-width: 768px) {
	.kt-termine--breit .kt-grid { grid-template-columns: minmax(0, 1fr); gap: var(--kt-gap); }
	.kt-termine--breit .kt-card {
		grid-template-columns: var(--kt-img) 200px minmax(0, 1fr);
		grid-template-areas: "img date info";
		grid-template-rows: auto;
		align-items: center;
	}
	.kt-termine--breit .kt-card::after { display: none; }
	.kt-termine--breit .kt-date {
		flex-direction: column;
		align-items: flex-start;
		justify-content: center;
		gap: 0;
		margin: 0;
		padding: 0 20px 0 24px;
		height: calc(var(--kt-img) - 48px);
		border-right: 1px solid var(--kt-line);
	}
	.kt-termine--breit .kt-date__num { font-size: 64px; line-height: 0.85; }
	.kt-termine--breit .kt-date__meta { padding: 0; border: 0; margin-top: 8px; }
	.kt-termine--breit .kt-date__month { font-size: 22px; }
	.kt-termine--breit .kt-card__info { padding: 16px 24px; }
	.kt-termine--breit .kt-card .kt-card__title { font-size: 22px !important; }
}

/* ---------- Handy: immer eine Spalte, kompaktere Kachel */
@media (max-width: 767px) {
	.kt-termine { --kt-img: 112px; --kt-num: 40px; --kt-gap: calc(var(--kt-card-gap, 24px) * 0.75); --kt-pad: 14px; }
	.kt-termine .kt-grid { grid-template-columns: minmax(0, 1fr); }
	.kt-termine .kt-date { gap: 10px; margin-bottom: 8px; padding-top: 12px; }
	.kt-termine .kt-date__meta { padding-left: 10px; gap: 3px; }
	.kt-termine .kt-date__month { font-size: 18px; }
	.kt-termine .kt-date__sub { font-size: 14px; }
	.kt-termine .kt-card .kt-card__title { font-size: 18px !important; }
	.kt-termine .kt-card p { font-size: 15px; }
}

/* ---------- Details: etwas abgesetzt (alle Darstellungen) */
.kt-termine .kt-card__details {
	margin-top: 10px;
	padding-top: 8px;
	border-top: 1px solid var(--kt-line);
}
.kt-termine .kt-card__details:empty { display: none; }

/* ---------- Volle Breite, großes Bild: Bild doppelt breit, Datum als weiße Box im Bild */
.kt-termine--bild .kt-grid { grid-template-columns: minmax(0, 1fr); gap: var(--kt-gap); }
.kt-termine--bild .kt-card {
	position: relative;
	grid-template-columns: 340px minmax(0, 1fr);
	grid-template-areas: "img info";
	grid-template-rows: auto;
	min-height: 190px;
}
.kt-termine--bild .kt-card::after { display: none; }
.kt-termine--bild .kt-card__img { width: auto; height: auto; align-self: stretch; min-height: 190px; }
.kt-termine--bild .kt-date {
	position: absolute;
	left: 12px;
	top: 12px;
	z-index: 1;
	margin: 0;
	padding: 10px 14px 10px 12px;
	background: #fff;
	border-radius: 0;
	--kt-num: 46px;
}
.kt-termine--bild .kt-date__month { font-size: 19px; }
.kt-termine--bild .kt-date__sub { font-size: 14px; }
.kt-termine--bild .kt-card__info { padding: 18px 22px 10px; }
.kt-termine--bild .kt-card .kt-card__title { font-size: 28px !important; line-height: 1.15 !important; }
.kt-termine--bild .kt-card__details { margin-top: 10px; padding-top: 8px; }

@media (max-width: 767px) {
	/* Handy: Bild oben als Streifen, Datum-Box darin, Text darunter */
	.kt-termine--bild .kt-card {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas: "img" "info";
		min-height: 0;
	}
	.kt-termine--bild .kt-card__img { min-height: 0; aspect-ratio: 2 / 1; }
	.kt-termine--bild .kt-date { --kt-num: 36px; padding: 8px 10px; }
	.kt-termine--bild .kt-date__month { font-size: 16px; }
	.kt-termine--bild .kt-card__info { padding: 14px 14px 12px; }
	.kt-termine--bild .kt-card .kt-card__title { font-size: 21px !important; }
	.kt-termine .kt-card .kt-card__links { padding-top: 10px; gap: 2px 22px; }
}

/* Vorschau im Backend: schmale Spalte → Handy-Aufbau erzwingen */
.kt-preview.kt-termine--bild .kt-card { grid-template-columns: minmax(0, 1fr); grid-template-areas: "img" "info"; min-height: 0; }
.kt-preview.kt-termine--bild .kt-card__img { min-height: 0; aspect-ratio: 2 / 1; }
.kt-preview.kt-termine--bild .kt-date { --kt-num: 34px; padding: 8px 10px; }
.kt-preview.kt-termine--bild .kt-card__info { padding: 12px 14px 12px; }
.kt-preview.kt-termine--bild .kt-card .kt-card__title { font-size: 18px !important; }
.kt-preview.kt-termine .kt-card .kt-card__links { padding-top: 10px; gap: 2px 22px; }
