.residential-page {
  --rp-green: #004a37;
  --rp-green-dark: #00382a;
  --rp-gold: #efa91e;
  --rp-line: #e1e5e0;
  color: #17201c;
  background:
    radial-gradient(circle at 90% 36%, rgba(221, 171, 74, .06), transparent 24%),
    #fbfbf8;
  font-size: 14px;
}

.rp-shell { width: min(1240px, calc(100% - 48px)); margin-inline: auto; }
.rp-hero {
  position: relative;
  min-height: 255px;
  color: white;
  background:
    url("../images/photo-1600607687920-4e2a09cf159d.jpg") center 58% / cover no-repeat,
    var(--rp-green-dark);
}
.rp-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 59, 43, .97) 0%, rgba(0, 59, 43, .75) 35%, rgba(0, 59, 43, .16) 76%);
}
.rp-hero-content { position: relative; z-index: 1; padding-top: 76px; }
.rp-hero h1 {
  margin: 0;
  font-family: "Manrope", Arial, sans-serif;
  font-size: clamp(40px, 4.2vw, 54px);
  line-height: 1.1;
}
.rp-hero nav { display: flex; align-items: center; gap: 12px; margin-top: 19px; font-size: 13px; }
.rp-hero nav span { color: rgba(255,255,255,.65); font-size: 20px; }

.rp-filter-card {
  position: relative;
  z-index: 4;
  margin-top: -42px;
  padding: 20px 22px;
  border: 1px solid rgba(0, 58, 41, .05);
  border-radius: 12px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 13px 34px rgba(0, 54, 39, .11);
}
.rp-filter-row { display: grid; align-items: end; gap: 26px; }
.rp-filter-primary { grid-template-columns: 1fr 1.05fr .95fr 1.35fr 1.05fr; padding-bottom: 17px; border-bottom: 1px solid #e7e9e5; }
.rp-filter-secondary { grid-template-columns: 1.25fr 1.65fr auto auto; padding-top: 17px; }
.rp-filter-card label, .rp-range-group, .rp-toggle-group { min-width: 0; margin: 0; padding: 0; border: 0; color: #303a35; font-size: 13px; font-weight: 600; }
.rp-filter-card label { display: flex; flex-direction: column; gap: 8px; }
.rp-filter-card select, .rp-filter-card input {
  width: 100%;
  height: 45px;
  padding: 0 13px;
  border: 1px solid #dfe3de;
  border-radius: 6px;
  outline: 0;
  color: #2d3732;
  background: white;
  font-size: 13px;
}
.rp-filter-card select:focus, .rp-filter-card input:focus { border-color: #258b6c; box-shadow: 0 0 0 2px rgba(37,139,108,.08); }
.rp-toggle-group legend, .rp-range-group > span { display: block; margin-bottom: 8px; color: #303a35; font-size: 13px; font-weight: 600; }
.rp-toggle-group { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.rp-toggle-group legend { grid-column: 1 / -1; }
.rp-toggle-group button {
  height: 45px;
  border: 1px solid #dfe3de;
  border-radius: 6px;
  color: #343e39;
  background: #fafaf7;
  font-size: 13px;
  font-weight: 700;
}
.rp-toggle-group button.active { border-color: var(--rp-green); color: white; background: var(--rp-green); box-shadow: 0 5px 12px rgba(0,65,46,.14); }
.rp-purpose { grid-template-columns: 1fr 1fr; }
.rp-range-group > div { display: flex; align-items: center; gap: 10px; }
.rp-range-group b { color: #737b77; font-size: 12px; font-weight: 500; }
.rp-size-group > div { display: grid; grid-template-columns: 1fr 1fr 82px; }
.rp-search-button, .rp-reset-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 22px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.rp-search-button { border: 0; color: white; background: var(--rp-green); box-shadow: 0 6px 14px rgba(0,65,46,.14); }
.rp-search-button svg { width: 18px; height: 18px; color: #f2bb35; }
.rp-reset-button { border: 0; color: #46514c; background: transparent; }
.rp-reset-button svg { width: 17px; height: 17px; color: var(--rp-green); }

.rp-listing { padding-top: 24px; padding-bottom: 18px; }
.rp-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.rp-toolbar > p { margin: 0; color: #4f5954; font-size: 13px; }
.rp-toolbar > div { display: flex; align-items: center; gap: 15px; }
.rp-toolbar label { display: flex; align-items: center; gap: 12px; color: #343e39; font-size: 13px; }
.rp-toolbar select { width: 180px; height: 42px; padding: 0 13px; border: 1px solid #dfe3de; border-radius: 6px; background: white; font-size: 13px; }
.rp-view-buttons { display: flex; gap: 5px; padding: 4px; border-radius: 7px; background: #f0f1ed; }
.rp-view-buttons button { width: 35px; height: 35px; display: grid; place-items: center; border: 0; border-radius: 5px; color: #535d58; background: transparent; }
.rp-view-buttons button.active { color: #f2bd38; background: var(--rp-green); }
.rp-view-buttons svg { width: 18px; height: 18px; }

.rp-property-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.rp-property-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dde2dd;
  border-radius: 10px;
  background: white;
  box-shadow: 0 5px 13px rgba(0, 48, 34, .05);
  transition: transform .2s ease, box-shadow .2s ease;
}
.rp-property-card:hover { transform: translateY(-3px); box-shadow: 0 14px 25px rgba(0, 48, 34, .11); }
.rp-property-card[hidden] { display: none; }
.rp-property-image { position: relative; height: 196px; background-position: center; background-size: cover; }
.rp-image-one, .rp-image-six, .rp-image-eleven { background-image: url("../images/photo-1545324418-cc1a3fa10c00.jpg"); }
.rp-image-two, .rp-image-five { background-image: url("../images/photo-1600585154340-be6161a56a0c.jpg"); }
.rp-image-three, .rp-image-seven { background-image: url("../images/photo-1600607687939-ce8a6c25118c.jpg"); }
.rp-image-four, .rp-image-nine { background-image: url("../images/photo-1600566753190-17f0baa2a6c3.jpg"); }
.rp-image-eight { background-image: url("../images/photo-1500382017468-9049fed747ef.jpg"); }
.rp-image-ten { background-image: url("../images/photo-1600047509807-ba8f99d2cdde.jpg"); }
.rp-image-twelve { background-image: url("../images/photo-1570129477492-45c003edd2be.jpg"); }
.rp-type { position: absolute; top: 12px; left: 12px; padding: 5px 9px; border-radius: 5px; color: white; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.rp-type.green { background: #08714f; }
.rp-type.gold { color: #3f2c03; background: var(--rp-gold); }
.rp-favourite {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: white;
  background: rgba(0, 43, 31, .28);
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.35));
}
.rp-favourite svg { width: 23px; height: 23px; }
.rp-favourite.saved { color: #e9a322; background: white; }
.rp-favourite.saved svg { fill: currentColor; }
.rp-card-body { padding: 13px; }
.rp-card-body h2 { margin: 0 0 5px; color: #151c19; font-size: 17px; line-height: 1.3; }
.rp-card-location { min-height: 20px; display: flex; align-items: flex-start; gap: 4px; margin: 0 0 10px; color: #68716c; font-size: 12px; }
.rp-card-location svg { width: 14px; height: 14px; flex: 0 0 auto; color: #25332d; }
.rp-features { display: flex; align-items: center; gap: 18px; margin-bottom: 12px; color: #4e5853; font-size: 12px; }
.rp-features span { display: flex; align-items: center; gap: 5px; }
.rp-features svg { width: 16px; height: 16px; color: #26352f; }
.rp-price { display: block; min-height: 22px; margin-bottom: 10px; color: #c77d13; font-size: 15px; }
.rp-card-body > a { height: 39px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--rp-green); border-radius: 5px; color: var(--rp-green); font-size: 12px; font-weight: 800; }
.rp-card-body > a:hover { color: white; background: var(--rp-green); }

.rp-property-grid.list-view { grid-template-columns: 1fr 1fr; }
.rp-property-grid.list-view .rp-property-card { display: grid; grid-template-columns: 210px 1fr; }
.rp-property-grid.list-view .rp-property-image { height: 100%; min-height: 205px; }
.rp-property-grid.list-view .rp-card-body { display: grid; grid-template-columns: 1fr auto; gap: 5px 14px; align-content: center; }
.rp-property-grid.list-view .rp-card-body h2, .rp-property-grid.list-view .rp-card-location, .rp-property-grid.list-view .rp-features { grid-column: 1 / -1; }
.rp-property-grid.list-view .rp-card-body > a { width: 130px; }

.rp-empty-state { padding: 60px 20px; border: 1px dashed #cad2cc; border-radius: 10px; text-align: center; background: white; }
.rp-empty-state svg { width: 42px; height: 42px; color: var(--rp-green); }
.rp-empty-state h2 { margin: 10px 0 3px; font-size: 21px; }
.rp-empty-state p { margin: 0; color: #68716c; }
.rp-pagination { display: flex; justify-content: center; gap: 9px; padding: 25px 0 5px; }
.rp-pagination button { min-width: 34px; height: 34px; padding: 0 8px; border: 1px solid #dce1dc; border-radius: 5px; color: #45504b; background: white; font-size: 12px; }
.rp-pagination button.active { border-color: var(--rp-green); color: white; background: var(--rp-green); }

.rp-contact-cta {
  min-height: 104px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 24px;
  margin-bottom: 26px;
  padding: 18px 27px;
  border-radius: 11px;
  color: white;
  background: linear-gradient(100deg, #00513b, #003b2e);
  box-shadow: 0 10px 25px rgba(0, 58, 41, .11);
}
.rp-contact-cta > div, .rp-call { display: flex; align-items: center; gap: 15px; }
.rp-contact-cta > div > svg { width: 48px; height: 48px; color: #e8a525; }
.rp-contact-cta p { display: flex; flex-direction: column; margin: 0; }
.rp-contact-cta p strong { font-family: "Manrope", Arial, sans-serif; font-size: 22px; }
.rp-contact-cta p span { font-size: 13px; }
.rp-contact-cta > a:not(.rp-call) { min-height: 49px; display: inline-flex; align-items: center; padding: 0 28px; border-radius: 6px; color: #19352b; background: #f1b83e; font-size: 13px; font-weight: 800; }
.rp-call { min-height: 55px; padding: 0 20px; border: 1px solid rgba(255,255,255,.22); border-radius: 7px; }
.rp-call svg { width: 28px; height: 28px; color: #f1b83e; }
.rp-call span { display: flex; flex-direction: column; font-size: 11px; }
.rp-call strong { margin-top: 2px; font-size: 14px; }
.residential-page + footer .footer-cta { display: none; }

@media (max-width: 1060px) {
  .rp-filter-primary { grid-template-columns: repeat(3, 1fr); }
  .rp-toggle-group, .rp-purpose { grid-column: span 1; }
  .rp-filter-secondary { grid-template-columns: 1fr 1fr; }
  .rp-search-button, .rp-reset-button { width: 100%; }
  .rp-property-grid { grid-template-columns: repeat(3, 1fr); }
  .rp-property-grid.list-view { grid-template-columns: 1fr; }
  .rp-contact-cta { grid-template-columns: 1fr auto; }
  .rp-call { grid-column: 1 / -1; width: fit-content; }
}

@media (max-width: 760px) {
  .rp-shell { width: calc(100% - 30px); }
  .rp-hero { min-height: 235px; }
  .rp-hero-content { padding-top: 58px; }
  .rp-filter-card { margin-top: -38px; padding: 16px; }
  .rp-filter-primary, .rp-filter-secondary { grid-template-columns: 1fr 1fr; gap: 16px; }
  .rp-toggle-group, .rp-purpose { grid-column: span 2; }
  .rp-toolbar { align-items: flex-start; flex-direction: column; gap: 12px; }
  .rp-toolbar > div { width: 100%; justify-content: space-between; }
  .rp-property-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .rp-property-image { height: 180px; }
  .rp-property-grid.list-view { grid-template-columns: 1fr; }
  .rp-contact-cta { grid-template-columns: 1fr; }
  .rp-contact-cta > a:not(.rp-call), .rp-call { width: 100%; justify-content: center; }
}

@media (max-width: 520px) {
  .rp-shell { width: calc(100% - 24px); }
  .rp-hero h1 { font-size: 37px; }
  .rp-filter-primary, .rp-filter-secondary { grid-template-columns: 1fr; }
  .rp-toggle-group, .rp-purpose { grid-column: auto; }
  .rp-range-group > div { gap: 7px; }
  .rp-size-group > div { grid-template-columns: 1fr 1fr; }
  .rp-size-group select { grid-column: 1 / -1; }
  .rp-toolbar > div { align-items: flex-end; }
  .rp-toolbar label { align-items: flex-start; flex-direction: column; gap: 5px; }
  .rp-property-grid { grid-template-columns: 1fr; }
  .rp-property-image { height: 220px; }
  .rp-property-grid.list-view .rp-property-card { grid-template-columns: 1fr; }
  .rp-property-grid.list-view .rp-property-image { min-height: 220px; }
  .rp-pagination { gap: 5px; }
  .rp-pagination button { min-width: 30px; padding: 0 5px; }
  .rp-contact-cta { padding: 20px; }
  .rp-contact-cta p strong { font-size: 20px; }
}
