/*
 * P09 — /projects directory index + /projects/{slug} detail.
 * All rules scoped under .rd-directory-index or .rd-project-detail
 * so the global cascade stays clean.
 *
 * Tokens come from redesign-tokens.v2.css (--rd-navy, --rd-brass, etc.).
 * If a token is missing, hard-coded fallbacks match the mockup palette.
 */

/* ============================================================
   /projects index
   ============================================================ */

.rd-directory-index {
    background: #F7F3EB;
    color: #1A1714;
    font-family: var(--font-body, "Inter", system-ui, sans-serif);
}
.rd-directory-index .rd-di-container {
    max-width: 1440px;
    margin: 0 auto;
    /* Horizontal padding bumped 32 -> 56 so hero, filter bar, results grid
       and agent callout all sit clear of the viewport edges at 1440 width.
       Mobile breakpoint below scales it back to 20px for narrow screens. */
    padding: 0 56px;
}
@media (max-width: 768px) {
    .rd-directory-index .rd-di-container { padding: 0 20px; }
}

/* Hero */
.rd-di-hero {
    background: #FFFFFF;
    border-bottom: 1px solid #E7DFCF;
    padding: 48px 0 36px;
}
.rd-di-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #B5946A;
    margin-bottom: 16px;
}
.rd-di-title {
    margin: 0;
    font-family: var(--font-display, "Plus Jakarta Sans", "Inter", system-ui, sans-serif);
    font-size: 56px;
    /* Aligned with mockup canonical (600) on 2026-05-26 - previous 800 was
       the only display heading on the site using extrabold; every other
       hero / page-title uses 600 per the type scale in tokens.v2.css. */
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.05;
    color: #1A1714;
    max-width: 900px;
}
.rd-di-title em {
    font-style: italic;
    font-weight: 700;
    color: #B85C3D;
}
.rd-di-lede {
    margin: 16px 0 0;
    max-width: 720px;
    font-size: 17px;
    color: #5B554D;
    line-height: 1.55;
}
.rd-di-lede strong { color: #1A1714; }

/* Sticky filter bar */
.rd-di-filterbar {
    position: sticky;
    /* Stick below the top nav (70px to match the current chrome height). */
    top: 70px;
    z-index: 30;
    background: #FFFFFF;
    border-top: 1px solid #E7DFCF;
    border-bottom: 1px solid #E7DFCF;
    box-shadow: 0 4px 16px rgba(26, 23, 20, 0.04);
}
.rd-di-filterbar__row {
    display: flex;
    flex-wrap: wrap;
    /* `gap` shorthand sets row-gap + column-gap so wrapped pill rows have
       vertical breathing room. */
    gap: 14px;
    align-items: center;
    /* !important to override .rd-di-container's `padding: 0 56px` rule,
       which has higher specificity (descendant selector) and would
       otherwise win for horizontal padding. */
    padding: 20px 32px !important;
}
.rd-di-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.rd-di-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    background: #FFFFFF;
    border: 1px solid #D9CDB5;
    border-radius: 999px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #1A1714;
    text-decoration: none;
    transition: background .15s, color .15s, border-color .15s;
}
.rd-di-pill:hover { background: #FBF8F2; color: #1A1714; text-decoration: none; }
.rd-di-pill__count {
    font-size: 11px;
    color: #8D8678;
}
.rd-di-pill.is-active {
    background: #131B3A;
    color: #fff;
    border-color: #131B3A;
}
.rd-di-pill.is-active .rd-di-pill__count { color: rgba(255,255,255,0.7); }
.rd-di-pill--city.is-active {
    background: #0E5B4A;
    border-color: #0E5B4A;
}
.rd-di-divider {
    width: 1px;
    height: 22px;
    background: #E7DFCF;
    margin: 0 4px;
}
.rd-di-filterbar__spacer { flex: 1; }

.rd-di-search {
    position: relative;
    width: 280px;
    display: block;
}
.rd-di-search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #8D8678;
}
.rd-di-search input {
    width: 100%;
    padding: 9px 14px 9px 34px;
    border: 1px solid #D9CDB5;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    outline: none;
    background: #fff;
}
.rd-di-search input:focus { border-color: #131B3A; }

/* Projects-index name autocomplete dropdown (Richard 2026-05-29). */
.rd-di-suggest {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 1200;
    background: #fff;
    border: 1px solid #D9CDB5;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(19, 27, 58, .12);
    padding: 6px;
    max-height: 320px;
    overflow-y: auto;
}
.rd-di-suggest__item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    background: transparent;
    border-radius: 8px;
    text-align: left;
    cursor: pointer;
    font-size: 13px;
    color: #131B3A;
}
.rd-di-suggest__item:hover,
.rd-di-suggest__item.is-active { background: #F4EFE4; }
.rd-di-suggest__badge {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: var(--color-accent, #1f2c58);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}
.rd-di-suggest__label {
    min-width: 0;
    flex: 1;
}

.rd-di-sort {
    padding: 9px 14px;
    border: 1px solid #D9CDB5;
    border-radius: 8px;
    background: #FFFFFF;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: #1A1714;
    outline: none;
    cursor: pointer;
}

/* Results */
.rd-di-results { padding: 32px 0 80px; }
.rd-di-results__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.rd-di-results__count {
    margin: 0;
    font-family: var(--font-display, "Plus Jakarta Sans", system-ui, sans-serif);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #1A1714;
}
.rd-di-results__city { color: #5B554D; font-weight: 500; margin-left: 6px; }
.rd-di-results__updated {
    font-size: 12px;
    color: #8D8678;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rd-di-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.rd-di-empty {
    padding: 64px 32px;
    text-align: center;
    background: #FFFFFF;
    border-radius: 16px;
    border: 1px solid #E7DFCF;
}
.rd-di-empty__title {
    font-family: var(--font-display, "Plus Jakarta Sans", system-ui, sans-serif);
    font-size: 22px;
    font-weight: 700;
    color: #1A1714;
    margin-bottom: 8px;
}
.rd-di-empty__hint { font-size: 14px; color: #5B554D; }

/* Card */
.rd-di-card {
    background: #FFFFFF;
    border-radius: 14px;
    border: 1px solid #E7DFCF;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 2px rgba(26, 23, 20, 0.04);
    color: #1A1714;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease;
}
.rd-di-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 48px rgba(26, 23, 20, 0.14);
    color: #1A1714;
    text-decoration: none;
}
.rd-di-card:hover .rd-di-card__name { color: #0E5B4A; }
.rd-di-card__photo {
    aspect-ratio: 4 / 3;
    position: relative;
    background: linear-gradient(135deg, #FBF8F2 0%, #F0E6D3 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #B5946A;
}
.rd-di-card__photo-svg {
    width: 56px;
    height: 56px;
    opacity: 0.55;
}
.rd-di-card__badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 6px;
}
.rd-di-card__badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
}
.rd-di-card__badge--type {
    background: rgba(255, 255, 255, 0.94);
    color: #1A1714;
    backdrop-filter: blur(4px);
}
.rd-di-card__badge--year {
    background: #B5946A;
    color: #fff;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.rd-di-card__body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}
.rd-di-card__name {
    font-family: var(--font-display, "Plus Jakarta Sans", system-ui, sans-serif);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: #131B3A;
    transition: color 0.15s;
}
.rd-di-card__city { font-size: 13px; color: #5B554D; line-height: 1.4; }
.rd-di-card__spacer { flex: 1; }
.rd-di-card__stats {
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid #E7DFCF;
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #5B554D;
}
.rd-di-card__stats strong { color: #1A1714; }
.rd-di-card__muted { color: #8D8678; font-style: italic; }

/* Pagination */
.rd-di-pagination { margin-top: 36px; display: flex; justify-content: center; }
.rd-di-pagination .pagination {
    display: inline-flex;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.rd-di-pagination .page-item .page-link,
.rd-di-pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid #E7DFCF;
    background: #fff;
    color: #1A1714;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.rd-di-pagination .page-item.active .page-link {
    background: #131B3A;
    color: #fff;
    border-color: #131B3A;
}
.rd-di-pagination .page-item.disabled .page-link {
    color: #B5AC9A;
    background: #FBF8F2;
}

/* Agent callout */
.rd-di-callout {
    background: #131B3A;
    color: #fff;
    border-top: 1px solid #E7DFCF;
}
.rd-di-callout__row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 32px;
    align-items: center;
    padding: 56px 32px;
    max-width: 1200px;
}
.rd-di-callout__eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #B5946A;
    margin-bottom: 14px;
}
.rd-di-callout__title {
    margin: 0;
    font-family: var(--font-display, "Plus Jakarta Sans", system-ui, sans-serif);
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
}
.rd-di-callout__title em { font-style: italic; color: #B5946A; }
.rd-di-callout__lede {
    margin: 12px 0 0;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.55;
    max-width: 620px;
}
.rd-di-callout__cta {
    padding: 14px 26px;
    background: #0E5B4A;
    color: #fff;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
}
.rd-di-callout__cta:hover { color: #fff; background: #0A4A3C; text-decoration: none; }

@media (max-width: 900px) {
    .rd-di-title { font-size: 40px; }
    .rd-di-callout__row { grid-template-columns: 1fr; gap: 20px; }
    .rd-di-callout__title { font-size: 28px; }
    .rd-di-search { width: 100%; }
    .rd-di-filterbar { top: 0; }
}

/* ============================================================
   /projects/{slug} detail
   ============================================================ */

.rd-project-detail {
    background: #F7F3EB;
    color: #1A1714;
    font-family: var(--font-body, "Inter", system-ui, sans-serif);
}
.rd-project-detail .rd-pd-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}

/* Breadcrumb */
.rd-pd-breadcrumb {
    background: #FFFFFF;
    border-bottom: 1px solid #E7DFCF;
}
.rd-pd-breadcrumb > .rd-pd-container { padding-top: 16px; padding-bottom: 16px; font-size: 13px; color: #5B554D; }
.rd-pd-breadcrumb a { color: #5B554D; text-decoration: none; }
.rd-pd-breadcrumb a:hover { color: #0E5B4A; text-decoration: none; }
.rd-pd-breadcrumb__sep { margin: 0 8px; color: #D9CDB5; }
.rd-pd-breadcrumb__current { color: #1A1714; font-weight: 600; }

/* Hero */
.rd-pd-hero { background: #FFFFFF; }
.rd-pd-hero__row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
    padding: 32px;
    padding-top: 32px;
    padding-bottom: 24px;
}
.rd-pd-hero__chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 999px;
    background: #E6EFEA;
    color: #0E5B4A;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.rd-pd-hero__title {
    margin: 0;
    font-family: var(--font-display, "Plus Jakarta Sans", system-ui, sans-serif);
    font-size: 52px;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.05;
    color: #1A1714;
}
.rd-pd-hero__subtitle {
    margin-top: 6px;
    font-size: 18px;
    color: #5B554D;
}
.rd-pd-hero__stats {
    margin-top: 14px;
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    color: #5B554D;
    font-size: 15px;
}
.rd-pd-hero__stats strong {
    color: #1A1714;
    font-family: var(--font-display, "Plus Jakarta Sans", system-ui, sans-serif);
}
.rd-pd-hero__listings strong { color: #0E5B4A; }
.rd-pd-hero__address {
    margin-top: 14px;
    font-size: 14px;
    color: #5B554D;
    max-width: 700px;
    line-height: 1.5;
}

/* Photos */
.rd-pd-photos {
    background: #FBF8F2;
    border-bottom: 1px solid #E7DFCF;
}
.rd-pd-photos > .rd-pd-container { padding-top: 24px; padding-bottom: 24px; }

/* Reuse legacy gallery shell from directory-project.css — restyle via wrapper. */
.rd-pd-photos .directory-project-gallery { margin: 0; }
.rd-pd-photos .directory-project-gallery-grid {
    grid-template-columns: 2fr repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 12px;
    border-radius: 14px;
    overflow: hidden;
}
.rd-pd-photos .directory-project-gallery-grid > a:first-child { grid-row: span 2; aspect-ratio: 4/3; }
.rd-pd-photos .directory-project-gallery-item { border-radius: 0; aspect-ratio: 1/1; }
.rd-pd-photos .directory-project-gallery-empty {
    background: linear-gradient(135deg, #FBF8F2 0%, #F0E6D3 100%);
    border: 1px dashed #D9CDB5;
    border-radius: 14px;
    padding: 56px 32px;
}
.rd-pd-photos .btn-primary {
    background: #131B3A;
    border-color: #131B3A;
    border-radius: 6px;
    padding: 11px 18px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Main */
.rd-pd-main > .rd-pd-container { padding-top: 40px; padding-bottom: 64px; }
.rd-pd-main__grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 32px;
    align-items: start;
}
.rd-pd-content { display: flex; flex-direction: column; gap: 16px; }

.rd-pd-card {
    background: #FFFFFF;
    border-radius: 14px;
    border: 1px solid #E7DFCF;
    padding: 28px;
    box-shadow: 0 1px 2px rgba(26, 23, 20, 0.03);
}
.rd-pd-h2 {
    margin: 0;
    font-family: var(--font-display, "Plus Jakarta Sans", system-ui, sans-serif);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: #1A1714;
}
.rd-pd-h3 {
    margin: 0;
    font-family: var(--font-display, "Plus Jakarta Sans", system-ui, sans-serif);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #1A1714;
    line-height: 1.25;
}
.rd-pd-card__lede { margin: 8px 0 18px; font-size: 14px; color: #5B554D; }

.rd-pd-stats {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.rd-pd-stat__label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8D8678;
    margin-bottom: 6px;
}
.rd-pd-stat__value {
    font-family: var(--font-display, "Plus Jakarta Sans", system-ui, sans-serif);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #1A1714;
}
.rd-pd-stat__value--mono {
    font-family: var(--font-mono, ui-monospace, SFMono-Regular, monospace);
    font-size: 14px;
    letter-spacing: 0;
}
.rd-pd-stat__value--accent { color: #0E5B4A; }

.rd-pd-map {
    height: 360px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #E7DFCF;
    z-index: 0;
}

/* Restyle legacy listings list within .rd-pd-card. */
.rd-pd-card .directory-project-listings-title {
    margin: 0 0 12px;
    font-family: var(--font-display, "Plus Jakarta Sans", system-ui, sans-serif);
    font-size: 24px;
    font-weight: 700;
    color: #1A1714;
}
.rd-pd-card .directory-project-listings { gap: 16px; }
.rd-pd-card .directory-project-listing {
    border-radius: 12px;
    border: 1px solid #E7DFCF;
}
.rd-pd-card .directory-project-listing:hover { box-shadow: 0 12px 28px rgba(26, 23, 20, 0.08); }

/* Nearby */
.rd-pd-nearby {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}
.rd-pd-nearby__h4 {
    margin: 0 0 12px;
    /* Richard 2026-05-29: titles were too small at 11px. */
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b6457;
}
.rd-pd-nearby__row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #E7DFCF;
    font-size: 13px;
    color: #1A1714;
}
.rd-pd-nearby__row:last-child { border-bottom: none; }
.rd-pd-nearby__dist {
    color: #8D8678;
    font-family: var(--font-mono, ui-monospace, SFMono-Regular, monospace);
    font-size: 12px;
}
.rd-pd-nearby__line {
    background: #131B3A;
    color: #fff;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 11px;
    font-weight: 600;
    margin-right: 6px;
}

/* Sidebar */
.rd-pd-aside {
    position: sticky;
    top: 96px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.rd-pd-aside__eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #B5946A;
    margin-bottom: 8px;
}
.rd-pd-aside__lede {
    margin: 6px 0 16px;
    font-size: 14px;
    color: #5B554D;
}
.rd-pd-aside__cta {
    display: block;
    text-align: center;
    padding: 12px 18px;
    background: #0E5B4A;
    color: #fff;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
}
.rd-pd-aside__cta:hover { color: #fff; background: #0A4A3C; text-decoration: none; }

.rd-pd-aside__agent {
    background: #131B3A;
    color: #fff;
    border-radius: 14px;
    padding: 24px;
}
.rd-pd-aside__agent-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #B5946A;
    margin-bottom: 10px;
}
.rd-pd-aside__agent-title {
    font-family: var(--font-display, "Plus Jakarta Sans", system-ui, sans-serif);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
}
.rd-pd-aside__agent-title em { font-style: italic; color: #B5946A; }
.rd-pd-aside__agent-lede {
    margin: 10px 0 16px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
}
.rd-pd-aside__agent-cta {
    display: block;
    text-align: center;
    padding: 11px 18px;
    background: #FFFFFF;
    color: #131B3A;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
}
.rd-pd-aside__agent-cta:hover { color: #131B3A; background: #FBF8F2; text-decoration: none; }

.rd-pd-siblings { margin-top: 12px; display: flex; flex-direction: column; }
.rd-pd-siblings__row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-top: 1px solid #E7DFCF;
    font-size: 13px;
    color: #1A1714;
    text-decoration: none;
}
.rd-pd-siblings__row:hover { color: #0E5B4A; text-decoration: none; }
.rd-pd-siblings__name { font-weight: 600; }
.rd-pd-siblings__meta { color: #8D8678; }

@media (max-width: 1024px) {
    .rd-pd-main__grid { grid-template-columns: 1fr; }
    .rd-pd-aside { position: static; }
    .rd-pd-stats { grid-template-columns: repeat(2, 1fr); }
    .rd-pd-hero__title { font-size: 38px; }
    .rd-pd-nearby { grid-template-columns: 1fr; }
}

/* ---------- Project detail map: branded marker + popup ---------- */
/* Used by inline JS in views/real-estate/directory/project-show.blade.php */
.rd-pd-mappin {
    background: transparent !important;
    border: 0 !important;
}
.rd-pd-mappin__bubble {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #131B3A;
    color: #fff;
    border: 3px solid #fff;
    box-shadow: 0 4px 14px rgba(19, 27, 58, 0.35);
}
.rd-pd-mappin__bubble svg { width: 18px; height: 18px; }
.rd-pd-mappin__tip {
    display: block;
    width: 0;
    height: 0;
    margin: -4px auto 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 10px solid #131B3A;
    filter: drop-shadow(0 2px 3px rgba(19, 27, 58, 0.35));
}

/* Branded popup — overrides Leaflet defaults */
.rd-map-popup-wrap.leaflet-popup .leaflet-popup-content-wrapper {
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(19, 27, 58, 0.18);
    border: 1px solid #E7DFCF;
    padding: 0;
}
.rd-map-popup-wrap.leaflet-popup .leaflet-popup-content {
    margin: 14px 38px 14px 18px;
    line-height: 1.4;
    font-family: var(--rd-font-body, "Plus Jakarta Sans"), sans-serif;
}
.rd-map-popup-wrap.leaflet-popup .leaflet-popup-tip {
    background: #FFFFFF;
    border: 1px solid #E7DFCF;
    border-top: 0;
    border-left: 0;
}
.rd-map-popup-wrap.leaflet-popup .leaflet-popup-close-button {
    top: 8px;
    right: 10px;
    width: 22px;
    height: 22px;
    color: #8D8678 !important;
    font: 700 18px/22px var(--rd-font-body, "Plus Jakarta Sans"), sans-serif !important;
    text-align: center;
    border-radius: 50%;
    transition: background 0.15s, color 0.15s;
}
.rd-map-popup-wrap.leaflet-popup .leaflet-popup-close-button:hover {
    background: #FBF8F2;
    color: #A8313C !important;
}
.rd-map-popup__eyebrow {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #A8313C;
    margin-bottom: 4px;
}
.rd-map-popup__title {
    font-family: var(--rd-font-display, "Cormorant Garamond"), Georgia, serif;
    font-size: 19px;
    font-weight: 600;
    color: #131B3A;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

/* ============================================================
   Nearby Places tile widget (rd-nearby)
   Used on /projects/{slug} (project-show) and /properties/{slug}
   to mirror Richard's msg 9378 mockup (3+2 large-tile grid).
   ============================================================ */
.rd-nearby {
    background: #FFFFFF;
    border: 1px solid #E7DFCF;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 1px 2px rgba(26, 23, 20, 0.04);
}
.rd-nearby__title {
    margin: 0 0 20px;
    font-family: var(--rd-font-display, "Cormorant Garamond"), Georgia, serif;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #131B3A;
}
.rd-nearby__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.rd-nearby__tile {
    appearance: none;
    border: 0;
    background: #FBF8F2;
    border-radius: 14px;
    padding: 18px 12px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.rd-nearby__tile:hover {
    background: #F3ECDC;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(26, 23, 20, 0.08);
}
.rd-nearby__tile.is-active {
    background: #131B3A;
}
.rd-nearby__tile.is-active .rd-nearby__tile-iconwrap { background: rgba(255,255,255,0.12); color: #fff; }
.rd-nearby__tile.is-active .rd-nearby__tile-label    { color: #fff; }

.rd-nearby__tile-iconwrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: #FFFFFF;
    color: #131B3A;
    font-size: 28px;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
}
.rd-nearby__tile-iconwrap i { font-size: 28px; }
.rd-nearby__tile-label {
    font-family: var(--rd-font-body, "Plus Jakarta Sans"), sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #131B3A;
    letter-spacing: -0.01em;
}

/* Tile tone tints — match Richard's mockup color palette per category */
.rd-nearby__tile--green   .rd-nearby__tile-iconwrap { color: #0E5B4A; }
.rd-nearby__tile--brass   .rd-nearby__tile-iconwrap { color: #B5946A; }
.rd-nearby__tile--navy    .rd-nearby__tile-iconwrap { color: #131B3A; }
.rd-nearby__tile--red     .rd-nearby__tile-iconwrap { color: #B85C3D; }

/* The 4th and 5th tiles wrap to row 2 (3+2 layout). Center the
   pair so they sit under tiles 2 and 3 like the mockup. */
.rd-nearby__tile:nth-child(4) { grid-column: 1 / 2; grid-row: 2; margin-left: 50%; transform: translateX(-50%); }
.rd-nearby__tile:nth-child(5) { grid-column: 2 / 3; grid-row: 2; margin-left: 50%; transform: translateX(-50%); }
.rd-nearby__tile:nth-child(4):hover,
.rd-nearby__tile:nth-child(5):hover { transform: translateX(-50%) translateY(-2px); }

@media (max-width: 560px) {
    .rd-nearby__grid { grid-template-columns: repeat(2, 1fr); }
    .rd-nearby__tile:nth-child(4),
    .rd-nearby__tile:nth-child(5) { grid-column: auto; grid-row: auto; margin-left: 0; transform: none; }
    .rd-nearby__tile:nth-child(4):hover,
    .rd-nearby__tile:nth-child(5):hover { transform: translateY(-2px); }
}

/* ── Zoom-gate overlay (directory-map.js) ─────────────────
   Shown when map zoom drops below ZOOM_THRESHOLD (13). Tells the
   user to zoom in so we don't try to plot every marker at country
   level. Positioned over the map container; pointer-events: none
   so the user can still pan/zoom through the overlay. */
.directory-map-zoom-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 500;
    background: rgba(20, 30, 60, .14);
    backdrop-filter: blur(1px);
}
.directory-map-zoom-overlay > span {
    background: rgba(20, 30, 60, .92);
    color: #fff;
    font-family: var(--font-display, 'Cormorant Garamond', serif);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: .02em;
    padding: 14px 28px;
    border-radius: 999px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .25);
}
