.ihm {
	position: relative;
	width: 100%;
}

.ihm__canvas {
	position: relative;
	width: 100%;
	margin: 0 auto;
	container-type: inline-size;
}

.ihm__base {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ihm__point {
	position: absolute;
	z-index: 2;
}

.ihm__point--pin {
	min-width: 16px;
	transform: translate(-50%, -100%);
}

.ihm__point--art {
	transform: translate(-50%, -50%);
	line-height: 0;
}

.ihm__point--label {
	transform: translate(-50%, -50%);
}

.ihm__trigger {
	display: block;
	position: relative;
	width: 100%;
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
	font: inherit;
	color: inherit;
	line-height: 0;
	cursor: pointer;
}

.ihm__point--label .ihm__trigger {
	width: auto;
	line-height: 1.25;
}

.ihm__pin,
.ihm__art {
	display: block;
	width: 100%;
	max-width: none;
	height: auto;
}

.ihm__pin {
	transition: transform 0.3s ease;
}

.ihm__pin--default {
	aspect-ratio: 30 / 42;
	background: #6b6259;
	clip-path: path("M15 42C15 42 30 24 30 15A15 15 0 1 0 0 15c0 9 15 27 15 27z");
}

.ihm__label {
	white-space: nowrap;
	font-size: clamp(12px, 1.7cqw, 20px);
	line-height: 1.25;
	color: #4a443e;
	letter-spacing: 0.01em;
}

.ihm__point--pin .ihm__label,
.ihm__point--art .ihm__label {
	position: absolute;
}

.ihm__point--pin.ihm__point--label-right .ihm__label,
.ihm__point--art.ihm__point--label-right .ihm__label {
	left: calc(100% + 0.45em);
	top: 40%;
	transform: translateY(-50%);
}

.ihm__point--pin.ihm__point--label-left .ihm__label,
.ihm__point--art.ihm__point--label-left .ihm__label {
	right: calc(100% + 0.45em);
	top: 40%;
	transform: translateY(-50%);
}

.ihm__point--pin.ihm__point--label-top .ihm__label,
.ihm__point--art.ihm__point--label-top .ihm__label {
	bottom: calc(100% + 0.3em);
	left: 50%;
	transform: translateX(-50%);
}

.ihm__point--pin.ihm__point--label-bottom .ihm__label,
.ihm__point--art.ihm__point--label-bottom .ihm__label {
	top: calc(100% + 0.3em);
	left: 50%;
	transform: translateX(-50%);
}

.ihm__point--label .ihm__label {
	position: static;
	font-style: italic;
	opacity: 0.85;
}

.ihm__trigger:hover .ihm__pin,
.ihm__point.is-open .ihm__pin {
	transform: translateY(-0.25em) scale(1.06);
}

.ihm__card {
	position: absolute;
	bottom: calc(100% + 14px);
	left: 50%;
	z-index: 10;
	width: 300px;
	transform: translateX(-50%);
	background: #fff;
	border-radius: 2px;
	box-shadow: 0 14px 44px rgba(0, 0, 0, 0.16);
	line-height: 1.5;
	text-align: left;
	cursor: default;
}

.ihm__point--edge-right .ihm__card {
	left: auto;
	right: 0;
	transform: none;
}

.ihm__point--edge-left .ihm__card {
	left: 0;
	transform: none;
}

.ihm__card-img {
	display: block;
	width: 100%;
	height: 165px;
	object-fit: cover;
}

.ihm__card-body {
	padding: 18px 20px 22px;
}

.ihm__card-title {
	margin: 0 0 8px;
	font-size: 19px;
	font-weight: 400;
	line-height: 1.3;
}

.ihm__card-text {
	font-size: 14px;
	line-height: 1.65;
	color: #5c564f;
}

.ihm__card-text p {
	margin: 0 0 0.6em;
}

.ihm__card-text p:last-child {
	margin-bottom: 0;
}

.ihm__cta {
	display: inline-block;
	margin-top: 14px;
	padding-bottom: 2px;
	border-bottom: 1px solid currentColor;
	font-size: 13px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
}

.ihm__close {
	position: absolute;
	top: 6px;
	right: 6px;
	z-index: 2;
	width: 30px;
	height: 30px;
	padding: 0;
	background: rgba(255, 255, 255, 0.9);
	border: 0;
	border-radius: 50%;
	font-size: 20px;
	line-height: 1;
	color: #4a443e;
	cursor: pointer;
}

.ihm__trigger:focus-visible,
.ihm__close:focus-visible {
	outline: 2px solid #6b6259;
	outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
	.ihm__pin {
		transition: none;
	}
}

.ihm--scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.ihm--scroll .ihm__canvas {
	width: 900px;
	max-width: none;
}

.ihm--scroll .ihm__card {
	width: 260px;
}

/* The canvas is a size container, so it has no intrinsic width: give the Elementor
   widget holding the map a definite width or its height collapses to 0 in a flex column. */
.elementor-widget:has(.ihm) {
	width: 100%;
}

/* Narrow maps (phones): the map always fits its container, so tighten labels instead of scrolling */
@container (max-width: 600px) {
	.ihm__label {
		font-size: 10px;
	}

	.ihm__point--pin.ihm__point--label-right.ihm__point--edge-right .ihm__label {
		left: 50%;
		top: calc(100% + 0.2em);
		transform: translateX(-50%);
	}

	.ihm__card {
		width: 240px;
	}
}

/* fill="cover": the map fills its container's full height like a cover background,
   trimming the sides; without a set height (e.g. stacked on phones) it keeps its ratio. */
.elementor-widget:has(.ihm--cover) {
	flex-grow: 1;
	align-self: stretch;
}

.elementor-widget:has(.ihm--cover) > .elementor-widget-container,
.elementor-widget:has(.ihm--cover) .elementor-shortcode {
	height: 100%;
}

.ihm--cover {
	height: 100%;
	aspect-ratio: var(--ihm-ratio);
	overflow: hidden;
	container-type: size;
}

.ihm--cover .ihm__canvas {
	position: absolute;
	top: 50%;
	left: 50%;
	width: max(100cqw, 100cqh * var(--ihm-ratio));
	transform: translate(-50%, -50%);
}

/* Cover mode fallback when the points would not fit at full height */
.ihm--cover.ihm--cover-fit {
	height: auto;
	overflow: visible;
	container-type: normal;
}

.ihm--cover-fit .ihm__canvas {
	position: relative;
	top: auto;
	left: auto;
	width: 100%;
	transform: none;
}

.elementor-widget:has(.ihm--cover-fit) {
	flex-grow: 0;
}
