/**
 * 8X Related Neighbourhoods — v2
 * Hosted on R2: ld/related-neighbourhoods.css
 */

.rn-wrap {
  font-family: Inter, system-ui, -apple-system, sans-serif;
  margin: 48px auto 24px;
  max-width: 1200px;
  padding: 0 24px;
}
.rn-wrap * { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Section header ── */
.rn-section-header {
  margin-bottom: 20px;
}
.rn-eyebrow {
  font-size: 12px;
  font-weight: 700;
  color: #c8102e;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}
.rn-section-title {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.02em;
}

/* ── Footer link ── */
.rn-footer {
  margin-top: 16px;
  text-align: center;
}
.rn-muni-link {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  text-decoration: none;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 20px;
  transition: border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.rn-muni-link:hover {
  color: #c8102e;
  border-color: #c8102e;
  box-shadow: 0 2px 8px rgba(200,16,46,0.08);
}
.rn-muni-link::after { content: ' \2192'; }

/* ── Grid ── */
.rn-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

/* ── Card ── */
.rn-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
  transition: border-color 0.15s, box-shadow 0.2s, transform 0.15s;
  position: relative;
  overflow: hidden;
}
.rn-card:hover {
  border-color: #c8102e;
  box-shadow: 0 4px 16px rgba(200,16,46,0.07);
  transform: translateY(-1px);
}

/* ── Card top row: name + badge ── */
.rn-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 12px;
}
.rn-name {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  line-height: 1.3;
}
.rn-badge {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.6;
}
.rn-badge-seller { background: #c8102e; color: #fff; }
.rn-badge-balanced { background: #fef3c7; color: #92400e; }
.rn-badge-buyer { background: #eff6ff; color: #1d4ed8; }

/* ── Price hero ── */
.rn-price {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}
.rn-price-label {
  font-size: 11px;
  color: #9ca3af;
  margin-bottom: 12px;
}

/* ── Metrics row ── */
.rn-metrics {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}
.rn-metric {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
}
.rn-metric strong {
  font-weight: 700;
  color: #374151;
}

/* ── Property type breakdown ── */
.rn-types {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #f3f4f6;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rn-type {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}
.rn-type-label {
  color: #9ca3af;
}
.rn-type-price {
  font-weight: 600;
  color: #374151;
  font-variant-numeric: tabular-nums;
}

/* ── Hover arrow ── */
.rn-arrow {
  position: absolute;
  top: 16px;
  right: 12px;
  font-size: 14px;
  color: #d1d5db;
  transition: color 0.15s, transform 0.15s;
}
/* Make room for the arrow so badge doesn't overlap */
.rn-card-top {
  padding-right: 24px;
}
.rn-card:hover .rn-arrow {
  color: #c8102e;
  transform: translateX(2px);
}

/* ── Current card ── */
.rn-current {
  border-color: #c8102e;
  background: linear-gradient(135deg, #fefafa 0%, #fff 100%);
  pointer-events: none;
}
.rn-current .rn-arrow { display: none; }
.rn-you {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  color: #c8102e;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: #fef2f2;
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ── Municipality tag on cross-muni cards ── */
.rn-muni-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  color: #9ca3af;
  background: #f3f4f6;
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
  text-transform: none;
  letter-spacing: 0;
}

/* ── Cross-municipality section ── */
.rn-cross {
  margin-top: 32px;
  padding-top: 0;
}

/* ── Loading ── */
.rn-loading {
  text-align: center;
  padding: 32px;
  color: #9ca3af;
  font-size: 13px;
}

/* ── Responsive ── */
@media (max-width: 991px) {
  .rn-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 767px) {
  .rn-wrap { padding: 0 16px; margin-top: 32px; }
  .rn-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .rn-card { padding: 12px 14px; }
  .rn-name { font-size: 13px; }
  .rn-price { font-size: 18px; }
  .rn-title { font-size: 15px; }
  .rn-metrics { gap: 10px; }
  .rn-metric { font-size: 11px; }
}
@media (max-width: 479px) {
  .rn-grid { grid-template-columns: 1fr; }
  .rn-card { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .rn-card-top { width: 100%; }
  .rn-price { font-size: 20px; }
}
