/*
 * GLOCK Events – Frontend-Styles
 *
 * Typo-System mit drei Rollen plus einem Kleinlabel, zwei Schriften:
 *
 *   Headline     Lato 24/600, versal, +1.6px          → Seitentitel, Event-Titel
 *   Zusatztext   Crimson Text 18/600 kursiv, zentriert → Termin, Ort, Intro
 *   Fließtext    Crimson Text 16/400, zentriert        → Beschreibung, Auszug
 *   Kleinlabel   Lato 11/600, versal, +1.5px           → Rubriken, Feldnamen
 *   Button       Lato 11/600, versal, +1.5px
 *
 * Farben kommen aus den Elementor-Globals, die Hex-Werte sind nur Fallback.
 * Die Globals liegen auf dem body (elementor-kit-…), deshalb werden die
 * Plugin-Variablen ebenfalls dort definiert – nicht auf :root.
 *
 * Zur Spezifität: Das Elementor-Kit stylt jedes a über `.elementor-kit-… a`
 * (0-1-1) – Farbe, Schrift und Größe. Eine einfache Klasse (0-1-0) verliert
 * dagegen. Regeln für Links im Plugin sind deshalb bewusst höher gewichtet
 * (doppelte Klasse), statt sich auf die Ladereihenfolge zu verlassen.
 */

body {
	--glock-headline: var(--e-global-color-242283f, #2a2a2a);
	--glock-body: var(--e-global-color-text, #7a7a7a);
	--glock-accent: var(--e-global-color-9eea80e, #efa758);
	--glock-accent-soft: var(--e-global-color-d24b10e, #f4c897);
	--glock-line: var(--e-global-color-0f46b1f, rgba(122, 122, 122, 0.13));

	--glock-font-headline: "Lato", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--glock-font-body: "Crimson Text", Georgia, "Times New Roman", serif;

	--glock-radius: 3px;
	--glock-gap: 4rem;
}

/* ------------------------------------------------------------- Rollen */

.glock-events-archive__title,
.glock-event-card__title,
.glock-event-single__title {
	margin: 0;
	color: var(--glock-headline);
	font-family: var(--glock-font-headline);
	font-size: 24px;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: 1.6px;
	text-transform: uppercase;
}

.glock-events-archive__intro,
.glock-event-card__meta,
.glock-event-details__value {
	margin: 0;
	color: var(--glock-headline);
	font-family: var(--glock-font-body);
	font-size: 18px;
	font-weight: 600;
	font-style: italic;
	line-height: 1.5;
	text-align: center;
}

.glock-event-card__excerpt,
.glock-event-single__content,
.glock-events-empty {
	color: var(--glock-body);
	font-family: var(--glock-font-body);
	font-size: 16px;
	font-weight: 400;
	font-style: normal;
	line-height: 1.7;
	text-align: center;
}

.glock-events-past__title,
.glock-event-details__label {
	color: var(--glock-body);
	font-family: var(--glock-font-headline);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 1.5px;
	line-height: 1.4;
	text-transform: uppercase;
}

/* ------------------------------------------------------------ Rahmen */

.glock-events-archive,
.glock-event-single {
	max-width: 860px;
	margin: 0 auto;
	padding: 4rem 1.25rem 5rem;
}

.glock-events-archive__header {
	margin-bottom: 4rem;
	text-align: center;
}

.glock-events-archive__title {
	margin-bottom: 1rem;
}

/* -------------------------------------------------------------- Liste */

.glock-events-list {
	display: grid;
	gap: var(--glock-gap);
}

.glock-events-list--compact {
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 2.5rem;
}

.glock-events-empty {
	padding: 2rem 0;
}

/* --------------------------------------------------------------- Card */

.glock-event-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.9rem;
	text-align: center;
}

/* Übersicht: Flyer links, Angaben rechts und linksbündig – setzt die Liste
   bewusst von der zentrierten Einzelansicht ab. */
.glock-events-list--cards .glock-event-card {
	display: grid;
	grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
	align-items: center;
	gap: 0.55rem 2.75rem;
	text-align: left;
}

.glock-events-list--cards .glock-event-card__media {
	grid-row: 1 / span 5;
	align-self: start;
	max-width: none;
	margin-bottom: 0;
}

.glock-events-list--cards .glock-event-card__meta,
.glock-events-list--cards .glock-event-card__excerpt {
	text-align: left;
}

.glock-events-list--cards .glock-event-card--no-media {
	grid-template-columns: minmax(0, 1fr);
}

.glock-events-list--cards .glock-event-card:not(:last-child) {
	padding-bottom: var(--glock-gap);
	border-bottom: 1px solid var(--glock-line);
}

.glock-event-card__media {
	display: block;
	width: 100%;
	max-width: 420px;
	margin-bottom: 0.6rem;
	overflow: hidden;
	border-radius: var(--glock-radius);
	line-height: 0;
}

.glock-event-card__media img {
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	transition: transform 0.45s ease;
}

.glock-event-card__media:hover img {
	transform: scale(1.02);
}

/* Erbt Schrift, Größe, Laufweite und Farbe vom Elternelement – schlägt
   `.elementor-kit-… a`, das sonst Crimson Text 15px erzwingt. */
.glock-event-card__title.glock-event-card__title a,
.glock-event-card__meta.glock-event-card__meta a,
.glock-events-archive__intro.glock-events-archive__intro a {
	font: inherit;
	color: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	text-decoration: none;
}

.glock-event-card__title.glock-event-card__title a:hover,
.glock-event-card__title.glock-event-card__title a:focus-visible {
	color: var(--glock-accent);
}

.glock-event-card__excerpt {
	max-width: 44rem;
	margin: 0.35rem 0 0;
}

.glock-event-card__more {
	margin: 0.75rem 0 0;
}

/* ------------------------------------------------------- Card kompakt */

.glock-events-list--compact .glock-event-card {
	gap: 0.6rem;
}

.glock-events-list--compact .glock-event-card__media {
	margin-bottom: 0.4rem;
}

.glock-events-list--compact .glock-event-card__media {
	max-width: none;
}

.glock-events-list--compact .glock-event-card__title {
	font-family: var(--glock-font-body);
	font-size: 18px;
	font-weight: 600;
	font-style: italic;
	letter-spacing: 0;
	line-height: 1.45;
	text-transform: none;
}

.glock-event-card--past {
	opacity: 0.85;
}

.glock-event-card--past .glock-event-card__media img {
	filter: saturate(0.5);
}

/* ------------------------------------------------ Vergangene Termine */

.glock-events-past {
	margin-top: 5.5rem;
	padding-top: 3rem;
	border-top: 1px solid var(--glock-line);
}

.glock-events-past__title {
	margin: 0 0 2.5rem;
	text-align: center;
}

/* ------------------------------------------------------------ Button */

.glock-events-button.glock-events-button {
	display: inline-block;
	padding: 0.95em 2.4em;
	border: 1px solid var(--glock-accent);
	border-radius: 0;
	background-color: var(--glock-accent);
	color: var(--glock-headline);
	font-family: var(--glock-font-headline);
	font-size: 11px;
	font-weight: 600;
	font-style: normal;
	letter-spacing: 1.5px;
	line-height: 1.2;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.glock-events-button.glock-events-button:hover,
.glock-events-button.glock-events-button:focus-visible {
	border-color: var(--glock-headline);
	background-color: var(--glock-headline);
	color: #fff;
}

/* ------------------------------------------------------ Einzelansicht */

.glock-event-single__header {
	margin-bottom: 2.5rem;
	text-align: center;
}

.glock-event-single__title {
	margin-bottom: 1.75rem;
}

.glock-event-single__media {
	margin: 0 0 2.5rem;
	text-align: center;
}

.glock-event-single__media img {
	max-width: 100%;
	max-height: 78vh;
	width: auto;
	height: auto;
	border-radius: var(--glock-radius);
}

.glock-event-single__content.glock-event-single__content a {
	font: inherit;
	color: var(--glock-headline);
	text-decoration: underline;
	text-decoration-color: var(--glock-accent);
	text-underline-offset: 0.2em;
}

.glock-event-single__footer {
	margin-top: 3.5rem;
	text-align: center;
}

/* ----------------------------------------------------- Termin-Angaben */

.glock-event-details {
	display: inline-flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1.25rem 3rem;
	padding: 1.1rem 2.25rem;
	border: 1px solid var(--glock-accent);
	border-radius: var(--glock-radius);
	background: transparent;
	text-align: center;
}

.glock-event-details__item {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}

.glock-event-details__value {
	font-size: 16px;
}

/* --------------------------------------------------------------- Mobil */

@media (max-width: 782px) {
	body {
		--glock-gap: 3rem;
	}

	.glock-events-archive,
	.glock-event-single {
		padding: 2.5rem 1.25rem 3.5rem;
	}

	.glock-events-archive__header {
		margin-bottom: 2.5rem;
	}

	.glock-events-list--cards .glock-event-card {
		grid-template-columns: minmax(0, 1fr);
		gap: 0.75rem;
	}

	.glock-events-list--cards .glock-event-card__media {
		grid-row: auto;
		margin-bottom: 0.4rem;
	}

	.glock-event-details {
		display: flex;
		gap: 1.1rem;
		padding: 1.25rem 1.5rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.glock-event-card__media img,
	.glock-events-button {
		transition: none;
	}

	.glock-event-card__media:hover img {
		transform: none;
	}
}
