/**
 * Preferred-professional pages (templates/template-realtor.php).
 *
 * Loaded after text-page.css: the hero and 900px column are the text page's;
 * this file styles only what that page has no equivalent for — the
 * professional cards, the directory lists, the programme cards and the
 * "preferred realtor program" panel — in the design's tokens, with the
 * DPA pages' card, button and feature-card values.
 */

.ij-realtor a,
.ij-realtor a:hover,
.ij-realtor a:focus { text-decoration: none; }
.ij-realtor a:focus-visible { outline: none; box-shadow: var(--ring-focus); border-radius: 6px; }

.ij-realtor .rl-col > * + * { margin-top: 24px; }
.ij-realtor .rl-col > .rl-h2 { margin-top: 64px; }
.ij-realtor .rl-col > :first-child { margin-top: 0; }

.ij-realtor .rl-h2 {
	margin: 0;
	font-family: var(--font-sans);
	font-size: var(--text-h2);
	line-height: 1.15;
	letter-spacing: -1.1px;
	font-weight: var(--weight-heading);
	color: var(--color-text);
	text-wrap: pretty;
}
.ij-realtor .rl-col > .rl-h2 + * { margin-top: 20px; }
.ij-realtor .rl-intro { margin: 0; font-size: 17px; line-height: 1.75; color: var(--color-text-secondary); }
.ij-realtor .rl-prose > :last-child { margin-bottom: 0; }

/* ---- Buttons (the design's green pill) ---------------------------------- */

.ij-realtor .rl-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.ij-realtor .rl-actions-center { justify-content: center; }
.ij-realtor .rl-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 11px 20px;
	border-radius: 100px;
	background: var(--brand-green);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	transition: background 200ms cubic-bezier(0.4, 0, 0.2, 1);
}
.ij-realtor .rl-btn:hover,
.ij-realtor .rl-btn:focus { background: var(--brand-green-dark); color: #fff; }
.ij-realtor .rl-btn-soft { background: var(--color-success-soft); color: var(--brand-green-dark); }
.ij-realtor .rl-btn-soft:hover,
.ij-realtor .rl-btn-soft:focus { background: var(--brand-green); color: #fff; }

/* ---- A professional ----------------------------------------------------- */

.ij-realtor .rl-card {
	display: grid;
	grid-template-columns: 200px minmax(0, 1fr);
	gap: 32px;
	align-items: start;
	padding: 28px;
	background: #fff;
	border-radius: 24px;
	box-shadow: var(--shadow-card);
}
.ij-realtor .rl-photo {
	aspect-ratio: 1 / 1;
	border-radius: 16px;
	overflow: hidden;
	background: var(--slate-100);
	display: flex;
	align-items: center;
	justify-content: center;
}
.ij-realtor .rl-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ij-realtor .rl-initials { font-size: 48px; font-weight: 600; letter-spacing: -1px; color: var(--brand-green-dark); }

.ij-realtor .rl-name {
	margin: 0;
	font-family: var(--font-sans);
	font-size: 26px;
	line-height: 1.2;
	letter-spacing: -0.8px;
	font-weight: var(--weight-heading);
	color: var(--color-text);
	text-wrap: pretty;
}
.ij-realtor .rl-sub { margin: 6px 0 0; font-size: 15px; line-height: 1.5; color: var(--color-text-secondary); }
.ij-realtor .rl-text { margin: 12px 0 0; font-size: 15px; line-height: 1.7; color: var(--color-text-secondary); }
.ij-realtor .rl-head {
	margin: 24px 0 0;
	font-family: var(--font-sans);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.6px;
	text-transform: uppercase;
	color: var(--brand-green-dark);
}

.ij-realtor .rl-rows { margin: 20px 0 0; padding: 0; }
.ij-realtor .rl-row {
	display: grid;
	grid-template-columns: 160px minmax(0, 1fr);
	gap: 16px;
	padding: 12px 0;
	box-shadow: inset 0 -1px 0 var(--color-border);
}
.ij-realtor .rl-row:first-child { box-shadow: inset 0 1px 0 var(--color-border), inset 0 -1px 0 var(--color-border); }
.ij-realtor .rl-row dt { margin: 0; font-size: 13px; line-height: 1.6; font-weight: 600; color: var(--color-text-secondary); }
.ij-realtor .rl-row dd { margin: 0; font-size: 15px; line-height: 1.6; color: var(--color-text); overflow-wrap: anywhere; }
.ij-realtor .rl-row dd > span { display: block; }
.ij-realtor .rl-row dd > span + span { margin-top: 6px; }
.ij-realtor .rl-info a:not(.rl-btn) { color: var(--brand-green-dark); font-weight: 600; }
.ij-realtor .rl-info a:not(.rl-btn):hover { color: var(--brand-green); }

/* ---- Images ------------------------------------------------------------- */

.ij-realtor .rl-figure { margin: 0; text-align: center; }
.ij-realtor .rl-figure img { max-width: 100%; height: auto; border-radius: 20px; display: inline-block; }

/* ---- Directory ---------------------------------------------------------- */

.ij-realtor .rl-dir {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}
.ij-realtor .rl-dir-group { padding: 20px 24px; background: #fff; border-radius: 20px; box-shadow: var(--shadow-card); }
.ij-realtor .rl-dir-letter {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 100px;
	background: var(--color-success-soft);
	color: var(--brand-green-dark);
	font-size: 14px;
	font-weight: 600;
}
.ij-realtor .rl-dir ul { list-style: none; margin: 12px 0 0; padding: 0; }
.ij-realtor .rl-dir li { padding: 6px 0; font-size: 15px; line-height: 1.4; }
.ij-realtor .rl-dir li.no-link { color: var(--color-text-tertiary, var(--color-text-secondary)); }
.ij-realtor .rl-dir li.has-link a { color: var(--brand-green-dark); font-weight: 600; }
.ij-realtor .rl-dir li.has-link a:hover { color: var(--brand-green); }

/* ---- Programme cards (the DPA pages' feature cards) --------------------- */

.ij-realtor .rl-programs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ij-realtor .rl-program { padding: 28px; background: #fff; border-radius: 20px; box-shadow: var(--shadow-card); }
.ij-realtor .rl-program-icon {
	width: 44px;
	height: 44px;
	border-radius: 100px;
	background: var(--color-warning-soft);
	color: var(--brand-orange);
	display: flex;
	align-items: center;
	justify-content: center;
}
.ij-realtor .rl-program-title { margin-top: 20px; font-size: 16px; font-weight: 600; letter-spacing: -0.3px; color: var(--color-text); }
.ij-realtor .rl-program p { margin: 8px 0 0; font-size: 14px; line-height: 1.6; color: var(--color-text-secondary); }

/* ---- "Preferred realtor program" panel ---------------------------------- */

.ij-realtor .rl-col > .rl-cta { margin-top: 64px; }
.ij-realtor .rl-cta {
	padding: 48px;
	border-radius: 24px;
	background: var(--slate-900);
	color: #fff;
	text-align: center;
}
.ij-realtor .rl-cta-kicker { display: block; font-size: 13px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: var(--brand-green); }
.ij-realtor .rl-cta-title {
	margin: 12px 0 0;
	font-family: var(--font-sans);
	font-size: 32px;
	line-height: 1.15;
	letter-spacing: -1.1px;
	font-weight: var(--weight-heading);
	color: #fff;
	text-transform: none;
}
.ij-realtor .rl-cta-kicker + .rl-cta-title { margin-top: 12px; }
.ij-realtor .rl-cta > .rl-cta-title:first-child { margin-top: 0; }
.ij-realtor .rl-cta-text { margin: 16px auto 0; max-width: 640px; }
.ij-realtor .rl-cta-text p { margin: 0 0 12px; font-size: 16px; line-height: 1.65; color: rgba(255, 255, 255, 0.72); }
.ij-realtor .rl-cta-text p:last-child { margin-bottom: 0; }
.ij-realtor .rl-cta .rl-btn { margin-top: 28px; }

/* ---- Breakpoints (!important: mobile.css forces section layout) ---------- */

@media (max-width: 820px) {
	.ij-realtor .rl-card { grid-template-columns: 1fr !important; gap: 20px !important; padding: 20px !important; }
	.ij-realtor .rl-photo { max-width: 220px; }
	.ij-realtor .rl-dir,
	.ij-realtor .rl-programs { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
	.ij-realtor .rl-cta { padding: 32px 20px !important; }
}

@media (max-width: 560px) {
	.ij-realtor .rl-row { grid-template-columns: 1fr !important; gap: 2px !important; }
	.ij-realtor .rl-dir,
	.ij-realtor .rl-programs { grid-template-columns: 1fr !important; }
	.ij-realtor .rl-name { font-size: 22px !important; letter-spacing: -0.5px !important; }
	/* A programme card becomes a compact row: icon beside title and text. */
	.ij-realtor .rl-program { display: grid !important; grid-template-columns: 44px minmax(0, 1fr) !important; column-gap: 16px !important; padding: 20px !important; }
	.ij-realtor .rl-program-icon { grid-row: span 2; }
	.ij-realtor .rl-program-title { margin-top: 0 !important; align-self: end; }
	.ij-realtor .rl-program p { margin-top: 4px !important; }
	.ij-realtor .rl-cta-title { font-size: 24px !important; }
	.ij-realtor .rl-col > .rl-h2,
	.ij-realtor .rl-col > .rl-cta { margin-top: 48px !important; }
}
