/* VN Termine – Liste. Werte 1:1 aus Loop-Vorlage 1709 + Elementor-Kit der Startseite.
   Selektoren bewusst mit .vn-termine davor, damit .elementor-kit-9 h2/button/a nicht gewinnt. */
.vn-termine { --vn-text: #000; --vn-btn: #1F1D1E; margin: 0; }

/* Monatsfilter – kompakt, nach Jahr gruppiert, bricht um (kein Scrollbalken) */
.vn-termine .vn-filter {
	display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 0 0 20px; padding: 0;
}
.vn-termine .vn-filter__group { display: flex; flex: var(--n, 1) 1 auto; flex-wrap: wrap; align-items: center; gap: 6px; }
.vn-termine .vn-filter > .vn-filter__btn { flex: 0 0 auto; }
.vn-termine .vn-filter__btn {
	flex: 1 1 auto; min-width: 44px; text-align: center; white-space: nowrap; cursor: pointer;
	font-family: "Heebo", sans-serif; font-size: 12px; font-weight: 400; line-height: 1;
	text-transform: uppercase; letter-spacing: 1px;
	background: #fff; color: #000; border: 1px solid #fff; border-radius: 5px; padding: 7px 9px 6px;
}
.vn-termine .vn-filter__btn:hover,
.vn-termine .vn-filter__btn:focus { background: #e9e9e9; color: #000; border: 1px solid #e9e9e9; padding: 7px 9px 6px; transform: none; }
/* Jahres-Button: weiß umrandet auf transparentem Grund, ausgewählt schwarz wie die Monate */
.vn-termine .vn-filter__btn.vn-filter__year {
	flex: 0 0 auto; min-width: 0; font-family: "Poppins", sans-serif; font-weight: 600; font-size: 13px; letter-spacing: 1px;
	background: transparent; color: #fff; border: 1px solid #fff;
}
.vn-termine .vn-filter__btn.vn-filter__year:hover,
.vn-termine .vn-filter__btn.vn-filter__year:focus { background: rgba(255,255,255,.18); color: #fff; border: 1px solid #fff; }
.vn-termine .vn-filter__btn.vn-filter__year.is-active,
.vn-termine .vn-filter__btn.is-active,
.vn-termine .vn-filter__btn.is-active:hover,
.vn-termine .vn-filter__btn.is-active:focus { background: #000; color: #fff; border: 1px solid #000; padding: 7px 9px 6px; transform: none; }

/* Termin-Karte = Loop-Item 1709 */
.vn-termine .vn-list { display: flex; flex-direction: column; gap: 15px; }
.vn-termine .vn-event {
	/* Raster: Zeile so hoch wie max(Bild, Text) → Button sitzt an der Bildunterkante;
	   die Box selbst darf im Listen-Raster gestreckt werden (gleich hohe Boxen), Rest bleibt unten frei. */
	display: grid; grid-template-columns: 16.092% minmax(0, 1fr); align-items: stretch; align-content: start; gap: 0;
	background: #fff; border-radius: 10px; padding: 10px;
}
.vn-termine .vn-event[hidden] { display: none; }
.vn-termine .vn-event__img { min-width: 0; align-self: start; }
.vn-termine .vn-event__zoom {
	display: block; position: relative; overflow: hidden; border-radius: 8px !important;
	background: transparent; cursor: zoom-in;
	width: 100%; padding: 0; margin: 0; border: 0; border-radius: 0; font: inherit; line-height: 0; text-transform: none; letter-spacing: 0;
}
.vn-termine .vn-event__zoom:hover,
.vn-termine .vn-event__zoom:focus { background: transparent; border: 0; padding: 0; }
.vn-termine .vn-event__zoom:focus-visible { outline: 2px solid #016462; outline-offset: 2px; }
.vn-termine .vn-event__img img {
	display: block; width: 100%; height: auto;
	border-radius: 8px; transition: transform .3s;
}
.vn-termine .vn-event__zoom:hover img { transform: scale(1.03); }
.vn-termine .vn-event__body { min-width: 0; padding: 0 0 0 15px; display: flex; flex-direction: column; }
.vn-termine .vn-event__title {
	font-family: "Poppins", sans-serif; font-size: 20px; font-weight: 400; line-height: 1;
	text-transform: none; letter-spacing: normal; color: #000; margin: 0 0 8px; padding: 0;
}
.vn-termine .vn-event__body,
.vn-termine .vn-event__body p,
.vn-termine .vn-event-info {
	font-family: "Heebo", sans-serif; font-size: 16px; font-weight: 300; color: var(--vn-text);
}
.vn-termine .vn-event__body p { margin: 0; }
.vn-termine .vn-event-info { line-height: 1.3; }
.vn-termine .vn-event-info strong { font-weight: 400; color: #000; }
.vn-termine .vn-event__body a:not(.vn-button) { color: #000; }

/* Button = Elementor-Button der Termine (Kit + Radius 5px) */
.vn-termine .vn-event__body .vn-button-wrap { margin: auto 0 0; padding-top: 10px; }
.vn-termine .vn-button,
.vn-termine .vn-button:visited {
	display: inline-block; text-decoration: none;
	font-family: "Heebo", sans-serif; font-size: 12px; font-weight: 400; line-height: 1;
	text-transform: uppercase; letter-spacing: 2px;
	background: var(--vn-btn); color: #fff; fill: #fff;
	border: 2px solid transparent; border-radius: 5px; padding: 9px 12px 8px;
	transition: all .3s;
}
.vn-termine .vn-button:hover,
.vn-termine .vn-button:focus { background: #000; color: #fff; border-color: var(--vn-btn); }

/* Vergangene Termine – zugeklappt unter der Liste */
.vn-termine .vn-past { margin-top: 15px; } /* = Abstand Summary → erste vergangene Box */
.vn-termine .vn-past > summary {
	cursor: pointer; list-style: none; padding: 14px 18px; margin: 0;
	background: #fff; border-radius: 10px; color: #000;
	font-family: "Poppins", sans-serif; font-size: 18px; font-weight: 400;
}
.vn-termine .vn-past > summary::-webkit-details-marker { display: none; }
.vn-termine .vn-past > summary::after { content: "+"; float: right; font-size: 24px; line-height: 1; color: #000; }
.vn-termine .vn-past[open] > summary::after { content: "–"; }
.vn-termine .vn-past[open] > summary { margin-bottom: 15px; }
.vn-termine .vn-list--past .vn-event { opacity: .8; }

.vn-termine .vn-empty { font-family: "Heebo", sans-serif; color: #fff; }

/* Tablet + Desktop: zwei Termine nebeneinander (50/50) */
@media (min-width: 768px) {
	.vn-termine .vn-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; align-items: stretch; }
	.vn-termine .vn-event { grid-template-columns: 30% minmax(0, 1fr); }
}

/* Tablet: Monatsfilter nicht strecken – einzelne Monate (z. B. „JAN“ 2028) bleiben normal breit */
@media (min-width: 768px) and (max-width: 1024px) {
	.vn-termine .vn-filter__group { flex: 0 1 auto; }
	.vn-termine .vn-filter__btn { flex: 0 0 auto; min-width: 52px; }
}

@media (max-width: 767px) {
	/* Monatsfilter kompakt: alle Buttons laufen lückenlos in einem Raster mit 5 Spalten durch
	   (Alle, Jahr, Monate, nächstes Jahr, …) – keine leeren Plätze. Jahre erkennt man am Rahmen. */
	.vn-termine .vn-filter { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-bottom: 20px; }
	.vn-termine .vn-filter__group { display: contents; }
	.vn-termine .vn-filter__btn { min-width: 0; width: 100%; padding: 9px 2px 8px; letter-spacing: .5px; }
	.vn-termine .vn-filter__btn:hover, .vn-termine .vn-filter__btn:focus,
	.vn-termine .vn-filter__btn.is-active, .vn-termine .vn-filter__btn.is-active:hover, .vn-termine .vn-filter__btn.is-active:focus { padding: 9px 2px 8px; }
	.vn-termine .vn-event__body,
	.vn-termine .vn-event__body p,
	.vn-termine .vn-event-info { font-size: 14px; }
	.vn-termine .vn-event { padding: 8px; border-radius: 8px; }
	.vn-termine .vn-event__img img { border-radius: 6px; }
	.vn-termine .vn-event__body { padding-left: 10px; }
}

/* Lightbox */
.vn-lightbox {
	position: fixed; inset: 0; z-index: 999999; display: flex; align-items: center; justify-content: center;
	background: rgba(0,0,0,.88); padding: 20px; box-sizing: border-box; cursor: zoom-out;
	opacity: 0; transition: opacity .2s;
}
.vn-lightbox.is-open { opacity: 1; }
.vn-lightbox img {
	display: block; max-width: min(500px, 92vw); max-height: 88vh; width: auto; height: auto;
	object-fit: contain; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.5); cursor: default;
}
.vn-lightbox .vn-lightbox__close {
	position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; padding: 0; margin: 0;
	background: transparent; color: #fff; border: 0; border-radius: 50%; font-size: 34px; line-height: 44px;
	text-transform: none; letter-spacing: 0; cursor: pointer; font-family: Arial, sans-serif;
}
.vn-lightbox .vn-lightbox__close:hover,
.vn-lightbox .vn-lightbox__close:focus { background: rgba(255,255,255,.15); color: #fff; border: 0; }
