/**
 * "Where we work" section (home page).
 *
 * Desktop: the live map fills the whole section (about 620px, no padding);
 * one see-through navy panel sits over it on the left and the map fades into
 * navy behind the panel. Phone: the map is a 180px strip on top and the same
 * content sits below it on navy, suburbs as one line separated by dots.
 *
 * Site fonts (--font-heading / --font-body), navy (--color-secondary) and red
 * (--color-accent) only. No coloured bars on the panel or the areas.
 *
 * @package Theme_It_Services_Child
 */

.fp-where {
	--www-navy: var(--color-secondary, #0a2540);
	--www-red: var(--color-accent, #ac1d23);
	--www-line: color-mix(in srgb, #ffffff 16%, transparent);
	position: relative;
	padding: 0;
	overflow: hidden;
	color: var(--color-dark-text, #ffffff);
	background: var(--www-navy);
}

/* Map layer — fills the section on desktop. */
.fp-where__map {
	position: absolute;
	inset: 0;
	z-index: 0;
	background: var(--www-navy);
}

/* Drawn Gauteng outline, shown until (or instead of) the live map. */
.fp-where__map-svg {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	box-sizing: border-box;
	padding: 2rem 2rem 2rem 46%;
}

/* The map's left edge fades into navy behind the panel. */
.fp-where__fade {
	position: absolute;
	inset: 0 auto 0 0;
	z-index: 1;
	width: 58%;
	pointer-events: none;
	background: linear-gradient(
		90deg,
		var(--www-navy) 0%,
		color-mix(in srgb, var(--www-navy) 92%, transparent) 45%,
		color-mix(in srgb, var(--www-navy) 55%, transparent) 75%,
		transparent 100%
	);
}

/* The inner box only places the panel; clicks pass through to the map. */
.fp-where__inner {
	position: relative;
	z-index: 2;
	pointer-events: none;
}

.fp-where__panel {
	pointer-events: auto;
	box-sizing: border-box;
	padding: 1.5rem 1.25rem;
	font-family: var(--font-body);
	font-size: 0.875rem;
	line-height: 1.5;
	color: color-mix(in srgb, #ffffff 82%, transparent);
}

.fp-where__eyebrow {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin: 0 0 0.6rem;
	font-family: var(--font-heading);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: color-mix(in srgb, #ffffff 88%, transparent);
}

.fp-where__eyebrow::before {
	content: "";
	flex: 0 0 auto;
	width: 1.5rem;
	height: 2px;
	background: var(--www-red);
}

.fp-where__title {
	margin: 0 0 0.6rem;
	font-family: var(--font-heading);
	font-size: clamp(1.3rem, 2.2vw, 1.6rem);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.2;
	color: #ffffff;
}

.fp-where__title-accent {
	color: var(--www-red);
}

.fp-where__lead {
	margin: 0;
}

/* Areas — 2 x 2, between two thin divider lines. */
.fp-where__areas {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem 1.5rem;
	margin: 1rem 0;
	padding: 1rem 0;
	list-style: none;
	border-top: 1px solid var(--www-line);
	border-bottom: 1px solid var(--www-line);
}

.fp-where__area {
	min-width: 0;
}

.fp-where__area-title {
	margin: 0 0 0.4rem;
	font-family: var(--font-heading);
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.3;
}

.fp-where__area-title a {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	color: #ffffff;
	text-decoration: none;
}

.fp-where__arrow {
	flex: 0 0 auto;
	color: var(--www-red);
	transition: transform 0.15s ease;
}

.fp-where__area-title a:hover,
.fp-where__area-title a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 0.18em;
	text-decoration-color: var(--www-red);
}

.fp-where__area-title a:hover .fp-where__arrow,
.fp-where__area-title a:focus-visible .fp-where__arrow {
	transform: translateX(2px);
}

/* Suburbs — one line of small text with dots (phone). */
.fp-where__suburbs {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.75rem;
	line-height: 1.5;
	color: color-mix(in srgb, #ffffff 68%, transparent);
}

.fp-where__suburb {
	display: inline;
}

.fp-where__suburb + .fp-where__suburb::before {
	content: " \00B7  ";
	color: var(--www-red);
}

.fp-where__close {
	margin: 0;
	font-size: 0.8125rem;
	color: color-mix(in srgb, #ffffff 75%, transparent);
}

.fp-where__close a {
	font-weight: 600;
	color: var(--www-red);
	text-decoration: underline;
	text-decoration-color: var(--www-red);
	text-underline-offset: 0.15em;
}

.fp-where__close a:hover,
.fp-where__close a:focus-visible {
	color: #ffffff;
}

/* Phone and small tablet — map strip on top, navy text block below. */
@media (max-width: 899px) {
	.fp-where__map {
		position: relative;
		height: 180px;
	}

	.fp-where__map-svg {
		padding: 0.75rem;
	}

	.fp-where__fade {
		display: none;
	}
}

/* Desktop — map edge to edge behind one see-through panel on the left. */
@media (min-width: 900px) {
	.fp-where {
		height: 620px;
		padding-inline: max(var(--space-section-x, 2rem), 2rem);
	}

	.fp-where__inner {
		display: flex;
		align-items: center;
		height: 100%;
	}

	.fp-where__panel {
		width: 560px;
		max-width: 46%;
		padding: 1.75rem 2rem;
		background: color-mix(in srgb, var(--www-navy) 86%, transparent);
		border: 1px solid color-mix(in srgb, #ffffff 16%, transparent);
		border-radius: var(--border-radius-lg, 12px);
		box-shadow: 0 24px 48px color-mix(in srgb, #000000 28%, transparent);
		-webkit-backdrop-filter: blur(6px);
		backdrop-filter: blur(6px);
	}

	/* Suburbs as small outlined pills. */
	.fp-where__suburbs {
		display: flex;
		flex-wrap: wrap;
		gap: 0.3rem;
		color: color-mix(in srgb, #ffffff 82%, transparent);
	}

	.fp-where__suburb {
		display: block;
		padding: 0.15rem 0.55rem;
		font-family: var(--font-heading);
		font-size: 0.6875rem;
		font-weight: 600;
		line-height: 1.45;
		border: 1px solid color-mix(in srgb, #ffffff 26%, transparent);
		border-radius: 999px;
	}

	.fp-where__suburb + .fp-where__suburb::before {
		content: none;
	}

	/* No map key: the panel stands on plain navy. */
	.fp-where:not(.fp-where--has-map) .fp-where__panel {
		max-width: 100%;
	}
}

@media (min-width: 900px) and (max-width: 1199px) {
	.fp-where__panel {
		max-width: 60%;
	}
}
