/**
 * Area pages — styling for the plugin-rendered pieces only.
 *
 * Property cards reuse the theme's own markup + stylesheet; this file styles the
 * net-new parts (area body, agent cards, area archive cards). Everything is
 * scoped under .vce-area-* so it never leaks into the externally-owned theme.
 * Loaded only on area pages (single + archive).
 */

:root {
	--vce-ink: #16243e;
	--vce-ink-soft: #5a6577;
	--vce-gold: #97925b;
	/* Darker olive-gold for small text so it clears WCAG AA (4.5:1) on white. */
	--vce-gold-text: #615c2c;
	--vce-surface: #ffffff;
	--vce-line: #e7e4da;
	--vce-bg: #f7f6f2;
	--vce-radius: 14px;
	--vce-shadow: 0 1px 2px rgba(22, 36, 62, 0.04), 0 18px 40px -24px rgba(22, 36, 62, 0.28);
	--vce-shadow-hover: 0 2px 4px rgba(22, 36, 62, 0.06), 0 30px 60px -28px rgba(22, 36, 62, 0.38);
	--vce-font-serif: "Playfair Display", "Cormorant Garamond", Georgia, serif;
	--vce-font-sans: "Inter", system-ui, -apple-system, sans-serif;
	--vce-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Body + content -------------------------------------------------- */

.vce-area-body {
	padding: clamp(2.5rem, 1.5rem + 4vw, 5rem) 0 clamp(1rem, 0.5rem + 2vw, 2rem);
}

.vce-area-hero-image {
	overflow: hidden;
	border-radius: var(--vce-radius);
	margin-bottom: clamp(1.5rem, 1rem + 2vw, 2.75rem);
	box-shadow: var(--vce-shadow);
}

.vce-area-hero-image img {
	display: block;
	width: 100%;
	height: clamp(220px, 18rem + 8vw, 460px);
	object-fit: cover;
}

.vce-area-content {
	max-width: 68ch;
	font-family: var(--vce-font-sans);
	font-size: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
	line-height: 1.75;
	color: var(--vce-ink-soft);
}

.vce-area-content h2,
.vce-area-content h3 {
	font-family: var(--vce-font-serif);
	color: var(--vce-ink);
	margin-top: 1.6em;
}

.vce-area-content a {
	color: var(--vce-gold);
}

/* Hero strapline kicker (matches the Locations office "category" label). */
.vce-area-kicker {
	font-family: var(--vce-font-sans);
	font-size: 0.78rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--vce-gold);
	margin-bottom: 0.5rem;
}

/* --- Office / contact panel ----------------------------------------- */

.vce-area-office {
	background: var(--vce-surface);
	border: 1px solid var(--vce-line);
	border-radius: var(--vce-radius);
	padding: 1.5rem 1.5rem 1.6rem;
	box-shadow: var(--vce-shadow);
}

.vce-area-office-title {
	font-family: var(--vce-font-serif);
	font-size: 1.4rem;
	color: var(--vce-ink);
	margin: 0 0 1rem;
}

.vce-area-office-row {
	display: flex;
	gap: 0.6rem;
	align-items: flex-start;
	font-family: var(--vce-font-sans);
	font-size: 0.95rem;
	line-height: 1.5;
	color: var(--vce-ink-soft);
	margin: 0 0 0.7rem;
}

.vce-area-office-row i {
	color: var(--vce-gold);
	margin-top: 0.2rem;
	flex: 0 0 auto;
}

.vce-area-office-row a {
	color: var(--vce-ink);
	text-decoration: none;
	transition: color var(--vce-ease) 0.25s;
}

.vce-area-office-row a:hover,
.vce-area-office-row a:focus-visible {
	color: var(--vce-gold-text);
}

.vce-area-office-map {
	margin-top: 1rem;
	border-radius: 10px;
	overflow: hidden;
	line-height: 0;
}

/* --- Section heading (mirrors the theme's editorial label) ----------- */

.vce-area-agents,
.vce-area-properties {
	padding: clamp(2rem, 1.25rem + 3vw, 4rem) 0;
}

.vce-area-agents .section-heading,
.vce-area-properties .section-heading {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	margin-bottom: clamp(1.5rem, 1rem + 2vw, 2.5rem);
}

.vce-area-agents .heading-line,
.vce-area-properties .heading-line {
	width: 42px;
	height: 1px;
	background: var(--vce-gold);
}

.vce-area-agents .heading-text,
.vce-area-properties .heading-text {
	font-family: var(--vce-font-serif);
	font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.4rem);
	color: var(--vce-ink);
	line-height: 1.1;
	margin: 0;
	font-weight: 600;
}

/* --- Agent cards ----------------------------------------------------- */

.vce-agent-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--vce-surface);
	border: 1px solid var(--vce-line);
	border-radius: var(--vce-radius);
	overflow: hidden;
	box-shadow: var(--vce-shadow);
	transition: transform var(--vce-ease) 0.4s, box-shadow var(--vce-ease) 0.4s;
}

.vce-agent-card:hover,
.vce-agent-card:focus-within {
	transform: translateY(-6px);
	box-shadow: var(--vce-shadow-hover);
}

.vce-agent-photo {
	position: relative;
	aspect-ratio: 4 / 5;
	background: linear-gradient(160deg, #1d2c49, var(--vce-ink));
	display: flex;
	align-items: center;
	justify-content: center;
}

.vce-agent-photo img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.vce-agent-initials {
	font-family: var(--vce-font-serif);
	font-size: 2.6rem;
	letter-spacing: 0.05em;
	color: rgba(255, 255, 255, 0.85);
}

.vce-agent-body {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	padding: 1.25rem 1.25rem 1.4rem;
	flex: 1 1 auto;
}

.vce-agent-name {
	font-family: var(--vce-font-serif);
	font-size: 1.3rem;
	color: var(--vce-ink);
	margin: 0;
}

.vce-agent-job {
	font-family: var(--vce-font-sans);
	font-size: 0.78rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--vce-gold-text);
	margin: 0;
}

.vce-agent-bio {
	font-family: var(--vce-font-sans);
	font-size: 0.92rem;
	line-height: 1.6;
	color: var(--vce-ink-soft);
	margin: 0.4rem 0 0;
}

.vce-agent-contact {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	margin-top: auto;
	padding-top: 0.85rem;
}

.vce-agent-contact a {
	font-family: var(--vce-font-sans);
	font-size: 0.88rem;
	color: var(--vce-ink);
	text-decoration: none;
	transition: color var(--vce-ease) 0.25s;
}

.vce-agent-contact a:hover,
.vce-agent-contact a:focus-visible {
	color: var(--vce-gold-text);
}

.vce-agent-contact i {
	color: var(--vce-gold-text);
	margin-right: 0.35rem;
}

.vce-agent-socials {
	display: flex;
	gap: 0.6rem;
	margin-top: 0.8rem;
}

.vce-agent-socials a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 1px solid var(--vce-line);
	color: var(--vce-ink);
	text-decoration: none;
	transition: color var(--vce-ease) 0.25s, border-color var(--vce-ease) 0.25s, transform var(--vce-ease) 0.25s;
}

.vce-agent-socials a:hover,
.vce-agent-socials a:focus-visible {
	color: var(--vce-gold-text);
	border-color: var(--vce-gold);
	transform: translateY(-2px);
}

/* --- Properties ------------------------------------------------------ */

.vce-area-search {
	padding: clamp(1.5rem, 1rem + 2vw, 3rem) 0 0;
}

.vce-area-properties .bottom-grid {
	margin-top: 0;
}

.vce-area-empty {
	font-family: var(--vce-font-sans);
	color: var(--vce-ink-soft);
	padding: 2rem 0;
	margin: 0;
}

/* --- Archive (area cards) -------------------------------------------- */

.vce-area-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--vce-surface);
	border: 1px solid var(--vce-line);
	border-radius: var(--vce-radius);
	overflow: hidden;
	text-decoration: none;
	box-shadow: var(--vce-shadow);
	transition: transform var(--vce-ease) 0.4s, box-shadow var(--vce-ease) 0.4s;
}

.vce-area-card:hover,
.vce-area-card:focus-visible {
	transform: translateY(-6px);
	box-shadow: var(--vce-shadow-hover);
}

.vce-area-card:focus-visible,
.vce-agent-socials a:focus-visible,
.vce-agent-contact a:focus-visible {
	outline: 2px solid var(--vce-gold-text);
	outline-offset: 3px;
}

.vce-area-card-image {
	aspect-ratio: 16 / 10;
	background: linear-gradient(160deg, #1d2c49, var(--vce-ink));
	overflow: hidden;
}

.vce-area-card-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--vce-ease) 0.6s;
}

.vce-area-card:hover .vce-area-card-image img {
	transform: scale(1.04);
}

.vce-area-card-body {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 1.3rem 1.3rem 1.5rem;
	flex: 1 1 auto;
}

.vce-area-card-title {
	font-family: var(--vce-font-serif);
	font-size: 1.5rem;
	color: var(--vce-ink);
	margin: 0;
}

.vce-area-card-desc {
	font-family: var(--vce-font-sans);
	font-size: 0.94rem;
	line-height: 1.6;
	color: var(--vce-ink-soft);
	margin: 0;
}

.vce-area-card-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: auto;
	padding-top: 0.7rem;
	font-family: var(--vce-font-sans);
	font-size: 0.8rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--vce-gold-text);
}

.vce-area-card-arrow {
	transition: transform var(--vce-ease) 0.3s;
}

.vce-area-card:hover .vce-area-card-arrow {
	transform: translateX(5px);
}

/* --- Motion preferences ---------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.vce-agent-card,
	.vce-area-card,
	.vce-area-card-image img,
	.vce-agent-socials a,
	.vce-area-card-arrow {
		transition: none;
	}

	.vce-agent-card:hover,
	.vce-agent-card:focus-within,
	.vce-area-card:hover,
	.vce-area-card:focus-visible,
	.vce-agent-socials a:hover,
	.vce-agent-socials a:focus-visible {
		transform: none;
	}

	.vce-area-card:hover .vce-area-card-image img {
		transform: none;
	}
}

/* ============================================================
   Areas archive — designers' all-offices office grid.
   .location-section + .office-card internals come from the theme's
   style.css; only the 3-column grid layout is added here (it lived
   inline in all_offices_template.php, not in style.css).
   ============================================================ */
.office-grid { border-top: 1px solid #e8e5de; }
.office-grid .office-col { flex: 0 0 33.3333%; max-width: 33.3333%; }
.office-grid .office-card { border-bottom: 1px solid #e8e5de; }
.office-grid .office-col:nth-child(3n) .office-card { border-right: none; }
@media (max-width: 991px) {
	.office-grid .office-col { flex: 0 0 50%; max-width: 50%; }
	.office-grid .office-col:nth-child(3n) .office-card { border-right: 1px solid rgba(22,36,62,.08); }
	.office-grid .office-col:nth-child(2n) .office-card { border-right: none; }
}
@media (max-width: 575px) {
	.office-grid .office-col { flex: 0 0 100%; max-width: 100%; }
	.office-grid .office-col .office-card { border-right: none; }
}

/* --- Single region: branch place chips ------------------------------- */

.branch-chips {
	margin-top: 1.1rem;
}

.branch-chip {
	display: inline-block;
	padding: 0.5rem 1.15rem;
	font-family: var(--vce-font-sans);
	font-size: 0.72rem;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #8b9099;
	background: #f4f4f1;
	border: 0;
	border-radius: 0;
}

/* --- Single region: full-width branch map ---------------------------- */

.area-map-section {
	line-height: 0; /* no gap under the map canvas */
}

.area-map {
	width: 100%;
	height: clamp(300px, 26rem + 4vw, 460px);
	background: var(--vce-bg);
	z-index: 0; /* stay under the theme's sticky navigation */
}

.area-map .leaflet-tile-pane {
	filter: saturate(0.55) contrast(0.95); /* soften CARTO light to match the mockup */
}

/* --- Single region: "Areas we cover" grid ----------------------------- */

.area-places-section {
	padding: clamp(3rem, 2rem + 4vw, 5.5rem) 0;
	background: var(--vce-surface);
}

.area-places-section .title-label {
	font-family: var(--vce-font-sans);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--vce-gold-text);
}

.area-places-section .title-line {
	width: 34px;
	height: 1px;
	background: var(--vce-gold);
}

.area-places-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	row-gap: 2.5rem;
}

.area-place {
	padding: 0.25rem 1.75rem;
	border-left: 1px solid var(--vce-line);
}

/* No divider on the first column of each row (5 / 3 / 1 columns). */
.area-place:nth-child(5n + 1) {
	border-left: 0;
	padding-left: 0;
}

@media (max-width: 1199px) {
	.area-places-grid {
		grid-template-columns: repeat(3, 1fr);
	}
	.area-place:nth-child(5n + 1) {
		border-left: 1px solid var(--vce-line);
		padding-left: 1.75rem;
	}
	.area-place:nth-child(3n + 1) {
		border-left: 0;
		padding-left: 0;
	}
}

.area-place-name {
	font-family: "Cormorant Garamond", var(--vce-font-serif);
	font-size: 1.5rem;
	font-weight: 600;
	color: var(--vce-ink);
	margin-bottom: 0.65rem;
}

.area-place-desc {
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 1.18rem;
	line-height: 1.65;
	color: rgba(90, 101, 119, 0.9);
	margin: 0;
}

@media (max-width: 767px) {
	.area-places-grid {
		grid-template-columns: 1fr;
	}
	.area-place,
	.area-place:nth-child(5n + 1),
	.area-place:nth-child(3n + 1) {
		border-left: 0;
		padding-left: 0;
	}
}

/* Discreet map attribution (required credit, quiet styling). */
.area-map .leaflet-control-attribution,
#vc-property-map .leaflet-control-attribution {
	font-size: 9px;
	line-height: 1.4;
	padding: 2px 7px;
	background: rgba(255, 255, 255, 0.55);
	color: rgba(90, 101, 119, 0.65);
}

.area-map .leaflet-control-attribution a,
#vc-property-map .leaflet-control-attribution a {
	color: rgba(90, 101, 119, 0.65);
	text-decoration: none;
}

/* --- Single region: featured branch (one-branch regions) -------------- */

.branch-feature .branch-footer {
	border-color: var(--vce-line) !important;
}

.branch-feature-link {
	font-family: var(--vce-font-sans);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--vce-gold-text);
	text-decoration: none;
}

.branch-feature-link:hover,
.branch-feature-link:focus-visible {
	color: var(--vce-ink);
}

.branch-feature-media {
	display: block;
	height: clamp(280px, 22rem + 4vw, 430px);
	background: #ececec;
	overflow: hidden;
}

.branch-feature-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* --- Branch hero with a photo (branch or region featured image) ------- */

.primrose-hill-hero.has-image {
	min-height: 620px;
}

.primrose-hill-hero.has-image .gradient-overlay {
	background: linear-gradient(to top, rgba(22, 36, 62, 0.96), rgba(22, 36, 62, 0.45));
}

/* --- Branch page: property-type toggles -------------------------------- */

.branch-toggle {
	padding: 0.5rem 1.15rem;
	font-family: var(--vce-font-sans);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #8b9099;
	background: #f4f4f1;
	border: 1px solid transparent;
	cursor: pointer;
	transition: color 0.2s, background 0.2s;
}

.branch-toggle.active {
	color: var(--vce-gold-text);
	background: #fff;
	border-color: var(--vce-gold);
}
