/*
Theme Name: Realty Point
Theme URI: https://realtypoint.ca
Author: Realty Point Inc.
Description: Custom theme for Realty Point, the real estate brokerage franchise. On activation it creates the site pages, menu, brokerage directory and media.
Version: 1.6.0
Requires at least: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: realty-point
*/

/* ---------- Fonts (self-hosted Barlow) ---------- */
@font-face { font-family: "Barlow"; src: url("assets/fonts/barlow-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("assets/fonts/barlow-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("assets/fonts/barlow-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("assets/fonts/barlow-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("assets/fonts/barlow-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("assets/fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("assets/fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
	--rp-blue: #0054a5;
	--rp-blue-deep: #06315f;
	--rp-ink: #0e2440;
	--rp-muted: #4a5d75;
	--rp-red: #bf1e23;
	--rp-red-dark: #9c171b;
	--rp-paper: #f4f7fb;
	--rp-line: #d5deea;
	--rp-white: #ffffff;

	--rp-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
	--rp-display: "Barlow Condensed", "Barlow", system-ui, sans-serif;

	--s-0: 0.875rem;  /* 14 */
	--s-1: 1.125rem;  /* 18 body */
	--s-2: 1.375rem;  /* 22 */
	--s-3: 1.75rem;   /* 28 */
	--s-4: 2.25rem;   /* 36 */
	--s-5: 2.875rem;  /* 46 */
	--s-6: clamp(2.6rem, 5.6vw, 4.5rem);

	--wrap: 1180px;
	--gutter: clamp(1.25rem, 4vw, 2.5rem);
	--radius: 2px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--rp-body);
	font-size: var(--s-1);
	line-height: 1.6;
	color: var(--rp-ink);
	background: var(--rp-white);
	-webkit-font-smoothing: antialiased;
}
img, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--rp-blue); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--rp-blue-deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--rp-red); outline-offset: 3px; }

h1, h2, h3, h4 {
	font-family: var(--rp-display);
	font-weight: 700;
	line-height: 1.08;
	letter-spacing: -0.005em;
	margin: 0 0 0.5em;
	color: var(--rp-blue-deep);
}
h1 { font-size: var(--s-5); }
h2 { font-size: var(--s-4); }
h3 { font-size: var(--s-3); font-weight: 600; }
h4 { font-size: var(--s-2); font-weight: 600; }
p, ul, ol, dl, blockquote, figure { margin: 0 0 1.1em; }
strong { font-weight: 600; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto; z-index: 1000; top: 0.5rem; left: 0.5rem;
	background: var(--rp-white); padding: 0.75rem 1rem; color: var(--rp-ink);
}
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Buttons ---------- */
.rp-btn,
.wp-block-button__link,
.rp-form button {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 48px; padding: 0.7rem 1.4rem;
	font-family: var(--rp-body); font-size: 1.0625rem; font-weight: 600; line-height: 1.2;
	text-decoration: none; border-radius: var(--radius);
	background: var(--rp-red); color: var(--rp-white); border: 2px solid var(--rp-red);
	cursor: pointer; transition: background-color .15s ease, border-color .15s ease;
}
.rp-btn:hover,
.wp-block-button__link:hover,
.rp-form button:hover { background: var(--rp-red-dark); border-color: var(--rp-red-dark); color: var(--rp-white); text-decoration: none; }
.rp-btn--ghost { background: transparent; color: var(--rp-blue); border-color: var(--rp-blue); }
.rp-btn--ghost:hover { background: var(--rp-blue); border-color: var(--rp-blue); }
.rp-btn--light { background: transparent; color: var(--rp-white); border-color: rgba(255,255,255,.75); }
.rp-btn--light:hover { background: var(--rp-white); color: var(--rp-blue-deep); border-color: var(--rp-white); }
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0; }

/* ---------- Header ---------- */
.site-header { background: var(--rp-white); border-bottom: 1px solid var(--rp-line); position: relative; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 84px; }
.site-logo { flex: 0 0 auto; display: block; }
.site-logo img { width: 190px; height: auto; }
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav > ul { display: flex; align-items: center; gap: 0.25rem; }
.site-nav li { position: relative; }
.site-nav a {
	display: block; padding: 0.6rem 0.8rem; color: var(--rp-ink);
	font-weight: 600; font-size: 1rem; text-decoration: none; border-radius: var(--radius);
}
.site-nav a:hover { color: var(--rp-blue); }
.site-nav .current-menu-item > a,
.site-nav .current-menu-ancestor > a,
.site-nav .current-page-ancestor > a { color: var(--rp-blue); box-shadow: inset 0 -3px 0 var(--rp-red); }
.site-nav .sub-menu {
	position: absolute; left: 0; top: 100%; min-width: 250px; padding: 0.5rem;
	background: var(--rp-white); border: 1px solid var(--rp-line); border-top: 3px solid var(--rp-blue);
	opacity: 0; visibility: hidden; transform: translateY(4px);
	transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.site-nav li:hover > .sub-menu,
.site-nav li:focus-within > .sub-menu,
.site-nav li.is-open > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.site-nav .sub-menu a { font-weight: 500; padding: 0.55rem 0.75rem; }
.site-nav .sub-menu .current-menu-item > a { box-shadow: inset 3px 0 0 var(--rp-red); }
.submenu-toggle { display: none; }
.header-phone { font-weight: 600; white-space: nowrap; color: var(--rp-blue-deep); text-decoration: none; }
.header-phone:hover { text-decoration: underline; }
.nav-toggle { display: none; }

@media (max-width: 1080px) {
	.header-phone { display: none; }
}
@media (max-width: 900px) {
	.site-header .wrap { min-height: 72px; }
	.site-logo img { width: 150px; }
	.nav-toggle {
		display: inline-flex; margin-left: auto; align-items: center; gap: 0.5rem;
		min-height: 44px; padding: 0.5rem 0.9rem; background: var(--rp-blue); color: #fff;
		border: 0; border-radius: var(--radius); font: 600 1rem var(--rp-body); cursor: pointer;
	}
	.header-cta { display: none; }
	.site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--rp-white); border-bottom: 3px solid var(--rp-blue); max-height: calc(100vh - 72px); overflow-y: auto; }
	.site-nav.is-open { display: block; }
	.site-nav > ul { flex-direction: column; align-items: stretch; padding: 0.5rem var(--gutter) 1rem; gap: 0; }
	.site-nav > ul > li { border-bottom: 1px solid var(--rp-line); display: flex; flex-wrap: wrap; align-items: center; }
	.site-nav > ul > li > a { flex: 1; padding: 0.9rem 0; }
	.site-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; display: none; border: 0; padding: 0 0 0.75rem 1rem; min-width: 0; width: 100%; }
	.site-nav li.is-open > .sub-menu { display: block; }
	.site-nav li:hover > .sub-menu, .site-nav li:focus-within > .sub-menu { display: none; }
	.site-nav li.is-open:hover > .sub-menu, .site-nav li.is-open:focus-within > .sub-menu { display: block; }
	.submenu-toggle { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; background: none; border: 0; color: var(--rp-blue); cursor: pointer; }
	.submenu-toggle svg { transition: transform .15s ease; }
	li.is-open > .submenu-toggle svg { transform: rotate(180deg); }
	.site-nav .current-menu-item > a, .site-nav .current-menu-ancestor > a, .site-nav .current-page-ancestor > a { box-shadow: none; }
}

/* ---------- Home hero: the bar row ---------- */
.rp-hero {
	position: relative; overflow: hidden;
	background: var(--rp-blue-deep); color: var(--rp-white);
	padding: clamp(3rem, 8vw, 6rem) 0 0;
}
.rp-hero__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: end; }
.rp-hero__text { padding-bottom: clamp(2rem, 5vw, 3.5rem); }
.rp-hero h1, .rp-hero__title {
	font-size: var(--s-6); color: var(--rp-white); line-height: 1; margin-bottom: 0.35em; max-width: 14ch;
}
.rp-hero__lead { font-size: var(--s-2); line-height: 1.45; max-width: 34ch; color: #dce7f4; margin-bottom: 1.75rem; }
.rp-hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.rp-hero__photo { margin: 0; align-self: stretch; min-height: 320px; position: relative; }
.rp-hero__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rp-hero__photo figcaption { position: absolute; left: 0; bottom: 0; background: var(--rp-blue-deep); color: #c9d8ea; font-size: var(--s-0); padding: 0.35rem 0.75rem; }

.rp-bars { margin-top: 0; position: relative; }
.rp-bars__row {
	display: flex; align-items: flex-end; gap: clamp(3px, 0.6vw, 8px);
	height: clamp(90px, 14vw, 170px);
	padding: 0; margin: 0; list-style: none;
}
.rp-bars__row li { flex: 1 1 0; min-width: 0; height: var(--h, 80%); background: var(--rp-blue); transform-origin: bottom; }
.rp-bars__row li:nth-child(3n+1) { --h: 72%; }
.rp-bars__row li:nth-child(3n+2) { --h: 84%; }
.rp-bars__row li:nth-child(3n) { --h: 78%; }
.rp-bars__row li.is-yours { --h: 100%; background: var(--rp-red); flex-grow: 1.6; }
.rp-bars__legend { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 0.85rem 0 1.1rem; font-size: var(--s-0); color: #c9d8ea; border-top: 1px solid rgba(255,255,255,.25); }
.rp-bars__legend a { color: var(--rp-white); font-weight: 600; }
.rp-bars__legend .yours { color: #ffb3b5; font-weight: 600; }
@media (prefers-reduced-motion: no-preference) {
	.rp-slide.is-active .rp-bars__row li { animation: rp-rise .7s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(200ms + var(--i, 0) * 28ms); }
	.rp-slide.is-active .rp-bars__row li.is-yours { animation-duration: 1s; }
	.rp-slider.is-js .rp-slide:not(.is-active) .rp-bars__row li { transform: scaleY(0); }
}
@keyframes rp-rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }

.rp-hero__grid.no-photo { grid-template-columns: 1fr; }
.rp-hero__grid.no-photo h1, .rp-hero__grid.no-photo .rp-hero__title { max-width: 20ch; }
.rp-hero__grid.no-photo .rp-hero__lead { max-width: 52ch; }
@media (max-width: 860px) {
	.rp-hero__grid { grid-template-columns: 1fr; }
	.rp-hero__photo { min-height: 240px; order: -1; margin-bottom: 0.5rem; }
	.rp-hero__text { padding-bottom: 2rem; }
}

/* ---------- Home slider ---------- */
.rp-slider { position: relative; background: var(--rp-blue-deep); color: var(--rp-white); }
.rp-slider__viewport { overflow: hidden; }
.rp-slider__track { display: flex; transition: transform .9s cubic-bezier(.65,0,.25,1); will-change: transform; }
.rp-slide { flex: 0 0 100%; min-width: 0; position: relative; display: flex; min-height: clamp(540px, 78vh, 700px); }
.rp-slide--photo { align-items: center; overflow: hidden; }
.rp-slide__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 72% center; }
.rp-slide--photo::before {
	content: ""; position: absolute; inset: 0; z-index: 1;
	background: linear-gradient(90deg, rgba(6,24,48,.88) 0%, rgba(6,24,48,.72) 36%, rgba(6,24,48,.25) 64%, rgba(6,24,48,.05) 85%), linear-gradient(0deg, rgba(6,24,48,.45) 0%, rgba(6,24,48,0) 30%);
}
.rp-slide__content { position: relative; z-index: 2; width: 100%; padding-top: 3.5rem; padding-bottom: 5.5rem; }
.rp-slide__label { display: flex; align-items: center; gap: 0.85rem; margin: 0 0 1.25rem; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #e4ecf6; }
.rp-slide__label::before { content: ""; width: 34px; height: 2px; background: var(--rp-red); }
.rp-slide__title { margin: 0 0 1.5rem; color: var(--rp-white); font-size: clamp(2.9rem, 6.4vw, 5.9rem); line-height: 0.95; font-weight: 700; letter-spacing: -0.01em; max-width: 16ch; }
.rp-slide__title span { display: block; }
.rp-slide__title-2 { color: #f5c79d; font-weight: 600; }
.rp-slide__text { font-size: var(--s-2); line-height: 1.5; max-width: 40ch; color: #e4ecf6; margin-bottom: 2rem; }
.rp-slide--bars { overflow: hidden; }
.rp-slide--bars::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(6,32,66,.93) 0%, rgba(6,32,66,.84) 45%, rgba(6,32,66,.7) 100%), linear-gradient(0deg, rgba(6,32,66,.6) 0%, rgba(6,32,66,0) 40%); }
.rp-slide--bars > .rp-hero { position: relative; z-index: 2; width: 100%; display: flex; flex-direction: column; justify-content: flex-end; background: transparent; }
.rp-slide--bars .rp-hero > .wrap { width: 100%; }
.rp-slide--bars .rp-hero__text { align-self: center; padding-top: 2.5rem; }
.rp-slider__controls { position: absolute; left: 0; right: 0; bottom: 1.25rem; z-index: 3; display: flex; align-items: center; gap: 1rem; pointer-events: none; }
.rp-slider__controls > * { pointer-events: auto; }
.rp-slider__pause { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.55); background: rgba(6,24,48,.35); color: #fff; cursor: pointer; }
.rp-slider__pause:hover { background: rgba(255,255,255,.15); }
.rp-slider__pause .i-play { display: none; }
.rp-slider.is-paused .rp-slider__pause .i-play { display: block; }
.rp-slider.is-paused .rp-slider__pause .i-pause { display: none; }
.rp-slider__dots { display: flex; gap: 0.5rem; }
.rp-slider__dots button { width: 34px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; }
.rp-slider__dots button::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px; background: rgba(255,255,255,.4); }
.rp-slider__dots button[aria-current="true"]::before { background: var(--rp-red); }
/* the bars slide sits its controls above the legend */
.rp-slider.on-bars .rp-slider__controls { bottom: auto; top: 1.25rem; }
@media (max-width: 860px) {
	.rp-slide { min-height: 0; }
	.rp-slide--photo { min-height: 600px; }
	.rp-slide--photo::before { background: linear-gradient(180deg, rgba(6,24,48,.55) 0%, rgba(6,24,48,.88) 55%, rgba(6,24,48,.95) 100%); }
	.rp-slide__bg { object-position: 78% center; }
	.rp-slide__content { align-self: flex-end; padding-top: 6rem; }
}
@media (prefers-reduced-motion: reduce) { .rp-slider__track { transition: none; } }

/* ---------- Home sections ---------- */
.rp-section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.rp-section--paper { background: var(--rp-paper); }
.rp-split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.rp-split--top { align-items: start; }
.rp-split p { max-width: 60ch; }
.rp-video { margin: 0; background: #000; }
.rp-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; }
.rp-video figcaption { background: var(--rp-white); color: var(--rp-muted); font-size: var(--s-0); padding: 0.6rem 0 0; }
.rp-section--paper .rp-video figcaption { background: var(--rp-paper); }

.rp-owner { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.rp-owner img { width: 180px; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; }
.rp-owner__name { font-family: var(--rp-display); font-size: var(--s-3); font-weight: 700; color: var(--rp-blue-deep); line-height: 1.1; margin: 0; }
.rp-owner__role { color: var(--rp-muted); margin-bottom: 0.9rem; }
.rp-pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); }
.rp-pair > div + div { border-left: 1px solid var(--rp-line); padding-left: clamp(2rem, 5vw, 4.5rem); }

.rp-logo-wall { list-style: none; padding: 0; margin: 2.5rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); border-top: 1px solid var(--rp-line); border-left: 1px solid var(--rp-line); }
.rp-logo-wall li { border-right: 1px solid var(--rp-line); border-bottom: 1px solid var(--rp-line); background: var(--rp-white); }
.rp-logo-wall a { display: flex; align-items: center; justify-content: center; height: 96px; padding: 0.9rem; }
.rp-logo-wall img { max-height: 62px; max-width: 100%; width: auto; object-fit: contain; }
.rp-logo-wall .is-dark a { background: var(--rp-blue-deep); }
.rp-logo-wall .text-logo { font-family: var(--rp-display); font-weight: 700; color: var(--rp-blue-deep); text-align: center; line-height: 1.1; }

.rp-statement { max-width: 62ch; font-size: var(--s-2); line-height: 1.5; }

.rp-facebook { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem; padding: 1.5rem 0; border-top: 1px solid var(--rp-line); margin-top: 2.5rem; }
.rp-facebook p { margin: 0; font-weight: 500; }

@media (max-width: 860px) {
	.rp-split, .rp-pair { grid-template-columns: 1fr; }
	.rp-pair > div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--rp-line); padding-top: 2rem; }
}
@media (max-width: 520px) {
	.rp-owner { grid-template-columns: 1fr; }
	.rp-owner img { width: 160px; }
}

/* ---------- Inner page banner + section tabs ---------- */
.page-banner { background: var(--rp-blue-deep); color: var(--rp-white); }
.page-banner__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); align-items: stretch; min-height: 260px; }
.page-banner__grid.no-photo { grid-template-columns: 1fr; min-height: 0; }
.page-banner__text { padding: clamp(2.5rem, 6vw, 4.25rem) 0; padding-right: 2rem; align-self: center; }
.page-banner__parent { display: inline-block; color: #c9d8ea; font-weight: 500; margin-bottom: 0.5rem; text-decoration: none; }
.page-banner__parent:hover { color: var(--rp-white); text-decoration: underline; }
.page-banner h1 { color: var(--rp-white); font-size: var(--s-6); line-height: 1; margin: 0; max-width: 18ch; }
.page-banner__intro { color: #dce7f4; font-size: var(--s-2); line-height: 1.45; max-width: 44ch; margin: 1rem 0 0; }
.page-banner__photo { margin: 0 calc(-1 * var(--gutter)) 0 0; position: relative; min-height: 220px; }
.page-banner__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 1181px) { .page-banner__photo { margin-right: calc((100vw - var(--wrap)) / -2 - var(--gutter) + var(--gutter)); } }
@media (max-width: 760px) {
	.page-banner__grid { grid-template-columns: 1fr; }
	.page-banner__photo { margin: 0 calc(-1 * var(--gutter)); min-height: 200px; }
	.page-banner__text { padding-right: 0; }
}

.section-tabs { background: var(--rp-white); border-bottom: 1px solid var(--rp-line); }
.section-tabs ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; overflow-x: auto; scrollbar-width: thin; }
.section-tabs a { display: block; white-space: nowrap; padding: 1rem 1rem 0.85rem; color: var(--rp-muted); font-weight: 600; text-decoration: none; border-bottom: 3px solid transparent; }
.section-tabs a:hover { color: var(--rp-blue); }
.section-tabs a[aria-current="page"] { color: var(--rp-blue-deep); border-bottom-color: var(--rp-red); }
.section-tabs li:first-child a { padding-left: 0; }

/* ---------- Page content (blocks) ---------- */
.entry { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 5rem); }
.entry > *:not(.alignwide):not(.alignfull):not(.wp-block-columns):not(.rp-wide):not(.wp-block-group) { max-width: 72ch; }
.entry > h2 { margin-top: 2.25rem; }
.entry > h2:first-child { margin-top: 0; }
.entry ul, .entry ol { padding-left: 1.2em; }
.entry li { margin-bottom: 0.35em; }
.entry li::marker { color: var(--rp-red); }
.wp-block-columns { display: flex; flex-wrap: wrap; gap: clamp(1.5rem, 4vw, 3.5rem); margin: 2rem 0; }
.wp-block-column { flex: 1 1 0; min-width: 0; }
.wp-block-column > *:last-child { margin-bottom: 0; }
.wp-block-columns.is-vertically-aligned-center, .wp-block-column.is-vertically-aligned-center { align-self: center; }
@media (max-width: 780px) { .wp-block-columns { flex-direction: column; } .wp-block-column { flex-basis: auto !important; } }
.wp-block-image { margin: 0 0 1.25rem; }
.wp-block-image img { height: auto; }
.wp-block-image figcaption { font-size: var(--s-0); color: var(--rp-muted); margin-top: 0.5rem; }
.wp-block-embed { margin: 0 0 1.5rem; }
.wp-block-embed__wrapper { position: relative; }
.wp-embed-aspect-16-9 .wp-block-embed__wrapper::before { content: ""; display: block; padding-top: 56.25%; }
.wp-embed-aspect-16-9 .wp-block-embed__wrapper iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.wp-block-video video { width: 100%; }
.wp-block-quote { border-left: 4px solid var(--rp-red); margin: 1.75rem 0; padding: 0.25rem 0 0.25rem 1.25rem; }
.wp-block-quote p { font-family: var(--rp-display); font-size: var(--s-3); font-weight: 600; line-height: 1.2; color: var(--rp-blue-deep); }
.wp-block-quote cite { font-style: normal; color: var(--rp-muted); font-size: var(--s-0); }
.wp-block-group.rp-panel { background: var(--rp-paper); padding: clamp(1.5rem, 4vw, 2.5rem); margin: 2rem 0; border-left: 4px solid var(--rp-blue); }
.wp-block-group.rp-panel > *:last-child { margin-bottom: 0; }
.wp-block-group.rp-panel h2, .wp-block-group.rp-panel h3 { margin-top: 0; }
.rp-checklist { list-style: none; padding-left: 0 !important; columns: 2; column-gap: 2.5rem; }
.rp-checklist li { break-inside: avoid; padding-left: 1.6rem; position: relative; margin-bottom: 0.65em; }
.rp-checklist li::before { content: ""; position: absolute; left: 0; top: 0.35em; width: 6px; height: 0.95em; background: var(--rp-red); }
@media (max-width: 640px) { .rp-checklist { columns: 1; } }

/* Pillars on Why Join: term + text pairs */
.rp-pillars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--rp-line); margin: 2rem 0; }
.rp-pillars > div { padding: 1.5rem 1.5rem 1.5rem 0; border-bottom: 1px solid var(--rp-line); }
.rp-pillars > div:nth-child(even) { padding-left: 1.5rem; border-left: 1px solid var(--rp-line); }
.rp-pillars h3 { font-size: var(--s-2); color: var(--rp-blue); margin-bottom: 0.35rem; }
.rp-pillars p { margin: 0; }
@media (max-width: 700px) { .rp-pillars { grid-template-columns: 1fr; } .rp-pillars > div:nth-child(even) { padding-left: 0; border-left: 0; } }

/* FAQ: details blocks */
.wp-block-details { border-bottom: 1px solid var(--rp-line); padding: 0; margin: 0; }
.wp-block-details:first-of-type { border-top: 1px solid var(--rp-line); }
.wp-block-details summary {
	cursor: pointer; list-style: none; padding: 1.15rem 2.5rem 1.15rem 0; position: relative;
	font-family: var(--rp-display); font-size: var(--s-3); font-weight: 600; color: var(--rp-blue-deep); line-height: 1.15;
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
	content: ""; position: absolute; right: 0.25rem; top: 50%; width: 14px; height: 14px; margin-top: -10px;
	border-right: 3px solid var(--rp-red); border-bottom: 3px solid var(--rp-red); transform: rotate(45deg); transition: transform .2s ease;
}
.wp-block-details[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }
.wp-block-details > *:not(summary) { max-width: 68ch; }
.wp-block-details[open] { padding-bottom: 1rem; }

/* ---------- Brokerage directory ---------- */
.rp-wide { max-width: none; }
.rp-dir__tools { display: flex; flex-wrap: wrap; gap: 1rem; align-items: end; justify-content: space-between; margin-bottom: 1.5rem; }
.rp-dir__tools label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.rp-dir__tools input { width: min(360px, 100%); min-height: 48px; padding: 0.6rem 0.8rem; font: inherit; border: 1px solid #9fb0c6; border-radius: var(--radius); }
.rp-dir__count { color: var(--rp-muted); margin: 0; }
.rp-dir__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--rp-line); }
.rp-dir__item { display: grid; grid-template-columns: 1fr; gap: 1.1rem; align-content: start; padding: 1.75rem 2rem 1.75rem 0; border-bottom: 1px solid var(--rp-line); }
.rp-dir__item:nth-child(even) { padding-left: 2rem; padding-right: 0; border-left: 1px solid var(--rp-line); }
.rp-dir__logo { height: 110px; width: 260px; max-width: 100%; display: flex; align-items: center; justify-content: center; border: 1px solid var(--rp-line); padding: 0.75rem; background: var(--rp-white); }
.rp-dir__logo.is-dark { background: var(--rp-blue-deep); border-color: var(--rp-blue-deep); }
.rp-dir__logo img { max-height: 84px; max-width: 100%; width: auto; object-fit: contain; }
.rp-dir__logo .text-logo { font-family: var(--rp-display); font-weight: 700; font-size: var(--s-2); color: var(--rp-blue-deep); text-align: center; line-height: 1.05; }
.rp-dir__item h3 { font-size: var(--s-3); margin-bottom: 0.5rem; }
.rp-dir__item h3 sup { color: var(--rp-red); font-size: 0.6em; }
.rp-dir__item dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.2rem 0.85rem; margin: 0; font-size: 1rem; }
.rp-dir__item dt { color: var(--rp-muted); }
.rp-dir__item dd { margin: 0; overflow-wrap: anywhere; }
.rp-dir__empty { padding: 2rem 0; color: var(--rp-muted); }
.rp-footnote { color: var(--rp-muted); font-size: var(--s-0); margin-top: 1.25rem; }
@media (max-width: 1000px) {
	.rp-dir__list { grid-template-columns: 1fr; }
	.rp-dir__item:nth-child(even) { padding-left: 0; border-left: 0; }
}
@media (max-width: 560px) {
	.rp-dir__item { grid-template-columns: 1fr; gap: 1rem; padding-right: 0; }
}

/* ---------- Locations ---------- */
.rp-locations { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3rem); }
.rp-location h2 { font-size: var(--s-4); margin-bottom: 0.2rem; }
.rp-location__near { color: var(--rp-muted); margin-bottom: 0.75rem; }
.rp-location address { font-style: normal; font-weight: 500; margin-bottom: 1rem; }
.rp-location iframe { width: 100%; aspect-ratio: 4 / 3; border: 1px solid var(--rp-line); display: block; }
.rp-location__photo { margin: 0 0 1rem; }
.rp-location__photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
@media (max-width: 760px) { .rp-locations { grid-template-columns: 1fr; } }

/* ---------- Forms ---------- */
.rp-form { max-width: 640px; }
.rp-form .field { margin-bottom: 1.15rem; }
.rp-form label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.rp-form .req { color: var(--rp-muted); font-weight: 400; }
.rp-form input[type="text"], .rp-form input[type="email"], .rp-form textarea {
	width: 100%; min-height: 48px; padding: 0.65rem 0.8rem; font: inherit; color: var(--rp-ink);
	background: var(--rp-white); border: 1px solid #9fb0c6; border-radius: var(--radius);
}
.rp-form textarea { min-height: 170px; resize: vertical; }
.rp-form input:focus, .rp-form textarea:focus { outline: 3px solid var(--rp-blue); outline-offset: 0; border-color: var(--rp-blue); }
.rp-form .hp { position: absolute; left: -9999px; }
.rp-notice { padding: 1rem 1.15rem; margin-bottom: 1.5rem; border-left: 4px solid; max-width: 640px; }
.rp-notice--ok { background: #ecf6ef; border-color: #1f7a3a; }
.rp-notice--error { background: #fdeeee; border-color: var(--rp-red); }

/* ---------- News ---------- */
.rp-news { list-style: none; padding: 0; margin: 0; }
.rp-news li { padding: 1.25rem 0; border-bottom: 1px solid var(--rp-line); }
.rp-news li:first-child { border-top: 1px solid var(--rp-line); }
.rp-news a { font-family: var(--rp-display); font-size: var(--s-2); font-weight: 600; line-height: 1.2; color: var(--rp-blue-deep); text-decoration: none; }
.rp-news a:hover { color: var(--rp-blue); text-decoration: underline; }
.rp-news__meta { display: block; color: var(--rp-muted); font-size: var(--s-0); margin-top: 0.35rem; }

/* ---------- Video slots, brochure ---------- */
.rp-slot { margin: 0 0 2.25rem; max-width: 900px; }
.rp-slot h3 { margin-bottom: 0.75rem; }
.rp-slot__empty { aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; text-align: center; padding: 1.5rem; background: var(--rp-paper); color: var(--rp-muted); border: 1px dashed #9fb0c6; }
.rp-slot__frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.rp-slot__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.rp-stories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem clamp(1.5rem, 4vw, 3rem); }
.rp-stories .rp-slot { margin: 0; }
.rp-stories h3 { font-size: var(--s-2); }
@media (max-width: 760px) { .rp-stories { grid-template-columns: 1fr; } }
.rp-brochure { display: inline-flex; gap: 1rem; align-items: center; padding: 1rem 1.25rem; border: 1px solid var(--rp-line); background: var(--rp-paper); text-decoration: none; color: var(--rp-ink); margin: 0 0 1.5rem; }
.rp-brochure img { width: 72px; height: auto; border: 1px solid var(--rp-line); }
.rp-brochure strong { display: block; color: var(--rp-blue-deep); }

/* ---------- Footer ---------- */
.site-footer { background: var(--rp-blue-deep); color: #dce7f4; }
.tagline-band { background: var(--rp-blue); color: var(--rp-white); }
.tagline-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding-top: 1.6rem; padding-bottom: 1.6rem; }
.tagline-band p { margin: 0; font-family: var(--rp-display); font-size: var(--s-3); font-weight: 600; line-height: 1.15; }
.footer-cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem; padding: 3rem 0 2.5rem; }
.site-footer h2 { color: var(--rp-white); font-size: var(--s-2); margin-bottom: 0.75rem; }
.site-footer address { font-style: normal; margin-bottom: 1rem; }
.site-footer a { color: var(--rp-white); }
.site-footer dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.15rem 1rem; margin: 0 0 1rem; }
.site-footer dd { margin: 0; }
.footer-social { display: flex; gap: 0.6rem; }
.footer-social a { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0.4rem 0.9rem; border: 1px solid rgba(255,255,255,.4); border-radius: var(--radius); text-decoration: none; font-weight: 600; }
.footer-social a:hover { background: var(--rp-white); color: var(--rp-blue-deep); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.18); padding: 1.25rem 0 1.5rem; font-size: var(--s-0); color: #a9bdd6; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; }
.footer-bottom p { margin: 0; }
@media (max-width: 820px) { .footer-cols { grid-template-columns: 1fr; } }

/* ---------- Misc ---------- */
.rp-404 { padding: 5rem 0; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .section-tabs { display: none; } }
.rp-dir__item[hidden] { display: none; }
