/* GesprächsRaum „Bekannt aus“ – Farben/Schriften aus dem Elementor-Kit (mit Fallbacks) */

.gr-ba {
	--gr-green: var(--e-global-color-primary, #798F38);
	--gr-brown: var(--e-global-color-secondary, #8D6E43);
	--gr-text: var(--e-global-color-text, #3A3A3A);
	--gr-sand: var(--e-global-color-accent, #D9C5B2);
	--gr-cream: #FDFAF5;

	--gr-font-head: "Quicksand", system-ui, sans-serif;
	--gr-font-body: "Manrope", system-ui, sans-serif;

	/* Ticket */
	--gr-ba-gap: 22px;
	--gr-ba-cut: 78px;     /* Position der Perforation (= Breite des Symbol-Teils) */
	--gr-ba-notch: 10px;   /* Radius der Einkerbungen */
	--gr-ba-h: 96px;

	/* Variante „hell“ */
	--gr-ba-bg: #ffffff;
	--gr-ba-stub: rgba(121, 143, 56, 0.16);
	--gr-ba-icon: var(--gr-green);
	--gr-ba-name: var(--gr-brown);
	--gr-ba-meta: var(--gr-text);
	--gr-ba-pill-bg: rgba(121, 143, 56, 0.12);
	--gr-ba-pill: var(--gr-green);
	--gr-ba-perf: rgba(141, 110, 67, 0.28);
	--gr-ba-shadow: drop-shadow(0 8px 16px rgba(58, 58, 58, 0.12));
	--gr-ba-head: var(--gr-green);

	position: relative;
	font-family: var(--gr-font-body);
	color: var(--gr-text);
}

.gr-ba--glas {
	--gr-ba-bg: rgba(255, 255, 255, 0.14);
	--gr-ba-stub: rgba(255, 255, 255, 0.10);
	--gr-ba-icon: var(--gr-sand);
	--gr-ba-name: #ffffff;
	--gr-ba-meta: rgba(255, 255, 255, 0.85);
	--gr-ba-pill-bg: rgba(255, 255, 255, 0.16);
	--gr-ba-pill: #ffffff;
	--gr-ba-perf: rgba(255, 255, 255, 0.35);
	--gr-ba-shadow: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.18));
	--gr-ba-head: #ffffff;
	color: #ffffff;
}

/* ---------- Überschrift ---------- */

.gr-ba__head {
	max-width: 760px;
	margin: 0 auto 40px;
	padding: 0 20px;
	text-align: center;
}

.gr-ba__title {
	margin: 0 0 12px;
	font-family: var(--gr-font-head);
	font-weight: 600;
	font-size: clamp(30px, 4vw, 46px);
	line-height: 1.2;
	color: var(--gr-ba-head);
}

.gr-ba__subtitle {
	margin: 0;
	font-size: 18px;
	line-height: 1.6;
}

/* ---------- Laufband ---------- */

.gr-ba__stage {
	display: flex;
	flex-direction: column;
	gap: var(--gr-ba-gap);
}

.gr-ba__row {
	overflow: hidden;
	padding: 12px 0 24px; /* Platz für den Schatten */
	-webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
	mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
}

.gr-ba__track {
	display: flex;
	width: max-content;
	animation: gr-ba-move var(--gr-ba-duration, 40s) linear infinite;
	will-change: transform;
}

.gr-ba__row--rechts .gr-ba__track {
	animation-direction: reverse;
}

@keyframes gr-ba-move {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); }
}

.gr-ba--hover-pause .gr-ba__stage:hover .gr-ba__track,
.gr-ba__stage:focus-within .gr-ba__track,
.gr-ba.is-offscreen .gr-ba__track {
	animation-play-state: paused;
}

.gr-ba__group {
	display: flex;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gr-ba__item {
	flex: none;
	margin: 0 var(--gr-ba-gap) 0 0;
	padding: 0;
	filter: var(--gr-ba-shadow);
}

/* Touch-Geräte: Slider Karte für Karte, jede Karte rastet mittig ein */
.gr-ba--touch .gr-ba__row {
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-webkit-mask-image: none;
	mask-image: none;
}

.gr-ba--touch .gr-ba__row::-webkit-scrollbar {
	display: none;
}

.gr-ba--touch .gr-ba__track {
	animation: none;
	will-change: auto;
}

.gr-ba--touch .gr-ba__item {
	scroll-snap-align: center;
	scroll-snap-stop: always; /* beim Wischen immer nur eine Karte weiter */
	max-width: calc(100vw - 48px);
}

.gr-ba--touch .gr-ba__ticket {
	max-width: 100%;
}

.gr-ba--touch .gr-ba__meta,
.gr-ba--touch .gr-ba__zusatz {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ---------- Ticket ---------- */

.gr-ba__ticket {
	display: flex;
	align-items: stretch;
	box-sizing: border-box;
	height: var(--gr-ba-h); /* alle Karten gleich hoch – mit und ohne Logo */
	background: var(--gr-ba-bg);
	border-radius: 18px;
	color: inherit;
	text-decoration: none;
	/* Zwei halbe Einkerbungen oben/unten an der Perforation */
	-webkit-mask:
		radial-gradient(circle var(--gr-ba-notch) at var(--gr-ba-cut) 0, transparent 98%, #000 100%) top / 100% 51% no-repeat,
		radial-gradient(circle var(--gr-ba-notch) at var(--gr-ba-cut) 100%, transparent 98%, #000 100%) bottom / 100% 51% no-repeat;
	mask:
		radial-gradient(circle var(--gr-ba-notch) at var(--gr-ba-cut) 0, transparent 98%, #000 100%) top / 100% 51% no-repeat,
		radial-gradient(circle var(--gr-ba-notch) at var(--gr-ba-cut) 100%, transparent 98%, #000 100%) bottom / 100% 51% no-repeat;
	transition: transform 0.3s ease;
}

/* Theme-Linkstile (Unterstreichung) neutralisieren */
.gr-ba a.gr-ba__ticket,
.gr-ba a.gr-ba__ticket:hover,
.gr-ba a.gr-ba__ticket:focus,
.gr-ba a.gr-ba__ticket * {
	text-decoration: none !important;
	box-shadow: none;
}

a.gr-ba__ticket:hover,
a.gr-ba__ticket:focus-visible {
	transform: translateY(-4px);
}

a.gr-ba__ticket:focus-visible {
	outline: 2px solid var(--gr-green);
	outline-offset: 4px;
}

.gr-ba__icon {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--gr-ba-cut);
	background: var(--gr-ba-stub);
	color: var(--gr-ba-icon);
}

.gr-ba__icon svg {
	width: 32px;
	height: 32px;
}

.gr-ba__body {
	box-sizing: border-box;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 8px;
	padding: 16px 28px 16px 26px;
	border-left: 2px dashed var(--gr-ba-perf);
}

.gr-ba__ticket--ohne-icon {
	-webkit-mask: none;
	mask: none;
}

.gr-ba__ticket--ohne-icon .gr-ba__body {
	border-left: 0;
}

.gr-ba__name {
	font-family: var(--gr-font-head);
	font-weight: 700;
	font-size: 23px;
	line-height: 1.2;
	letter-spacing: 0.01em;
	white-space: nowrap;
	color: var(--gr-ba-name);
}

/* Spezifisch + !important, damit Theme-/Elementor-Regeln (img { height: auto }) die Höhe nicht aufblähen */
.gr-ba .gr-ba__logo {
	display: block;
	flex: 0 1 auto;
	height: 64px !important;
	max-height: 100% !important;
	width: auto !important;
	max-width: 220px !important;
	min-height: 0;
	object-fit: contain;
}

.gr-ba__ticket--logo .gr-ba__body {
	align-items: center;
	min-width: 190px;
	padding-top: 14px;
	padding-bottom: 14px;
}

/* Milchglas: Logos auf heller Fläche, damit ihre Originalfarben wirken */
.gr-ba--glas .gr-ba__ticket--logo .gr-ba__body {
	background: rgba(253, 250, 245, 0.94);
	--gr-ba-meta: var(--gr-text);
	--gr-ba-pill: var(--gr-green);
	--gr-ba-pill-bg: rgba(121, 143, 56, 0.12);
}

.gr-ba__meta {
	display: flex;
	align-items: center;
	gap: 10px;
	white-space: nowrap;
}

.gr-ba__zusatz {
	font-size: 14px;
	line-height: 1.4;
	color: var(--gr-ba-meta);
}

.gr-ba__jahr {
	padding: 2px 10px;
	border-radius: 999px;
	background: var(--gr-ba-pill-bg);
	font-family: var(--gr-font-head);
	font-weight: 700;
	font-size: 13px;
	line-height: 1.5;
	color: var(--gr-ba-pill);
}

/* ---------- Smartphone ---------- */

@media (max-width: 767px) {
	.gr-ba {
		--gr-ba-gap: 14px;
		--gr-ba-cut: 50px;  /* schmalerer Symbol-Streifen, mehr Platz fürs Logo */
		--gr-ba-h: 96px;    /* gleiche Höhe wie Desktop, damit Logos lesbar bleiben */
		--gr-ba-notch: 8px;
	}

	.gr-ba__subtitle {
		font-size: 16px;
	}

	.gr-ba__icon svg {
		width: 24px;
		height: 24px;
	}

	.gr-ba__body {
		padding: 14px 22px 14px 20px;
	}

	.gr-ba__name {
		font-size: 20px;
	}

	.gr-ba__ticket--logo .gr-ba__body {
		min-width: 0;
		padding: 8px 18px 8px 16px;
	}

	.gr-ba .gr-ba__logo {
		height: 80px !important;
		max-width: 170px !important;
	}
}

/* ---------- Bewegung reduzieren: statisch, umbrechend ---------- */

@media (prefers-reduced-motion: reduce) {
	.gr-ba__row {
		-webkit-mask-image: none;
		mask-image: none;
	}

	.gr-ba__track {
		width: auto;
		animation: none;
		justify-content: center;
	}

	.gr-ba__group {
		flex-wrap: wrap;
		justify-content: center;
		gap: var(--gr-ba-gap);
	}

	.gr-ba__item {
		margin: 0;
	}

	.gr-ba__group[aria-hidden="true"],
	.gr-ba__row[aria-hidden="true"],
	.gr-ba__item[data-clone] {
		display: none;
	}
}
