/* Weltreise Blog */

:root {
	--wr-geplant: #9aa0a6;
	--wr-aktuell: #e8710a;
	--wr-besucht: #2e8b57;
	--wr-rand: color-mix(in srgb, currentColor 15%, transparent);
	--wr-flaeche: color-mix(in srgb, currentColor 5%, transparent);
	--wr-radius: 10px;
}

/* ---------------------------------------------------------------- Karte */

.wr-karte {
	width: 100%;
	min-height: 280px;
	border-radius: var(--wr-radius);
	overflow: hidden;
	z-index: 0;
	position: relative;
}

/* Smartphone: Karte über die ganze Bildschirmbreite (aus dem Inhaltsrand des Themes heraus).
   !important + doppelte Klasse nötig, weil TT25 (.is-layout-constrained > *) margin-left/right: auto !important setzt. */
@media (max-width: 600px) {
	.wr-karte.wr-karte {
		width: 100vw;
		max-width: none !important;
		margin-left: calc(50% - 50vw) !important;
		margin-right: calc(50% - 50vw) !important;
		border-radius: 0;
	}
}

.wr-karte .wr-fehler {
	position: absolute;
	inset: auto 10px 10px;
	z-index: 1000;
	background: #fff;
	padding: 6px 10px;
	border-radius: 6px;
}

.wr-popup {
	min-width: 160px;
	line-height: 1.4;
}

.wr-popup img {
	display: block;
	width: 100%;
	max-height: 120px;
	object-fit: cover;
	border-radius: 6px;
	margin-bottom: 6px;
}

.wr-foto-marker img,
.wr-cluster img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
	border: 2px solid #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
	box-sizing: border-box;
	display: block;
}

.wr-cluster {
	position: relative;
}

.wr-cluster span {
	position: absolute;
	right: -4px;
	top: -4px;
	background: var(--wr-aktuell);
	color: #fff;
	font: 600 11px/18px system-ui, sans-serif;
	min-width: 18px;
	padding: 0 4px;
	border-radius: 9px;
	text-align: center;
	box-sizing: border-box;
}

.wr-tauch-marker {
	font-size: 20px;
	line-height: 28px;
	text-align: center;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.wr-puls {
	border-radius: 50%;
	background: var(--wr-aktuell);
	opacity: 0.5;
	animation: wr-puls 2s ease-out infinite;
}

@keyframes wr-puls {
	0% { transform: scale(0.4); opacity: 0.7; }
	100% { transform: scale(1.6); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.wr-puls { animation: none; }
}

.wr-legende {
	background: rgba(255, 255, 255, 0.9);
	padding: 4px 8px;
	border-radius: 6px;
	font: 12px/1.6 system-ui, sans-serif;
	color: #333;
}

.wr-legende span {
	margin-right: 8px;
	white-space: nowrap;
}

.wr-legende i {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	margin-right: 4px;
	vertical-align: -1px;
}

/* -------------------------------------------------------- Status / Info */

.wr-badge {
	display: inline-block;
	font-size: 0.75em;
	font-weight: 600;
	line-height: 1.6;
	padding: 0 0.6em;
	border-radius: 1em;
	color: #fff;
	background: var(--wr-geplant);
	vertical-align: middle;
}

.wr-badge.wr-status-aktuell { background: var(--wr-aktuell); }
.wr-badge.wr-status-besucht { background: var(--wr-besucht); }

.wr-info {
	font-size: 0.95em;
	opacity: 0.9;
}

.wr-leer {
	opacity: 0.7;
	font-style: italic;
}

/* -------------------------------------------------------------- Galerie */

.wr-galerie {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	grid-auto-flow: dense;
	gap: 6px;
	margin: 1em 0;
}

.wr-galerie-bild {
	position: relative;
	margin: 0;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: 6px;
}

.wr-galerie-bild.ist-highlight {
	grid-column: span 2;
	grid-row: span 2;
}

.wr-galerie-bild a,
.wr-galerie-bild img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s;
}

.wr-galerie-bild a:hover img {
	transform: scale(1.04);
}

.wr-stern {
	position: absolute;
	top: 6px;
	right: 8px;
	color: #ffd23f;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
	pointer-events: none;
}

/* Ausgeblendete Fotos eines Tagesalbums ("+N weitere") */
.wr-galerie-bild.ist-mehr {
	display: none;
}

.wr-galerie.zeige-alle .wr-galerie-bild.ist-mehr {
	display: block;
}

.wr-galerie-mehr {
	aspect-ratio: 1;
	border: 0;
	border-radius: 6px;
	background: var(--wr-flaeche);
	color: inherit;
	font-size: 1.1em;
	font-weight: 600;
	cursor: pointer;
}

/* -------------------------------------------------------------- Timeline */

.wr-timeline {
	position: relative;
	margin: 1em 0;
}

.wr-tl-spur {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding: 0 12px;
	padding: 4px 2px 22px;
	cursor: grab;
	scrollbar-width: thin;
	/* Zeitachse unter den Karten */
	background: linear-gradient(var(--wr-rand), var(--wr-rand)) left calc(100% - 9px) / 100% 2px no-repeat;
	background-attachment: local;
}

.wr-tl-spur.zieht {
	cursor: grabbing;
	scroll-snap-type: none;
	user-select: none;
}

.wr-tl-tag {
	flex: 0 0 min(78vw, 280px);
	scroll-snap-align: center;
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
	position: relative;
}

/* Punkt auf der Zeitachse */
.wr-tl-tag::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: -19px;
	width: 12px;
	height: 12px;
	margin-left: -6px;
	border-radius: 50%;
	background: var(--wr-aktuell);
	border: 2px solid #fff;
	box-sizing: border-box;
}

.wr-tl-bilder {
	display: grid;
	gap: 3px;
	aspect-ratio: 4 / 3;
	border-radius: var(--wr-radius);
	overflow: hidden;
	background: var(--wr-flaeche);
	transition: transform 0.2s, box-shadow 0.2s;
}

.wr-tl-tag:hover .wr-tl-bilder,
.wr-tl-tag:focus-visible .wr-tl-bilder {
	transform: translateY(-3px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.wr-tl-tag.laedt .wr-tl-bilder {
	opacity: 0.6;
}

.wr-tl-bild {
	position: relative;
	display: block;
	min-height: 0;
	overflow: hidden;
	background: var(--wr-flaeche);
}

.wr-tl-bilder img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	pointer-events: none;
}

/* Collage: 1 Bild voll, 2 nebeneinander, 3 = gross links + 2 rechts */
.wr-tl-n2 {
	grid-template-columns: 1fr 1fr;
}

.wr-tl-n3 {
	grid-template-columns: 2fr 1fr;
	grid-template-rows: 1fr 1fr;
}

.wr-tl-n3 .wr-tl-bild:first-child {
	grid-row: span 2;
}

.wr-tl-text {
	display: flex;
	flex-direction: column;
	font-size: 0.85em;
	line-height: 1.35;
}

.wr-tl-text strong {
	font-size: 1.05em;
}

.wr-tl-text span {
	opacity: 0.75;
}

.wr-tl-pfeil {
	position: absolute;
	top: calc(50% - 40px);
	z-index: 2;
	width: 2.4rem;
	height: 2.4rem;
	border-radius: 50%;
	border: 0;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
}

.wr-tl-zurueck { left: 4px; }
.wr-tl-weiter { right: 4px; }

.wr-timeline.am-anfang .wr-tl-zurueck,
.wr-timeline.am-ende .wr-tl-weiter {
	display: none;
}

/* Auf Touch-Geräten wird gewischt, Pfeile nur mit Maus */
@media (hover: none) {
	.wr-tl-pfeil {
		display: none;
	}
}

/* ------------------------------------------------------------- Lightbox */

.wr-lb {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(0, 0, 0, 0.92);
	display: none;
	align-items: center;
	justify-content: center;
}

.wr-lb.offen {
	display: flex;
}

html.wr-lb-aktiv {
	overflow: hidden;
}

.wr-lb figure {
	margin: 0;
	max-width: 100vw;
	max-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.wr-lb img,
.wr-lb video {
	max-width: 100vw;
	max-height: calc(100vh - 4em);
	object-fit: contain;
}

.wr-lb video,
.wr-lb.zeigt-video img {
	display: none;
}

.wr-lb.zeigt-video video {
	display: block;
	background: #000;
}

/* Videos: Play-Symbol über Vorschaubildern (Galerie, Zeitstrahl, Karte) */
.ist-video {
	position: relative;
}

.wr-galerie-bild.ist-video a::after,
.wr-tl-bild.ist-video::after,
.wr-foto-marker.ist-video::after {
	content: "▶";
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 2.6em;
	height: 2.6em;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font: 1em/2.6em system-ui, sans-serif;
	text-align: center;
	padding-left: 0.15em;
	box-sizing: border-box;
	pointer-events: none;
}

.wr-foto-marker.ist-video::after {
	width: 1.6em;
	height: 1.6em;
	font-size: 0.7em;
	line-height: 1.6em;
}

.wr-galerie-bild.ist-video a {
	position: relative;
}

.wr-video-leer {
	display: block;
	width: 100%;
	height: 100%;
	background: #222;
}

.wr-lb figcaption {
	color: #eee;
	padding: 0.6em 1em;
	text-align: center;
	font-size: 0.95em;
}

.wr-lb button {
	position: absolute;
	background: rgba(0, 0, 0, 0.4);
	color: #fff;
	border: 0;
	font-size: 2.2rem;
	line-height: 1;
	width: 2.6rem;
	height: 2.6rem;
	border-radius: 50%;
	cursor: pointer;
}

.wr-lb-zu { top: 10px; right: 10px; }
.wr-lb-zurueck { left: 10px; top: 50%; transform: translateY(-50%); }
.wr-lb-weiter { right: 10px; top: 50%; transform: translateY(-50%); }
.wr-lb.einzeln .wr-lb-zurueck,
.wr-lb.einzeln .wr-lb-weiter { display: none; }

/* ------------------------------------------------------- Destinationen */

.wr-destinationen {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 16px;
}

.wr-destination {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
	border: 1px solid var(--wr-rand);
	border-radius: var(--wr-radius);
	overflow: hidden;
	border-top: 4px solid var(--wr-geplant);
}

.wr-destination.wr-status-aktuell { border-top-color: var(--wr-aktuell); }
.wr-destination.wr-status-besucht { border-top-color: var(--wr-besucht); }
.wr-destination.wr-status-geplant .wr-destination-bild { filter: grayscale(0.6); }

.wr-destination-bild {
	aspect-ratio: 16 / 10;
	background: var(--wr-flaeche);
}

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

.wr-destination-text {
	padding: 10px 12px 12px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 0.9em;
}

.wr-destination-text strong {
	font-size: 1.15em;
}

.wr-destination-text .wr-badge {
	align-self: flex-start;
}

/* ------------------------------------------------- Aktuell / Statistik */

.wr-aktuell {
	padding: 1em 1.2em;
	border-left: 5px solid var(--wr-aktuell);
	background: var(--wr-flaeche);
	border-radius: var(--wr-radius);
}

.wr-aktuell p {
	margin: 0.3em 0;
}

.wr-aktuell-titel {
	font-size: 1.4em;
}

.wr-aktuell .wr-galerie {
	grid-template-columns: 1fr;
	max-width: 480px;
}

.wr-aktuell .wr-galerie-bild {
	aspect-ratio: 4 / 3;
}

/* 8 Kacheln: Handy 2 × 4, ab Tablet 4 × 2 */
.wr-statistik {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
}

@media (min-width: 600px) {
	.wr-statistik {
		grid-template-columns: repeat(4, 1fr);
	}
}

.wr-kachel {
	background: var(--wr-flaeche);
	border-radius: var(--wr-radius);
	padding: 0.8em;
	text-align: center;
	display: flex;
	flex-direction: column;
}

.wr-kachel strong {
	font-size: 1.6em;
	line-height: 1.2;
}

.wr-kachel span {
	font-size: 0.85em;
	opacity: 0.8;
}

/* --------------------------------------------- Tauchlog / Achterbahnen */

.wr-summe {
	font-size: 1.05em;
}

.wr-tabelle {
	overflow-x: auto;
}

.wr-tabelle table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9em;
}

.wr-tabelle th,
.wr-tabelle td {
	text-align: left;
	padding: 6px 8px;
	border-bottom: 1px solid var(--wr-rand);
	vertical-align: top;
}

.wr-fakten {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 4px 16px;
	padding: 1em;
	background: var(--wr-flaeche);
	border-radius: var(--wr-radius);
}

.wr-fakten dt {
	font-weight: 600;
}

.wr-fakten dd {
	margin: 0;
}

.wr-zaehler {
	display: flex;
	align-items: center;
	gap: 0.6em;
}

.wr-zaehler strong {
	font-size: 3.5em;
	line-height: 1;
	color: var(--wr-aktuell);
}

.wr-fortschritt {
	height: 10px;
	border-radius: 5px;
	background: var(--wr-flaeche);
	overflow: hidden;
	margin: 0.8em 0 0.3em;
}

.wr-fortschritt span {
	display: block;
	height: 100%;
	background: var(--wr-besucht);
}

.wr-bahnen {
	list-style: none;
	padding: 0;
}

.wr-bahnen li {
	padding: 4px 0;
	border-bottom: 1px solid var(--wr-rand);
}

.wr-bahnen li span {
	opacity: 0.75;
	font-size: 0.9em;
}

.wr-bahnen .wr-sterne {
	color: #e0a800;
	opacity: 1;
}

.wr-untertitel {
	font-weight: 600;
	margin-top: 1.5em;
}

.wr-nav {
	display: flex;
	justify-content: space-between;
	gap: 1em;
	margin-top: 2em;
	padding-top: 1em;
	border-top: 1px solid var(--wr-rand);
}

/* -------------------------------------------------------------- Upload */

.wr-upload {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.wr-up-feld select {
	display: block;
	width: 100%;
	margin-top: 4px;
	padding: 10px;
	font-size: 1rem;
}

.wr-up-waehlen {
	text-align: center;
	font-size: 1.15rem;
	cursor: pointer;
}

.wr-up-option {
	font-size: 0.9em;
}

.wr-up-liste {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.wr-up-eintrag {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 8px;
	border: 1px solid var(--wr-rand);
	border-radius: var(--wr-radius);
}

.wr-up-eintrag.fertig { border-color: var(--wr-besucht); }
.wr-up-eintrag.fehler { border-color: #c0392b; }

.wr-up-vorschau {
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: 6px;
	flex: none;
	background: var(--wr-flaeche);
}

.wr-up-details {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 0.85rem;
}

.wr-up-name {
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wr-up-kommentar {
	width: 100%;
	padding: 6px;
	font-size: 1rem;
	box-sizing: border-box;
}

.wr-up-details progress {
	width: 100%;
}

.wr-up-mini {
	font-size: 0.8rem;
	padding: 2px 8px;
	margin: 2px 4px 2px 0;
	border-radius: 12px;
	border: 1px solid var(--wr-rand);
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.wr-up-entfernen {
	border: 0;
	background: transparent;
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
	color: inherit;
	opacity: 0.6;
}

/* Nextcloud-Auswahl */

.wr-up-titel {
	margin: 0.8em 0 0;
	font-size: 1.1rem;
}

.wr-up-titel small {
	font-weight: normal;
	opacity: 0.7;
	font-size: 0.8em;
}

.wr-nc {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--wr-rand);
}

.wr-nc-tag {
	margin: 8px 0 2px;
	font-weight: 600;
	font-size: 0.9rem;
}

.wr-nc-raster {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
	gap: 4px;
}

.wr-nc-bild {
	position: relative;
	aspect-ratio: 1;
	padding: 0;
	border: 3px solid transparent;
	border-radius: 6px;
	overflow: hidden;
	background: var(--wr-flaeche);
	cursor: pointer;
}

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

.wr-nc-bild span {
	position: absolute;
	left: 3px;
	bottom: 3px;
	font: 600 10px/1.4 system-ui, sans-serif;
	color: #fff;
	background: rgba(0, 0, 0, 0.5);
	padding: 0 4px;
	border-radius: 3px;
}

.wr-nc-bild.ist-gewaehlt {
	border-color: var(--wr-aktuell);
}

.wr-nc-bild.ist-gewaehlt::after,
.wr-nc-bild.ist-importiert::after {
	position: absolute;
	top: 3px;
	right: 3px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	color: #fff;
	font: 700 14px/22px system-ui, sans-serif;
	text-align: center;
}

.wr-nc-bild.ist-gewaehlt::after {
	content: "✓";
	background: var(--wr-aktuell);
}

.wr-nc-bild.ist-importiert {
	cursor: default;
}

.wr-nc-bild.ist-importiert img {
	opacity: 0.45;
}

.wr-nc-bild.ist-importiert::after {
	content: "✔";
	background: var(--wr-besucht);
}

.wr-nc-bild.ist-video::before {
	content: "▶";
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font: 12px/26px system-ui, sans-serif;
	text-align: center;
	padding-left: 2px;
	box-sizing: border-box;
	pointer-events: none;
	z-index: 1;
}

.wr-nc-bild.ist-zugross {
	opacity: 0.35;
	cursor: not-allowed;
}

.wr-up-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(0, 0, 0, 0.6);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px;
}

.wr-up-modal-box {
	background: #fff;
	color: #111;
	border-radius: var(--wr-radius);
	padding: 12px;
	width: 100%;
	max-width: 640px;
}

.wr-up-modal-karte {
	height: 60vh;
	border-radius: 6px;
}

.wr-up-abbrechen {
	background: transparent;
	border: 0;
	text-decoration: underline;
	cursor: pointer;
}

@media (max-width: 600px) {
	.wr-galerie {
		grid-template-columns: repeat(3, 1fr);
		gap: 3px;
	}
}
