/* ============================================================================
   The Floppy Trail — Etappen-Post, Routenübersicht, Fullscreen-Viewer
   Referenz: wordpress_blog/design/floppytrail-design.html
   ========================================================================== */

/* ── Grundlage ────────────────────────────────────────────────────────────── */

body.ft-etappe,
body.ft-route {
	background: var(--ft-paper);
}

/* Der Post bringt Eyebrow/H1/Recap selbst mit — Theme-Titelbereich raus. */
body.ft-etappe .hero-section,
body.ft-etappe .entry-header,
body.ft-etappe .page-title,
body.ft-etappe .entry-meta {
	display: none !important;
}

.ft-post,
.ft-route {
	max-width: var(--ft-max);
	margin-inline: auto;
	padding: var(--ft-pad-y) var(--ft-pad-x) 64px;
	background: var(--ft-paper);
	color: var(--ft-ink);
	font-family: var(--ft-sans);
	box-sizing: border-box;
}

.ft-post *,
.ft-route * {
	box-sizing: border-box;
}

.ft-post img,
.ft-route img {
	display: block;
	max-width: 100%;
	height: auto;
}

/* Zuschnitt statt Verzerrung.
   Jedes formatgebundene Bild traegt sein Seitenverhaeltnis selbst, nicht nur
   der Container. Setzt ein Theme-Update irgendwann `img { height: auto }` mit
   hoeherer Spezifitaet durch, greift object-fit trotzdem weiter. */
.ft-post .ft-inline-photo img,
.ft-post .ft-thumb img,
.ft-post .ft-stage img,
.ft-post .ft-aitile img,
.ft-post .ft-map img,
.ft-route .ft-map img,
.ft-route .ft-timeline-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.ft-post .ft-inline-photo img { aspect-ratio: 1 / 1; }

/* Beschnitt-Empfehlung des Analysten (fotos.crop_empfehlung): "top"/"bottom"
   heisst, das Motiv sitzt oben bzw. unten im Bild und wuerde beim zentrierten
   Zuschnitt abgeschnitten. "center" ist der Standard und braucht keine Klasse. */
.ft-post img.ft-crop--top { object-position: center top; }
.ft-post img.ft-crop--bottom { object-position: center bottom; }
.ft-post .ft-thumb img,
.ft-post .ft-stage img,
.ft-post .ft-aitile img { aspect-ratio: 9 / 16; }
.ft-post .ft-map img { aspect-ratio: 1200 / 440; }
.ft-route .ft-timeline-thumb img { aspect-ratio: 1 / 1; }

.ft-post a,
.ft-route a {
	color: var(--ft-lila);
	text-decoration: none;
}

.ft-post a:hover,
.ft-route a:hover {
	color: var(--ft-lila-dark);
}

/* ── Kopf ─────────────────────────────────────────────────────────────────── */

.ft-eyebrow {
	font: 12px var(--ft-mono);
	letter-spacing: .5px;
	color: var(--ft-lila);
	text-transform: uppercase;
	margin: 0 0 2px;
}

.ft-post .ft-title {
	font: 700 44px/1.15 var(--ft-serif);
	color: var(--ft-ink);
	max-width: 640px;
	margin: 10px 0 14px;
}

.ft-recap {
	font: 16px var(--ft-sans);
	color: var(--ft-ink-60);
	margin: 0 0 28px;
}

/* ── Hero-Karte (entfällt sauber, solange kein Kartenbild existiert) ──────── */

.ft-map {
	position: relative;
	width: 100%;
	margin: 0 0 10px;
	border-radius: 8px;
	overflow: hidden;
	background: var(--ft-placeholder);
	aspect-ratio: 1200 / 440;
}

.ft-map img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ft-map figcaption {
	position: absolute;
	left: 16px;
	bottom: 12px;
	font: 11px var(--ft-mono);
	color: var(--ft-ink-40);
}

/* ── Fortschrittsbalken ──────────────────────────────────────────────────── */

.ft-progress {
	height: 6px;
	border-radius: 3px;
	background: var(--ft-ink-08);
	overflow: hidden;
	margin-bottom: 8px;
}

.ft-progress > span {
	display: block;
	height: 100%;
	width: var(--ft-progress, 0%);
	background: var(--ft-lila);
}

.ft-progress-caption {
	font: 11px var(--ft-mono);
	color: var(--ft-ink-45);
	margin: 0 0 44px;
}

/* ── Zweispalter ─────────────────────────────────────────────────────────── */

.ft-split {
	display: flex;
	gap: var(--ft-col-gap);
	align-items: flex-start;
}

.ft-article {
	width: 60%;
	min-width: 0;
}

.ft-post .ft-highlight {
	font: 700 26px var(--ft-serif);
	color: var(--ft-ink);
	margin: 0 0 18px;
}

.ft-article p {
	font: 17px/1.7 var(--ft-sans);
	color: var(--ft-ink);
	margin: 0 0 24px;
}

.ft-article p:last-child {
	margin-bottom: 36px;
}

.ft-inline-photo {
	margin: 0 0 24px;
	border-radius: 6px;
	overflow: hidden;
	background: var(--ft-placeholder);
	aspect-ratio: 1 / 1;
}

.ft-inline-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ── Rail (Stories- und Video-Player) ────────────────────────────────────── */

/* Scrollt normal mit. Sticky war im Design vorgesehen, taugt hier aber nicht:
   die Rail ist mit Stories, Videos und Blockmenue ~1950px hoch, also hoeher als
   jedes Fenster — sie blieb entweder mitten im Text stehen oder machte die
   Videoreihe unerreichbar. */
.ft-rail {
	width: 40%;
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ft-post .ft-rail h2 {
	font: 700 22px var(--ft-serif);
	color: var(--ft-ink);
	margin: 0 0 8px;
}

.ft-post .ft-rail h2 + .ft-subcaption {
	margin-top: -4px;
}

.ft-subcaption {
	font: 12px var(--ft-mono);
	color: var(--ft-ink-55);
	margin: 0 0 8px;
}

.ft-rail-note {
	font: 14px/1.55 var(--ft-sans);
	color: var(--ft-ink-60);
	margin: 8px 0 22px;
}

/* Thumbnail-Reihen */
.ft-thumbs {
	display: flex;
	gap: 5px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ft-thumbs > li {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.ft-thumb {
	position: relative;
	display: block;
	aspect-ratio: 9 / 16;
	border-radius: 4px;
	overflow: hidden;
	background: var(--ft-placeholder);
	border: 2px solid transparent;
	cursor: pointer;
}

.ft-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ft-thumb.is-active {
	border-color: var(--ft-lila);
}

/* Punkt = für dieses Foto existiert eine KI-Version */
.ft-thumb[data-ft-ai]::after {
	content: "";
	position: absolute;
	top: 3px;
	right: 3px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--ft-lila);
}

.ft-thumb--video {
	background: var(--ft-ink);
}

.ft-thumb--video::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	border-style: solid;
	border-width: 5px 0 5px 8px;
	border-color: transparent transparent transparent var(--ft-paper);
	z-index: 1;
}

.ft-thumb-titel {
	font: italic 11px var(--ft-serif);
	color: var(--ft-ink-55);
	text-align: center;
}

/* ── Stage (je ein Player für Stories und Videos) ─────────────────────────── */

.ft-stage {
	position: relative;
	width: 100%;
	aspect-ratio: 9 / 16;
	border-radius: 8px;
	overflow: hidden;
	background: var(--ft-placeholder);
	margin-top: 14px;
}


/* Zustand: diese Stage zeigt gerade ein Video (statt eines Fotos).
   Bewusst getrennt von .ft-stage--videoslider — das ist eine Struktur-Klasse.
   Beides in einer Klasse hiesse: Video anklicken blendet den Player aus. */
.ft-stage.is-video {
	background: var(--ft-ink);
}

.ft-stage-media {
	position: absolute;
	inset: 0;
}

.ft-stage img,
.ft-stage iframe {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border: 0;
	display: block;
}

.ft-stage-counter {
	position: absolute;
	top: 10px;
	left: 10px;
	font: 600 11px var(--ft-mono);
	color: var(--ft-ink);
	background: rgba(247, 244, 238, .85);
	padding: 4px 9px;
	border-radius: 12px;
	z-index: 2;
}

.ft-stage.is-video .ft-stage-counter {
	color: var(--ft-paper);
	background: rgba(247, 244, 238, .15);
}

.ft-stage-full {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 26px;
	height: 26px;
	border: 0;
	padding: 0;
	border-radius: 6px;
	background: rgba(42, 36, 29, .5);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 2;
}

.ft-stage-full::before {
	content: "";
	width: 11px;
	height: 11px;
	border: 1.5px solid var(--ft-paper);
	border-radius: 2px;
}

.ft-stage-nav {
	position: absolute;
	top: 0;
	height: 100%;
	width: 34px;
	border: 0;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font: 24px var(--ft-sans);
	color: var(--ft-paper);
	cursor: pointer;
	z-index: 2;
}

.ft-stage-nav--prev {
	left: 0;
	background: linear-gradient(90deg, rgba(42, 36, 29, .22), transparent);
}

.ft-stage-nav--next {
	right: 0;
	background: linear-gradient(-90deg, rgba(42, 36, 29, .22), transparent);
}

/* Original/KI-Pille — nur sichtbar, wenn das aktive Foto ein KI-Pendant hat */
.ft-pill {
	position: absolute;
	bottom: 12px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	border-radius: 20px;
	overflow: hidden;
	font: 11px var(--ft-sans);
	background: rgba(42, 36, 29, .55);
	backdrop-filter: blur(2px);
	z-index: 2;
}

.ft-pill[hidden] {
	display: none;
}

.ft-pill button {
	border: 0;
	padding: 6px 15px;
	background: transparent;
	color: var(--ft-paper);
	font: inherit;
	cursor: pointer;
}

.ft-pill button.is-active {
	background: var(--ft-lila);
	color: #fff;
}

.ft-stage-titel {
	font: italic 14px var(--ft-serif);
	color: var(--ft-ink-55);
	margin: 8px 0 0;
}

/* ── Redaktionelles Block-Menü unten in der Rail ─────────────────────────── */

.ft-blockmenu {
	border-top: 1px solid var(--ft-ink-12);
	padding-top: 20px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.ft-blockmenu > div + div {
	border-top: 1px solid var(--ft-ink-10);
	padding-top: 16px;
}

.ft-blockmenu strong,
.ft-blockmenu > div > a {
	font: 600 15px var(--ft-sans);
	color: var(--ft-ink);
	display: block;
}

.ft-blockmenu ul {
	list-style: none;
	margin: 10px 0 0;
	padding-left: 14px;
	display: flex;
	flex-direction: column;
	gap: 9px;
}

.ft-blockmenu ul a {
	font: 15px var(--ft-sans);
	color: var(--ft-ink);
}

.ft-blockmenu ul a.is-current {
	color: var(--ft-lila);
}

/* ── Full-Bleed-Sektion (sprengt den Zweispalter) ────────────────────────── */

.ft-fullbleed {
	width: 100%;
	margin: 0 calc(var(--ft-pad-x) * -1);
	padding: 44px var(--ft-pad-x) 0;
	border-top: 1px solid var(--ft-ink-12);
}

.ft-post .ft-fullbleed h2 {
	font: 700 26px var(--ft-serif);
	color: var(--ft-ink);
	margin: 0 0 16px;
}

.ft-aigrid {
	display: flex;
	gap: 6px;
	margin-bottom: 32px;
	list-style: none;
	padding: 0;
}

.ft-aigrid > li {
	flex: 1;
	min-width: 0;
}

.ft-aitile {
	position: relative;
	display: block;
	aspect-ratio: 9 / 16;
	border-radius: 4px;
	overflow: hidden;
	background: var(--ft-ai-stripe);
	border: 1px solid var(--ft-lila-35);
	cursor: pointer;
}

.ft-aitile img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* "+N" auf der letzten sichtbaren Kachel — von floppytrail.js gesetzt, weil
   erst der Breakpoint entscheidet, wie viele Kacheln sichtbar sind. */
.ft-aitile-more {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(42, 36, 29, .55);
	color: var(--ft-paper);
	font: 600 13px var(--ft-mono);
}

/* Die Stage zeigt alle Fotos, die Reihe nur die ersten fünf. */
.ft-thumbs > li:nth-child(n+6) {
	display: none;
}

.ft-aigrid > li:nth-child(n+8) {
	display: none;
}

.ft-videorow {
	display: flex;
	gap: 8px;
	padding-bottom: 44px;
	list-style: none;
	margin: 0;
}

.ft-videorow > li {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* ── Prev/Next ───────────────────────────────────────────────────────────── */

.ft-postnav {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	border-top: 1px solid var(--ft-ink-12);
	padding-top: 16px;
	margin-top: 26px;
	font: 14px var(--ft-sans);
}

.ft-postnav a {
	color: var(--ft-ink);
}

.ft-postnav a:hover {
	color: var(--ft-lila);
}

/* ── Routenübersicht ─────────────────────────────────────────────────────── */

.ft-route .ft-title {
	font: 700 42px/1.15 var(--ft-serif);
	margin: 10px 0 12px;
}

.ft-route .ft-map {
	aspect-ratio: 1200 / 280;
}

.ft-route h2 {
	font: 700 24px var(--ft-serif);
	margin: 36px 0 8px;
}

.ft-timeline {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ft-timeline li {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 14px 0;
	border-bottom: 1px solid var(--ft-ink-10);
}

.ft-timeline-thumb {
	width: 64px;
	height: 64px;
	flex-shrink: 0;
	border-radius: 6px;
	overflow: hidden;
	background: var(--ft-placeholder);
}

.ft-timeline-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ft-timeline-body {
	flex: 1;
	min-width: 0;
}

.ft-timeline-titel {
	font: 600 15px var(--ft-sans);
	color: var(--ft-ink);
}

.ft-timeline-highlight {
	font: italic 14px var(--ft-serif);
	color: var(--ft-ink-60);
	margin: 2px 0 0;
}

.ft-timeline-meta {
	font: 12px var(--ft-mono);
	color: var(--ft-ink-45);
	margin: 4px 0 0;
}

.ft-timeline-link {
	font: 600 14px var(--ft-sans);
	color: var(--ft-lila);
	flex-shrink: 0;
}

/* Geplante Etappen */
.ft-timeline li.is-geplant {
	border-bottom-style: dashed;
}

.ft-timeline li.is-geplant .ft-timeline-thumb {
	background: none;
	border: 1px dashed rgba(42, 36, 29, .25);
}

.ft-timeline li.is-geplant .ft-timeline-body {
	opacity: .4;
}

/* ── Fullscreen-Viewer (eine Komponente, drei Aufrufkontexte) ────────────── */

.ft-viewer {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: #000;
	display: flex;
	align-items: center;
	justify-content: center;
	touch-action: pan-y;
}

.ft-viewer[hidden] {
	display: none;
}

.ft-viewer-media {
	max-width: 100%;
	max-height: 100%;
}

.ft-viewer-media img,
.ft-viewer-media iframe {
	max-width: 100vw;
	max-height: 100vh;
	width: auto;
	height: auto;
	display: block;
	border: 0;
}

.ft-viewer-media iframe {
	width: 100vw;
	height: 100vh;
}

.ft-viewer-counter {
	position: absolute;
	top: 16px;
	left: 16px;
	font: 600 11px var(--ft-mono);
	color: var(--ft-paper);
	background: rgba(0, 0, 0, .4);
	padding: 4px 9px;
	border-radius: 12px;
}

.ft-viewer-close {
	position: absolute;
	top: 14px;
	right: 16px;
	width: 32px;
	height: 32px;
	border: 0;
	background: transparent;
	color: var(--ft-paper);
	font: 18px var(--ft-sans);
	cursor: pointer;
}

.ft-viewer-nav {
	position: absolute;
	top: 0;
	height: 100%;
	width: 50px;
	border: 0;
	background: transparent;
	color: rgba(247, 244, 238, .55);
	font: 30px var(--ft-sans);
	cursor: pointer;
}

.ft-viewer-nav--prev { left: 0; }
.ft-viewer-nav--next { right: 0; }

.ft-viewer .ft-pill {
	bottom: 28px;
	background: rgba(0, 0, 0, .5);
	font-size: 12px;
}

.ft-viewer .ft-pill button {
	padding: 7px 16px;
}

body.ft-viewer-open {
	overflow: hidden;
}

/* ── Mobil ───────────────────────────────────────────────────────────────── */

/* Stories und Videos haben je einen eigenen Player — auf allen Breiten.
   Ein gemeinsamer Player (so stand es im Design) verwirrt: ein Videoklick
   tauschte dort das Foto aus, das man gerade angesehen hat. */

@media (max-width: 900px) {
	.ft-post,
	.ft-route {
		padding: 28px 22px 36px;
		--ft-pad-x: 22px;
	}

	.ft-post .ft-title {
		font-size: 27px;
		line-height: 1.2;
		margin: 8px 0 14px;
	}

	.ft-eyebrow {
		font-size: 10px;
	}

	.ft-recap {
		font-size: 13.5px;
		margin-bottom: 14px;
	}

	.ft-map {
		aspect-ratio: 375 / 200;
		border-radius: 7px;
	}

	.ft-map figcaption {
		left: 14px;
		bottom: 10px;
		font-size: 10px;
	}

	.ft-progress {
		height: 5px;
	}

	.ft-progress-caption {
		font-size: 10px;
		margin-bottom: 26px;
	}

	/* Linearisierung: Rail wird zum Block nach dem Fliesstext */
	.ft-split {
		display: block;
	}

	.ft-article,
	.ft-rail {
		width: 100%;
	}

	.ft-rail {
		position: static;
		border-top: 1px solid var(--ft-ink-12);
		padding-top: 20px;
		margin-bottom: 22px;
	}

	.ft-post .ft-highlight {
		font-size: 21px;
	}

	.ft-article p {
		font-size: 15.5px;
		line-height: 1.65;
		margin-bottom: 18px;
	}

	.ft-inline-photo {
		margin-bottom: 18px;
	}

	.ft-post .ft-rail h2 {
		font-size: 21px;
		margin-bottom: 3px;
	}

	/* Thumbnail-Reihen weg, dafuer beide Stages gross */
	.ft-thumbs {
		display: none;
	}

	.ft-stage {
		margin-top: 0;
	}


	.ft-stage-nav {
		width: 34px;
	}

	.ft-rail-note {
		font: italic 12px var(--ft-serif);
		color: var(--ft-ink-45);
		margin: 6px 0 22px;
	}

	/* KI-Highlights: 2-spaltiges Grid statt einer Reihe */
	.ft-fullbleed {
		margin: 0;
		padding: 0;
		border-top: 0;
	}

	.ft-aigrid {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 6px;
	}

	.ft-aitile {
		border-radius: 6px;
	}

	.ft-aigrid > li:nth-child(n+5) {
		display: none;
	}

	.ft-videorow {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 8px;
		padding-bottom: 24px;
	}

	.ft-post .ft-fullbleed h2 {
		font-size: 21px;
		margin-bottom: 4px;
	}

	.ft-postnav {
		font-size: 12.5px;
	}

	/* Routenübersicht */
	.ft-route .ft-title {
		font-size: 28px;
	}

	.ft-route .ft-map {
		aspect-ratio: 375 / 150;
	}

	.ft-timeline-thumb {
		width: 48px;
		height: 48px;
	}

	.ft-timeline-link {
		display: none;
	}
}

/* ── Ohne JavaScript ─────────────────────────────────────────────────────── */

/* Ohne JS bleiben Thumbnails und Stage schlichte Bilder/Links — die
   Bedienelemente, die nur JS bedient, blenden wir erst ein, wenn JS lief. */
.ft-stage-nav,
.ft-stage-full,
.ft-pill {
	display: none;
}

.ft-js .ft-stage-nav,
.ft-js .ft-stage-full {
	display: flex;
}

.ft-js .ft-pill:not([hidden]) {
	display: flex;
}
