/* DCE Image Hotspots
   ------------------------------------------------------------------ */
.dce-ih {
	--dce-ih-accent: #2f6bff;
	position: relative;
	padding: clamp(1.5rem, 4vw, 3.5rem);
	padding-top: 1.5rem;
	overflow: hidden;
	/* `clip` clips identically to `hidden` but creates no scroll container, so
	   focusing the off-screen panel can never scroll/shift the image. */
	overflow: clip;
}

/* Subtle plus pattern */
.dce-ih--pattern::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(to right, rgba(120, 130, 140, 0.18) 1px, transparent 1px),
		linear-gradient(to bottom, rgba(120, 130, 140, 0.18) 1px, transparent 1px);
	background-size: 46px 46px;
	-webkit-mask-image: radial-gradient(circle 3px at center, #000 2px, transparent 2.5px);
	mask-image: radial-gradient(circle 3px at center, #000 2px, transparent 2.5px);
	-webkit-mask-size: 46px 46px;
	mask-size: 46px 46px;
	pointer-events: none;
	opacity: 0.6;
}

.dce-ih--framed {
	outline: 2px solid var(--dce-ih-accent);
	outline-offset: -14px;
}

/* Stage */
.dce-ih-stage {
	position: relative;
}

.dce-ih-image-wrap {
	position: relative;
	line-height: 0;
}

.dce-ih-image {
	display: block;
	width: 100%;
	height: auto;
}

/* Overlay text (heading + intro) */
.dce-ih-overlay-content {
	position: absolute;
	top: 6%;
	left: 3%;
	max-width: 34%;
	min-width: 260px;
	z-index: 7;
	padding-top: 3rem;
}

.dce-ih-heading {
	display: inline;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
	background-color: #ffffff;
	color: #1a2332;
	font-size: clamp(2.34rem, 4.42vw, 4.42rem);
	line-height: 1.25;
	font-weight: 700;
	margin: 0;
	padding: 0.12em 0.6rem 0.12em 1rem;
}

.dce-ih-intro {
	background-color: #2b3648;
	color: #ffffff;
	padding: clamp(1.2rem, 1.8vw, 1.75rem);
	margin-top: 1.5rem;
	width: 65%;
}

.dce-ih-intro-text {
	font-size: 0.95rem;
	line-height: 1.45;
	margin: 0 0 1.5rem;
}

.dce-ih-buttons {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	align-items: flex-start;
}

.dce-ih-btn {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: 600;
	padding: 0.7rem 1rem;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.dce-ih-btn:hover {
	opacity: 0.88;
	transform: scale(1.05);
}

.dce-ih-btn--primary {
	background-color: var(--dce-ih-accent);
	color: #ffffff;
}

.dce-ih-btn--outline {
	background-color: #ffffff;
	color: var(--dce-ih-accent);
}

.dce-ih-btn .dce-ih-plus {
	font-weight: 300;
	font-size: 1.96em;
	line-height: 1;
}

/* Markers */
.dce-ih-marker {
	position: absolute;
	z-index: 4;
	width: 34px;
	height: 34px;
	transform: translate(-50%, -50%);
	border: 2px solid #ffffff;
	border-radius: 50%;
	background-color: var(--dce-ih-accent);
	color: #ffffff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dce-ih-marker .dce-ih-plus {
	font-size: 1.25em;
	font-weight: 300;
	line-height: 1;
	transition: opacity 0.15s ease;
}

.dce-ih-marker .dce-ih-num {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.85em;
	font-weight: 700;
	line-height: 1;
	opacity: 0;
	transition: opacity 0.15s ease;
}

.dce-ih-marker:hover .dce-ih-plus,
.dce-ih-marker.is-active .dce-ih-plus {
	opacity: 0;
}

.dce-ih-marker:hover .dce-ih-num,
.dce-ih-marker.is-active .dce-ih-num {
	opacity: 1;
}

.dce-ih-marker:hover,
.dce-ih-marker.is-active {
	transform: translate(-50%, -50%) scale(1.15);
	box-shadow: 0 0 0 6px var(--dce-ih-marker-glow, rgba(47, 107, 255, 0.25));
}

/* Idle pulse — markers ripple once each, in sequence. Driven by JS, which
   adds .is-pulsing to one marker at a time. Duration here must stay in step
   with PULSE_DURATION in image-hotspots.js. */
@keyframes dce-ih-pulse {
	0% {
		transform: translate(-50%, -50%) scale(1);
		box-shadow:
			0 2px 10px rgba(0, 0, 0, 0.25),
			0 0 0 0 var(--dce-ih-marker-glow, rgba(47, 107, 255, 0.25));
	}

	40% {
		transform: translate(-50%, -50%) scale(1.16);
		box-shadow:
			0 2px 10px rgba(0, 0, 0, 0.25),
			0 0 0 10px transparent;
	}

	100% {
		transform: translate(-50%, -50%) scale(1);
		box-shadow:
			0 2px 10px rgba(0, 0, 0, 0.25),
			0 0 0 0 transparent;
	}
}

.dce-ih-marker.is-pulsing {
	animation: dce-ih-pulse 600ms ease-in-out;
}

/* Hover and the open-panel state both outrank the idle pulse. */
.dce-ih-marker:hover.is-pulsing,
.dce-ih-marker.is-active.is-pulsing {
	animation: none;
}

@media (prefers-reduced-motion: reduce) {
	.dce-ih-marker.is-pulsing {
		animation: none;
	}
}

/* Backdrop */
.dce-ih-backdrop {
	position: absolute;
	inset: 0;
	z-index: 5;
	background-color: rgba(233, 235, 236, 0.72);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.dce-ih-backdrop.is-visible {
	opacity: 1;
}

/* Slide-in panel */
.dce-ih-panel {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 6;
	width: min(420px, 92%);
	height: 100%;
	max-height: calc(100vh - var(--dce-ih-header-height, 57px) * 2);
	max-height: calc(100dvh - var(--dce-ih-header-height, 57px) * 2);
	background-color: #ffffff;
	box-shadow: -12px 0 40px rgba(0, 0, 0, 0.12);
	transform: translateX(100%);
	transition: transform 0.35s ease;
	display: flex;
	flex-direction: column;
	padding: clamp(1.25rem, 2vw, 2rem);
	overflow: hidden;
}

.dce-ih-panel.is-open {
	transform: translateX(0);
}

.dce-ih-close {
	align-self: flex-end;
	width: 34px;
	height: 34px;
	border: 1px solid var(--dce-ih-accent);
	background: none;
	color: var(--dce-ih-accent);
	font-size: 1.35rem;
	line-height: 1;
	cursor: pointer;
	border-radius: 3px;
}

/* Progress */
.dce-ih-progress {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin: 0.75rem 0 1.5rem;
}

.dce-ih-progress-bars {
	display: flex;
	gap: 6px;
	flex: 1;
}

.dce-ih-progress-bar {
	height: 3px;
	flex: 1;
	background-color: #d4d7db;
	transition: background-color 0.2s ease;
}

.dce-ih-progress-bar.is-active {
	background-color: var(--dce-ih-accent);
}

.dce-ih-counter {
	font-size: 0.8rem;
	color: #6b7280;
	white-space: nowrap;
}

/* Slides */
.dce-ih-slides {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
}

.dce-ih-zone {
	display: block;
	color: var(--dce-ih-accent);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-bottom: 1rem;
}

.dce-ih-slide-image {
	display: block;
	width: 100%;
	height: auto;
	margin-bottom: 1.5rem;
}

.dce-ih-slide-title {
	color: var(--dce-ih-accent);
	font-size: clamp(1.5rem, 2.2vw, 2rem);
	font-weight: 600;
	margin: 0 0 0.75rem;
}

.dce-ih-slide-desc {
	color: #3a4250;
	font-size: 0.95rem;
	line-height: 1.5;
	margin-bottom: 1.5rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid #e2e4e7;
}

.dce-ih-stat {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1.5rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid #e2e4e7;
}

.dce-ih-stat-number {
	color: var(--dce-ih-accent);
	font-size: 2.5rem;
	font-weight: 700;
	line-height: 1;
}

.dce-ih-stat-label {
	color: #3a4250;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	line-height: 1.3;
}

.dce-ih-quote {
	margin: 0;
	padding: 0.25rem 0 0.25rem 1rem;
	border-left: 3px solid var(--dce-ih-accent);
	color: #1a2332;
	font-size: 1rem;
	line-height: 1.4;
}

/* Nav */
.dce-ih-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: auto;
	flex-shrink: 0;
	padding-top: 1.5rem;
}

.dce-ih-prev,
.dce-ih-next {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	background: none;
	border: 0;
	cursor: pointer;
	font-size: 0.9rem;
	font-weight: 600;
	padding: 0.5rem 0;
	color: #1a2332;
}

.dce-ih-next {
	color: var(--dce-ih-accent);
}

.dce-ih-prev .dce-ih-arrow,
.dce-ih-next .dce-ih-arrow {
	font-size: 1.1em;
}

.dce-ih-prev[disabled],
.dce-ih-next[disabled] {
	opacity: 0.35;
	cursor: default;
}

/* Responsive */
@media (max-width: 1280px) {
	.dce-ih-stage {
		display: flex;
		flex-direction: column;
	}

	/* Title + intro flow above the image (order 1) and sit behind the
	   pop-up overlay, so the container expands with content instead of
	   clipping when the image is shorter than the text. */
	.dce-ih-overlay-content {
		position: static;
		max-width: none;
		margin-bottom: 1.5rem;
		order: 1;
		z-index: 1;
	}

	.dce-ih-image-wrap {
		order: 2;
	}
}

@media (max-width: 782px) {
	.dce-ih-panel {
		width: 100%;
	}
}
