/**
 * SWMO Residential — Zillow-inspired polish (spacing, light sections, cards, map rail)
 * Load last. v20260590
 */

:root {
  --swmo-page-max: 1400px;
  --swmo-section-pad: clamp(2.5rem, 5vw, 4rem);
  --swmo-bg-muted: #f7f7f7;
  --swmo-bg-white: #ffffff;
  --swmo-shadow-soft: 0 2px 12px rgba(7, 21, 38, 0.06);
  --swmo-shadow-card: 0 4px 20px rgba(7, 21, 38, 0.08);
  --swmo-radius-lg: 14px;
  --swmo-radius-pill: 999px;
}

/* —— Page width & section rhythm —— */
.site-zillow .container,
.site-zillow .section-inner {
  max-width: var(--swmo-page-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1rem, 3vw, 1.5rem);
  padding-right: clamp(1rem, 3vw, 1.5rem);
}

.site-zillow main > section {
  padding-top: var(--swmo-section-pad);
  padding-bottom: var(--swmo-section-pad);
}

.section-light {
  background: var(--swmo-bg-white);
}

.section-muted {
  background: var(--swmo-bg-muted);
}

.section-heading {
  margin: 0 0 0.35rem;
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--navy, #071526);
}

.section-sub {
  margin: 0 0 1.25rem;
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--text-muted, #5c6570);
}

.section-sub--tight {
  margin-bottom: 0.85rem;
}

/* —— Header: thinner, sticky polish —— */
.site-zillow .site-header.is-solid {
  box-shadow: 0 1px 0 rgba(7, 21, 38, 0.08);
}

.site-zillow .header-kw-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: 0.25rem;
  opacity: 0.95;
}
.site-zillow .header-kw-link:hover {
  opacity: 1;
}
.site-zillow .header-kw-logo {
  display: block;
  height: 20px;
  width: auto;
  max-width: 76px;
}

.site-zillow .footer-office {
  margin: 0.35rem 0 0.5rem;
  font-size: 0.88rem;
  line-height: 1.45;
}
.site-zillow .footer-office a {
  color: var(--navy, #071526);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Dark footer (homepage + compliant IDX footer) — office line must stay light */
.site-zillow .site-footer--compliant .footer-office,
.site-zillow .site-footer--compliant .footer-office a,
.site-premium .site-footer--compliant .footer-office,
.site-premium .site-footer--compliant .footer-office a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-zillow .site-footer--compliant .footer-office a:hover,
.site-premium .site-footer--compliant .footer-office a:hover {
  color: #fff;
}

.listing-agent-brand-row {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 0.65rem;
}
.listing-agent-kw-side {
  flex: 0 0 auto;
  width: 96px;
  height: auto;
  display: block;
}
.listing-agent-brand-text {
  flex: 1 1 auto;
  min-width: 0;
}
.listing-agent-office {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  line-height: 1.4;
}
.listing-agent-office a {
  color: var(--navy, #071526);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-zillow .header-wrap {
  max-width: var(--swmo-page-max);
  min-height: 52px;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.site-zillow .header-nav a {
  font-weight: 500;
}

/* —— Hero: cleaner, more open —— */
.site-zillow .hero-cover {
  padding: clamp(1.5rem, 4vw, 2.75rem) 0 clamp(1.75rem, 4vw, 3rem);
}

.site-zillow .hero-cover h1 {
  font-weight: 700;
  line-height: 1.15;
}

.site-zillow .hero-lead {
  font-weight: 400;
  line-height: 1.55;
  max-width: 36rem;
}

.site-zillow .hero-search-bar {
  background: rgba(255, 255, 255, 0.98);
  border-radius: var(--swmo-radius-lg);
  box-shadow: var(--swmo-shadow-card);
  padding: 0.5rem;
  gap: 0.45rem;
}

.site-zillow .hero-cta-row--cover {
  justify-content: flex-start;
  margin-top: 0.65rem;
}

/* —— Buttons —— */
.site-zillow .btn-gold {
  border-radius: 8px;
  font-weight: 700;
  min-height: 56px;
  padding: 1rem 1.5rem;
  line-height: 1.15;
  letter-spacing: 0.01em;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.site-zillow .btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(201, 162, 77, 0.35);
}

.site-zillow .btn-outline,
.site-zillow .btn-outline-navy,
.site-zillow .zillow-card-actions .btn-outline {
  border-radius: var(--swmo-radius-pill);
  font-weight: 600;
  background: #fff;
  color: var(--navy, #071526);
  border: 1px solid rgba(7, 21, 38, 0.35);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.site-zillow .btn-outline-navy:hover,
.site-zillow .zillow-card-actions .btn-outline:hover {
  background: rgba(7, 21, 38, 0.06);
  color: var(--navy, #071526);
  border-color: var(--navy, #071526);
}

.site-zillow .homes-pagination .homes-page-btn.btn-outline-navy {
  border: 1px solid #c5cad1;
  color: var(--navy, #071526);
  min-height: 44px;
  padding: 0.55rem 1.2rem;
}

/* —— Featured & reviews carousels —— */
.featured-band--carousel {
  padding-top: clamp(1.25rem, 3vw, 2rem);
  padding-bottom: clamp(1rem, 2.5vw, 1.75rem);
  border-bottom: none;
}

.featured-carousel-shell {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.featured-carousel-viewport {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.featured-carousel-arrow {
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(7, 21, 38, 0.12);
  border-radius: 50%;
  background: #fff;
  color: #071526;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(7, 21, 38, 0.08);
}

.featured-carousel-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

.featured-carousel,
.reviews-wall--three {
  display: flex;
  gap: 0.85rem;
  overflow: visible;
  scroll-snap-type: x mandatory;
  touch-action: pan-x;
  padding-bottom: 0.35rem;
}

.featured-carousel .premium-card-hit,
.featured-carousel .zillow-card-photo-btn,
.featured-carousel .zillow-card-info,
.featured-carousel .premium-card,
.featured-carousel > * {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.featured-carousel > *,
.reviews-wall--three > .review-card,
.reviews-wall--three > article {
  flex: 0 0 min(82vw, 280px);
  scroll-snap-align: start;
}

@media (min-width: 769px) {
  .featured-carousel > *,
  .reviews-wall--three > .review-card,
  .reviews-wall--three > article {
    flex: 0 0 300px;
  }
}

/* —— Popular cities (hero, under search bar) —— */
.hero-popular-cities {
  margin: 0.35rem 0 0.75rem;
  max-width: 52rem;
}

.hero-popular-cities__label {
  margin: 0 0 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

.hero-popular-cities .popular-searches__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.hero-popular-cities .popular-chip {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.38rem 0.8rem;
  border-radius: var(--swmo-radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.95);
  box-shadow: none;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.hero-popular-cities .popular-chip:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(212, 175, 55, 0.65);
  transform: translateY(-1px);
}

.popular-searches__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.popular-chip {
  border-radius: var(--swmo-radius-pill);
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--zillow-border, #d8dde3);
  background: #fff;
  box-shadow: var(--swmo-shadow-soft);
}

/* —— Search results: open, not boxed-in —— */
.search-results.section-muted {
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

.search-results .results-toolbar {
  margin-bottom: 1rem;
  gap: 0.75rem;
}

.search-results .idx-search-disclaimer {
  font-size: 0.72rem;
  line-height: 1.45;
  margin: 0.5rem 0 0.75rem;
  color: var(--text-muted);
}

/* —— Map explorer —— */
.zillow-explorer {
  border-radius: var(--swmo-radius-lg) !important;
  box-shadow: var(--swmo-shadow-card) !important;
  border: 1px solid rgba(7, 21, 38, 0.08) !important;
  overflow: hidden;
  background: #fff !important;
}

.zillow-map-col {
  display: flex;
  flex-direction: column;
  background: #eef1f4;
}

.homes-map-shell {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
}

.homes-map-shell .homes-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Horizontal listing rail under map */
.map-listing-rail {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0.55rem 0.65rem 0.65rem;
  background: #fff;
  border-top: 1px solid var(--zillow-border, #e2e6ea);
  scrollbar-width: thin;
}

.map-listing-rail:not([hidden]) {
  display: flex;
}

.map-listing-rail .premium-card {
  flex: 0 0 min(72vw, 220px);
  scroll-snap-align: start;
  border-radius: 12px;
  box-shadow: var(--swmo-shadow-soft);
  border: 1px solid rgba(7, 21, 38, 0.08);
  overflow: hidden;
  background: #fff;
}

.map-listing-rail .premium-card-photo {
  aspect-ratio: 4 / 3;
}

.map-listing-rail .premium-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-listing-rail .premium-card-body {
  padding: 0.45rem 0.55rem 0.55rem;
}

@media (min-width: 769px) {
  .site-premium #homes-explorer.zillow-explorer.is-map-mode,
  .zillow-explorer.is-map-mode {
    display: grid !important;
    grid-template-columns: minmax(320px, 42%) minmax(0, 1fr);
    min-height: 0 !important;
    max-height: none !important;
    height: auto !important;
  }

  .zillow-explorer.is-map-mode .homes-map-shell {
    height: 420px;
    min-height: 420px;
    max-height: 420px;
  }

  .zillow-explorer.is-map-mode .zillow-map-col {
    max-height: none;
    min-height: 0;
  }

  .map-listing-rail .premium-card {
    flex: 0 0 200px;
  }

  .zillow-explorer.is-map-mode .zillow-list-col {
    max-height: 560px;
    border-left: 1px solid var(--zillow-border, #e2e6ea);
  }

  .zillow-explorer.is-map-mode .homes-list--zillow {
    max-height: 480px;
  }
}

@media (max-width: 768px) {
  .zillow-explorer.show-map-mobile .homes-map-shell {
    height: min(42vh, 320px);
    min-height: 220px;
    max-height: min(42vh, 320px);
  }

  .zillow-explorer.show-map-mobile .map-listing-rail {
    display: flex;
  }
}

/* —— Listing cards: image-first, soft shadow —— */
.homes-list--zillow .zillow-card {
  display: flex;
  flex-direction: column;
  grid-template-columns: none;
  border-radius: var(--swmo-radius-lg);
  border: 1px solid rgba(7, 21, 38, 0.08);
  box-shadow: var(--swmo-shadow-soft);
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.premium-card {
  cursor: pointer;
}

.premium-card-hit {
  width: 100%;
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  display: block;
  -webkit-tap-highlight-color: rgba(7, 21, 38, 0.08);
}

a.zillow-card-photo-btn,
a.zillow-card-info,
a.btn-view-details {
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: rgba(7, 21, 38, 0.08);
}

a.btn-view-details {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.homes-list--zillow .zillow-card:hover {
  box-shadow: var(--swmo-shadow-card);
  transform: translateY(-2px);
}

.homes-list--zillow .zillow-card-photo-btn {
  width: 100%;
  min-height: 0;
  aspect-ratio: 16 / 10;
  background: #e8ecf0;
}

.homes-list--zillow .zillow-card-photo-btn img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

.homes-list--zillow .zillow-card-body {
  padding: 0.75rem 0.85rem 0.85rem;
}

.homes-list--zillow .zillow-card-price {
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.3;
}

.homes-list--zillow .zillow-card-address {
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: normal;
}

.homes-list--zillow .zillow-card-meta {
  font-size: 0.8rem;
  font-weight: 400;
}

.homes-list--zillow .zillow-card-idx,
.homes-list--zillow .zillow-card-courtesy {
  font-size: 0.7rem;
  line-height: 1.35;
  opacity: 0.85;
}

.homes-list--zillow .zillow-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.homes-list--zillow .zillow-card-actions .btn-sm {
  flex: 0 1 auto;
  min-width: 0;
  width: 100%;
  max-width: 14rem;
  min-height: 52px;
  text-align: center;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  position: relative;
  z-index: 3;
  pointer-events: auto;
  cursor: pointer;
}

.homes-list--zillow .zillow-card-actions .btn-view-details {
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1.5px solid var(--navy, #0f203a);
  background: #fff;
  color: var(--navy, #0f203a);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.homes-list--zillow .zillow-card-actions .btn-view-details:hover {
  background: var(--navy, #0f203a);
  color: #fff;
  border-color: var(--navy, #0f203a);
}

.homes-list--zillow .zillow-card,
.featured-carousel .premium-card {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.homes-list--zillow .zillow-card-photo-btn,
.homes-list--zillow .zillow-card-info,
.premium-card-hit {
  position: relative;
  z-index: 2;
  pointer-events: auto;
  cursor: pointer;
}

@media (min-width: 769px) {
  .homes-list--zillow:not(.homes-list--grid) > .zillow-card {
    flex-direction: row;
    align-items: stretch;
  }

  .homes-list--zillow:not(.homes-list--grid) > .zillow-card .zillow-card-photo-btn {
    width: 200px;
    flex-shrink: 0;
    aspect-ratio: auto;
    min-height: 140px;
  }
}

/* Premium carousel cards */
.premium-card {
  border-radius: 12px;
  box-shadow: var(--swmo-shadow-soft);
  border: 1px solid rgba(7, 21, 38, 0.08);
  overflow: hidden;
  background: #fff;
}

.premium-card-photo {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.premium-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* —— Trust & buying help —— */
.trust-band.section-light:not(.trust-band--photo) {
  background: var(--swmo-bg-white);
}

.trust-band .trust-card {
  background: #fff;
  border: 1px solid rgba(7, 21, 38, 0.08);
  border-radius: var(--swmo-radius-lg);
  box-shadow: var(--swmo-shadow-soft);
  padding: 1.15rem 1.25rem;
}

.trust-band .trust-card--highlight {
  border-color: rgba(201, 162, 77, 0.45);
  box-shadow: var(--swmo-shadow-card);
}

.buying-help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.buying-help-card {
  background: #fff;
  border-radius: var(--swmo-radius-lg);
  padding: 1.15rem 1.2rem;
  border: 1px solid rgba(7, 21, 38, 0.08);
  box-shadow: var(--swmo-shadow-soft);
}

.buying-help-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
}

.buying-help-card p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  font-weight: 400;
  color: var(--text-muted);
}

/* —— Seller CTA —— */
.seller-cta-band {
  padding: clamp(2rem, 4vw, 3rem) 0;
}

.seller-cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  background: #fff;
  border-radius: var(--swmo-radius-lg);
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: var(--swmo-shadow-card);
  border: 1px solid rgba(7, 21, 38, 0.08);
}

.seller-cta-copy {
  flex: 1 1 280px;
  min-width: 0;
}

.seller-cta-inner .btn-lg {
  flex-shrink: 0;
  padding: 0.7rem 1.35rem;
  white-space: nowrap;
}

/* —— Alerts: light band, centered form (fix “too far right”) —— */
.lead-capture-band--light.lead-capture-band--promo {
  background: var(--swmo-bg-muted) !important;
  color: var(--navy, #071526) !important;
  border-top: 1px solid rgba(7, 21, 38, 0.08);
}

.lead-capture-band--light .listing-alerts-promo__eyebrow {
  color: var(--text-muted);
}

.lead-capture-band--light .listing-alerts-promo__copy h2 {
  color: var(--navy);
}

.lead-capture-band--light .listing-alerts-promo__lead,
.lead-capture-band--light .listing-alerts-promo__benefits li {
  color: var(--text-muted);
}

.lead-capture-band--light .listing-alerts-promo {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 960px;
  margin: 0 auto;
  align-items: start;
}

@media (min-width: 900px) {
  .lead-capture-band--light .listing-alerts-promo {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
  }
}

.lead-capture-band--light .listing-alerts-promo__form {
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100%;
  justify-self: stretch;
}

.lead-capture-band--light .home-lead-form--promo {
  margin: 0 auto;
  max-width: 440px;
  width: 100%;
}

/* Kill giant empty form boxes from older layout rules */
.lead-capture-band--light .home-lead-form--promo,
.lead-capture-band--light .listing-alerts-promo__form,
.lead-capture-band--light .form-wrapper {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
}

@media (min-width: 769px) {
  .lead-capture-band--light .listing-alerts-promo__form {
    min-width: 0 !important;
  }
}

/* —— Remove cramped dark bands (except reviews/footer) —— */
.zillow-diff-band {
  display: none;
}

.brandon-band {
  background: var(--swmo-bg-muted) !important;
}

/* —— Map loading: reduce flash —— */
.homes-map-shell.is-map-loading .homes-map {
  opacity: 0;
}

.homes-map-shell.is-map-ready .homes-map {
  opacity: 1;
  transition: opacity 0.25s ease;
}
