/* New Forest Boundary Markers — front end.
   Everything is scoped under .nfbm so it sits inside your theme without fighting it.
   Colours echo the markers themselves: oak-leaf green and Douglas Fir brown. */

.nfbm {
	--nf-green: #2f5d3a;
	--nf-green-deep: #1d3d25;
	--nf-bark: #6b4a2b;
	--nf-moss: #e9efe6;
	--nf-ink: #24231f;
	--nf-muted: #6d6a62;
	--nf-line: #d9ddd3;
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 20px 48px;
	color: var(--nf-ink);
	box-sizing: border-box;
}
.nfbm *, .nfbm *::before, .nfbm *::after { box-sizing: inherit; }
.nfbm a { color: var(--nf-green); }
.nfbm a:hover, .nfbm a:focus { color: var(--nf-green-deep); }
.nfbm :focus-visible { outline: 3px solid var(--nf-green); outline-offset: 2px; }

/* ---------- Page head ---------- */
.nfbm-page-head { padding: 28px 0 20px; border-bottom: 1px solid var(--nf-line); margin-bottom: 28px; }
.nfbm-eyebrow { margin: 0 0 6px; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--nf-bark); }
.nfbm-page-head h1 { margin: 0 0 12px; line-height: 1.1; }
.nfbm-lede { max-width: 64ch; font-size: 1.1rem; line-height: 1.55; color: var(--nf-muted); margin: 0 0 16px; }
.nfbm-button { display: inline-block; padding: 10px 18px; background: var(--nf-green); color: #fff !important; border-radius: 999px; text-decoration: none; font-weight: 600; }
.nfbm-button:hover { background: var(--nf-green-deep); }

.nfbm-crumbs { font-size: .9rem; margin: 18px 0 0; color: var(--nf-muted); }
.nfbm-crumbs span[aria-hidden] { margin: 0 8px; }

/* ---------- Map ---------- */
.nfbm-map-wrap { margin: 0 0 24px; }
.nfbm-map { width: 100%; min-height: 320px; height: 600px; border: 1px solid var(--nf-line); border-radius: 8px; background: var(--nf-moss); }
.nfbm-map-mini { height: 300px; }
.nfbm-map-footnote { margin: 10px 0 0; font-size: .9rem; color: var(--nf-muted); }

.nfbm-popup img { display: block; width: 100%; height: 130px; object-fit: cover; border-radius: 4px; margin-bottom: 8px; }
.nfbm-popup strong { display: block; font-size: 1rem; line-height: 1.25; }
.nfbm-popup-town { display: block; color: var(--nf-muted, #6d6a62); font-size: .85rem; margin-top: 2px; }
.nfbm-popup-link { display: inline-block; margin-top: 8px; font-weight: 600; color: #2f5d3a; text-decoration: none; }
.leaflet-popup-content { margin: 12px 14px; }
.leaflet-container .marker-cluster-small, .leaflet-container .marker-cluster-small div { background: rgba(47, 93, 58, .35); }
.leaflet-container .marker-cluster-small div { background: #2f5d3a; color: #fff; font-weight: 700; }
.leaflet-container .marker-cluster-medium, .leaflet-container .marker-cluster-medium div { background: rgba(107, 74, 43, .35); }
.leaflet-container .marker-cluster-medium div { background: #6b4a2b; color: #fff; font-weight: 700; }
.leaflet-tooltip.nfbm-tip { font-weight: 600; }

/* ---------- Listing grid ---------- */
.nfbm-grid { list-style: none; margin: 0 0 40px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }
.nfbm-card { margin: 0; }
.nfbm-card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; background: #fff; border: 1px solid var(--nf-line); border-radius: 8px; overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.nfbm-card-link:hover, .nfbm-card-link:focus-visible { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(29, 61, 37, .12); color: inherit; }
.nfbm-card-photo { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--nf-moss); overflow: hidden; }
.nfbm-card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nfbm-card-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.nfbm-card-placeholder img { width: 48px; height: auto; opacity: .5; }
.nfbm-card-number { position: absolute; top: 10px; left: 10px; min-width: 34px; padding: 4px 8px; background: var(--nf-green-deep); color: #fff; font-size: .8rem; font-weight: 700; letter-spacing: .06em; border-radius: 4px; text-align: center; font-variant-numeric: tabular-nums; }
.nfbm-card-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; flex: 1; }
.nfbm-card-title { font-weight: 700; font-size: 1.05rem; line-height: 1.25; }
.nfbm-card-town { color: var(--nf-muted); font-size: .9rem; }
.nfbm-card-cta { margin-top: auto; padding-top: 10px; font-size: .85rem; font-weight: 600; color: var(--nf-green); }

.nfbm-about { max-width: 68ch; padding-top: 28px; border-top: 1px solid var(--nf-line); }
.nfbm-about h2 { margin-top: 0; }

/* ---------- Single marker ---------- */
.nfbm-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; font-size: .95rem; color: var(--nf-muted); }
.nfbm-meta-town { font-weight: 600; color: var(--nf-ink); }
.nfbm-meta-coords { font-variant-numeric: tabular-nums; }
.nfbm-meta-directions { font-weight: 600; }

.nfbm-gallery { display: grid; gap: 14px; margin: 0 0 32px; grid-template-columns: repeat(2, 1fr); }
.nfbm-gallery-one { grid-template-columns: 1fr; }
.nfbm-photo { margin: 0; }
.nfbm-photo-lead { grid-column: 1 / -1; }
.nfbm-photo a { display: block; border-radius: 8px; overflow: hidden; background: var(--nf-moss); }
.nfbm-photo img { width: 100%; height: auto; display: block; }
.nfbm-photo-lead img { max-height: 640px; object-fit: cover; }
.nfbm-photo figcaption { font-size: .85rem; color: var(--nf-muted); margin-top: 6px; }

.nfbm-single-body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 36px; align-items: start; margin-bottom: 40px; }
.nfbm-content { font-size: 1.05rem; line-height: 1.65; max-width: 68ch; }
.nfbm-content > :first-child { margin-top: 0; }
.nfbm-side { background: var(--nf-moss); border-radius: 8px; padding: 18px; }
.nfbm-side-title { font-size: 1rem; margin: 0 0 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--nf-bark); }
.nfbm-side .nfbm-map { background: #fff; }
.nfbm-side p { margin: 12px 0 0; font-size: .95rem; }

.nfbm-pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; padding-top: 24px; border-top: 1px solid var(--nf-line); }
.nfbm-pager a { text-decoration: none; }
.nfbm-pager-prev, .nfbm-pager-next { display: flex; flex-direction: column; gap: 2px; }
.nfbm-pager-next { text-align: right; grid-column: 3; }
.nfbm-pager-label { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--nf-muted); }
.nfbm-pager-title { font-weight: 700; }
.nfbm-pager-all { grid-column: 2; padding: 8px 14px; border: 1px solid var(--nf-line); border-radius: 999px; font-size: .9rem; font-weight: 600; }

@media (max-width: 720px) {
	.nfbm-single-body { grid-template-columns: 1fr; }
	.nfbm-gallery { grid-template-columns: 1fr; }
	.nfbm-map { height: 420px; }
	.nfbm-pager { grid-template-columns: 1fr 1fr; }
	.nfbm-pager-all { grid-column: 1 / -1; justify-self: center; order: 3; }
	.nfbm-pager-next { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
	.nfbm-card-link { transition: none; }
	.nfbm-card-link:hover { transform: none; }
}
