/* Facebook-Feed: Kachelreihe mit Schieber und Detailansicht.
   Farben und Rundungen kommen aus eigenen Variablen, die das Theme
   überschreiben kann. */
.fbsp {
	--fbsp-primary: #16396e;
	--fbsp-primary-2: #275db0;
	--fbsp-text: #14212f;
	--fbsp-muted: #5b6977;
	--fbsp-rand: rgba(20, 33, 47, 0.12);
	--fbsp-rand-hell: rgba(20, 33, 47, 0.06);
	--fbsp-flaeche: #ffffff;
	--fbsp-grund: transparent;
	--fbsp-radius: 24px;
	--fbsp-schatten: 0 14px 24px -10px rgba(15, 25, 35, 0.18);
	--fbsp-fokus: #14212f;
	--fbsp-punkt: rgba(22, 57, 110, 0.28);
	--fbsp-luecke: 20px;
	--fbsp-container: min(1200px, calc(100vw - 48px));
	--fbsp-bewegung: 1;
	background: var(--fbsp-grund);
	color: var(--fbsp-text);
	line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
	.fbsp {
		--fbsp-bewegung: 0;
	}
}

.fbsp *,
.fbsp *::before,
.fbsp *::after {
	box-sizing: border-box;
}

.fbsp__container {
	width: var(--fbsp-container);
	margin: 0 auto;
	padding: 90px 0;
}

.fbsp__kopf {
	max-width: 760px;
	margin-bottom: 36px;
}

.fbsp__kicker {
	display: inline-flex;
	align-items: center;
	padding: 8px 14px;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--fbsp-primary), var(--fbsp-primary-2));
	color: #fff;
	box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
	font-size: 0.82rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.fbsp__titel {
	margin: 14px 0 0;
	font-size: clamp(2.2rem, 5vw, 4.3rem);
	line-height: 1;
	font-weight: 800;
}

.fbsp__titel a {
	color: var(--fbsp-primary);
	text-decoration: underline;
	text-decoration-thickness: 3px;
	text-underline-offset: 6px;
}

.fbsp__titel a:hover {
	color: var(--fbsp-primary-2);
}

/* Schieber: drei Karten je Seite, die Karten liegen auf einer frei
   scroll- und wischbaren Spur mit Einrastpunkten; Pfeile und Punkte
   blättern seitenweise um drei Karten. Der Scrollbalken bleibt
   verborgen, die Spur ist eingedämmt, damit sie nicht in die
   Scrollbreite der Seite zählt. */
.fbsp__spur {
	display: flex;
	gap: var(--fbsp-luecke);
	align-items: start;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	padding: 6px 0 26px;
	margin: -6px 0 -12px;
	transition: height calc(0.3s * var(--fbsp-bewegung)) ease;
	contain: content;
}

.fbsp__spur::-webkit-scrollbar {
	display: none;
}

.fbsp__karte {
	flex: 0 0 calc((100% - var(--fbsp-luecke) * 2) / 3);
	scroll-snap-align: start;
	background: var(--fbsp-flaeche);
	border: 1px solid var(--fbsp-rand);
	border-radius: var(--fbsp-radius);
	box-shadow: var(--fbsp-schatten);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	font-size: 0.95rem;
}

.fbsp__karte-kopf {
	padding: 14px 16px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.fbsp__avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	object-fit: cover;
	flex: 0 0 auto;
}

.fbsp__avatar--leer {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, var(--fbsp-primary), var(--fbsp-primary-2));
	color: #fff;
}

.fbsp__karte-quelle {
	font-weight: 700;
	line-height: 1.2;
	color: var(--fbsp-text);
	text-decoration: none;
}

a.fbsp__karte-quelle:hover,
a.fbsp__karte-quelle:focus-visible {
	color: var(--fbsp-primary);
	text-decoration: underline;
}

.fbsp__karte-datum {
	font-size: 0.85rem;
	color: var(--fbsp-muted);
	line-height: 1.2;
}

.fbsp__karte-text {
	padding: 14px 16px 12px;
	line-height: 1.5;
	color: #2a3b4d;
	flex: 1;
}

.fbsp__karte-text p {
	margin: 0;
}

/* Medienstaffelung: das erste Medium im Verhältnis 3:2 über die volle
   Breite, weitere darunter dreispaltig; bei mehr als vier Medien zählt
   die dritte Kachel die übrigen. */
.fbsp__medien {
	position: relative;
	display: block;
	text-decoration: none;
}

.fbsp__medium {
	position: relative;
	display: block;
	overflow: hidden;
	background: var(--fbsp-rand-hell);
}

.fbsp__medium--haupt {
	aspect-ratio: 3 / 2;
}

.fbsp__medium img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.fbsp__medien-zeile {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2px;
	margin-top: 2px;
}

.fbsp__medium--klein {
	aspect-ratio: 1 / 1;
}

.fbsp__medien-rest {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-weight: 700;
}

.fbsp__play {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.fbsp__medium--klein .fbsp__play {
	width: 34px;
	height: 34px;
}

/* Fokus: die Karte schneidet mit overflow: hidden den äußeren Rahmen
   ab, deshalb liegt der Indikator bei Öffnern innen. */
.fbsp :focus-visible {
	outline: 3px solid var(--fbsp-fokus);
	outline-offset: 2px;
}

.fbsp__medien:focus-visible,
.fbsp__karte-text--oeffner:focus-visible,
.fbsp-medien__spur:focus-visible {
	outline-offset: -5px;
}

.fbsp__medien:focus-visible::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	outline: 3px solid var(--fbsp-fokus);
	outline-offset: -5px;
}

.fbsp__karte-text--oeffner {
	display: block;
	text-decoration: none;
	color: inherit;
}

.fbsp__karte-text--oeffner:hover p,
.fbsp__karte-text--oeffner:focus-visible p {
	text-decoration: underline;
}

.fbsp__hashtags {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 10px;
	padding: 0 16px 12px;
	font-size: 0.85rem;
}

.fbsp__hashtag {
	display: inline-flex;
	align-items: center;
	min-height: 24px;
	color: var(--fbsp-muted);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.fbsp__hashtag:hover,
.fbsp__hashtag:focus-visible {
	color: var(--fbsp-primary);
}

.fbsp__karte-fuss {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
	margin-top: auto;
	padding: 10px 16px 14px;
	border-top: 1px solid var(--fbsp-rand-hell);
	color: var(--fbsp-muted);
	font-size: 0.85rem;
}

.fbsp__zaehler {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.fbsp__zaehler--likes svg {
	color: var(--fbsp-primary-2);
}

.fbsp__zaehler--link {
	color: inherit;
	text-decoration: none;
}

.fbsp__zaehler--link:hover,
.fbsp__zaehler--link:focus-visible {
	color: var(--fbsp-primary);
	text-decoration: underline;
}

.fbsp__aktionen {
	margin-left: auto;
	display: inline-flex;
	gap: 12px;
}

.fbsp__aktion {
	color: var(--fbsp-muted);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.fbsp__aktion:hover,
.fbsp__aktion:focus-visible {
	color: var(--fbsp-primary);
}

/* Steuerung: Pfeile und Punkte, ohne JavaScript verborgen. */
.fbsp__steuerung {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 14px;
	margin-top: 20px;
}

.fbsp__steuerung[hidden] {
	display: none;
}

.fbsp__pfeil {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid var(--fbsp-rand);
	background: var(--fbsp-flaeche);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--fbsp-primary);
	padding: 0;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.fbsp__pfeil:hover,
.fbsp__pfeil:focus-visible {
	border-color: transparent;
	background: linear-gradient(135deg, var(--fbsp-primary), var(--fbsp-primary-2));
	color: #fff;
}

.fbsp__punkte {
	display: flex;
	gap: 0;
	align-items: center;
	flex-wrap: wrap;
	justify-content: center;
	max-width: min(420px, 60vw);
}

.fbsp__stand {
	font-size: 0.9rem;
	color: var(--fbsp-muted);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

/* Die Bedienfläche misst 24 px, der sichtbare Punkt bleibt 9 px; der
   aktive Punkt wird zum abgerundeten Strich. */
.fbsp__punkt {
	position: relative;
	width: 24px;
	height: 24px;
	border: 0;
	cursor: pointer;
	padding: 0;
	background: transparent;
	transition: width 0.2s ease;
}

.fbsp__punkt::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 9px;
	height: 9px;
	transform: translate(-50%, -50%);
	border-radius: 999px;
	background: var(--fbsp-punkt);
	transition: width 0.2s ease, background 0.2s ease;
}

.fbsp__punkt:hover,
.fbsp__punkt:focus {
	background: transparent;
	border-color: transparent;
}

.fbsp__punkt:hover::before {
	background: linear-gradient(90deg, var(--fbsp-primary), var(--fbsp-primary-2));
}

.fbsp__punkt.ist-aktiv {
	width: 40px;
}

.fbsp__punkt.ist-aktiv::before {
	width: 26px;
	background: linear-gradient(90deg, var(--fbsp-primary), var(--fbsp-primary-2));
}

/* Detailansicht: Medium links, Text rechts, am Telefon untereinander. */
/* Natives Dialogfenster: füllt den Anzeigebereich, das Fenster liegt mittig. */
.fbsp-lightbox {
	position: fixed;
	inset: 0;
	z-index: 900;
	width: 100%;
	max-width: 100%;
	height: 100%;
	max-height: 100%;
	margin: 0;
	padding: 24px;
	border: 0;
	background: transparent;
	overflow: hidden;
}

.fbsp-lightbox[open] {
	display: flex;
	align-items: center;
	justify-content: center;
}

.fbsp-lightbox::backdrop {
	background: rgba(8, 16, 26, 0.8);
}

.fbsp-lightbox__fenster {
	position: relative;
	background: var(--fbsp-flaeche);
	border-radius: var(--fbsp-radius);
	max-width: 1060px;
	width: 100%;
	max-height: min(86vh, 820px);
	overflow: hidden;
	display: flex;
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

.fbsp-lightbox__schliessen {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid var(--fbsp-rand);
	background: var(--fbsp-flaeche);
	color: var(--fbsp-text);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.fbsp-lightbox__inhalt {
	width: 100%;
	overflow: auto;
}

.fbsp-detail {
	display: grid;
	grid-template-columns: 3fr 2fr;
	min-height: 320px;
}

.fbsp-detail--ohne-medien {
	grid-template-columns: 1fr;
	max-width: 640px;
}

/* Medien-Schieber: eine Spur mit Einrasten, Pfeile und Zähler darüber. */
.fbsp-medien {
	position: relative;
	background: #0d1724;
	min-width: 0;
	display: flex;
	align-items: center;
	overflow: hidden;
}

.fbsp-medien__spur {
	display: flex;
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.fbsp-medien__spur::-webkit-scrollbar {
	display: none;
}

.fbsp-medien__stueck {
	flex: 0 0 100%;
	scroll-snap-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
}

.fbsp-medien__stueck img {
	width: 100%;
	height: auto;
	max-height: min(86vh, 820px);
	object-fit: contain;
	display: block;
}

.fbsp-medien__stueck .fbsp-detail__extern {
	width: 100%;
}

.fbsp-medien__pfeil {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 1;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid var(--fbsp-rand);
	background: var(--fbsp-flaeche);
	color: var(--fbsp-primary);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.fbsp-medien__pfeil:hover,
.fbsp-medien__pfeil:focus-visible {
	border-color: transparent;
	background: linear-gradient(135deg, var(--fbsp-primary), var(--fbsp-primary-2));
	color: #fff;
}

.fbsp-medien__pfeil--zurueck {
	left: 12px;
}

.fbsp-medien__pfeil--weiter {
	right: 12px;
}

.fbsp-medien__zaehler {
	position: absolute;
	bottom: 12px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 1;
	margin: 0;
	padding: 4px 12px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.72);
	color: #fff;
	font-size: 0.875rem;
}

.fbsp-detail__extern {
	position: relative;
	display: block;
}

.fbsp-detail__extern-text {
	position: absolute;
	left: 50%;
	bottom: 16px;
	transform: translateX(-50%);
	background: rgba(0, 0, 0, 0.72);
	color: #fff;
	padding: 8px 14px;
	border-radius: 999px;
	font-size: 0.85rem;
	white-space: nowrap;
}

.fbsp-detail__inhalt {
	padding: 18px 18px 14px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	overflow: auto;
	max-height: min(86vh, 820px);
	font-size: 0.95rem;
}

.fbsp-detail__kopf {
	padding: 0 30px 0 0;
}

.fbsp-detail__text {
	line-height: 1.5;
	color: #2a3b4d;
}

.fbsp-detail__text p {
	margin: 0;
}

.fbsp-detail__hashtags {
	padding: 0;
}

.fbsp-detail__fuss {
	padding: 10px 0 0;
	margin-top: auto;
}

body.hat-fbsp-lightbox {
	overflow: hidden;
}

@supports (height: 1dvh) {
	.fbsp-lightbox__fenster,
	.fbsp-medien__stueck img {
		max-height: min(86dvh, 820px);
	}
}

/* Editor-Hinweis ohne Bestand. */
.fbsp-hinweis {
	padding: 16px 20px;
	border: 1px dashed rgba(22, 57, 110, 0.4);
	border-radius: 12px;
	color: #16396e;
	background: rgba(22, 57, 110, 0.04);
}

@media (max-width: 1023px) {
	.fbsp__karte {
		flex-basis: calc((100% - var(--fbsp-luecke)) / 2);
	}
}

@media (max-width: 767px) {
	.fbsp {
		--fbsp-container: min(1200px, calc(100vw - 32px));
	}

	.fbsp__container {
		padding: 56px 0;
	}

	.fbsp__karte {
		flex-basis: 100%;
	}

	.fbsp-lightbox {
		padding: 12px;
	}

	.fbsp-detail {
		grid-template-columns: 1fr;
	}

	.fbsp-medien,
	.fbsp-medien__stueck img {
		max-height: 46vh;
	}

	.fbsp-medien__pfeil {
		width: 40px;
		height: 40px;
	}
}
