/* ==========================================================================
   Gepäckgeschichten Reisetagebuch – Frontend Timeline
   Alle Selektoren sind auf .ggt-* beschränkt – keine globalen Kollisionen.
   ========================================================================== */

/* ── Custom Properties ──────────────────────────────────────────────────── */
.ggt-timeline {
	--ggt-accent:       #3a7dbd;
	--ggt-accent-muted: #e8f1f9;
	--ggt-line-color:   #d0d9e3;
	--ggt-dot-size:     14px;
	--ggt-dot-border:   3px;
	--ggt-radius:       8px;
	--ggt-gap:          32px;
	--ggt-font:         inherit;
	--ggt-text:         inherit;
	--ggt-text-muted:   #6b7280;
	--ggt-card-bg:      #ffffff;
	--ggt-card-border:  #e5e9ee;
	--ggt-shadow:       0 2px 12px rgba(0,0,0,.06);

	font-family: var(--ggt-font);
	color: var(--ggt-text);
	max-width: 100%;
}

/* Trawell-compatible mode – softer, inherits more from theme */
.ggt-timeline[data-mode="trawell"] {
	--ggt-card-bg:    transparent;
	--ggt-card-border: rgba(0,0,0,.08);
	--ggt-shadow:     none;
}

/* Minimal mode */
.ggt-timeline[data-mode="minimal"] {
	--ggt-card-bg:    transparent;
	--ggt-card-border: transparent;
	--ggt-shadow:     none;
	--ggt-accent:     currentColor;
}

/* ── Journey header ─────────────────────────────────────────────────────── */
.ggt-timeline__header {
	margin-bottom: var(--ggt-gap);
}

.ggt-timeline__hero {
	width: 100%;
	height: 280px;
	background-size: cover;
	background-position: center;
	border-radius: var(--ggt-radius);
	margin-bottom: 20px;
}

.ggt-timeline__title {
	font-size: 1.75rem;
	font-weight: 700;
	margin: 0 0 10px;
	line-height: 1.2;
}

.ggt-timeline__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	font-size: .875rem;
	color: var(--ggt-text-muted);
	margin-bottom: 12px;
}

.ggt-timeline__desc {
	font-size: 1rem;
	color: var(--ggt-text-muted);
	max-width: 72ch;
	margin: 0;
}

/* ── Timeline list ──────────────────────────────────────────────────────── */
.ggt-timeline__list {
	position: relative;
	padding-left: 32px;
}

/* Vertical line behind all items */
.ggt-timeline__list::before {
	content: '';
	position: absolute;
	left: 6px;
	top: 8px;
	bottom: 8px;
	width: 2px;
	background: var(--ggt-line-color);
}

/* ── Individual item ────────────────────────────────────────────────────── */
.ggt-timeline__item {
	position: relative;
	margin-bottom: var(--ggt-gap);
}

.ggt-timeline__connector {
	position: absolute;
	left: -32px;
	top: 18px;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.ggt-timeline__dot {
	width: var(--ggt-dot-size);
	height: var(--ggt-dot-size);
	border-radius: 50%;
	background: var(--ggt-accent);
	border: var(--ggt-dot-border) solid var(--ggt-card-bg, #fff);
	box-shadow: 0 0 0 2px var(--ggt-accent);
	flex-shrink: 0;
}

/* ── Card ───────────────────────────────────────────────────────────────── */
.ggt-timeline__card {
	background: var(--ggt-card-bg);
	border: 1px solid var(--ggt-card-border);
	border-radius: var(--ggt-radius);
	box-shadow: var(--ggt-shadow);
	overflow: hidden;
}

.ggt-timeline__card-image {
	width: 100%;
	aspect-ratio: 16/7;
	overflow: hidden;
}

.ggt-timeline__card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .3s ease;
}

.ggt-timeline__card:hover .ggt-timeline__card-image img {
	transform: scale(1.02);
}

.ggt-timeline__card-body {
	padding: 20px 24px 24px;
}

/* ── Card header ────────────────────────────────────────────────────────── */
.ggt-timeline__card-header {
	margin-bottom: 14px;
}

.ggt-stage-number {
	display: inline-block;
	font-size: .75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--ggt-accent);
	margin-bottom: 4px;
}

.ggt-stage-title {
	font-size: 1.2rem;
	font-weight: 700;
	margin: 0 0 4px;
	line-height: 1.3;
}

.ggt-stage-date {
	display: block;
	font-size: .8rem;
	color: var(--ggt-text-muted);
	margin-bottom: 4px;
}

.ggt-stage-route {
	font-size: .875rem;
	color: var(--ggt-text-muted);
}

/* ── Stats row ──────────────────────────────────────────────────────────── */
.ggt-timeline__card-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 20px;
	margin-bottom: 16px;
	padding: 10px 14px;
	background: var(--ggt-accent-muted);
	border-radius: calc(var(--ggt-radius) - 2px);
	font-size: .8rem;
}

.ggt-stat {
	display: flex;
	align-items: center;
	gap: 5px;
	white-space: nowrap;
}

.ggt-stat__icon {
	font-size: .9rem;
}

/* ── Text content ───────────────────────────────────────────────────────── */
.ggt-stage-desc {
	font-size: .95rem;
	margin: 0 0 16px;
	line-height: 1.65;
}

/* ── Moments ────────────────────────────────────────────────────────────── */
.ggt-moment {
	padding: 12px 16px;
	border-radius: calc(var(--ggt-radius) - 2px);
	margin-bottom: 12px;
	font-size: .9rem;
	line-height: 1.6;
	border-left: 3px solid;
}

.ggt-moment strong {
	display: block;
	font-size: .75rem;
	text-transform: uppercase;
	letter-spacing: .07em;
	margin-bottom: 4px;
}

.ggt-moment p {
	margin: 0;
}

.ggt-moment--highlight {
	background: #fffdf0;
	border-color: #f0c040;
}

.ggt-moment--best {
	background: #f0f8ff;
	border-color: var(--ggt-accent);
}

.ggt-moment--chaos {
	background: #fff5f0;
	border-color: #e08060;
}

/* ── Gallery ────────────────────────────────────────────────────────────── */
.ggt-timeline__gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 6px;
	margin: 16px 0;
}

.ggt-gallery__item {
	margin: 0;
	overflow: hidden;
	border-radius: 4px;
	aspect-ratio: 4/3;
}

.ggt-gallery__link {
	display: block;
	height: 100%;
}

.ggt-gallery__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .25s;
}

.ggt-gallery__item:hover img {
	transform: scale(1.04);
}

.ggt-gallery__item figcaption {
	font-size: .75rem;
	color: var(--ggt-text-muted);
	padding: 4px 2px 0;
}

/* ── Stage map ──────────────────────────────────────────────────────────── */
.ggt-stage-map,
.ggt-leaflet-wrapper {
	border-radius: var(--ggt-radius);
	overflow: hidden;
	border: 1px solid var(--ggt-card-border);
}

/* ── Overnight ──────────────────────────────────────────────────────────── */
.ggt-overnight {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: .85rem;
	color: var(--ggt-text-muted);
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--ggt-card-border);
}

/* ── Conclusion ─────────────────────────────────────────────────────────── */
.ggt-stage-conclusion {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid var(--ggt-card-border);
	font-size: .9rem;
	color: var(--ggt-text-muted);
}

/* ── Overview map ───────────────────────────────────────────────────────── */
.ggt-timeline__map {
	margin-top: var(--ggt-gap);
}

#ggt-map {
	border-radius: var(--ggt-radius);
	overflow: hidden;
	border: 1px solid var(--ggt-card-border);
}

/* ── Notice ─────────────────────────────────────────────────────────────── */
.ggt-notice {
	padding: 12px 16px;
	background: var(--ggt-accent-muted);
	border-radius: var(--ggt-radius);
	font-size: .9rem;
}

/* ── Compact layout ─────────────────────────────────────────────────────── */
.ggt-layout-compact .ggt-timeline__card-body {
	padding: 14px 18px;
}

.ggt-layout-compact .ggt-stage-title {
	font-size: 1rem;
}

.ggt-layout-compact .ggt-timeline__card-stats {
	padding: 6px 10px;
	font-size: .75rem;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (min-width: 768px) {
	.ggt-timeline__list {
		padding-left: 40px;
	}
	.ggt-timeline__connector {
		left: -40px;
	}
	.ggt-timeline__list::before {
		left: 10px;
	}
}

@media (max-width: 600px) {
	.ggt-timeline__hero {
		height: 180px;
	}
	.ggt-timeline__title {
		font-size: 1.3rem;
	}
	.ggt-timeline__card-body {
		padding: 14px 16px 18px;
	}
	.ggt-timeline__gallery {
		grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
	}
	.ggt-timeline__card-stats {
		gap: 8px 12px;
	}
}

/* ── Reduced motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
	.ggt-timeline__card-image img,
	.ggt-gallery__item img {
		transition: none;
	}
}
