/* ========================================================================
   Transport hub — redesigned
   ======================================================================== */

:root {
	--th-bg: #f9f7f2;
	--th-surface: #ffffff;
	--th-ink: #2d2a26;
	--th-ink-muted: #6b635a;
	--th-ink-soft: #8a8177;
	--th-border: #ebe5d9;
	--th-border-soft: #f0ebe0;
	--th-accent: #3e7a47;
	--th-accent-soft: #eaf0e5;
	--th-warn-bg: #fdf5e1;
	--th-warn-border: #ead9a2;
	--th-warn-ink: #7a5a18;
	--th-shadow: 0 1px 2px rgba(30, 25, 15, .04), 0 8px 24px -12px rgba(30, 25, 15, .08);
	--th-radius: 14px;
	--th-radius-sm: 8px;
}

.transport-hub {
	max-width: 1440px;
	margin: 0 auto;
	padding: 2.5rem 1.5rem 4rem;
	color: var(--th-ink);
	font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Header ---------------------------------------------------------------- */

.transport-hub__header {
	text-align: center;
	margin-bottom: 2.5rem;
}

.transport-hub__eyebrow {
	text-transform: uppercase;
	font-size: .78rem;
	letter-spacing: .14em;
	color: var(--th-ink-soft);
	margin: 0 0 .5rem;
	font-weight: 600;
}

.transport-hub__title {
	margin: 0 0 .6rem;
	font-size: clamp(1.9rem, 4vw, 2.6rem);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -.01em;
}

.transport-hub__lede {
	margin: 0 auto;
	max-width: 620px;
	color: var(--th-ink-muted);
	font-size: 1.05rem;
	line-height: 1.55;
}

/* Route tabs ------------------------------------------------------------ */

.route-tabs {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: .75rem;
	margin-bottom: 2rem;
}

.route-tabs__btn {
	all: unset;
	display: flex;
	flex-direction: column;
	gap: .15rem;
	padding: 1rem 1.1rem;
	background: var(--th-surface);
	border: 2px solid var(--th-border);
	border-radius: var(--th-radius);
	cursor: pointer;
	transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
	position: relative;
	overflow: hidden;
}

.route-tabs__btn:hover {
	border-color: var(--route-color);
	transform: translateY(-1px);
}

.route-tabs__btn.is-active {
	border-color: var(--route-color);
	background: linear-gradient(180deg, var(--th-surface) 0%, color-mix(in srgb, var(--route-color) 5%, var(--th-surface)) 100%);
	box-shadow: var(--th-shadow);
}

.route-tabs__btn.is-active::before {
	content: '';
	position: absolute;
	inset: 0 0 auto 0;
	height: 3px;
	background: var(--route-color);
}

.route-tabs__dot {
	width: 8px;
	height: 8px;
	border-radius: 999px;
	background: var(--route-color);
	display: inline-block;
	margin-bottom: .35rem;
}

.route-tabs__name {
	font-weight: 700;
	font-size: 1rem;
}

.route-tabs__sub {
	font-size: .85rem;
	color: var(--th-ink-muted);
}

/* Route panel ----------------------------------------------------------- */

.route-panel {
	display: none;
}

.route-panel.is-active {
	display: block;
	animation: th-fade .2s ease;
}

@keyframes th-fade {
	from { opacity: 0; transform: translateY(4px); }
	to   { opacity: 1; transform: translateY(0); }
}

.route-panel__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(320px, 1fr);
	gap: 2rem;
	align-items: start;
}

@media (max-width: 960px) {
	.route-panel__grid {
		grid-template-columns: 1fr;
	}
}

/* Info column ----------------------------------------------------------- */

.route-panel__info {
	background: var(--th-surface);
	border: 1px solid var(--th-border);
	border-radius: var(--th-radius);
	padding: 1.75rem;
	box-shadow: var(--th-shadow);
}

.route-panel__header h2 {
	margin: 0;
	font-size: 1.6rem;
	font-weight: 700;
	letter-spacing: -.005em;
}

.route-panel__subtitle {
	margin: .2rem 0 1rem;
	color: var(--th-ink-muted);
	font-size: 1rem;
}

.route-panel__summary {
	margin: 0 0 1.5rem;
	color: var(--th-ink);
	line-height: 1.6;
}

/* Meta list ------------------------------------------------------------- */

.meta-list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 1rem 1.5rem;
	margin: 0 0 2rem;
	padding: 1.1rem 1.25rem;
	background: color-mix(in srgb, var(--route-color) 6%, var(--th-surface));
	border: 1px solid color-mix(in srgb, var(--route-color) 18%, var(--th-border));
	border-radius: var(--th-radius-sm);
}

.meta-item dt {
	font-size: .72rem;
	text-transform: uppercase;
	letter-spacing: .1em;
	color: var(--th-ink-soft);
	margin: 0 0 .15rem;
	font-weight: 600;
}

.meta-item dd {
	margin: 0;
	font-weight: 500;
	font-size: .95rem;
	color: var(--th-ink);
}

.meta-item a {
	color: var(--route-color);
	text-decoration: none;
}

.meta-item a:hover {
	text-decoration: underline;
}

/* Sections -------------------------------------------------------------- */

.route-section {
	margin-bottom: 2rem;
}

.route-section:last-child {
	margin-bottom: 0;
}

.route-section__title {
	margin: 0 0 1rem;
	font-size: 1.1rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	gap: .5rem;
}

.route-section__count {
	background: var(--th-border-soft);
	color: var(--th-ink-muted);
	font-size: .75rem;
	font-weight: 600;
	padding: .1rem .5rem;
	border-radius: 999px;
}

/* Schedule -------------------------------------------------------------- */

.schedule-cols {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 1.25rem;
	margin-bottom: 1rem;
}

.schedule-col__label {
	margin: 0 0 .6rem;
	font-size: .9rem;
	font-weight: 600;
	color: var(--th-ink);
}

.time-chips {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: .35rem;
}

.time-chips__chip {
	background: var(--th-accent-soft);
	border: 1px solid color-mix(in srgb, var(--route-color) 18%, var(--th-border));
	border-radius: 999px;
	padding: .22rem .6rem;
	font-variant-numeric: tabular-nums;
	font-size: .85rem;
	color: color-mix(in srgb, var(--route-color) 70%, var(--th-ink));
	font-weight: 500;
}

.time-chips--seasonal .time-chips__chip {
	background: var(--th-warn-bg);
	border-color: var(--th-warn-border);
	color: var(--th-warn-ink);
}

.schedule-col__note {
	margin: .5rem 0 0;
	font-size: .82rem;
	color: var(--th-ink-muted);
	font-style: italic;
}

.schedule-seasonal {
	margin-top: 1.25rem;
	padding: 1rem 1.25rem;
	background: var(--th-warn-bg);
	border: 1px solid var(--th-warn-border);
	border-radius: var(--th-radius-sm);
}

.schedule-seasonal__title {
	margin: 0 0 .75rem;
	font-size: .9rem;
	font-weight: 700;
	color: var(--th-warn-ink);
	text-transform: uppercase;
	letter-spacing: .04em;
}

.schedule-seasonal__item + .schedule-seasonal__item {
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px dashed var(--th-warn-border);
}

.schedule-seasonal__label {
	margin: 0 0 .5rem;
	font-size: .88rem;
	font-weight: 600;
	color: var(--th-warn-ink);
}

/* Stops list ------------------------------------------------------------ */

.stops {
	list-style: none;
	padding: 0;
	margin: 0;
	counter-reset: none;
	border: 1px solid var(--th-border);
	border-radius: var(--th-radius-sm);
	overflow: hidden;
}

.stop {
	display: flex;
	align-items: center;
	gap: .85rem;
	padding: .65rem .85rem;
	border-top: 1px solid var(--th-border-soft);
	cursor: pointer;
	transition: background .12s ease;
}

.stop:first-child {
	border-top: none;
}

.stop:hover,
.stop.is-active {
	background: color-mix(in srgb, var(--route-color) 6%, var(--th-surface));
}

.stop.is-active {
	box-shadow: inset 3px 0 0 var(--route-color);
}

.stop__num {
	flex: 0 0 28px;
	height: 28px;
	border-radius: 999px;
	background: var(--th-border-soft);
	color: var(--th-ink-muted);
	font-size: .78rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .12s ease, color .12s ease;
}

.stop:hover .stop__num,
.stop.is-active .stop__num {
	background: var(--route-color);
	color: #fff;
}

.stop--highlight .stop__num {
	background: var(--route-color);
	color: #fff;
}

.stop--optional {
	opacity: .72;
}

.stop__body {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: .1rem;
	min-width: 0;
}

.stop__name {
	font-size: .95rem;
	font-weight: 500;
	color: var(--th-ink);
}

.stop__note {
	font-size: .78rem;
	color: var(--th-ink-soft);
	font-style: italic;
}

.stop__link {
	flex: 0 0 auto;
	color: var(--th-ink-soft);
	padding: .3rem;
	border-radius: 6px;
	display: flex;
	align-items: center;
	text-decoration: none;
	transition: color .12s ease, background .12s ease;
}

.stop__link:hover {
	color: var(--route-color);
	background: var(--th-border-soft);
}

/* Sources --------------------------------------------------------------- */

.route-sources {
	margin-top: 1.75rem;
	padding-top: 1rem;
	border-top: 1px solid var(--th-border-soft);
	font-size: .82rem;
	color: var(--th-ink-soft);
}

.route-sources a {
	color: var(--th-ink-muted);
	text-decoration: none;
	border-bottom: 1px dotted var(--th-ink-soft);
}

.route-sources a:hover {
	color: var(--route-color);
	border-bottom-color: var(--route-color);
}

/* Map column ------------------------------------------------------------ */

.route-panel__map {
	position: sticky;
	top: 1.5rem;
	background: var(--th-surface);
	border: 1px solid var(--th-border);
	border-radius: var(--th-radius);
	padding: 1.25rem;
	box-shadow: var(--th-shadow);
}

@media (max-width: 960px) {
	.route-panel__map {
		position: static;
	}
}

.map-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: .85rem;
	flex-wrap: wrap;
}

.map-header__title {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
}

.map-toggle {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	cursor: pointer;
	font-size: .82rem;
	color: var(--th-ink-muted);
	user-select: none;
}

.map-toggle__input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.map-toggle__track {
	width: 34px;
	height: 20px;
	background: var(--th-border);
	border-radius: 999px;
	position: relative;
	transition: background .15s ease;
	flex: 0 0 auto;
}

.map-toggle__thumb {
	position: absolute;
	top: 2px;
	left: 2px;
	width: 16px;
	height: 16px;
	background: #fff;
	border-radius: 999px;
	transition: transform .15s ease;
	box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.map-toggle__input:checked + .map-toggle__track {
	background: var(--route-color);
}

.map-toggle__input:checked + .map-toggle__track .map-toggle__thumb {
	transform: translateX(14px);
}

.map-canvas {
	width: 100%;
	height: 520px;
	border-radius: var(--th-radius-sm);
	background: #eeeae1;
	position: relative;
	overflow: hidden;
}

@media (max-width: 960px) {
	.map-canvas {
		height: 420px;
	}
}

.map-canvas__placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--th-ink-soft);
	font-size: .9rem;
	text-align: center;
	padding: 1rem;
}

.rudartsi-missing-gmaps-key .map-canvas__placeholder::before {
	content: 'Google Maps API ключ липсва. Настрой в Изглед → Персонализиране → Rudartsi — интеграции.';
}

.map-hint {
	margin: .75rem 0 0;
	font-size: .8rem;
	color: var(--th-ink-soft);
	text-align: center;
}

/* Map marker labels (custom overlay) */

.map-label {
	position: absolute;
	background: #fff;
	color: var(--th-ink);
	padding: 3px 7px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 500;
	white-space: nowrap;
	box-shadow: 0 1px 3px rgba(0,0,0,.15), 0 0 0 1px rgba(0,0,0,.06);
	transform: translate(12px, -50%);
	pointer-events: none;
	transition: opacity .15s ease;
	z-index: 1;
}

.map-label--highlight {
	background: var(--th-ink);
	color: #fff;
}

.map-label--hidden {
	opacity: 0;
}

/* InfoWindow polish */

.gm-style .gm-style-iw-c {
	border-radius: 10px !important;
	padding: 10px 14px !important;
	box-shadow: 0 2px 8px rgba(0,0,0,.15) !important;
}

.gm-style-iw-d {
	overflow: visible !important;
}

.iw-content {
	font-size: .9rem;
	line-height: 1.4;
	max-width: 220px;
}

.iw-content__name {
	font-weight: 600;
	color: var(--th-ink);
	margin: 0 0 .15rem;
}

.iw-content__note {
	font-size: .78rem;
	color: var(--th-ink-soft);
	font-style: italic;
	margin: 0;
}

/* Disclaimer ------------------------------------------------------------ */

.transport-disclaimer {
	margin-top: 2.5rem;
	padding: 1.1rem 1.5rem;
	background: var(--th-warn-bg);
	border: 1px solid var(--th-warn-border);
	border-radius: var(--th-radius-sm);
	font-size: .92rem;
	color: var(--th-warn-ink);
}

.transport-disclaimer p {
	margin: 0;
}

.transport-disclaimer a {
	color: var(--th-warn-ink);
	font-weight: 600;
}
