/* 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;
	/* Fallback-Werte, damit die Pills auch ohne .qf-root-Wrapper korrekt
	   aussehen (z. B. [stsbw_post_source] / [stsbw_post_topics] im Single). */
	border: 1px solid var(--qf-line, #e7e4dc);
	background: #fff;
	color: #555;
	border-radius: var(--qf-radius, 999px);
	padding: 3px 11px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
}

.qf-tax-pill--quellen,
.qf-tax-pill--quelle {
	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;
}

/* --- Suchergebnisse ------------------------------------------------------ */
.qf-searchresults__title {
	font-size: clamp(24px, 2.4vw, 34px);
	font-weight: 800;
	margin: 0 0 24px;
	line-height: 1.15;
}

.qf-searchresults__count {
	color: #9a938a;
	font-weight: 600;
}

.qf-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 30px;
}

.qf-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid #e7e4dc;
	border-radius: 999px;
	text-decoration: none;
	color: #1a1a1a;
	font-weight: 600;
}

.qf-pagination .page-numbers.current {
	background: #111;
	color: #fff;
	border-color: #111;
}

.qf-pagination a.page-numbers:hover {
	border-color: #111;
}

/* --- 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-pills {
	margin: 14px 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;
}

/* Titel über die Reihe ausrichten – unabhängig von der Pill-Anzahl.
   subgrid richtet Bild/Pills/Datum/Titel aller Karten einer Reihe aus. */
@supports (grid-template-rows: subgrid) {
	.qf-results.qf-grid {
		grid-auto-rows: auto;
	}

	.qf-card {
		display: grid;
		grid-template-rows: subgrid;
		grid-row: span 4;
		row-gap: 0;
	}

	.qf-card-media,
	.qf-card-pills,
	.qf-card-meta,
	.qf-card-title {
		align-self: start;
	}
}

.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;
	}
}

/* The Events Calendar packt Einzel-Events teils in einen schmalen Wrapper –
   auf Event-Singles aufheben, damit das Elementor-Template volle Breite bekommt. */
.single-tribe_events .tribe-events-single,
.single-tribe_events .tribe-events,
.single-tribe_events .tribe_events,
.single-tribe_events #tribe-events,
.single-tribe_events #tribe-events-pg-template,
.single-tribe_events .tribe-events-pg-template {
	max-width: 100% !important;
	width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* --- Single-Bausteine ---------------------------------------------------- */
.qf-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #9a938a;
}

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

.qf-breadcrumb a:hover {
	color: #555;
}

.qf-breadcrumb__sep {
	opacity: 0.5;
}

.qf-post-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
}

.qf-post-meta__line {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #7a7a7a;
	font-size: 14px;
}

.qf-post-meta__sep {
	opacity: 0.6;
}

/* Teilen / Drucken */
.qf-share {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.qf-share__btn {
	appearance: none;
	border: 1px solid #d8d4ca;
	background: #fff;
	color: #1a1a1a;
	border-radius: 999px;
	padding: 9px 20px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.qf-share__btn:hover {
	border-color: #111;
}

.qf-share__btn.is-copied::after {
	content: " ✓";
}

/* Callout */
.qf-callout {
	border-radius: 12px;
	padding: 16px 20px;
	font-size: 16px;
	line-height: 1.55;
	margin: 8px 0;
}

.qf-callout--info {
	background: #eef4ec;
	color: #24361f;
}

.qf-callout--tipp {
	background: #eaf1fb;
	color: #1a2b45;
}

.qf-callout__title {
	font-weight: 800;
}

/* Kalender-Badge */
.qf-datebadge {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	width: 66px;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid #e7e4dc;
	background: #fff;
	line-height: 1;
	text-align: center;
}

.qf-datebadge__mon {
	display: block;
	width: 100%;
	background: var(--qf-badge-accent, #e0503a);
	color: var(--qf-badge-fg, #fff);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 5px 0;
}

.qf-datebadge__day {
	font-size: 28px;
	font-weight: 800;
	padding: 6px 0 2px;
}

.qf-datebadge__wd {
	font-size: 11px;
	color: #7a7a7a;
	padding: 0 0 7px;
}

/* Event-Details-Box */
.qf-eventbox {
	border: 1px solid #e7e4dc;
	border-radius: 14px;
	padding: 20px 22px;
}

.qf-eventbox__title {
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #9a938a;
	margin: 0 0 12px;
}

.qf-eventbox__list {
	margin: 0;
	display: grid;
	gap: 12px;
}

.qf-eventbox__list dt {
	font-weight: 700;
	font-size: 14px;
}

.qf-eventbox__list dd {
	margin: 2px 0 0;
	font-size: 15px;
	color: #3a3a3a;
}

.qf-eventbox__map {
	font-weight: 600;
	text-decoration: none;
	border-bottom: 1px solid currentColor;
}

/* Event-Aktionen */
.qf-event-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.qf-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border-radius: 999px;
	padding: 13px 26px;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.qf-btn--primary {
	background: #111;
	color: #fff;
	border: 1px solid #111;
}

.qf-btn--primary:hover {
	background: #333;
}

.qf-btn--outline {
	background: #fff;
	color: #111;
	border: 1px solid #111;
}

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

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

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

.qf-teaser-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px 24px;
	flex-wrap: wrap;
	margin-bottom: 28px;
}

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

.qf-teaser-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;
	white-space: nowrap;
}

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

.qf-teaser-grid {
	display: grid;
	grid-template-columns: repeat(var(--qf-cols, 3), minmax(0, 1fr));
	gap: 34px 30px;
	align-items: start;
}

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

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

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

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

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

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

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

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

/* Event-Karte mit Kalender-Badge (Weitere Veranstaltungen) */
.qf-ecard {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	border: 1px solid #e7e4dc;
	border-radius: 12px;
	padding: 16px 18px;
	background: #fff;
}

.qf-ecard__link {
	flex: none;
	text-decoration: none;
}

.qf-ecard__body {
	min-width: 0;
}

.qf-ecard__title {
	font-size: 19px;
	line-height: 1.2;
	font-weight: 800;
	margin: 2px 0 6px;
}

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

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

.qf-datebadge--sm {
	width: 56px;
}

.qf-datebadge--sm .qf-datebadge__mon {
	font-size: 10px;
	padding: 4px 0;
}

.qf-datebadge--sm .qf-datebadge__day {
	font-size: 22px;
	padding: 5px 0;
}

@media (max-width: 900px) {
	.qf-teaser-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.qf-teaser-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";
	}
}

/* --- [quartier_posts] „Alle Beiträge anzeigen"-Button ------------------- */
.qf-posts-more-wrap {
	margin-top: 24px;
}

.qf-posts-more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 14px 26px;
	border-radius: 10px;
	background: #2f6fdc;
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	transition: background 0.15s ease, transform 0.12s ease;
}

.qf-posts-more:hover,
.qf-posts-more:focus {
	background: #245bb8;
	color: #fff;
	transform: translateY(-1px);
}
