/*
 * WealthArch – Location page sections
 * Figma: Live Site Updates → 2517:3 (/location/) and 2541:2 (/locations/alhambra/)
 * Markup: patterns/location-*.php  ·  Loaded by inc/location-sections.php
 */

.wa-loc-section {
	--wa-navy: #0a4171;
	--wa-text: #2f3334;
	--wa-link: #136fad;
	--wa-mist: #ebeef8;
	--wa-steel: #84a2bc;
	--wa-section-space: clamp(56px, 6vw, 90px);
	--wa-title-size: clamp(2rem, 1.43rem + 1.79vw, 3rem);
	color: var(--wa-text);
	font-family: Roboto, sans-serif;
	box-sizing: border-box;
}

.wa-loc-section *,
.wa-loc-section *::before,
.wa-loc-section *::after {
	box-sizing: border-box;
}

/* Sections stack flush; spacing comes from each section's own padding. */
.wp-block-post-content > .wa-loc-section,
.wa-loc-section + .wa-loc-section {
	margin-block-start: 0 !important;
	margin-block-end: 0 !important;
}

/*
 * Match the hero (alignwide cover): a 1366px box with the content inset 36px at every width, so section
 * copy lines up with the hero copy instead of sitting on the box edge (the theme only pads below 1366px).
 */
.wa-loc-section > .alignwide {
	max-width: var(--wp--style--global--wide-size, 1366px) !important;
	padding-inline: var(--wp--style--block-gap, 36px) !important;
}

/* The hero's inset drops to 24px at ≤768px; follow it so the left edges stay aligned on phones. */
@media (max-width: 768px) {
	.wa-loc-section > .alignwide,
	.wa-loc-section > .wa-loc-earl__head,
	.wa-loc-section > .wa-loc-usps__head,
	.wa-loc-section > .wa-loc-title {
		padding-inline: 24px !important;
	}
}

/* Neutralise core flow/constrained blockGap (* + * margin) inside these sections; spacing is set explicitly below. */
.wa-loc-section :is(.is-layout-flow, .is-layout-constrained) > * + *,
.wa-loc-section.is-layout-constrained > * + * {
	margin-block-start: 0;
}

.wa-loc-section p {
	margin: 0;
	font-size: 18px;
	line-height: 28px;
}

.wa-loc-section a:not(.wp-element-button) {
	color: var(--wa-link);
	text-decoration: underline;
}

.wa-loc-section .wa-loc-title {
	margin: 0;
	color: var(--wa-navy);
	font-size: var(--wa-title-size);
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

.wa-loc-section .wa-loc-title strong {
	font-weight: 700;
}

.wa-loc-section .wa-loc-eyebrow {
	margin: 0 0 10px;
	color: var(--wa-navy);
	font-size: 18px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: -0.02em;
	text-transform: uppercase;
}

.wa-loc-section .wp-block-image {
	margin: 0;
}

/* ---------- We Value Your Trust ---------- */

.wa-loc-badges {
	padding-block: var(--wa-section-space);
	background: linear-gradient(180deg, var(--wa-mist) 0%, #fff 100%);
}

.wa-loc-badges .wa-loc-title strong {
	font-weight: 600;
}

.wa-loc-badges__top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 40px;
}

.wa-loc-badges__intro {
	flex: 1 1 0;
	min-width: 0;
	max-width: 514px;
}

.wa-loc-badges__intro .wa-loc-title {
	margin-bottom: 14px;
}

.wa-loc-badges__intro p {
	line-height: 24px;
}

.wa-loc-badges__logos {
	display: flex;
	flex: 0 0 auto;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 20px;
}

/* 144px at ≥1600px (design), easing down to 112px so all five stay on one row beside the intro. */
.wa-loc-badges__logos .wp-block-image,
.wa-loc-badges__logos .wp-block-image img {
	width: clamp(112px, 9vw, 144px) !important;
	height: clamp(112px, 9vw, 144px) !important;
}

.wa-loc-badges__logos .wp-block-image img {
	display: block;
	object-fit: contain;
}

.wa-loc-badges__notes {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 22px;
	margin-block-start: 46px !important;
}

.wa-loc-badges__notes p {
	font-size: 16px;
	line-height: 1.5;
}

/* ---------- Office map ---------- */

.wa-loc-map {
	padding-block-end: var(--wa-section-space);
	padding-inline: 36px !important;
	background: #fff;
}

@media (max-width: 768px) {
	.wa-loc-map {
		padding-inline: 24px !important; /* theme zeroes .alignfull padding on mobile */
	}
}

.wa-loc-map__frame {
	width: 100%;
	max-width: 960px;
	margin-inline: auto;
	aspect-ratio: 960 / 500;
}

.wa-loc-map__frame iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

/* ---------- Meet Earl Yaokasin, CFA ---------- */

.wa-loc-earl {
	padding-block-end: var(--wa-section-space);
	background: #fff;
}

.wa-loc-map + .wa-loc-earl {
	padding-block-start: var(--wa-section-space);
}

.wa-loc-section .wa-loc-earl__head {
	max-width: 932px;
	margin-inline: auto;
	text-align: center;
}

.wa-loc-earl__head .wa-loc-title {
	margin-bottom: 16px;
}

.wa-loc-earl__content {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 72px;
	max-width: 1120px;
	margin-block-start: 64px !important;
	margin-inline: auto !important;
}

.wa-loc-earl__photo {
	flex: 0 0 448px;
	box-shadow: -4px 4px 6px rgba(0, 0, 0, 0.15);
}

.wa-loc-earl__photo img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 448 / 544;
	object-fit: cover;
}

.wa-loc-earl__copy {
	flex: 0 1 600px;
}

.wa-loc-earl__copy .wa-loc-earl__subtitle {
	margin: 0 0 14px;
	color: var(--wa-navy);
	font-size: clamp(1.75rem, 1.39rem + 1.14vw, 2.5rem);
	font-weight: 400;
	line-height: 1.175;
	letter-spacing: -0.02em;
}

.wa-loc-earl__subtitle strong {
	font-weight: 700;
}

.wa-loc-section .wa-loc-earl__copy p + p {
	margin-top: 15px;
}

/* ---------- Independent Advice. Proven Trust. ---------- */

.wa-loc-usps {
	padding-block-end: var(--wa-section-space);
	background: linear-gradient(180deg, #fff 0%, var(--wa-mist) 100%);
}

.wa-loc-usps__head {
	text-align: center;
}

.wa-loc-usps__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 18px;
	margin-block-start: 40px !important;
}

.wa-loc-usps__card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	padding: 32px 28px 44px;
	background: #fff;
	filter: drop-shadow(-2px 4px 6px rgba(0, 0, 0, 0.08));
	text-align: center;
}

.wa-loc-usps__card > * {
	margin: 0 !important;
}

.wa-loc-usps__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 88px;
	height: 88px;
	border-radius: 50%;
	background: var(--wa-mist);
}

.wa-loc-usps__icon img {
	display: block;
	width: 48px;
	height: 48px;
}

.wa-loc-usps__card h3 {
	color: var(--wa-text);
	font-size: 22px;
	font-weight: 600;
	line-height: 28px;
	letter-spacing: 0;
}

.wa-loc-usps__card h3 + p {
	margin-top: -4px !important; /* 12px title/body gap inside the 16px card gap */
	line-height: 1.5;
}

/* ---------- In The News ---------- */

.wa-loc-news {
	padding-block-end: 80px;
	background: linear-gradient(180deg, var(--wa-mist) 0%, var(--wa-steel) 100%);
}

.wa-loc-news__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 73px;
	margin-block-start: 40px !important;
}

.wa-loc-news__card {
	display: flex;
	flex-direction: column;
	gap: 15px;
	padding: 30px 15px;
	background: #fff;
}

.wa-loc-news__card > * {
	margin: 0 !important;
}

.wa-loc-news__card h3 {
	margin-bottom: 10px !important;
	color: var(--wa-navy);
	font-size: 23px;
	font-weight: 700;
	line-height: 1.2;
}

.wa-loc-news__card .wp-block-image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
	border: 0.57px solid rgba(0, 0, 0, 0.07);
}

.wa-loc-news__card p {
	line-height: 1.4;
}

.wa-loc-news__card .wp-block-buttons {
	margin-top: 10px !important;
}

.wa-loc-news__card .wp-block-button__link {
	padding: 12px 24px;
	border-radius: 3px;
	background: var(--wa-link);
	color: #fff;
	font-size: 14.4px;
	font-weight: 500;
	line-height: 1.7;
	letter-spacing: normal;
	text-decoration: none;
	text-transform: none;
}

.wa-loc-news__card .wp-block-button__link:hover,
.wa-loc-news__card .wp-block-button__link:focus {
	background: var(--wa-navy);
	color: #fff;
}

/* ---------- Responsive ---------- */

@media (max-width: 1200px) {
	.wa-loc-badges__top {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.wa-loc-badges__intro {
		flex-basis: auto;
		max-width: 640px;
	}

	.wa-loc-badges__logos {
		justify-content: center;
	}

	.wa-loc-usps__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.wa-loc-news__grid {
		gap: 32px;
	}

	.wa-loc-earl__content {
		gap: 48px;
	}

	.wa-loc-earl__photo {
		flex-basis: 380px;
	}
}

@media (max-width: 960px) {
	.wa-loc-earl__content {
		flex-direction: column;
	}

	.wa-loc-section .wa-loc-earl__photo.wp-block-image {
		flex-basis: auto;
		width: 100%;
		max-width: 448px;
	}

	.wa-loc-earl__copy {
		flex-basis: auto;
	}

	.wa-loc-news .wa-loc-news__grid.alignwide {
		grid-template-columns: minmax(0, 1fr);
		max-width: 480px;
		margin-inline: auto !important;
	}
}

@media (max-width: 781px) {
	.wa-loc-section p {
		font-size: 16px;
		line-height: 1.6;
	}

	.wa-loc-badges__logos {
		gap: 12px;
	}

	.wa-loc-badges__logos .wp-block-image,
	.wa-loc-badges__logos .wp-block-image img {
		width: 96px !important; /* beats the image block's inline 144px size */
		height: 96px !important;
	}

	.wa-loc-badges__notes {
		grid-template-columns: minmax(0, 1fr);
		margin-block-start: 32px !important;
	}

	.wa-loc-badges__notes p {
		font-size: 14px;
	}

	.wa-loc-map__frame {
		aspect-ratio: 4 / 3;
	}

	.wa-loc-earl__content {
		margin-block-start: 40px !important;
		gap: 32px;
	}

	.wa-loc-usps__card {
		padding: 28px 20px 36px;
	}

	.wa-loc-usps__card h3 {
		font-size: 20px;
		line-height: 26px;
	}

	.wa-loc-news {
		padding-block-end: 56px;
	}
}

@media (max-width: 600px) {
	.wa-loc-usps .wa-loc-usps__grid.alignwide {
		grid-template-columns: minmax(0, 1fr);
		max-width: 420px;
		margin-inline: auto !important;
	}
}
