/* ── CAROUSEL WRAPPER ─────────────────────────────────────────────────────── */

.ql-carousel-wrapper {
	display: flex;
	align-items: center;
	gap: 16px;
	width: 100%;
	position: relative;
}

.ql-carousel {
	flex: 1;
	overflow: hidden;
	min-width: 0;
	/* Horizontale Wischgesten landen beim Karussell, vertikales Scrollen bleibt nativ */
	touch-action: pan-y;
}

.ql-track {
	display: flex;
	gap: 16px;
	transition: transform 0.45s ease;
	will-change: transform;
}

/* ── CARDS ────────────────────────────────────────────────────────────────── */

.ql-card {
	flex-shrink: 0;
	box-sizing: border-box;
	padding: 40px 32px;
	border: 2px solid #111;
	display: flex;
	flex-direction: column;
	gap: 16px;
	/* width is set by JS per visible card count */
}

.ql-card--round  { border-radius: 40px; }
.ql-card--square { border-radius: 0; }

/* ── CARD TITLE ───────────────────────────────────────────────────────────── */

.ql-card__title {
	font-size: 1.4rem;
	font-weight: 300;
	text-transform: uppercase;
	line-height: 1.2;
	margin: 0;
}

/* Markiertes Wort – Border als Pseudo-Element */
.ql-card__title .ql-marked {
	display: inline-block;
	position: relative;
	padding: 0.05em 0.35em;
}

.ql-card__title .ql-marked::after {
	content: '';
	position: absolute;
	inset: 0;
	border: 1px solid currentColor;
	pointer-events: none;
}

/* Automatisch entgegengesetzte Form: runde Karte → eckige Umrandung */
.ql-card--round  .ql-card__title .ql-marked::after { border-radius: 0; }
/* Eckige Karte → runde Umrandung */
.ql-card--square .ql-card__title .ql-marked::after { border-radius: 50em; }

/* ── TEASER ───────────────────────────────────────────────────────────────── */

.ql-card__teaser {
	font-size: 0.9rem;
	line-height: 1.6;
	margin: 0;
	flex: 1;
}

/* ── MEHR-BUTTON ──────────────────────────────────────────────────────────── */

.ql-mehr-btn {
	display: inline-block;
	background: none;
	border: 1px solid #111;
	color: #111;
	padding: 4px 16px;
	border-radius: 50em;
	font-size: 0.8rem;
	font-family: inherit;
	cursor: pointer;
	align-self: flex-start;
	transition: background 0.2s, color 0.2s;
}

.ql-mehr-btn:hover,
.ql-mehr-btn:focus-visible {
	background: #111;
	color: #fff;
	outline: none;
}

/* ── ARROW BUTTONS ────────────────────────────────────────────────────────── */

/* Selektor + !important überschreiben Astras Button-Defaults */
.ql-carousel-wrapper button.ql-arrow {
	background: var(--ast-global-color-0, #ffff00) !important; /* QUOI-Gelb aus der Theme-Palette */
	border: none !important;
	border-radius: 0 !important; /* eckig */
	box-shadow: none !important;
	padding: 0 !important;
	width: 44px;
	height: 44px;
	box-sizing: border-box;
	cursor: pointer;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #111 !important; /* steuert den currentColor-Stroke des Pfeil-SVG → schwarz */
	transition: background 0.2s, transform 0.2s;
}

.ql-carousel-wrapper button.ql-arrow:hover,
.ql-carousel-wrapper button.ql-arrow:focus-visible {
	
	color: #111 !important;
	transform: scale(1.08);
	outline: none;
}

/* Pfeil-Strich explizit schwarz – falls Astra die color erbt/überschreibt */
.ql-carousel-wrapper .ql-arrow svg {
	stroke: #111;
}

/* ── LIGHTBOX OVERLAY ─────────────────────────────────────────────────────── */

.ql-lightbox-overlay {
	position: fixed;
	inset: 0;
	background: var(--quoi-lb-overlay-bg, rgba(0, 0, 0, 0.85));
	backdrop-filter: blur(var(--quoi-lb-blur, 0px));
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	/* Transition-Trick: visibility verzögert ausblenden (nach opacity) */
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.3s ease, visibility 0s 0.3s;
}

.ql-lightbox-overlay.ql-lightbox--open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transition: opacity 0.3s ease;
}

/* ── LIGHTBOX MODAL ───────────────────────────────────────────────────────── */

.ql-lightbox-modal {
	background: #fff;
	color: #111; /* feste Farbe – sonst erbt der Text im Dark Mode Weiß vom Theme */
	width: 400px;
	max-width: 90vw;
	max-height: 85vh;
	overflow-y: auto;
	padding: 48px 40px 40px;
	position: relative;
	transform: scale(0.95);
	transition: transform 0.3s ease;
}

.ql-lightbox--open .ql-lightbox-modal {
	transform: scale(1);
}

.ql-lightbox-close {
	position: absolute;
	top: 14px;
	right: 18px;
	background: #ffff00;
	color: #111;
	border: none;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
	opacity: 0.5;
	transition: opacity 0.2s;
	padding: 4px;
}

.ql-lightbox-close:hover,
.ql-lightbox-close:focus-visible {
	opacity: 1;
	outline: none;
}

.ql-lightbox-body {
	font-size: 1rem;
	line-height: 1.7;
}

/* Astra färbt Überschriften, Absätze und Listen im Dark Mode direkt ein –
   im weißen Modal alles auf die Modal-Farbe zurücksetzen. */
.ql-lightbox-body :is(h1, h2, h3, h4, h5, h6, p, li, span, strong, em, b, i, blockquote, figcaption) {
	color: inherit !important;
}

/* ── HIDDEN LIGHTBOX DATA ─────────────────────────────────────────────────── */

.ql-lightbox-data { display: none; }

/* ── MOBILE ───────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
	/* Pfeile unter das Karussell – die Karte bekommt die volle Breite,
	   geblättert wird primär per Wischen. */
	.ql-carousel-wrapper {
		flex-wrap: wrap;
		gap: 12px;
	}

	.ql-carousel {
		flex: 1 1 100%;
		order: -1;
	}

	.ql-carousel-wrapper button.ql-arrow {
		width: 40px;
		height: 40px;
	}

	.ql-card {
		padding: 28px 22px;
	}

	.ql-card--round {
		border-radius: 32px;
	}

	.ql-lightbox-modal {
		box-sizing: border-box; /* Innenabstand zählt mit – sonst ragt das Modal über den Rand */
		width: auto;
		max-width: calc(100vw - 32px);
		max-height: 85dvh;
		padding: 44px 22px 28px;
	}

	.ql-lightbox-close {
		/* Mindestens 44px Tippfläche */
		min-width: 44px;
		min-height: 44px;
		padding: 0;
		top: 6px;
		right: 6px;
		opacity: 0.8;
	}
}
