/* Block: tto-region-map — VA regional map + region-detail selector card */
.region-map { padding-block: var(--cmcf-section-pad); }
.region-map--inner {
	display: grid;
	grid-template-columns: 490px 1fr;
	gap: 0 var(--cmcf-col-gap);
	align-items: start;
}

/* Selector card (left) */
.region-map--card {
	background: var(--cmcf-white);
	border-radius: 12px;
	padding: 24px 28px 28px;
	color: var(--cmcf-black);
	align-self: start;
	/* The full-width map figure pulls up under the card (as in the design); the
	   map image has an opaque band-green background, so the card must stack above it. */
	position: relative;
	z-index: 2;
}
.region-map--panel { display: none; }
.region-map--panel.is-active { display: block; }
.region-map--panel-head {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	padding-bottom: 16px;
	margin-bottom: 16px;
	border-bottom: 1px solid var(--cmcf-secondary);
}
.region-map--panel-title {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var(--cmcf-font-heading);
	font-size: 24px;
	color: var(--cmcf-primary);
	flex: 1 1 auto;
	justify-content: center;
}
.region-map--badge {
	display: inline-grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border: 2px solid var(--cmcf-secondary);
	border-radius: 50%;
	font-family: var(--cmcf-font-body);
	font-weight: 700;
	font-size: 16px;
	color: var(--cmcf-primary);
}
.region-map--nav {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	border: 1px solid var(--cmcf-secondary);
	background: var(--cmcf-white);
	color: var(--cmcf-primary);
	border-radius: 6px;
	cursor: pointer;
	display: grid;
	place-items: center;
	transition: background .2s ease, color .2s ease;
	padding: 0;
}
.region-map--nav:hover { background: var(--cmcf-secondary); color: var(--cmcf-deep); }
.region-map--label {
	font-family: var(--cmcf-font-body);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-size: 14px;
	margin: 16px 0 5.6px;
	color: var(--cmcf-black);
}
/* Fixed (not max) height: every region's list area — 2 items or 17 — takes
   up exactly the same space, so the card itself is always the same height
   and the map, pinned a fixed amount below it, never shifts position as the
   selected region changes. Longer lists scroll inside this box instead of
   pushing the card taller; shorter ones just leave the extra room blank. */
.region-map--panel-body {
	height: 280px;
	overflow-y: auto;
	padding-right: 10px;
	/* Default OS scrollbars are easy to miss (especially the thin overlay
	   style on Mac/mobile) — a long list would then look silently cut off
	   instead of scrollable. Make it visible on both engines. */
	scrollbar-width: thin;
	scrollbar-color: var(--cmcf-secondary) var(--cmcf-grey-panel, #eee);
}
.region-map--panel-body::-webkit-scrollbar { width: 6px; }
.region-map--panel-body::-webkit-scrollbar-track { background: var(--cmcf-grey-panel, #eee); border-radius: 3px; }
.region-map--panel-body::-webkit-scrollbar-thumb { background: var(--cmcf-secondary); border-radius: 3px; }
/* Some platforms (macOS, touch devices) use overlay scrollbars that are
   invisible until actively scrolling/hovering — without this, a long list
   would look silently cut off instead of scrollable. JS toggles this class
   only when the list actually overflows. */
.region-map--panel-body.has-more {
	mask-image: linear-gradient(to bottom, black calc(100% - 28px), transparent 100%);
	-webkit-mask-image: linear-gradient(to bottom, black calc(100% - 28px), transparent 100%);
}
.region-map--card ul { list-style: none !important; margin: 0; padding: 0; }
.region-map--card li { list-style: none; margin-bottom: 4px; padding-left: 0; }
.region-map--card li::marker { content: none; }
.region-map--cta { margin-top: 20px; }

/* Right column: intro + map */
.region-map--right { color: var(--cmcf-white); }
.region-map--eyebrow { color: var(--cmcf-accent); }
.region-map--heading { color: var(--cmcf-white); font-size: var(--cmcf-fs-h1); margin: 0 0 16px; }
.region-map--body { max-width: 560px; }
.region-map--body a { color: var(--cmcf-accent); text-decoration: underline; font-weight: 600; }
/* Map spans both grid columns; per design it is 1070px wide, offset 75px from the
   container's left edge, and pulls up under the card's bottom (design y=430 vs row-1
   bottom ~510). */
.region-map--figure {
	position: relative;
	grid-column: 1 / -1;
	width: min(1070px, 100%);
	margin: -61px 0 0 100px;
}
.region-map--figure img,
.region-map--svg { display: block; width: 100%; height: auto; }
/* Active region: light green -> white, per design. The badge circle's
   outline swaps the opposite way so it stays visible against either fill. */
.region-map--svg-region { fill: var(--cmcf-secondary); transition: fill 0.25s ease; }
.region-map--svg-region.is-active { fill: var(--cmcf-white); }
.region-map--svg-badge { stroke: var(--cmcf-white); transition: stroke 0.25s ease; }
.region-map--svg-badge.is-active { stroke: var(--cmcf-secondary); }
.region-map--hotspot {
	position: absolute;
	width: 50px;
	height: 50px;
	transform: translate(-50%, -50%);
	border: none;
	background: transparent;
	border-radius: 50%;
	cursor: pointer;
	padding: 0;
}
/* The hotspot is purely an invisible tap/hover target now — the badge's own
   stroke color (white/green swap above) already shows which region is
   selected. A separate box-shadow ring here used to double up with that
   real SVG stroke at a slightly different radius/width, reading as a
   misaligned "double line" around the number. */

@media (max-width: 980px) {
	.region-map--inner { grid-template-columns: 1fr; }
	.region-map--card { max-width: 490px; order: 1; margin-top: 2.5em;}
	.region-map--figure { width: 100%; margin: 24px 0 0; }
}
/* Same overlap-clearance pattern used on media-text sections: when the
   next section's image is pulled up, reserve extra bottom space here so
   it doesn't sit flush against this card. Split phone/tablet like the
   media-text version — a percentage tuned for phone isn't enough once the
   container gets wider at tablet sizes. */
@media (max-width: 860px) {
	.region-map:has(+ .media-text:not(.cmcf-no-overlap) .media-text--media:first-child) {
		padding-bottom: calc(var(--cmcf-section-pad) + 38%);
	}
}
@media (min-width: 768px) and (max-width: 980px) {
	.region-map:has(+ .media-text:not(.cmcf-no-overlap) .media-text--media:first-child) {
		padding-bottom: calc(var(--cmcf-section-pad) + 50%);
	}
}
