/* OSM Area Map — stepped scrollytelling tour layout.
   Sticky map stage + scrolling step panels. Stays inside its container width. */

.oam-st {
	position: relative;
	--oam-accent: #d8a24a;
}

/* The map stage. Pinned to the viewport by JS (robust to ancestors whose
   overflow:hidden would break position:sticky). Default is absolute at the top;
   the tour script switches it to fixed while the tour is on screen. */
.oam-st-stage {
	position: absolute;
	top: 0;
	left: 0;
	height: 100vh;
	height: 100dvh; /* avoids the mobile address-bar jump */
	width: 100%;
	overflow: hidden;
	background: #e9eef5;
	z-index: 1;
}
.oam-st-stage .oam-map-gl,
.oam-st-stage .maplibregl-map {
	position: absolute;
	inset: 0;
	height: 100%;
	width: 100%;
}
/* The map tiles never capture touch, so swipes always scroll the page — but the
   markers stay clickable so a tap opens that area's post. */
.oam-st-stage .oam-map-gl,
.oam-st-stage .maplibregl-canvas {
	pointer-events: none;
}
.oam-st-stage .maplibregl-marker,
.oam-st-cta-fixed { pointer-events: auto; }

/* Clickable markers. */
.oam-mk { display: block; line-height: 0; cursor: pointer; }
.oam-cty-fallback {
	display: block;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--oam-accent);
	border: 2px solid #fff;
	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.45);
	cursor: pointer;
}
.oam-town-dot { display: block; }

/* Even-spread overlay: county markers laid evenly on top of the map and kept
   there while it flies. The layer ignores pointer events; the pins accept them. */
.oam-st-spread {
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
}
.oam-spread-mk {
	position: absolute;
	transform: translate(-50%, -50%);
	pointer-events: auto;
}

/* Company HQ marker (bigger, with an optional label). */
.oam-hq { display: flex; flex-direction: column; align-items: center; cursor: pointer; }
.oam-hq-link { display: block; line-height: 0; }
.oam-hq-label {
	margin-top: 5px;
	background: #0d2350;
	color: #fff;
	font-weight: 700;
	font-size: 12px;
	line-height: 1.2;
	padding: 3px 11px;
	border-radius: 20px;
	white-space: nowrap;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

/* Steps flow in front of the stage. */
.oam-st-steps {
	position: relative;
	z-index: 2;
	pointer-events: none;
	padding: 0 6vw;
	display: flex;
	flex-direction: column;
}
.oam-st--right .oam-st-steps { align-items: flex-end; }
.oam-st--left .oam-st-steps { align-items: flex-start; }

.oam-st-step {
	pointer-events: auto;
	box-sizing: border-box;
	width: min(420px, 86%);
	margin: 0 0 60vh;
	padding: 22px 24px;
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(6px);
	box-shadow: 0 14px 40px rgba(8, 20, 45, 0.18);
	border: 1px solid rgba(8, 20, 45, 0.06);
	opacity: 0.5;
	transform: translateY(8px);
	transition: opacity 0.35s ease, transform 0.35s ease;
}
.oam-st-step.is-active {
	opacity: 1;
	transform: translateY(0);
}
.oam-st-step--intro {
	margin-top: 32vh;
	background: rgba(8, 20, 45, 0.86);
}
.oam-st-step--intro .oam-st-title { color: var(--oam-intro-heading, #fff); }
.oam-st-step--intro .oam-st-sub,
.oam-st-step--intro .oam-st-hint { color: var(--oam-intro-text, #fff); }

.oam-st-title {
	margin: 0;
	font-weight: 800;
	text-transform: uppercase;
	line-height: 1.05;
	font-size: clamp(22px, 3vw, 38px);
}
.oam-st-sub {
	margin: 10px 0 0;
	font-size: clamp(14px, 1.3vw, 17px);
	line-height: 1.5;
}
.oam-st-hint {
	margin: 16px 0 0;
	font-size: 13px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	opacity: 0.75;
}
.oam-st-num {
	display: inline-block;
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.1em;
	color: var(--oam-accent);
	margin-bottom: 6px;
}
.oam-st-area {
	margin: 0;
	font-weight: 800;
	line-height: 1.1;
	font-size: clamp(20px, 2.4vw, 30px);
	color: #0d2350;
}
/* Town list inside a county card. */
.oam-st-towns {
	margin: 12px 0 0;
	font-size: 14px;
	line-height: 1.6;
	color: #33415c;
}
.oam-st-towns a {
	color: #0d3577;
	text-decoration: none;
	border-bottom: 1px solid rgba(13, 53, 119, 0.25);
}
.oam-st-towns a:hover { border-bottom-color: var(--oam-accent); }

/* Small town pin on the map (shown only for the active county). */
.oam-town-dot {
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: var(--oam-accent);
	border: 2px solid #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.oam-st-link {
	display: inline-block;
	margin-top: 14px;
	font-weight: 700;
	font-size: 14px;
	text-decoration: none;
	color: #0d3577;
	border-bottom: 2px solid var(--oam-accent);
	padding-bottom: 2px;
}
.oam-st-link--cta {
	background: #0d3577;
	color: #fff;
	border: 0;
	padding: 12px 22px;
	border-radius: 40px;
}
.oam-st-step--cta { background: #fff; }

/* Floating current-area badge + persistent CTA on the stage. */
.oam-st-badge {
	position: absolute;
	left: 50%;
	bottom: 6vh;
	transform: translateX(-50%);
	z-index: 3;
	background: #0d3577;
	color: #fff;
	font-weight: 700;
	font-size: clamp(15px, 1.8vw, 22px);
	padding: 9px 22px;
	border-radius: 40px;
	border: 1.5px solid var(--oam-accent);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
	white-space: nowrap;
	opacity: 0;
	transition: opacity 0.25s ease;
	pointer-events: none;
}
.oam-st-badge.is-on { opacity: 1; }

.oam-st-cta-fixed {
	position: absolute;
	top: 20px;
	right: 20px;
	z-index: 4;
	background: var(--oam-accent);
	color: #0d2350;
	font-weight: 800;
	text-decoration: none;
	padding: 10px 20px;
	border-radius: 40px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* No-WebGL fallback AND Elementor editor preview: relax the pin and show the
   map + cards stacked in normal flow (accurate content preview while editing). */
.oam-st.is-fallback .oam-st-stage,
.oam-st--editor .oam-st-stage {
	position: relative !important;
	top: auto !important;
	left: auto !important;
	width: 100% !important;
	height: 60vh;
}
.oam-st.is-fallback .oam-st-steps,
.oam-st--editor .oam-st-steps {
	margin-top: 24px;
	pointer-events: auto;
}
.oam-st.is-fallback .oam-st-step,
.oam-st--editor .oam-st-step {
	width: 100%;
	max-width: 640px;
	margin: 0 0 14px;
	opacity: 1;
	transform: none;
}
.oam-st--editor .oam-st-step--intro { margin-top: 0; }
.oam-st.is-fallback .oam-st-badge,
.oam-st--editor .oam-st-badge { display: none; }

/* Mobile: cards centred, smaller, and a shorter overall scroll. */
@media ( max-width: 760px ) {
	.oam-st-steps { padding: 0 14px; align-items: center; }
	.oam-st-step { width: 100%; max-width: 100%; margin-bottom: 42vh; padding: 18px 18px; }
	.oam-st-step--intro { margin-top: 20vh; }
	.oam-st-title { font-size: clamp(20px, 7vw, 30px); }
	.oam-st-area { font-size: clamp(18px, 6vw, 26px); }
	.oam-st-cta-fixed { top: 12px; right: 12px; padding: 8px 14px; font-size: 13px; }
	.oam-st-dir-list { grid-template-columns: 1fr; }
}

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

/* Full directory of every county + its towns (below the tour). */
.oam-st-directory {
	padding: 48px 6vw;
	background: #0d2350;
	color: #dbe2f2;
}
.oam-st-dir-title {
	margin: 0 0 22px;
	color: #fff;
	font-weight: 800;
	text-transform: uppercase;
	font-size: clamp(18px, 2.2vw, 28px);
}
.oam-st-dir-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 18px 32px;
}
.oam-st-dir-list li { break-inside: avoid; }
.oam-st-dir-county {
	display: inline-block;
	font-weight: 800;
	font-size: 16px;
	color: #fff;
	text-decoration: none;
	border-bottom: 2px solid var(--oam-accent);
}
.oam-st-dir-towns {
	display: block;
	margin-top: 6px;
	font-size: 13.5px;
	line-height: 1.6;
	color: #b9c4e0;
}
.oam-st-dir-towns a {
	color: #cdd7f0;
	text-decoration: none;
}
.oam-st-dir-towns a:hover { color: #fff; }
