/**
 * Image Hotspot Groups for Elementor
 */

.hsg-wrap {
	--hsg-accent: #1A6DD9;
	--hsg-cap-gap: 8px;
	--hsg-marker-size: 42px;
	--hsg-icon-size: 16px;
	--hsg-marker-border-width: 0px;
	--hsg-card-width: 290px;
	--hsg-card-offset: 14px;
	--hsg-arrow-color: #FFFFFF;

	position: relative;
	margin: 0 auto;
	padding: 0;
	box-sizing: border-box;
}

.hsg-wrap *,
.hsg-wrap *::before,
.hsg-wrap *::after {
	box-sizing: border-box;
}

/* ---------- Image ---------- */
.hsg-image {
	position: relative;
	line-height: 0;
	overflow: visible;
}

.hsg-image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: inherit;
}

.hsg-image::after {
	position: absolute;
	inset: 0;
	pointer-events: none;
	border-radius: inherit;
	z-index: 2;
}

/* ---------- Group box ----------
   Each group is a box over the image. Its pins live inside it, so moving or
   resizing the box moves the whole bunch. */
.hsg-group {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	z-index: 3;
	pointer-events: none;
}

.hsg-group.hsg-active {
	z-index: 9;
}

/* Outline helper: always on inside the editor, optional on the live site. */
.hsg-editor .hsg-group,
.hsg-group.hsg-show-area {
	outline: 1px dashed var(--hsg-accent);
	outline-offset: 0;
}

.hsg-editor .hsg-group::before,
.hsg-group.hsg-show-area::before {
	content: attr(data-area-label);
	position: absolute;
	left: 0;
	bottom: 100%;
	font-size: 10px;
	line-height: 1.4;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--hsg-accent);
	opacity: 0.85;
}

/* ---------- Group labels ---------- */
.hsg-group-label {
	position: absolute;
	left: 50%;
	top: 6%;
	z-index: 3;
	transform: translate(-50%, -50%);
	white-space: nowrap;
	line-height: 1.2;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	pointer-events: none;
}

/* ---------- Pins ---------- */
.hsg-point {
	position: absolute;
	z-index: 4;
	pointer-events: auto;
	width: var(--hsg-marker-size);
	height: var(--hsg-marker-size);
	transform: translate(-50%, -50%);
}

.hsg-point.hsg-open {
	z-index: 7;
}

/* The high-specificity selector and the min/max sizing are deliberate: many
   themes style every <button> with their own padding, width and colour, which
   turns the pin into a stretched oval. */
.hsg-wrap button.hsg-marker,
.hsg-wrap .hsg-marker {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	flex: 0 0 auto;
	width: var(--hsg-marker-size);
	height: var(--hsg-marker-size);
	min-width: var(--hsg-marker-size);
	max-width: var(--hsg-marker-size);
	min-height: var(--hsg-marker-size);
	max-height: var(--hsg-marker-size);
	aspect-ratio: 1 / 1;
	padding: 0;
	margin: 0;
	cursor: pointer;
	background-color: #fff;
	background-image: none;
	color: var(--hsg-accent);
	border: var(--hsg-marker-border-width) solid currentColor;
	border-radius: 50%;
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	line-height: 1;
	overflow: visible;
	transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.hsg-wrap .hsg-marker i,
.hsg-wrap .hsg-marker svg {
	color: inherit;
}

.hsg-wrap .hsg-marker:focus-visible {
	outline: 2px solid var(--hsg-accent);
	outline-offset: 3px;
}

.hsg-marker-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: var(--hsg-icon-size);
	line-height: 1;
	transition: transform 0.25s ease;
}

.hsg-marker-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
	display: block;
}

.hsg-marker-label {
	font-size: calc(var(--hsg-marker-size) * 0.34);
	font-weight: 700;
	line-height: 1;
}

.hsg-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

/* ---------- Caption outside the circle ---------- */
.hsg-caption {
	position: absolute;
	z-index: 2;
	white-space: nowrap;
	pointer-events: none;
	line-height: 1.2;
	font-size: 14px;
	font-weight: 700;
	color: #fff;
	transition: opacity 0.2s ease;
}

.hsg-point.hsg-cap-top .hsg-caption {
	bottom: calc(100% + var(--hsg-cap-gap, 8px));
	left: 50%;
	transform: translateX(-50%);
}

.hsg-point.hsg-cap-bottom .hsg-caption {
	top: calc(100% + var(--hsg-cap-gap, 8px));
	left: 50%;
	transform: translateX(-50%);
}

.hsg-point.hsg-cap-left .hsg-caption {
	right: calc(100% + var(--hsg-cap-gap, 8px));
	top: 50%;
	transform: translateY(-50%);
}

.hsg-point.hsg-cap-right .hsg-caption {
	left: calc(100% + var(--hsg-cap-gap, 8px));
	top: 50%;
	transform: translateY(-50%);
}

.hsg-capvis-hover .hsg-caption,
.hsg-capvis-open .hsg-caption {
	opacity: 0;
}

.hsg-capvis-hover .hsg-point:hover .hsg-caption,
.hsg-capvis-hover .hsg-point.hsg-open .hsg-caption,
.hsg-capvis-open .hsg-point.hsg-open .hsg-caption {
	opacity: 1;
}

/* Pulse */
.hsg-pulse-yes .hsg-marker::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 100%;
	height: 100%;
	transform: translate(-50%, -50%);
	border-radius: inherit;
	border: 2px solid var(--hsg-accent);
	opacity: 0;
	pointer-events: none;
	animation: hsg-pulse 2.2s ease-out infinite;
}

.hsg-pulse-yes .hsg-point.hsg-open .hsg-marker::before {
	animation: none;
}

@keyframes hsg-pulse {
	0%   { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
	70%  { opacity: 0;   transform: translate(-50%, -50%) scale(1.8); }
	100% { opacity: 0;   transform: translate(-50%, -50%) scale(1.8); }
}

/* Dim the rest */
.hsg-dim-yes .hsg-wrap.hsg-has-open .hsg-point:not(.hsg-open) {
	opacity: 0.4;
}

.hsg-point {
	transition: opacity 0.2s ease;
}

/* ---------- Card ---------- */
.hsg-card {
	position: absolute;
	z-index: 8;
	width: var(--hsg-card-width);
	max-width: min(var(--hsg-card-width), 78vw);
	max-height: 340px;
	overflow-y: auto;
	overscroll-behavior: contain;
	text-align: left;
	line-height: 1.5;
	background-color: #fff;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.hsg-point.hsg-open .hsg-card,
.hsg-wrap[data-trigger="hover"] .hsg-point:hover .hsg-card {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* Placement */
.hsg-place-top .hsg-card,
.hsg-place-auto .hsg-card {
	bottom: calc(100% + var(--hsg-card-offset));
	left: 50%;
	transform: translateX(calc(-50% + var(--hsg-shift, 0px))) translateY(6px);
}

.hsg-place-bottom .hsg-card {
	top: calc(100% + var(--hsg-card-offset));
	bottom: auto;
	left: 50%;
	transform: translateX(calc(-50% + var(--hsg-shift, 0px))) translateY(-6px);
}

.hsg-place-left .hsg-card {
	right: calc(100% + var(--hsg-card-offset));
	left: auto;
	top: 50%;
	transform: translateY(-50%) translateX(6px);
}

.hsg-place-right .hsg-card {
	left: calc(100% + var(--hsg-card-offset));
	right: auto;
	top: 50%;
	transform: translateY(-50%) translateX(-6px);
}

.hsg-point.hsg-open .hsg-card,
.hsg-wrap[data-trigger="hover"] .hsg-point:hover .hsg-card {
	transform: translateX(calc(-50% + var(--hsg-shift, 0px)));
}

.hsg-point.hsg-open.hsg-place-left .hsg-card,
.hsg-point.hsg-open.hsg-place-right .hsg-card,
.hsg-wrap[data-trigger="hover"] .hsg-point.hsg-place-left:hover .hsg-card,
.hsg-wrap[data-trigger="hover"] .hsg-point.hsg-place-right:hover .hsg-card {
	transform: translateY(-50%);
}

/* Arrow */
.hsg-card-arrow {
	display: none;
}

.hsg-arrow-yes .hsg-card-arrow {
	display: block;
	position: absolute;
	width: 12px;
	height: 12px;
	background-color: var(--hsg-arrow-color);
	transform: rotate(45deg);
	z-index: -1;
}

.hsg-arrow-yes .hsg-place-top .hsg-card-arrow,
.hsg-arrow-yes .hsg-place-auto .hsg-card-arrow {
	bottom: -5px;
	left: calc(50% - 6px - var(--hsg-shift, 0px));
}

.hsg-arrow-yes .hsg-place-bottom .hsg-card-arrow {
	top: -5px;
	bottom: auto;
	left: calc(50% - 6px - var(--hsg-shift, 0px));
}

.hsg-arrow-yes .hsg-place-left .hsg-card-arrow {
	right: -5px;
	left: auto;
	top: calc(50% - 6px);
}

.hsg-arrow-yes .hsg-place-right .hsg-card-arrow {
	left: -5px;
	right: auto;
	top: calc(50% - 6px);
}

/* Card content */
.hsg-card-close {
	position: absolute;
	top: 4px;
	right: 6px;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	opacity: 0.45;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.hsg-card-close:hover {
	opacity: 0.9;
}

.hsg-card-image {
	display: block;
	width: 100%;
	height: auto;
	margin-bottom: 12px;
	border-radius: 6px;
}

.hsg-card-title {
	display: block;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	margin-bottom: 10px;
}

.hsg-rows {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.hsg-row {
	font-size: 14px;
	line-height: 1.45;
}

.hsg-row-label {
	margin-right: 0.35em;
}

.hsg-wrap[data-row-layout="inline"] .hsg-row-label::after {
	content: ":";
}

.hsg-wrap[data-row-layout="split"] .hsg-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}

.hsg-wrap[data-row-layout="split"] .hsg-row-value {
	text-align: right;
}

.hsg-wrap[data-row-layout="stack"] .hsg-row {
	display: flex;
	flex-direction: column;
}

.hsg-row-single .hsg-row-label {
	display: none;
}

.hsg-card-text {
	margin-top: 10px;
	font-size: 13px;
	line-height: 1.55;
}

.hsg-card-btn {
	display: inline-block;
	margin-top: 14px;
	background-color: var(--hsg-accent);
	color: #fff;
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	transition: background-color 0.2s ease, color 0.2s ease;
}

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
	.hsg-hidelabels-yes .hsg-group-label {
		display: none;
	}

	.hsg-card {
		max-height: 260px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hsg-pulse-yes .hsg-marker::before {
		animation: none;
	}

	.hsg-card,
	.hsg-marker,
	.hsg-marker-icon {
		transition: none;
	}
}
