/* CroatiaRentalCars – rental locations map */
.crc-locmap {
	--lm-navy: #0B1B3F;
	--lm-blue: #1D4ED8;
	--lm-orange: #F97316;
	--lm-line: #E6EAF2;
	--lm-soft: #F5F7FB;
	--lm-muted: #5B6578;
	--lm-airport: #1D4ED8;
	--lm-city: #F97316;
	--lm-station: #0F766E;
	--lm-marina: #7C3AED;
	--lm-shadow: 0 1px 2px rgba(11, 27, 63, .04), 0 10px 30px rgba(11, 27, 63, .08);
	margin: 32px auto 56px;
	max-width: 1280px;
	color: var(--lm-navy);
}
.crc-locmap * { box-sizing: border-box; }

/* Page hero (H1 + intro from the page content) */
body.crc-locations-page .wp-block-post-content > h1:first-child {
	font-size: clamp(32px, 4.4vw, 52px);
	font-weight: 800;
	letter-spacing: -.03em;
	line-height: 1.06;
	margin-top: 40px;
	text-wrap: balance;
}
body.crc-locations-page .wp-block-post-content > h1:first-child + p {
	font-size: 17px;
	line-height: 1.65;
	color: var(--lm-muted, #5B6578);
	max-width: 860px;
}

/* Stats */
.crc-locmap__stats {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 12px;
	margin-bottom: 36px;
}
.crc-locmap__stat {
	background: #fff;
	border: 1px solid var(--lm-line);
	border-radius: 16px;
	padding: 16px 18px;
	box-shadow: var(--lm-shadow);
	display: flex;
	flex-direction: column;
	gap: 2px;
	position: relative;
	overflow: hidden;
}
.crc-locmap__stat::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--lm-navy); }
.crc-locmap__stat--airport::after { background: var(--lm-airport); }
.crc-locmap__stat--city::after { background: var(--lm-city); }
.crc-locmap__stat--station::after { background: var(--lm-station); }
.crc-locmap__stat--marina::after { background: var(--lm-marina); }
.crc-locmap__stat strong { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.crc-locmap__stat span { font-size: 14px; color: var(--lm-muted); font-weight: 600; }

.crc-locmap__title { font-size: clamp(24px, 2.6vw, 32px); font-weight: 800; letter-spacing: -.02em; margin: 0 0 16px; }

/* Toolbar */
.crc-locmap__toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; }
.crc-locmap__search {
	flex: 1 1 280px;
	display: flex;
	align-items: center;
	gap: 10px;
	height: 50px;
	padding: 0 16px;
	background: #fff;
	border: 1.5px solid #D5DCE8;
	border-radius: 999px;
	color: var(--lm-muted);
	transition: border-color .15s ease, box-shadow .15s ease;
}
.crc-locmap__search:focus-within { border-color: var(--lm-blue); box-shadow: 0 0 0 4px rgba(29, 78, 216, .12); }
.crc-locmap__search input { border: 0; outline: 0; background: transparent; flex: 1; font: inherit; font-size: 16px; color: var(--lm-navy); min-width: 0; height: 100%; }
.crc-locmap__filters { display: flex; flex-wrap: wrap; gap: 8px; }
.crc-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 44px;
	padding: 0 16px;
	border-radius: 999px;
	border: 1.5px solid #D5DCE8;
	background: #fff;
	color: var(--lm-navy);
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.crc-chip span { font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--lm-soft); color: var(--lm-muted); }
.crc-chip:hover { border-color: var(--lm-navy); }
.crc-chip.is-active { background: var(--lm-navy); border-color: var(--lm-navy); color: #fff; }
.crc-chip.is-active span { background: rgba(255, 255, 255, .16); color: #fff; }
.crc-chip:focus-visible, .crc-locmap__near:focus-visible, .crc-loc__pin:focus-visible, .crc-loc__name:focus-visible { outline: 3px solid var(--lm-orange); outline-offset: 2px; }
.crc-locmap__near {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 44px;
	padding: 0 18px;
	border-radius: 999px;
	border: 0;
	background: var(--lm-orange);
	color: #fff;
	font: inherit;
	font-size: 14px;
	font-weight: 800;
	cursor: pointer;
	box-shadow: 0 8px 20px rgba(249, 115, 22, .28);
	transition: transform .15s ease, box-shadow .15s ease;
}
.crc-locmap__near:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(249, 115, 22, .34); }
.crc-locmap__near.is-busy { opacity: .7; cursor: progress; }

/* Layout */
.crc-locmap__body {
	display: grid;
	grid-template-columns: minmax(300px, 400px) 1fr;
	gap: 0;
	background: #fff;
	border: 1px solid var(--lm-line);
	border-radius: 22px;
	box-shadow: var(--lm-shadow);
	overflow: hidden;
	height: 680px;
}

/* List */
.crc-locmap__list { overflow-y: auto; padding: 8px 10px 16px; border-right: 1px solid var(--lm-line); scrollbar-width: thin; }
.crc-locmap__group-title {
	position: sticky;
	top: -8px;
	z-index: 2;
	margin: 0;
	padding: 14px 10px 8px;
	background: linear-gradient(#fff 80%, rgba(255, 255, 255, 0));
	font-size: 12px !important;
	font-weight: 800;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--lm-muted);
}
.crc-locmap__group ul { list-style: none; margin: 0; padding: 0; }
.crc-loc {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px;
	border-radius: 14px;
	transition: background-color .15s ease;
}
.crc-loc:hover { background: var(--lm-soft); }
.crc-loc.is-active { background: #EEF3FF; box-shadow: inset 3px 0 0 var(--lm-blue); }
.crc-loc__icon { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.crc-loc__icon--airport { background: #EEF3FF; color: var(--lm-airport); }
.crc-loc__icon--city { background: #FFF1E6; color: #C2410C; }
.crc-loc__icon--station { background: #E6F6F3; color: var(--lm-station); }
.crc-loc__icon--marina { background: #F1EBFE; color: var(--lm-marina); }
.crc-loc__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.crc-loc__name { font-weight: 800; color: var(--lm-navy) !important; text-decoration: none !important; line-height: 1.3; }
.crc-loc__name:hover { color: var(--lm-blue) !important; text-decoration: underline !important; text-underline-offset: 3px; }
.crc-loc__meta { font-size: 13px; color: var(--lm-muted); }
.crc-loc__dist { font-weight: 700; color: var(--lm-blue); }
.crc-loc__pin {
	flex: none;
	width: 40px;
	height: 40px;
	border-radius: 999px;
	border: 1.5px solid var(--lm-line);
	background: #fff;
	color: var(--lm-blue);
	display: grid;
	place-items: center;
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease;
}
.crc-loc__pin:hover { background: #EEF3FF; border-color: #C7D5FB; }
.crc-locmap__empty { padding: 16px 10px; color: var(--lm-muted); }

/* Sorted by distance: one flat list */
.crc-locmap.is-sorted [data-list] { display: flex; flex-direction: column; }
.crc-locmap.is-sorted .crc-locmap__group,
.crc-locmap.is-sorted .crc-locmap__group ul { display: contents; }
.crc-locmap.is-sorted .crc-locmap__group-title { display: none; }

/* Map */
.crc-locmap__mapwrap { position: relative; display: flex; flex-direction: column; min-height: 0; }
.crc-locmap__map { flex: 1; min-height: 0; background: #E8EEF7; }
.crc-locmap__legend {
	position: absolute;
	left: 14px;
	bottom: 52px;
	z-index: 500;
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	margin: 0;
	padding: 10px 14px;
	list-style: none;
	background: rgba(255, 255, 255, .95);
	border: 1px solid var(--lm-line);
	border-radius: 12px;
	box-shadow: var(--lm-shadow);
	font-size: 13px;
	font-weight: 700;
}
.crc-locmap__legend li { display: flex; align-items: center; gap: 6px; }
.crc-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(11, 27, 63, .2); }
.crc-dot--airport { background: var(--lm-airport); }
.crc-dot--city { background: var(--lm-city); }
.crc-dot--station { background: var(--lm-station); }
.crc-dot--marina { background: var(--lm-marina); }
.crc-locmap__note { margin: 0; padding: 10px 16px; font-size: 12.5px; color: var(--lm-muted); border-top: 1px solid var(--lm-line); background: #fff; }

/* Markers */
.crc-mk { background: none; border: 0; }
.crc-mk span {
	display: block;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: 3px solid #fff;
	box-shadow: 0 2px 6px rgba(11, 27, 63, .35);
	transition: transform .15s ease;
}
.crc-mk--airport span { background: var(--lm-airport, #1D4ED8); }
.crc-mk--city span { background: var(--lm-city, #F97316); }
.crc-mk--station span { background: var(--lm-station, #0F766E); }
.crc-mk--marina span { background: var(--lm-marina, #7C3AED); }
.crc-mk:hover span, .crc-mk.is-hot span { transform: scale(1.35); }
.crc-mk:focus-visible { outline: none; }
.crc-mk:focus-visible span { box-shadow: 0 0 0 3px #F97316; }

/* Popups */
.crc-locmap .leaflet-popup-content-wrapper { border-radius: 16px; box-shadow: 0 16px 40px rgba(11, 27, 63, .2); }
.crc-locmap .leaflet-popup-content { margin: 14px 16px; font-family: inherit; }
.crc-pop { display: flex; flex-direction: column; gap: 4px; }
.crc-pop__type { align-self: flex-start; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: #EEF3FF; color: #1D4ED8; }
.crc-pop__type--city { background: #FFF1E6; color: #C2410C; }
.crc-pop__type--station { background: #E6F6F3; color: #0F766E; }
.crc-pop__type--marina { background: #F1EBFE; color: #6D28D9; }
.crc-pop__name { font-size: 16px; font-weight: 800; color: #0B1B3F; line-height: 1.25; }
.crc-pop__region { font-size: 13px; color: #5B6578; }
.crc-pop__actions { margin-top: 8px; }
.crc-pop__btn {
	display: inline-flex;
	align-items: center;
	min-height: 38px;
	padding: 0 14px;
	border-radius: 999px;
	background: #F97316;
	color: #fff !important;
	font-weight: 800;
	font-size: 13px;
	text-decoration: none !important;
}
.crc-pop__btn:hover { background: #EA580C; }

/* Responsive */
@media (max-width: 1024px) {
	.crc-locmap__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
	.crc-locmap__body { grid-template-columns: 1fr; height: auto; }
	.crc-locmap__mapwrap { order: -1; }
	.crc-locmap__map { height: 380px; flex: none; }
	.crc-locmap__list { max-height: 520px; border-right: 0; border-top: 1px solid var(--lm-line); }
	.crc-locmap__legend { top: 10px; bottom: auto; left: 56px; right: 10px; padding: 8px 10px; gap: 4px 10px; font-size: 12px; }
}
@media (max-width: 600px) {
	.crc-locmap__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
	.crc-locmap__stats .crc-locmap__stat:first-child { grid-column: 1 / -1; }
	.crc-locmap__stat strong { font-size: 24px; }
	.crc-locmap__filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 4px; }
	.crc-chip { flex: none; }
	.crc-locmap__near { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
	.crc-locmap * { transition: none !important; }
}
