/*
 * Events — Zeitleiste, Einzelansicht und Startseiten-Slider.
 * Eigene Klassen, keine Hestia-Klassen überschrieben; ein Theme-Update fasst
 * hier nichts an.
 */

.ghm-events,
.ghm-slider {
	--ghm-honig: #b8860b;
	--ghm-honig-hell: #f3e7c8;
	--ghm-linie: rgba(0, 0, 0, .1);
	--ghm-grau: #6b6b6b;
}

/* ------------------------------------------------------------------ *
 * Zeitleiste
 * ------------------------------------------------------------------ */

.ghm-events {
	list-style: none;
	margin: 0 0 2.5rem;
	padding: 0;
}

.ghm-event {
	position: relative;
	display: flex;
	gap: 1.5rem;
	align-items: flex-start;
	padding: 0 0 2.25rem;
}

/* Verbindungslinie: läuft hinter dem Kalenderblatt durch, endet am letzten. */
.ghm-event::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 31px;
	width: 2px;
	background: var(--ghm-linie);
}

.ghm-event:last-child::before {
	bottom: auto;
	height: 34px;
}

.ghm-event:first-child::before {
	top: 34px;
}

.ghm-event:first-child:last-child::before {
	display: none;
}

/* --- Kalenderblatt --- */

.ghm-event__badge {
	position: relative;
	z-index: 1;
	flex: 0 0 64px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 64px;
	min-height: 64px;
	padding: .45rem 0 .5rem;
	background: #fff;
	border: 2px solid var(--ghm-linie);
	border-radius: 10px;
	line-height: 1.1;
}

.ghm-event__day {
	font-size: 28px;
	font-weight: 700;
	color: #222;
}

.ghm-event__month {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--ghm-grau);
}

.ghm-event__year {
	margin-top: .1rem;
	font-size: 11px;
	letter-spacing: .06em;
	color: var(--ghm-grau);
}

.ghm-event--next .ghm-event__badge {
	background: var(--ghm-honig);
	border-color: var(--ghm-honig);
	box-shadow: 0 6px 18px rgba(184, 134, 11, .3);
}

.ghm-event--next .ghm-event__day,
.ghm-event--next .ghm-event__month,
.ghm-event--next .ghm-event__year {
	color: #fff;
}

.ghm-events--past .ghm-event__badge {
	background: #fafafa;
}

/* --- Textspalte --- */

.ghm-event__body {
	flex: 1 1 auto;
	min-width: 0;
	padding-top: .15rem;
}

.ghm-event__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: .5rem .75rem;
}

.ghm-event__title {
	margin: 0;
	font-size: 24px;
	line-height: 1.25;
}

.ghm-event__title a {
	color: inherit;
	text-decoration: none;
}

.ghm-event__title a:hover,
.ghm-event__title a:focus {
	color: var(--ghm-honig);
}

.ghm-event__countdown {
	flex: 0 0 auto;
	padding: .18rem .6rem;
	background: var(--ghm-honig-hell);
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .03em;
	text-transform: uppercase;
	color: #7a5807;
	white-space: nowrap;
}

.ghm-event__detail {
	margin: .3rem 0 0;
	font-size: 16px;
	color: #5c5c5c;
}

.ghm-event__ort {
	margin: .2rem 0 0;
	font-size: 16px;
	color: var(--ghm-grau);
}

.ghm-event__ort a {
	color: inherit;
	text-decoration: none;
	border-bottom: 1px dotted currentColor;
}

.ghm-event__ort a:hover,
.ghm-event__ort a:focus {
	color: var(--ghm-honig);
}

.ghm-pin {
	margin-right: .3rem;
	vertical-align: -2px;
	opacity: .75;
}

/* --- Bild und Anriss --- */

.ghm-event__media {
	display: flex;
	gap: 1.25rem;
	align-items: flex-start;
	margin-top: .9rem;
}

.ghm-event__thumb {
	flex: 0 0 240px;
	line-height: 0;
	border-radius: 8px;
	overflow: hidden;
}

.ghm-event__thumb img {
	display: block;
	width: 100%;
	height: 150px;
	object-fit: cover;
	transition: transform .35s ease;
}

.ghm-event__thumb:hover img,
.ghm-event__thumb:focus img {
	transform: scale(1.04);
}

.ghm-event__text {
	flex: 1 1 auto;
	min-width: 0;
}

.ghm-event__excerpt {
	margin: 0 0 .4rem;
}

.ghm-event__more {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
}

.ghm-events__year {
	margin: 2.5rem 0 1.25rem;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: .12em;
	color: #9a9a9a;
}

.ghm-events__year:first-child {
	margin-top: 0;
}

.ghm-events__empty {
	margin: 1rem 0 2rem;
	color: #6b6b6b;
}

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

.ghm-single__hero {
	position: relative;
	margin: 0 0 2.5rem;
	border-radius: 12px;
	overflow: hidden;
	line-height: 0;
	background: #f0ece2;
	aspect-ratio: 16 / 9;
	box-shadow: 0 6px 24px rgba(0, 0, 0, .13);
}

.ghm-single__hero img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ghm-single__hero .ghm-event__badge {
	position: absolute;
	left: 1.25rem;
	bottom: 1.25rem;
	flex: none;
	width: 76px;
	min-height: 76px;
	border-color: #fff;
	box-shadow: 0 4px 16px rgba(0, 0, 0, .28);
}

.ghm-single__hero .ghm-event__day {
	font-size: 32px;
}

.ghm-single__countdown {
	position: absolute;
	top: 1rem;
	right: 1rem;
	padding: .3rem .85rem;
	background: #b8860b;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .04em;
	line-height: 1.5;
	text-transform: uppercase;
	color: #fff;
}

/* --- Termin- und Ortskarte --- */

.ghm-single__facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 1rem;
	margin: 0 0 1.5rem;
}

.ghm-fact {
	display: flex;
	gap: .85rem;
	align-items: flex-start;
	padding: 1.1rem 1.25rem;
	background: #faf6ec;
	border: 1px solid #ecdfc2;
	border-radius: 10px;
	color: inherit;
	text-decoration: none;
}

.ghm-fact .ghm-icon {
	flex: 0 0 auto;
	margin-top: .15rem;
	color: #b8860b;
}

.ghm-fact__body {
	display: block;
	min-width: 0;
}

.ghm-fact__label {
	display: block;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: #9a7c2e;
}

.ghm-fact__value {
	display: block;
	margin-top: .15rem;
	font-weight: 600;
	line-height: 1.35;
}

.ghm-fact__meta {
	display: block;
	margin-top: .1rem;
	font-size: 15px;
	color: #6b6b6b;
}

.ghm-fact__action {
	display: block;
	margin-top: .35rem;
	font-size: 15px;
	font-weight: 600;
	color: #b8860b;
}

a.ghm-fact--link:hover,
a.ghm-fact--link:focus {
	background: #f5eeda;
	border-color: #d9c48f;
	color: inherit;
	text-decoration: none;
}

/* --- Aktionsknöpfe --- */

.ghm-single__actions {
	display: flex;
	flex-wrap: wrap;
	gap: .65rem;
	margin: 0 0 2.25rem;
}

.ghm-btn {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	padding: .6rem 1.1rem;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, .15);
	border-radius: 999px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	color: #333;
	text-decoration: none;
	transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.ghm-btn:hover,
.ghm-btn:focus {
	background: #faf6ec;
	border-color: #d9c48f;
	color: #8a6408;
	text-decoration: none;
}

.ghm-btn--primary {
	background: #b8860b;
	border-color: #b8860b;
	color: #fff;
}

.ghm-btn--primary:hover,
.ghm-btn--primary:focus {
	background: #9c710a;
	border-color: #9c710a;
	color: #fff;
}

.ghm-btn__meta {
	font-weight: 400;
	opacity: .8;
}

.ghm-btn .ghm-icon {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
}

/* --- Flyer als Bild --- */

.ghm-event-flyer {
	margin: 2rem 0;
}

.ghm-event-flyer--bild img {
	max-width: 100%;
	height: auto;
	border-radius: 10px;
	box-shadow: 0 4px 18px rgba(0, 0, 0, .12);
}

.ghm-event-flyer figcaption {
	margin-top: .5rem;
	font-size: 15px;
	color: #6b6b6b;
}

/* --- Produkte --- */

.ghm-event-produkte {
	display: flex;
	gap: .75rem;
	align-items: flex-start;
	margin: 2rem 0 0;
	padding: 1rem 1.25rem;
	background: #f7f7f5;
	border-radius: 10px;
}

.ghm-event-produkte .ghm-icon {
	flex: 0 0 auto;
	margin-top: .2rem;
	color: #b8860b;
}

.ghm-event-zurueck {
	margin: 2rem 0 0;
	font-size: 16px;
	font-weight: 600;
}

.ghm-event-zurueck a {
	display: inline-flex;
	align-items: center;
	gap: .3rem;
}

.ghm-event-zurueck .ghm-icon {
	width: 18px;
	height: 18px;
}

/* Hestia setzt auf Einzelseiten eine Kategorien-Zeile; Events haben keine. */
.single-ghm_event .entry-categories {
	display: none;
}

/* ------------------------------------------------------------------ *
 * Startseiten-Sektion
 * ------------------------------------------------------------------ */

.ghm-events-section {
	padding: 4.5rem 0 5rem;
	background: #fff;
}

.ghm-events-section .hestia-title {
	margin-bottom: .5rem;
}

.ghm-events-section .description {
	margin-bottom: 2.25rem;
	color: #6b6b6b;
}

.ghm-events-section__more {
	margin: 2rem 0 0;
	text-align: center;
}

/* --- Slider: Scrollen macht CSS, das Skript nur die Pfeile --- */

.ghm-slider {
	position: relative;
}

.ghm-slider__track {
	display: flex;
	gap: 1.5rem;
	margin: 0;
	padding: .5rem .25rem 1.5rem;
	list-style: none;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.ghm-slider__track::-webkit-scrollbar {
	display: none;
}

.ghm-slide {
	flex: 0 0 calc((100% - 3rem) / 3);
	scroll-snap-align: start;
}

.ghm-slide__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 3px 14px rgba(0, 0, 0, .1);
	overflow: hidden;
	color: inherit;
	text-decoration: none;
	transition: transform .25s ease, box-shadow .25s ease;
}

.ghm-slide__link:hover,
.ghm-slide__link:focus {
	transform: translateY(-4px);
	box-shadow: 0 10px 26px rgba(0, 0, 0, .16);
	color: inherit;
	text-decoration: none;
}

.ghm-slide__media {
	position: relative;
	display: block;
	line-height: 0;
	background: #f0ece2;
	aspect-ratio: 16 / 9;
	overflow: hidden;
}

/*
 * Absolut statt im Fluss: ein Bild mit height:100% in einem Elternteil ohne
 * feste Höhe ist zirkulär, der Browser fällt dann auf die Eigenhöhe zurück und
 * die Karten werden unterschiedlich hoch.
 */
.ghm-slide__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Das Kalenderblatt sitzt über dem Bild, deshalb hier absolut statt im Fluss. */
.ghm-slide__media .ghm-event__badge {
	position: absolute;
	left: 1rem;
	bottom: -20px;
	flex: none;
	border-color: #fff;
	box-shadow: 0 3px 10px rgba(0, 0, 0, .18);
}

.ghm-slide__body {
	display: block;
	padding: 2rem 1.25rem 1.35rem;
}

.ghm-slide__title {
	display: block;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
}

.ghm-slide__ort,
.ghm-slide__detail {
	display: block;
	margin-top: .35rem;
	font-size: 15px;
	color: #5c5c5c;
}

.ghm-slider__nav {
	position: absolute;
	top: calc(50% - 2rem);
	z-index: 2;
	width: 42px;
	height: 42px;
	padding: 0;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, .12);
	border-radius: 50%;
	box-shadow: 0 3px 12px rgba(0, 0, 0, .15);
	font-size: 28px;
	line-height: 1;
	color: #333;
	cursor: pointer;
}

.ghm-slider__nav:hover {
	background: #b8860b;
	border-color: #b8860b;
	color: #fff;
}

.ghm-slider__nav[hidden] {
	display: none;
}

.ghm-slider__nav--prev {
	left: -21px;
}

.ghm-slider__nav--next {
	right: -21px;
}

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

@media (max-width: 991px) {
	.ghm-slide {
		flex-basis: calc((100% - 1.5rem) / 2);
	}

	.ghm-slider__nav {
		display: none;
	}
}

@media (max-width: 600px) {
	.ghm-event {
		gap: 1rem;
		padding-bottom: 1.75rem;
	}

	.ghm-event::before {
		left: 25px;
	}

	.ghm-event__badge {
		flex-basis: 52px;
		width: 52px;
		min-height: 52px;
	}

	.ghm-event:last-child::before {
		height: 28px;
	}

	.ghm-event:first-child::before {
		top: 28px;
	}

	.ghm-event__day {
		font-size: 24px;
	}

	.ghm-event__title {
		font-size: 20px;
	}

	/* Bild über den Text, sonst bleibt für beides zu wenig Breite. */
	.ghm-event__media {
		flex-direction: column;
		gap: .75rem;
	}

	.ghm-event__thumb {
		flex-basis: auto;
		width: 100%;
	}

	.ghm-event__thumb img {
		height: 170px;
	}

	.ghm-single__hero .ghm-event__badge {
		left: .85rem;
		bottom: .85rem;
		width: 60px;
		min-height: 60px;
	}

	.ghm-single__hero .ghm-event__day {
		font-size: 26px;
	}

	.ghm-btn {
		width: 100%;
		justify-content: center;
	}

	.ghm-events-section {
		padding: 3rem 0 3.5rem;
	}

	/* Angeschnittene Nachbarkarte signalisiert, dass man wischen kann. */
	.ghm-slide {
		flex-basis: 82%;
	}
}
