/* The interactive gallery inside a heritage item (inc/heritage-hotspots.php).
   The site's own palette and type, not a second visual language. */
/* Says plainly that this is not just a photograph, in the same voice as the
   gold eyebrows used elsewhere on the site. */
.me-hs-eyebrow {
	margin: 2.5rem 0 0.7rem;
	font-family: Inter, system-ui, sans-serif;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: #EAB308;
}

.me-hs {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	gap: 0;
	margin: 0 0 2.5rem;
	background: rgba(5, 10, 25, 0.97);
	border: 1px solid rgba(234, 179, 8, 0.25);
	border-radius: 12px;
	overflow: hidden;
}

/* The image carries no width or height attributes, so before it loads it
   has no intrinsic size and the frame collapses to nothing. A box of zero
   height can fail to trigger the lazy loader at all, and the image then
   never loads: the gallery shows its points over empty space. Reserving a
   little height breaks that deadlock, and also stops the page jumping when
   the image arrives. */
.me-hs-frame {
	min-height: 180px;

	position: relative;
	height: 100%;
}

.me-hs-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.me-hs-node {
	position: absolute;
	width: 30px;
	height: 30px;
	margin: -15px 0 0 -15px;
	padding: 0;
	border-radius: 50%;
	border: 2px solid #FFFFFF;
	background: #EAB308;
	color: #0B1120;
	font-family: Inter, system-ui, sans-serif;
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	transition: transform 0.25s ease, background 0.25s ease;
	animation: me-hs-pulse 2.4s infinite;
}

.me-hs-node:hover,
.me-hs-node:focus-visible,
.me-hs-node.is-active {
	background: #FFFFFF;
	border-color: #EAB308;
	transform: scale(1.18);
	animation: none;
}

@keyframes me-hs-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(234, 179, 8, 0.65); }
	70%  { box-shadow: 0 0 0 14px rgba(234, 179, 8, 0); }
	100% { box-shadow: 0 0 0 0 rgba(234, 179, 8, 0); }
}

.me-hs-panel {
	padding: 28px 28px 26px;
	border-left: 1px solid rgba(234, 179, 8, 0.2);
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.me-hs-states {
	position: relative;
	overflow: hidden;
}

.me-hs-state {
	display: none;
}

.me-hs-state.is-active {
	display: block;
	animation: me-hs-fade 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
}

@keyframes me-hs-fade {
	from { opacity: 0; transform: translateX(18px); }
	to   { opacity: 1; transform: translateX(0); }
}

.me-hs-title {
	font-family: Lora, Georgia, serif;
	font-size: 1.35rem;
	font-weight: 600;
	color: #EAB308;
	margin: 0 0 10px;
	line-height: 1.2;
}

.me-hs-text {
	font-family: Lora, Georgia, serif;
	font-size: 0.95rem;
	line-height: 1.7;
	color: #FFFFFF;
	margin: 0;
}

.me-hs-hint {
	font-family: Lora, Georgia, serif;
	font-size: 0.8rem;
	font-style: italic;
	color: rgba(255, 255, 255, 0.82);
	margin: 16px 0 0;
}

@media (max-width: 782px) {
	.me-hs {
		grid-template-columns: minmax(0, 1fr);
	}

	.me-hs-panel {
		border-left: 0;
		border-top: 1px solid rgba(234, 179, 8, 0.2);
		padding: 22px 20px;
	}

	.me-hs-node {
		width: 34px;
		height: 34px;
		margin: -17px 0 0 -17px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.me-hs-node { animation: none; }
	.me-hs-state.is-active { animation: none; }
}

/* Stepping through the points, for readers who do not try the dots. */
.me-hs-steps {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
	padding-top: 16px;
	border-top: 1px solid rgba(234, 179, 8, 0.2);
}

.me-hs-step {
	background: none;
	border: 1px solid rgba(234, 179, 8, 0.45);
	border-radius: 999px;
	color: #EAB308;
	font-family: Inter, system-ui, sans-serif;
	font-size: 0.72rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 9px 14px;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.me-hs-step:hover:not(:disabled),
.me-hs-step:focus-visible:not(:disabled) {
	background: #EAB308;
	color: #0B1120;
}

.me-hs-step:disabled {
	opacity: 0.35;
	cursor: default;
}

.me-hs-count {
	font-family: Inter, system-ui, sans-serif;
	font-size: 0.72rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.82);
}

/* A standing instruction under the photograph, where a phone reader looks. */
.me-hs-tap {
	display: none;
}

@media (max-width: 782px) {
	.me-hs-tap {
		display: block;
		margin: 0;
		padding: 10px 16px;
		text-align: center;
		font-family: Inter, system-ui, sans-serif;
		font-size: 0.72rem;
		letter-spacing: 0.1em;
		text-transform: uppercase;
		color: #EAB308;
		background: rgba(234, 179, 8, 0.08);
	}

	/* A thumb needs 44px, and a ring so the chosen point is obvious. */
	.me-hs-node {
		width: 44px;
		height: 44px;
		margin: -22px 0 0 -22px;
		font-size: 0.9rem;
	}

	.me-hs-node.is-active {
		box-shadow: 0 0 0 5px rgba(234, 179, 8, 0.35);
	}

	.me-hs-image {
		max-height: 62vh;
	}
}
