:root {
  --hmh-map-navy: #2e4066;
  --hmh-map-raspberry: #db365e;
  --hmh-map-yellow: #faeb89;
  --hmh-map-ink: #201e28;
  --hmh-map-surface: #f5f5f6;
  --hmh-map-border: #dfe3ea;
}

.hmh-smart-search {
  padding-top: 52px;
}

.hmh-smart-search__intro {
  margin-bottom: 24px;
}

.hmh-homes-results {
  background: #f7f7f8;
  padding: 42px 0 72px;
}

.hmh-results-toolbar {
  align-items: flex-end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin: 0 0 34px;
}

.hmh-homes-results .hmh-results-summary {
  margin: 0;
}

.hmh-homes-results .hmh-results-summary span {
  color: var(--hmh-map-navy);
  font-family: "Clearface Std", Georgia, serif;
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.hmh-results-view-toggle {
  background: #fff;
  border: 1px solid var(--hmh-map-border);
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 auto;
  padding: 4px;
}

.hmh-results-view-toggle__button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: var(--hmh-map-navy);
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  gap: 9px;
  justify-content: center;
  min-height: 44px;
  min-width: 96px;
  padding: 10px 18px;
  transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.hmh-results-view-toggle__button:hover {
  background: #f6f7fa;
}

.hmh-results-view-toggle__button.is-active {
  background: var(--hmh-map-navy);
  box-shadow: 0 4px 10px rgba(32, 30, 40, 0.18);
  color: #fff;
}

.hmh-results-view-toggle__button:focus-visible {
  outline: 3px solid var(--hmh-map-yellow);
  outline-offset: 2px;
}

.hmh-results-view-toggle__icon {
  display: inline-block;
  height: 16px;
  position: relative;
  width: 16px;
}

.hmh-results-view-toggle__icon--list,
.hmh-results-view-toggle__icon--list::before,
.hmh-results-view-toggle__icon--list::after {
  border-top: 2px solid currentColor;
}

.hmh-results-view-toggle__icon--list::before,
.hmh-results-view-toggle__icon--list::after {
  content: "";
  left: 0;
  position: absolute;
  right: 0;
}

.hmh-results-view-toggle__icon--list::before {
  top: 5px;
}

.hmh-results-view-toggle__icon--list::after {
  top: 12px;
}

.hmh-results-view-toggle__icon--map {
  border: 2px solid currentColor;
  border-radius: 50% 50% 50% 0;
  height: 13px;
  margin-top: -3px;
  transform: rotate(-45deg);
  width: 13px;
}

.hmh-results-view-toggle__icon--map::after {
  border: 2px solid currentColor;
  border-radius: 50%;
  content: "";
  height: 2px;
  left: 3px;
  position: absolute;
  top: 3px;
  width: 2px;
}

.hmh-results-grid {
  display: grid !important;
  gap: 28px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 !important;
  width: 100%;
}

.hmh-results-grid > .card.homes {
  background: #fff;
  border: 1px solid #ddd9d7;
  border-radius: 0;
  box-shadow: 0 12px 30px rgba(32, 30, 40, 0.07);
  display: flex !important;
  flex-direction: column;
  margin: 0 !important;
  max-width: none !important;
  overflow: hidden;
  padding: 0 !important;
  position: relative;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  width: 100% !important;
}

.hmh-results-grid > .card.homes[data-hmh-result-type="development"] {
  border-top: 5px solid var(--hmh-map-raspberry);
}

.hmh-results-grid > .card.homes[data-hmh-result-type="resale"] {
  border-top: 5px solid var(--hmh-map-navy);
}

.hmh-results-grid > .card.homes:hover {
  box-shadow: 0 16px 36px rgba(32, 30, 40, 0.12);
  transform: translateY(-2px);
}

.hmh-results-grid .card.homes > .inner {
  float: none !important;
  height: auto !important;
  margin: 0 !important;
  max-width: none !important;
  padding: 0 !important;
  width: 100% !important;
}

.hmh-results-grid .card.homes > .card-visual {
  flex: 0 0 auto;
}

.hmh-results-grid .card-visual > a {
  display: block;
  height: 100%;
}

.hmh-results-grid .single-img {
  aspect-ratio: 16 / 9;
  background: #e8e9ed;
  height: auto !important;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.hmh-results-grid .single-img img {
  display: block;
  height: 100% !important;
  object-fit: cover;
  transition: transform 0.35s ease;
  width: 100% !important;
}

.hmh-results-grid > .card.homes:hover .single-img img {
  transform: scale(1.025);
}

#response.hmh-results-grid > .card.homes > .inner.card-content {
  box-sizing: border-box !important;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  padding: 24px 28px 28px !important;
}

.hmh-results-grid .hmh-result-type {
  align-items: center;
  display: flex;
  font-size: 13px;
  font-weight: 700;
  gap: 8px;
  letter-spacing: 0.04em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.hmh-results-grid .hmh-result-type::before {
  border-radius: 50%;
  content: "";
  flex: 0 0 auto;
  height: 9px;
  width: 9px;
}

.hmh-results-grid .hmh-result-type--development {
  color: var(--hmh-map-raspberry) !important;
}

.hmh-results-grid .hmh-result-type--development::before {
  background: var(--hmh-map-raspberry);
}

.hmh-results-grid .hmh-result-type--resale {
  color: var(--hmh-map-navy) !important;
}

.hmh-results-grid .hmh-result-type--resale::before {
  background: var(--hmh-map-navy);
}

.hmh-results-grid .card-content h2 {
  color: var(--hmh-map-navy) !important;
  display: -webkit-box;
  font-family: "Clearface Std", Georgia, serif;
  font-size: clamp(27px, 2.2vw, 32px) !important;
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.16;
  margin: 0 0 10px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.hmh-results-grid .card-content h2 a {
  color: inherit !important;
}

.hmh-results-grid .homes-content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}

.hmh-results-grid .homes-content ul {
  display: grid !important;
  gap: 12px 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 0 0 16px !important;
  padding: 0 !important;
}

.hmh-results-grid .homes-content li {
  box-sizing: border-box;
  color: #33333a !important;
  font-size: 15px !important;
  line-height: 1.45 !important;
  margin: 0 !important;
  min-width: 0;
  padding-left: 27px !important;
  width: auto !important;
}

.hmh-results-grid .homes-content li.address {
  color: #414652 !important;
  grid-column: 1 / -1;
}

.hmh-results-grid .homes-content p {
  color: #40424a;
  display: -webkit-box;
  font-size: 16px;
  line-height: 1.5;
  margin: 0 0 18px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.hmh-results-grid .homes-content .cta {
  background: #fff7d6;
  border-left: 4px solid var(--hmh-map-raspberry);
  color: var(--hmh-map-navy);
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 18px;
  padding: 10px 12px;
}

#response.hmh-results-grid > .card.homes .homes-link.btn {
  align-items: center;
  align-self: stretch;
  background: var(--hmh-map-navy) !important;
  border: 2px solid var(--hmh-map-navy) !important;
  border-radius: 2px !important;
  box-sizing: border-box !important;
  color: #fff !important;
  display: flex !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  justify-content: center;
  margin: auto 0 0 !important;
  max-width: 100% !important;
  min-height: 50px;
  padding: 12px 18px !important;
  text-align: center;
  text-decoration: none !important;
  transform: none !important;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease !important;
  width: 100% !important;
  will-change: auto !important;
}

#response.hmh-results-grid > .card.homes .homes-link.btn:hover,
#response.hmh-results-grid > .card.homes .homes-link.btn:focus-visible {
  background: var(--hmh-map-raspberry) !important;
  border-color: var(--hmh-map-raspberry) !important;
  box-shadow: 0 8px 18px rgba(219, 54, 94, 0.24) !important;
  color: #fff !important;
  transform: none !important;
}

#response.hmh-results-grid > .card.homes .homes-link.btn:focus-visible {
  outline: 3px solid var(--hmh-map-yellow);
  outline-offset: 2px;
}

.hmh-results-map[hidden],
.hmh-results-list[hidden] {
  display: none !important;
}

.hmh-results-map {
  background: #fff;
  border: 1px solid var(--hmh-map-border);
  border-radius: 4px;
  box-shadow: 0 12px 30px rgba(32, 30, 40, 0.08);
  overflow: hidden;
}

.hmh-results-map__canvas {
  background: #e9edf2;
  height: min(68vh, 680px);
  min-height: 520px;
  width: 100%;
}

.hmh-results-map__canvas:focus-visible {
  outline: 4px solid var(--hmh-map-yellow);
  outline-offset: -4px;
}

.hmh-results-map__status {
  background: #fff;
  color: #5b606b;
  font-size: 13px;
  margin: 0;
  padding: 11px 16px;
}

.hmh-results-map__key {
  align-items: center;
  background: #fff;
  border-top: 1px solid var(--hmh-map-border);
  color: var(--hmh-map-navy);
  display: flex;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 700;
  gap: 14px 24px;
  padding: 14px 16px 6px;
}

.hmh-results-map__key-item {
  align-items: center;
  display: inline-flex;
  gap: 9px;
}

.hmh-results-map__key-pin {
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 0;
  box-shadow: 0 2px 6px rgba(32, 30, 40, 0.25);
  display: inline-block;
  height: 20px;
  position: relative;
  transform: rotate(-45deg);
  width: 20px;
}

.hmh-results-map__key-pin::after {
  background: #fff;
  border-radius: 50%;
  content: "";
  height: 5px;
  left: 6px;
  position: absolute;
  top: 6px;
  width: 5px;
}

.hmh-results-map__key-pin--development {
  background: #db365e;
}

.hmh-results-map__key-pin--resale {
  background: #2e4066;
}

.hmh-map-marker-wrapper {
  background: transparent;
  border: 0;
}

.hmh-map-marker {
  align-items: center;
  background: #db365e;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  box-shadow: 0 4px 12px rgba(32, 30, 40, 0.35);
  display: flex;
  height: 34px;
  justify-content: center;
  transform: rotate(-45deg);
  width: 34px;
}

.hmh-map-marker__dot {
  background: #fff;
  border-radius: 50%;
  height: 9px;
  transform: none;
  width: 9px;
}

.hmh-map-marker--resale {
  background: #2e4066;
}

.hmh-map-cluster-wrapper {
  background: transparent;
}

.hmh-map-cluster {
  align-items: center;
  background: var(--hmh-map-yellow);
  border: 4px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(32, 30, 40, 0.28);
  color: var(--hmh-map-navy);
  display: flex;
  font-size: 14px;
  font-weight: 800;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.hmh-map-popup {
  color: var(--hmh-map-ink);
  font-family: "GT Walsheim", Arial, sans-serif;
  min-width: 230px;
}

.hmh-map-popup__image {
  aspect-ratio: 3 / 2;
  display: block;
  margin: -1px -1px 14px;
  object-fit: cover;
  width: calc(100% + 2px);
}

.hmh-map-popup__banner {
  background: var(--hmh-map-yellow);
  border-left: 4px solid var(--hmh-map-raspberry);
  color: var(--hmh-map-navy);
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.3;
  margin: 0 0 12px;
  padding: 8px 10px;
  text-transform: uppercase;
}

.hmh-map-popup--resale .hmh-map-popup__banner {
  border-left-color: var(--hmh-map-navy);
}

.hmh-map-popup__type {
  color: var(--hmh-map-raspberry);
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.hmh-map-popup--resale .hmh-map-popup__type {
  color: var(--hmh-map-navy);
}

.hmh-map-popup__title {
  color: var(--hmh-map-navy);
  font-family: "Clearface Std", Georgia, serif;
  font-size: 21px;
  font-weight: 400;
  line-height: 1.18;
  margin: 0 0 10px;
}

.hmh-map-popup__facts {
  color: #4f535c;
  display: grid;
  font-size: 14px;
  gap: 8px;
  margin: 0 0 16px;
}

.hmh-map-popup__fact {
  align-items: flex-start;
  display: flex !important;
  gap: 9px;
  line-height: 1.35;
  margin: 0 !important;
}

.hmh-map-popup__icon {
  color: var(--hmh-map-raspberry);
  display: block;
  flex: 0 0 18px;
  fill: none;
  height: 18px;
  margin-top: 1px;
  overflow: visible;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  vector-effect: non-scaling-stroke;
  width: 18px;
}

.hmh-map-popup--resale .hmh-map-popup__icon {
  color: var(--hmh-map-navy);
}

.leaflet-popup .hmh-map-popup__link {
  align-items: center;
  background: var(--hmh-map-navy);
  border: 2px solid var(--hmh-map-navy);
  border-radius: 2px;
  box-sizing: border-box;
  color: #fff !important;
  display: flex;
  font-size: 14px;
  font-weight: 800;
  justify-content: center;
  line-height: 1.25;
  min-height: 44px;
  padding: 10px 14px;
  text-align: center;
  text-decoration: none !important;
  transform: none !important;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
  width: 100%;
}

.leaflet-popup .hmh-map-popup__link:hover,
.leaflet-popup .hmh-map-popup__link:focus-visible {
  background: var(--hmh-map-raspberry);
  border-color: var(--hmh-map-raspberry);
  color: #fff !important;
  text-decoration: none !important;
  transform: none !important;
}

.leaflet-popup .hmh-map-popup__link:focus-visible {
  outline: 3px solid rgba(219, 54, 94, 0.32);
  outline-offset: 2px;
}

.leaflet-popup-content-wrapper {
  border-radius: 4px;
  box-shadow: 0 10px 28px rgba(32, 30, 40, 0.22);
  padding: 0;
}

.leaflet-popup-content {
  margin: 0;
  padding: 16px;
}

.leaflet-popup-close-button {
  background: #fff !important;
  border-radius: 50%;
  color: var(--hmh-map-navy) !important;
  height: 28px !important;
  line-height: 26px !important;
  right: 7px !important;
  top: 7px !important;
  width: 28px !important;
}

.leaflet-control-attribution {
  font-size: 10px;
}

@media (max-width: 900px) {
  .hmh-results-grid {
    gap: 24px;
  }

  #response.hmh-results-grid > .card.homes > .inner.card-content {
    padding: 22px 24px 24px !important;
  }

  .hmh-results-grid .homes-content ul {
    grid-template-columns: 1fr;
  }

  .hmh-results-grid .homes-content li.address {
    grid-column: auto;
  }
}

@media (max-width: 700px) {
  .hmh-smart-search {
    padding-top: 36px;
  }

  .hmh-homes-results {
    padding: 28px 0 48px;
  }

  .hmh-results-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 24px;
  }

  .hmh-results-view-toggle {
    align-self: stretch;
  }

  .hmh-results-view-toggle__button {
    flex: 1 1 50%;
  }

  .hmh-results-grid {
    grid-template-columns: 1fr;
  }

  .hmh-results-grid .card-content h2 {
    font-size: 27px;
  }

  .hmh-results-grid .homes-content ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hmh-results-grid .homes-content li.address {
    grid-column: 1 / -1;
  }

  .hmh-results-map__canvas {
    height: 62vh;
    min-height: 430px;
  }

  .hmh-results-map__key {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  #response.hmh-results-grid > .card.homes > .inner.card-content {
    padding: 22px !important;
  }

  .hmh-results-grid .homes-content ul {
    grid-template-columns: 1fr;
  }

  .hmh-results-grid .homes-content li.address {
    grid-column: auto;
  }

}

@media (prefers-reduced-motion: reduce) {
  .hmh-results-grid > .card.homes,
  .hmh-results-grid .single-img img,
  .hmh-results-view-toggle__button {
    transition: none;
  }
}
