/**
 * Interactive Alberta service-area map. Scoped to .amc-map.
 */
.amc-map {
	max-width: 1120px; margin: 0 auto;
}
.amc-map__head { text-align: center; max-width: 640px; margin: 0 auto clamp(1.6rem, 3vw, 2.4rem); }
.amc-map__head h2 { color: var(--green); font-size: var(--wp--preset--font-size--h-2-sm); line-height: 1.12; margin: .5rem 0; text-wrap: balance; }
/* Badge margin (design.css, 1rem) is the whole gap — see the stacking note there. */
.amc-map__head .amc-map__eyebrow + h2 { margin-top: 0; }
.amc-map__head p { color: var(--text); margin: 0; }

.amc-map__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.4rem, 3vw, 2.8rem); align-items: center; }
.amc-map__stage { position: relative; }
.amc-map__img { width: 100%; height: auto; display: block; }

/* markers — the region crop leaves room for comfortable senior-friendly
   targets (≥40px) and always-visible town labels. */
/* Pins/chips render as <a> (navigate to the town page) with a <button>
   fallback for areas without a page — style both identically. */
.amc-map__pin { position: absolute; transform: translate(-50%, -50%); background: none; border: 0; padding: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; min-width: 44px; min-height: 44px; text-decoration: none; }
.amc-map__pin .dot { width: 16px; height: 16px; border-radius: 50%; background: var(--teal); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(12,58,52,.35); transition: transform .25s var(--ease), background .25s; }
.amc-map__pin.is-home .dot { width: 22px; height: 22px; background: var(--gold); animation: amc-map-pulse 2.6s ease-in-out infinite; }
/* Labels appear on intent (hover/focus/active) — always-on labels collided
   in the Calgary cluster; chips below carry the always-visible names. */
.amc-map__pin .lbl { position: absolute; top: 100%; left: 50%; margin-top: 3px; font-size: .72rem; font-weight: 700; color: var(--green); background: rgba(255,255,255,.92); padding: .05rem .45rem; border-radius: 6px; white-space: nowrap; pointer-events: none; opacity: 0; transform: translate(-50%, -3px); transition: opacity .25s, transform .25s; z-index: 3; }
.amc-map__pin:hover .lbl, .amc-map__pin:focus-visible .lbl, .amc-map__pin.is-active .lbl { opacity: 1; transform: translate(-50%, 0); }
.amc-map__pin:hover .dot, .amc-map__pin.is-active .dot { transform: scale(1.35); background: var(--gold); }
.amc-map__pin.is-active .lbl { background: var(--gold); color: var(--wp--preset--color--gold-ink); }
.amc-map__pin:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; border-radius: 8px; }
@keyframes amc-map-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(245,194,51,.5); } 50% { box-shadow: 0 0 0 10px rgba(245,194,51,0); } }

/* side panel + chips */
.amc-map__panel { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 1.2rem 1.4rem; box-shadow: 0 14px 34px -26px rgba(17,78,70,.45); min-height: 96px; }
.amc-map__panel h3 { color: var(--green); margin: 0 0 .3rem; font-size: 1.25rem; }
.amc-map__panel p { margin: 0; color: var(--text); font-size: .98rem; line-height: 1.55; }
.amc-map__panel-link { display: inline-flex; align-items: center; gap: .35rem; margin-top: .7rem; color: var(--teal); font-weight: 700; font-size: .92rem; text-decoration: none; }
.amc-map__panel-link:hover { text-decoration: underline; }
.amc-map__panel-link[hidden] { display: none; }
.amc-map__chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }
.amc-map__chip { display: inline-block; font: inherit; font-size: .9rem; font-weight: 600; color: var(--green); background: var(--cream); border: 1px solid var(--border); border-radius: 999px; padding: .65rem 1rem; cursor: pointer; text-decoration: none; transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease); }
.amc-map__chip:hover, .amc-map__chip.is-active { background: var(--gold); border-color: var(--gold); color: var(--wp--preset--color--gold-ink); transform: translateY(-1px); }
.amc-map__chip:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.amc-map__cta { display: flex; flex-wrap: wrap; gap: .7rem 1.1rem; margin-top: 1.3rem; align-items: center; }
.amc-map a.amc-map__btn { position: relative; overflow: hidden; isolation: isolate; display: inline-flex; align-items: center; gap: .5rem; background: var(--green); color: #fff; font-weight: 700; text-decoration: none; padding: .8rem 1.35rem; border-radius: 999px; transition: color .25s ease, transform .2s var(--ease), box-shadow .2s var(--ease); }
.amc-map a.amc-map__btn::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--gold); transform: translateX(-101%); transition: transform .5s var(--ease); }
.amc-map a.amc-map__btn:hover { color: var(--wp--preset--color--gold-ink); transform: translateY(-2px); box-shadow: 0 14px 30px -16px rgba(17,78,70,.5); }
.amc-map a.amc-map__btn:hover::after { transform: translateX(0); }
.amc-map a.amc-map__call { font-weight: 700; color: var(--teal); text-decoration: none; }
.amc-map a.amc-map__call:hover { text-decoration: underline; }

@media (max-width: 820px) {
	.amc-map__grid { grid-template-columns: 1fr; gap: 1.4rem; }
	.amc-map__stage { max-width: 460px; margin: 0 auto; width: 100%; }
	/* On a narrow stage the always-on labels collide — show only the active
	   town's label; the chip list below carries the full set. */
	.amc-map__pin .lbl { opacity: 0; }
	.amc-map__pin.is-active .lbl, .amc-map__pin:focus-visible .lbl { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
	.amc-map__pin .dot, .amc-map__pin.is-home .dot { animation: none !important; transition: none !important; }
}

/* On small screens the painted map is decorative — chips carry the whole
   interaction; pins leave the accessibility tree with them. */
@media (max-width: 620px) {
	.amc-map__pin { display: none; }
}
