/* =========================================================================
   Events – Gestaltung
   Farben, Radius, Abstände über die Variablen anpassen, z. B. in
   Elementor › Website-Einstellungen › Eigenes CSS:
   .cd-events, .cd-single { --cd-akzent: #1f5a3c; --cd-flaeche: #c0b2a1; }
   ====================================================================== */

.cd-events,
.cd-single {
	--cd-akzent: #1f5a3c;       /* Datum, Titel, Button */
	--cd-akzent-text: #fff;     /* Schrift im Button */
	--cd-karte: #fff;           /* mittlerer Kartenteil (Datum/Ort) */
	--cd-flaeche: #c0b2a1;      /* unterer Kartenteil + Infobox */
	--cd-badge-bg: #c2453a;     /* „Ausgebucht“ */
	--cd-badge-text: #fff;
	--cd-button-bg: #ba7d89;    /* Buttons (rosa) */
	--cd-button-text: #fff;
	--cd-button-radius: 8px;
	--cd-wenige-bg: #e0a526;    /* „Nur noch wenige Plätze“ */
	--cd-wenige-text: #1a1a1a;
	--cd-radius: 0;
	--cd-gap: 28px;
	--cd-bild-ratio: 1 / 1;
	--cd-schatten: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.cd-events {
	scroll-margin-top: 120px;
}

/* ---------- Filter ---------- */

.cd-events__filter ul {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	list-style: none;
	margin: 0 0 48px;
	padding: 0;
}
.cd-events__filter a {
	display: inline-block;
	padding: 8px 18px;
	border: 1.5px solid var(--cd-akzent);
	border-radius: 999px;
	color: var(--cd-akzent);
	font-size: 0.9em;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	transition: background-color 0.15s, color 0.15s;
}
.cd-events__filter a:hover,
.cd-events__filter a.is-aktiv {
	background: var(--cd-akzent);
	color: var(--cd-akzent-text);
}

/* ---------- Übersichtsseite (/events) ---------- */

.cd-archiv {
	padding: 56px 0 96px;
}
.cd-archiv__kopf {
	max-width: 760px;
	margin: 0 auto 48px;
	padding-inline: 24px;
}
.cd-archiv .cd-archiv__titel {
	margin: 0 0 16px;
}
.cd-archiv__intro {
	font-size: 1.1em;
	line-height: 1.6;
}
.cd-archiv__intro > :last-child {
	margin-bottom: 0;
}

/* ---------- Raster: 3 → 2 → 1 Spalten, schmal und zentriert ---------- */

.cd-events {
	max-width: var(--cd-max-breite, 1080px);
	margin-inline: auto;
	padding-inline: var(--cd-rand, 24px);
	box-sizing: border-box;
}
.cd-events__grid {
	display: grid;
	grid-template-columns: repeat(var(--cd-spalten, 3), minmax(0, 1fr));
	gap: var(--cd-gap);
}
@media (max-width: 900px) {
	.cd-events__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
	.cd-events__grid { grid-template-columns: 1fr; }
}

/* ---------- Kachel: Bild, Titel, Datum, Standort, Button ---------- */

.cd-event {
	border-radius: var(--cd-radius);
	overflow: hidden;
	background: var(--cd-flaeche);
	box-shadow: var(--cd-schatten);
}
.cd-event__link,
.cd-event__link:hover,
.cd-event__link:focus {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: var(--cd-akzent);
	text-decoration: none;
}

.cd-event__bild,
.cd-single__bild {
	position: relative;
	aspect-ratio: var(--cd-bild-ratio);
	overflow: hidden;
	background: #e6e1da;
}
.cd-event__bild img,
.cd-single__bild img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.cd-event__bild img {
	transition: transform 0.5s ease;
}
.cd-event__link:hover .cd-event__bild img {
	transform: scale(1.04);
}

.cd-event__badge {
	position: absolute;
	top: 14px;
	left: 14px;
	padding: 5px 12px;
	border-radius: var(--cd-radius);
	background: var(--cd-badge-bg);
	color: var(--cd-badge-text);
	font-size: 0.75em;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1.3;
	text-transform: uppercase;
}

.cd-event__badge--wenige {
	background: var(--cd-wenige-bg);
	color: var(--cd-wenige-text);
}

.cd-event__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 22px 22px 24px;
}
.cd-events .cd-event__titel {
	margin: 0 0 12px;
	color: inherit;
	font-size: 1.25em;
	font-weight: 500;
	line-height: 1.25;
}
.cd-event__meta {
	margin-bottom: 22px;
	font-size: 0.95em;
	line-height: 1.4;
}
.cd-event__meta p {
	margin: 0 0 6px;
}
.cd-event__meta p:last-child {
	margin-bottom: 0;
}
.cd-event__datum {
	font-weight: 700;
}
.cd-event__zeile {
	display: flex;
	gap: 6px;
	align-items: flex-start;
}
.cd-event__zeile .cd-icon {
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	margin-top: 2px;
}

.cd-event__button,
.cd-single__button,
.cd-single__ausgebucht {
	display: block;
	padding: 18px 24px;
	border-radius: var(--cd-button-radius);
	font-weight: 400;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
}
.cd-event__button {
	margin-top: auto;
	padding: 14px 18px;
	background: var(--cd-button-bg);
	color: var(--cd-button-text);
	font-size: 1.05em;
	transition: filter 0.15s;
}
.cd-event__link:hover .cd-event__button {
	filter: brightness(0.92);
}

.cd-events__leer {
	color: var(--cd-akzent);
}

/* ---------- Einzelseite ---------- */

.cd-single {
	max-width: 1200px;
	margin: 0 auto;
	padding: 48px 0 96px;
}
.cd-single__zurueck {
	display: inline-block;
	margin-bottom: 32px;
	color: var(--cd-akzent);
	font-weight: 600;
	text-decoration: none;
}
.cd-single__zurueck:hover {
	text-decoration: underline;
}

.cd-single__kopf {
	display: grid;
	grid-template-columns: 1fr;
	gap: 32px;
}
@media (min-width: 900px) {
	.cd-single__kopf {
		grid-template-columns: 1.1fr 1fr;
		gap: 48px;
		align-items: stretch;
	}
}
.cd-single__bild {
	border-radius: var(--cd-radius);
}
@media (min-width: 900px) {
	.cd-single__bild {
		aspect-ratio: auto;
		min-height: 100%;
	}
}

.cd-single__info {
	display: flex;
	flex-direction: column;
	padding: clamp(24px, 5vw, 48px);
	border-radius: var(--cd-radius);
	background: var(--cd-flaeche);
	color: var(--cd-akzent);
}
.cd-single__kategorie {
	margin: 0 0 8px;
	font-weight: 700;
	letter-spacing: 0.08em;
}
.cd-single .cd-single__titel {
	margin: 0 0 32px;
	color: inherit;
	font-size: clamp(2em, 4vw, 2.8em);
	line-height: 1.15;
}
.cd-single__fakten {
	margin: 0 0 36px;
	padding: 0;
	list-style: none;
	border-top: 1px solid rgba(0, 0, 0, 0.12);
}
.cd-single__fakten li {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	margin: 0;
	padding: 14px 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.12);
	line-height: 1.5;
}
.cd-single__fakten .cd-icon {
	flex-shrink: 0;
	margin-top: 2px;
}

.cd-single__button {
	margin-top: auto;
	background: var(--cd-button-bg);
	color: var(--cd-button-text);
	font-size: 1.1em;
	transition: filter 0.15s;
}
.cd-single__button:hover,
.cd-single__button:focus {
	color: var(--cd-button-text);
	filter: brightness(0.92);
}
.cd-single__ausgebucht {
	margin-top: auto;
	border: 2px solid var(--cd-badge-bg);
	color: var(--cd-badge-bg);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.cd-single__wenige {
	margin: auto 0 10px;
	font-weight: 700;
}
.cd-single__wenige + .cd-single__button {
	margin-top: 0;
}
.cd-single__hinweis {
	margin: auto 0 0;
	font-style: italic;
}

.cd-single__text {
	margin: -12px 0 32px;
	font-size: 1.05em;
	line-height: 1.65;
}
.cd-single__text > :first-child {
	margin-top: 0;
}
.cd-single__text > :last-child {
	margin-bottom: 0;
}
.cd-single__text img {
	max-width: 100%;
	height: auto;
	border-radius: var(--cd-radius);
}

/* Ohne Bild: Infobox über volle Breite, aber lesbar schmal */
.cd-single__kopf.ohne-bild {
	grid-template-columns: 1fr;
	max-width: 760px;
}


/* =========================================================================
   Variante „quer“: [events layout="quer"]
   Bild links, Infos rechts, 2 Spalten
   ====================================================================== */

.cd-events--quer {
	--cd-max-breite: 1200px;
	--cd-quer-bild: 44%;
}
.cd-events--quer .cd-event__link,
.cd-events--quer .cd-event__link:hover,
.cd-events--quer .cd-event__link:focus {
	flex-direction: row;
	align-items: stretch;
}
.cd-events--quer .cd-event__bild {
	flex: 0 0 var(--cd-quer-bild);
	aspect-ratio: auto;
	min-height: 240px;
}
.cd-events--quer .cd-event__bild img {
	position: absolute;
	inset: 0;
}
.cd-events--quer .cd-event__body {
	justify-content: center;
	padding: 28px 28px 28px 32px;
}
.cd-events--quer .cd-event__titel {
	font-size: 1.35em;
}
.cd-events--quer .cd-event__button {
	align-self: flex-start;
	margin-top: 6px;
	padding: 12px 28px;
}

/* 1 Spalte, Kachel bleibt quer */
@media (max-width: 1000px) {
	.cd-events--quer .cd-events__grid { grid-template-columns: 1fr; }
	.cd-events--quer { --cd-max-breite: 760px; }
}
/* Handy: Bild oben, Infos darunter */
@media (max-width: 560px) {
	.cd-events--quer .cd-event__link,
	.cd-events--quer .cd-event__link:hover,
	.cd-events--quer .cd-event__link:focus {
		flex-direction: column;
	}
	.cd-events--quer .cd-event__bild {
		flex-basis: auto;
		aspect-ratio: 4 / 3;
		min-height: 0;
	}
	.cd-events--quer .cd-event__body {
		padding: 22px;
	}
	.cd-events--quer .cd-event__button {
		align-self: stretch;
	}
}


/* =========================================================================
   Slider für Ladenseiten: [events layout="slider" standort="…"]
   Übernimmt Text- und Linienfarbe vom umgebenden Elementor-Abschnitt.
   ====================================================================== */

.cd-slider {
	--cd-gap: 24px;
	--cd-linie: currentColor;
	--cd-badge-bg: #c2453a;
	--cd-badge-text: #fff;
	--cd-wenige-bg: #e0a526;
	--cd-wenige-text: #1a1a1a;
	--cd-radius: 0;
	--cd-bild-ratio: 4 / 3;
	position: relative;
}
.cd-slider__nav {
	display: flex;
	gap: 12px;
	margin-bottom: 20px;
}
.cd-slider__pfeil,
.cd-slider__pfeil:hover,
.cd-slider__pfeil:focus {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	cursor: pointer;
	box-shadow: none;
}
.cd-slider__pfeil .cd-icon {
	width: 26px;
	height: 26px;
	transition: transform 0.15s;
}
.cd-slider__pfeil[data-richtung="-1"]:hover .cd-icon { transform: translateX(-3px); }
.cd-slider__pfeil[data-richtung="1"]:hover .cd-icon { transform: translateX(3px); }
.cd-slider__pfeil:disabled {
	opacity: 0.3;
	cursor: default;
}
.cd-slider__pfeil:disabled .cd-icon { transform: none !important; }

.cd-slider__track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - (var(--cd-sichtbar, 2) - 1) * var(--cd-gap)) / var(--cd-sichtbar, 2));
	gap: var(--cd-gap);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	overscroll-behavior-x: contain;
}
.cd-slider__track::-webkit-scrollbar { display: none; }
@media (max-width: 700px) {
	/* Handy: eine Kachel, die nächste lugt hervor */
	.cd-slider__track { grid-auto-columns: 85%; }
}

.cd-slide {
	scroll-snap-align: start;
	min-width: 0;
}
.cd-slide__link,
.cd-slide__link:hover,
.cd-slide__link:focus {
	display: block;
	color: inherit;
	text-decoration: none;
}
.cd-slide__bild {
	position: relative;
	aspect-ratio: var(--cd-bild-ratio);
	overflow: hidden;
	background: rgba(0, 0, 0, 0.06);
}
.cd-slide__bild img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}
.cd-slide__link:hover .cd-slide__bild img {
	transform: scale(1.03);
}
.cd-slider .cd-slide__titel {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 2.4em; /* Platz für 2 Zeilen: Linien beider Kacheln stehen auf einer Höhe */
	margin: 28px 0 24px;
	color: inherit;
	font-size: 1.75em;
	font-weight: 400;
	line-height: 1.2;
	text-align: center;
}
.cd-slide__link:hover .cd-slide__titel {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 5px;
}
.cd-slide__fakten {
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--cd-linie);
}
.cd-slide__fakten li {
	display: flex;
	gap: 16px;
	align-items: center;
	margin: 0;
	padding: 10px 10px;
	border-bottom: 1px solid var(--cd-linie);
	line-height: 1.6;
}
.cd-slide__fakten .cd-icon {
	flex-shrink: 0;
	width: 22px;
	height: 22px;
}
.cd-slider__leer {
	margin: 0;
}
