/* Quartier Filter – Frontend-Styles
   Prefix: qf-  |  angelehnt an Hello Elementor (systemnahe Serifen für Titel). */

.qf-root {
	--qf-ink: #1a1a1a;
	--qf-muted: #7a7a7a;
	--qf-line: #e7e4dc;
	--qf-bg-soft: #faf8f3;
	--qf-radius: 999px;
	color: var(--qf-ink);
	font-family: inherit;
}

.qf-root * {
	box-sizing: border-box;
}

/* --- Filterleiste --------------------------------------------------------- */
.qf-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
	gap: 10px 14px;
	padding: 16px 0 18px;
	border-bottom: 1px solid var(--qf-line);
	margin-bottom: 28px;
	/* Sticky: bleibt beim Scrollen oben. --qf-sticky-top ggf. auf die Höhe
	   eines fixen Theme-Headers setzen (z. B. style="--qf-sticky-top:80px"). */
	position: sticky;
	top: var(--qf-sticky-top, 0px);
	z-index: 20;
	background: var(--qf-bar-bg, #fff);
}

.qf-types,
.qf-quartiere {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.qf-quartiere {
	display: inline-flex;
	align-items: center;
}

.qf-root .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
	border: 0;
	padding: 0;
	margin: -1px;
}

/* Quartier-Dropdown */
.qf-quartier-select {
	appearance: none;
	-webkit-appearance: none;
	background-color: #fff;
	color: var(--qf-ink);
	border: 1px solid var(--qf-line);
	border-radius: var(--qf-radius);
	padding: 9px 40px 9px 18px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	max-width: 260px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23333' d='M6 8 0 2l1.4-1.4L6 5.2 10.6.6 12 2z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.qf-quartier-select:hover {
	border-color: #cfcabd;
}

/* Gewähltes Quartier: weisse Pille, Rand + Schrift in Quartierfarbe. */
.qf-quartier-select[data-colored] {
	background-color: #fff;
	color: var(--qf-sel-bg);
	border-color: var(--qf-sel-bg);
	font-weight: 600;
}

.qf-type {
	appearance: none;
	border: 1px solid var(--qf-line);
	background: #fff;
	color: var(--qf-ink);
	border-radius: var(--qf-radius);
	padding: 9px 18px;
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
	line-height: 1.2;
}

.qf-type:hover {
	border-color: #cfcabd;
}

.qf-type.is-active {
	background: #111;
	color: #fff;
	border-color: #111;
}

/* --- Ladezustand ---------------------------------------------------------- */
.qf-root.is-loading .qf-results {
	opacity: 0.45;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

/* --- Hero ----------------------------------------------------------------- */
.qf-hero {
	display: grid;
	grid-template-columns: minmax(0, 48%) 1fr;
	gap: 36px;
	align-items: start;
	padding-bottom: 34px;
	margin-bottom: 30px;
	border-bottom: 1px solid var(--qf-line);
}

.qf-hero-media {
	display: block;
	border-radius: 14px;
	overflow: hidden;
	background: var(--qf-bg-soft);
	aspect-ratio: 4 / 3;
}

/* Höhere Spezifität, damit Theme-Regeln (z. B. img { height:auto }) den
   Zuschnitt nicht aushebeln – gilt auch für hochformatige Event-Plakate. */
.qf-root .qf-hero-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
	max-width: none;
}

.qf-hero-body {
	padding-top: 6px;
}

.qf-hero-title {
	font-size: clamp(28px, 3vw, 40px);
	line-height: 1.12;
	font-weight: 800;
	margin: 12px 0 14px;
}

.qf-hero-title a,
.qf-row-title a {
	color: inherit;
	text-decoration: none;
}

.qf-hero-title a:hover,
.qf-row-title a:hover {
	text-decoration: underline;
}

.qf-hero-excerpt {
	color: #3a3a3a;
	font-size: 17px;
	line-height: 1.5;
	margin-bottom: 18px;
}

.qf-hero-excerpt p {
	margin: 0 0 0.6em;
}

.qf-more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 700;
	text-decoration: none;
	color: var(--qf-ink);
	border-bottom: 2px solid currentColor;
	padding-bottom: 2px;
}

.qf-more:hover {
	opacity: 0.7;
}

/* --- Meta / Badges -------------------------------------------------------- */
.qf-meta,
.qf-row-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
}

.qf-badge {
	display: inline-block;
	border-radius: var(--qf-radius);
	padding: 4px 12px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
}

.qf-date {
	color: var(--qf-muted);
	font-size: 14px;
	font-variant-numeric: tabular-nums;
}

.qf-time {
	color: var(--qf-muted);
	font-size: 14px;
	font-variant-numeric: tabular-nums;
}

.qf-venue {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--qf-muted);
	font-size: 13px;
	font-weight: 600;
}

.qf-venue .qf-pin {
	flex: none;
	opacity: 0.8;
}

/* Zusatz-Taxonomien (Themen, Quellen) als Pills */
.qf-tax-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 10px 0 0;
}

.qf-hero-body .qf-tax-pills {
	margin: 0 0 16px;
}

.qf-tax-pill {
	display: inline-block;
	border: 1px solid var(--qf-line);
	background: #fff;
	color: #555;
	border-radius: var(--qf-radius);
	padding: 3px 11px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
}

.qf-tax-pill--quellen {
	color: #7a5c00;
	border-color: #e7d9a8;
	background: #fffaf0;
}

.qf-quartier-pill {
	font-weight: 700;
	border-color: transparent;
}

/* --- Listenzeile ---------------------------------------------------------- */
.qf-row {
	display: grid;
	grid-template-columns: 180px 1fr 200px;
	gap: 28px;
	align-items: center;
	padding: 22px 0;
	border-bottom: 1px solid var(--qf-line);
}

.qf-row-meta {
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
}

.qf-row-main {
	min-width: 0;
}

.qf-row-title {
	font-size: clamp(19px, 1.6vw, 23px);
	line-height: 1.2;
	font-weight: 800;
	margin: 0;
}

.qf-row-media {
	display: block;
	border-radius: 10px;
	overflow: hidden;
	background: var(--qf-bg-soft);
	aspect-ratio: 16 / 9;
}

.qf-root .qf-row-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
	max-width: none;
}

.qf-row-media:empty {
	display: none;
}

/* --- Mehr laden / Leerzustand -------------------------------------------- */
.qf-loadmore-wrap {
	text-align: center;
	padding: 30px 0 6px;
}

.qf-loadmore {
	appearance: none;
	border: 1px solid var(--qf-ink);
	background: #fff;
	color: var(--qf-ink);
	border-radius: var(--qf-radius);
	padding: 12px 28px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.qf-loadmore:hover {
	background: #111;
	color: #fff;
}

.qf-loadmore[disabled] {
	opacity: 0.5;
	cursor: default;
}

.qf-empty {
	padding: 40px 0;
	color: var(--qf-muted);
	font-size: 17px;
	text-align: center;
}

/* --- Design 2: Karten-Grid ----------------------------------------------- */
.qf-results.qf-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 36px 30px;
	align-items: start;
}

.qf-results.qf-grid .qf-empty {
	grid-column: 1 / -1;
}

.qf-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.qf-card-media {
	display: block;
	aspect-ratio: 16 / 9;
	border-radius: 14px;
	overflow: hidden;
	background: var(--qf-bg-soft);
}

.qf-root .qf-card-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
	max-width: none;
}

.qf-card-body {
	padding-top: 14px;
}

.qf-card-pills {
	margin: 0 0 10px;
}

.qf-card-meta {
	margin: 0 0 8px;
}

.qf-card-title {
	font-size: clamp(19px, 1.5vw, 23px);
	line-height: 1.2;
	font-weight: 800;
	margin: 0;
}

.qf-card-title a {
	color: inherit;
	text-decoration: none;
}

.qf-card-title a:hover {
	text-decoration: underline;
}

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 980px) {
	.qf-results.qf-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.qf-results.qf-grid {
		grid-template-columns: 1fr;
	}
}

/* --- Responsive (Design 1) ----------------------------------------------- */
@media (max-width: 900px) {
	.qf-hero {
		grid-template-columns: 1fr;
		gap: 18px;
	}

	.qf-row {
		grid-template-columns: 1fr 130px;
		grid-template-areas:
			"meta media"
			"title title";
		gap: 14px 18px;
	}

	.qf-row-meta {
		grid-area: meta;
		flex-direction: row;
	}

	.qf-row-media {
		grid-area: media;
	}

	.qf-row-main {
		grid-area: title;
	}
}

@media (max-width: 640px) {
	.qf-quartiere {
		margin-left: 0;
		width: 100%;
	}

	.qf-row {
		grid-template-columns: 1fr;
		grid-template-areas:
			"media"
			"meta"
			"title";
	}
}
