/**
 * Карта України з регіонами + маркерами локалей (§9 ТЗ).
 *
 * Layout — мапа на всю ширину контейнера, список локалей знизу
 * у грид-row карток.
 */
.section-locations-map .locations-map {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.section-locations-map .locations-map__canvas {
	position: relative;
	/* Full-bleed: canvas виходить за межі .container на всю ширину
	   viewport (хак, що не торкає інші секції). */
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	/* Aspect = ширина/висота SVG-генератора (1049 / 700 ≈ 1.499). */
	aspect-ratio: 1049 / 700;
	max-height: 760px;
	min-height: 360px;
	background: #f7f5f0;
	overflow: hidden;
}

.section-locations-map .locations-map__svg,
.section-locations-map .locations-map__canvas > svg {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	display: block;
}

/* Регіони (області) */
.section-locations-map .locations-map__region {
	fill: #ece4d3;
	stroke: #fff;
	stroke-width: 1;
	stroke-linejoin: round;
	transition: fill 0.15s ease;
}

.section-locations-map .locations-map__region.is-active {
	fill: #d8b88a;
}

.section-locations-map .locations-map__region.is-clickable {
	cursor: pointer;
}

.section-locations-map .locations-map__region.is-active.is-hover,
.section-locations-map .locations-map__region.is-active:hover,
.section-locations-map .locations-map__region.is-hover,
.section-locations-map .locations-map__region:hover {
	fill: #c89a5e;
}

/* Маркери (pin) */
.section-locations-map .locations-map__markers {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.section-locations-map .locations-map__marker {
	position: absolute;
	transform: translate(-50%, -100%);
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	text-decoration: none;
	color: #111;
	opacity: 0;
	pointer-events: auto;
	transition: opacity 0.2s ease, transform 0.2s ease;
	z-index: 2;
}

.section-locations-map .locations-map__marker.is-positioned {
	opacity: 1;
}

.section-locations-map .locations-map__marker:hover,
.section-locations-map .locations-map__marker.is-hover,
.section-locations-map .locations-map__marker:focus-visible {
	transform: translate(-50%, -100%) scale(1.08);
	z-index: 3;
}

.section-locations-map .locations-map__pin {
	width: 18px;
	height: 18px;
	border-radius: 50% 50% 50% 0;
	background: #a4763e;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
	transform: rotate(-45deg);
	display: inline-block;
	border: 2px solid #fff;
}

.section-locations-map .locations-map__marker.is-hover .locations-map__pin,
.section-locations-map .locations-map__marker:hover .locations-map__pin,
.section-locations-map .locations-map__marker:focus-visible .locations-map__pin {
	background: #1a1a1a;
}

.section-locations-map .locations-map__label {
	font-size: 12px;
	font-weight: 600;
	color: #1a1a1a;
	background: #fff;
	padding: 2px 8px;
	border-radius: 4px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
	white-space: nowrap;
	opacity: 0;
	transform: translateY(-4px);
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.section-locations-map .locations-map__marker.is-hover .locations-map__label,
.section-locations-map .locations-map__marker:hover .locations-map__label,
.section-locations-map .locations-map__marker:focus-visible .locations-map__label {
	opacity: 1;
	transform: translateY(0);
}

/* Тултіп з інфо про локацію (показується на ховері маркера / області / списку) */
.section-locations-map .locations-map__tooltip {
	position: absolute;
	transform: translate(-50%, calc(-100% - 28px));
	min-width: 220px;
	max-width: 300px;
	padding: 14px 16px;
	background: #fff;
	border: 1px solid #ece9e1;
	border-radius: 8px;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
	z-index: 5;
	font-size: 13px;
	line-height: 1.45;
	color: #1a1a1a;
}

.section-locations-map .locations-map__tooltip.is-visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translate(-50%, calc(-100% - 34px));
	transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s;
}

.section-locations-map .locations-map__tooltip::after {
	content: '';
	position: absolute;
	left: 50%;
	bottom: -7px;
	width: 12px;
	height: 12px;
	background: #fff;
	border-right: 1px solid #ece9e1;
	border-bottom: 1px solid #ece9e1;
	transform: translateX(-50%) rotate(45deg);
}

.section-locations-map .locations-map__tooltip-title {
	font-weight: 600;
	font-size: 15px;
	color: #111;
	margin-bottom: 6px;
}

.section-locations-map .locations-map__tooltip-row {
	display: block;
	color: #555;
	margin-bottom: 6px;
}

.section-locations-map .locations-map__tooltip-phone {
	font-weight: 600;
	color: #1a1a1a;
	text-decoration: none;
}

.section-locations-map .locations-map__tooltip-phone:hover {
	color: #a4763e;
}

.section-locations-map .locations-map__tooltip-cta {
	display: inline-block;
	margin-top: 2px;
	color: #a4763e;
	font-weight: 600;
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: border-color 0.15s ease;
}

.section-locations-map .locations-map__tooltip-cta:hover {
	border-bottom-color: #a4763e;
}

/* Список локалей знизу — горизонтальний грід карток */
.section-locations-map .locations-map__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 12px;
}

.section-locations-map .locations-map__list a {
	display: grid;
	grid-template-columns: auto 1fr;
	grid-template-areas:
		"dot title"
		"dot address";
	gap: 2px 12px;
	padding: 14px 16px;
	background: #fff;
	border: 1px solid #ece9e1;
	border-radius: 8px;
	color: inherit;
	text-decoration: none;
	transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.section-locations-map .locations-map__list a:hover {
	background: #f7f5f0;
	border-color: #d4cdbf;
	transform: translateY(-1px);
}

.section-locations-map .locations-map__list-dot {
	grid-area: dot;
	align-self: center;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #a4763e;
}

.section-locations-map .locations-map__list-title {
	grid-area: title;
	font-weight: 600;
	color: #111;
}

.section-locations-map .locations-map__list-address {
	grid-area: address;
	font-size: 13px;
	color: #666;
}

@media (max-width: 767px) {
	.section-locations-map .locations-map__canvas {
		min-height: 280px;
	}
	.section-locations-map .locations-map__list {
		grid-template-columns: 1fr;
	}
	.section-locations-map .locations-map__label {
		display: none;
	}
	.section-locations-map .locations-map__tooltip {
		min-width: 180px;
		max-width: 240px;
		font-size: 12px;
		padding: 10px 12px;
	}
	.section-locations-map .locations-map__tooltip-title {
		font-size: 14px;
	}
}
