/* AGILITA Event-Übersicht (81283) – Design wie /veranstaltungen/ und SAP-Wiki-Filter */
.agev-uebersicht {
	--agev-spalten: 3;
	--agev-abstand: 20px;
	--agev-lime: var(--e-global-color-e147fd0, #CAFA63);
	--agev-grau: var(--e-global-color-f700a89, #F7F7F7);
	--agev-ease: cubic-bezier(.22, 1, .36, 1);
	width: 100%;
	font-family: Poppins, sans-serif;
	color: #000;
}

/* Titel wie «Bevorstehende Events» */
.agev-uebersicht .agev-titel {
	margin: 0 0 30px;
	font-family: Poppins, sans-serif;
	font-size: 50px;
	font-weight: 700;
	line-height: 45px;
	letter-spacing: -2.1px;
	color: inherit;
}

/* Fokus sichtbar */
.agev-uebersicht a.agev-btn:focus-visible,
.agev-titel--archiv:focus-visible {
	outline: 2px solid #000;
	outline-offset: 3px;
}
.agev-titel--archiv:focus:not(:focus-visible) {
	outline: none;
}

/* Button «Vergangene Events» nach den bevorstehenden Events */
.agev-archiv-start {
	display: flex;
	justify-content: center;
	margin-top: 60px;
}
.agev-archiv-start[hidden],
.agev-archiv[hidden] {
	display: none;
}
.agev-uebersicht .agev-archiv-start a.agev-archiv-btn {
	padding: 16px 36px;
	font-size: 20px;
	letter-spacing: -0.5px;
}

/* Archiv */
.agev-archiv {
	margin-top: 100px;
}

/* Raster */
.agev-raster {
	display: grid;
	grid-template-columns: repeat(var(--agev-spalten), minmax(0, 1fr));
	grid-auto-rows: 1fr;
	gap: var(--agev-abstand);
	align-items: stretch;
}
.agev-raster > .e-loop-item {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.agev-raster > .e-loop-item > .e-con {
	flex: 1 1 auto;
}

/* Jahresgruppen im Archiv */
.agev-jahr + .agev-jahr {
	margin-top: 40px;
}
.agev-uebersicht .agev-jahr__titel {
	margin: 0 0 20px;
	font-family: Poppins, sans-serif;
	font-size: 25px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -1.6px;
	color: var(--e-global-color-secondary, #999);
}

/* Ort-Pille über dem Titel: Platz bleibt auch ohne Ort reserviert (gleich hohe Karten) */
.agev-karte .agev-pille {
	align-self: flex-start;
	max-width: 100%;
	min-height: 23px;
	margin-top: 15px;
}
.agev-pille .elementor-heading-title:empty {
	display: none;
}
.agev-pille .elementor-heading-title {
	display: block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Gleich grosse Karten: Titel immer 2 Zeilen, Datum 2 Zeilen, Text 4 Zeilen */
.agev-karte__titel .elementor-heading-title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
	min-height: 2.2em;
	min-height: 2lh;
	overflow-wrap: anywhere;
	hyphens: auto;
}
.agev-karte__termin .elementor-widget-container {
	min-height: 36px;
	min-height: 2lh;
}
.agev-karte__termin strong {
	font-weight: 700;
}
.agev-karte__text .elementor-widget-container {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
	line-clamp: 4;
	overflow: hidden;
	min-height: 4lh;
}
.agev-karte__text .elementor-widget-container p {
	margin: 0;
	display: inline;
}

/* Mehr laden */
.agev-mehr {
	display: flex;
	justify-content: center;
	margin-top: 40px;
}
.agev-mehr[hidden] {
	display: none;
}
.agev-uebersicht a.agev-btn {
	display: inline-flex;
	align-items: center;
	padding: 12px 24px;
	border: 1px solid #000;
	border-radius: 99px;
	background: transparent;
	color: #000;
	font-family: Poppins, sans-serif;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .25s var(--agev-ease), border-color .25s var(--agev-ease);
}
.agev-uebersicht a.agev-btn:hover,
.agev-uebersicht a.agev-btn:focus-visible {
	background-color: var(--agev-lime);
	border-color: var(--agev-lime);
	color: #000;
}
.agev-mehr__btn[aria-disabled="true"] {
	opacity: .5;
	pointer-events: none;
}

/* Leer, Fehler, Status */
.agev-leer,
.agev-fehler {
	margin: 0;
	padding: 40px 0;
	font-size: 16px;
	line-height: 1.5;
}
.agev-fehler {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 15px;
}
.agev-status {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
.agev-hinweis {
	padding: 20px;
	border: 1px dashed #999;
	font-size: 14px;
}

/* Skeleton in Form und Grösse der Event-Karten */
.agev-inhalt[aria-busy="true"] {
	pointer-events: none;
}
.agev-skeleton {
	display: flex;
	flex-direction: column;
	gap: 15px;
	min-height: 470px;
	padding: 20px;
	border-radius: 12px;
	background: var(--agev-grau);
}
.agev-sk {
	position: relative;
	overflow: hidden;
	border-radius: 6px;
	background: #e8e8e8;
}
.agev-sk--bild { height: 150px; border-radius: 8px; }
.agev-sk--pille { height: 23px; width: 90px; border-radius: 99px; }
.agev-sk--titel { height: 34px; width: 80%; }
.agev-sk--titel2 { height: 34px; width: 55%; }
.agev-sk--linie { height: 1px; background: #d6d6d6; margin: 5px 0; }
.agev-sk--zeile { height: 14px; width: 60%; }
.agev-sk--text { height: 14px; width: 95%; }
.agev-sk--text2 { height: 14px; width: 85%; }
.agev-sk--button { height: 38px; width: 130px; margin-top: auto; border-radius: 99px; }
.agev-sk::after {
	content: "";
	position: absolute;
	inset: 0;
	transform: translateX(-100%);
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .65), transparent);
	animation: agev-schimmer 1.3s ease-in-out infinite;
}
.agev-sk--linie::after { display: none; }
@keyframes agev-schimmer {
	100% { transform: translateX(100%); }
}
@media (prefers-reduced-motion: reduce) {
	.agev-sk::after { animation: none; display: none; }
	.agev-uebersicht a.agev-btn { transition: none; }
}

/* Responsive Grundwerte (gelten auch ohne Elementor-CSS des Widgets) */
@media (max-width: 1024px) {
	.agev-uebersicht { --agev-spalten: 2; }
}
@media (max-width: 767px) {
	.agev-uebersicht { --agev-spalten: 1; --agev-abstand: 30px; }
	.agev-skeleton { min-height: 440px; }
	.agev-uebersicht .agev-titel {
		font-size: 40px;
		line-height: 1em;
		margin-bottom: 20px;
	}
	.agev-archiv { margin-top: 60px; }
	.agev-archiv-start { margin-top: 40px; }
	.agev-uebersicht .agev-archiv-start a.agev-archiv-btn { padding: 14px 28px; font-size: 18px; }
	.agev-jahr + .agev-jahr { margin-top: 30px; }
}

/* ---------- AGILITA Event-Banner (Mega-Menü) ---------- */
.elementor-widget-agilita_event_banner_81283 {
	width: 100%;
	flex: 1 1 auto;
	align-self: stretch;
}
.elementor-widget-agilita_event_banner_81283 > .elementor-widget-container {
	height: 100%;
}
.agev-banner {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
	box-sizing: border-box;
	height: 100%;
	padding: 25px;
	border-radius: 12px;
	overflow: hidden;
	background-color: #1d1d1d;
	background-position: center center;
	background-size: cover;
	background-repeat: no-repeat;
	font-family: Poppins, sans-serif;
	isolation: isolate;
}
.agev-banner::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-color: #000;
	opacity: 0;
}
.agev-banner .agev-banner__datum,
.agev-banner .agev-banner__titel {
	margin: 0;
	padding: 0;
	color: #fff;
	font-family: Poppins, sans-serif;
	font-weight: 700;
}
.agev-banner .agev-banner__datum {
	font-size: 14px;
	line-height: 1.4;
}
.agev-banner .agev-banner__titel {
	font-size: 35px;
	line-height: 1.1;
	overflow-wrap: break-word;
	hyphens: auto;
}
.agev-banner a.agev-banner__button {
	display: inline-block;
	padding: 10px 25px;
	border-radius: 99px;
	background-color: #fff;
	color: #000;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	transition: transform .2s ease;
}
.agev-banner a.agev-banner__button:hover,
.agev-banner a.agev-banner__button:focus-visible {
	transform: scale(.9);
	color: #000;
}
.agev-banner a.agev-banner__button:focus-visible {
	outline: 2px solid #cafa63;
	outline-offset: 2px;
}
.agev-banner--leer {
	min-height: 120px;
	background-color: #555;
}
@media (prefers-reduced-motion: reduce) {
	.agev-banner a.agev-banner__button { transition: none; }
}
