:root {
  --bg: #f6f4ee;
  --surface: #ffffff;
  --ink: #1f2a24;
  --ink-soft: #55605a;
  --line: #e2ddd2;
  --brand: #2f6b4f;      /* land green */
  --brand-dark: #245740;
  --accent: #c6892f;     /* warm earth */
  --wa: #25d366;         /* whatsapp */
  --error: #b3261e;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(31, 42, 36, 0.10);
  --maxw: 560px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

/* The hidden attribute must always win over display rules like .loading/.map-view. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Language switch (inline in nav / topbar) ---------- */
.lang-switch {
  display: inline-flex;
  gap: 2px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  flex: 0 0 auto;
}
.lang-btn {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.lang-btn.active {
  background: var(--brand);
  color: #fff;
}

/* ---------- Homepage ---------- */
.home { min-height: 100dvh; background: var(--surface); }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 600;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px;
  padding: 10px 24px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.nav-logo-link { justify-self: center; line-height: 0; cursor: pointer; }
.nav-logo-link:hover { opacity: 0.85; } /* the logo is the way home */
.nav-logo { height: 96px; width: auto; }
.nav-links { display: flex; gap: 4px; justify-self: start; }
.nav-link {
  background: none; border: 0; cursor: pointer;
  font-size: 15px; font-weight: 600; color: var(--ink);
  padding: 8px 12px; border-radius: 8px; text-decoration: none; white-space: nowrap;
}
.nav-link:hover { background: rgba(47, 107, 79, 0.08); color: var(--brand-dark); }
.nav-right { display: flex; align-items: center; gap: 12px; justify-self: end; }
.nav-cta {
  background: var(--brand); color: #fff; border: 0; cursor: pointer;
  font-weight: 700; font-size: 15px; padding: 10px 18px; border-radius: 10px; white-space: nowrap;
}
.nav-cta:hover { background: var(--brand-dark); }

/* hero */
.home-hero {
  position: relative; overflow: hidden;
  min-height: 74vh; display: flex; align-items: center; justify-content: center;
  padding: 60px 20px; text-align: center; background: #1c2620;
}
.home-hero-inner { position: relative; z-index: 2; width: 100%; max-width: 720px; }
.home-hero h1 { text-align: center; margin: 0 0 12px; }
.home-hero .eyebrow { color: #bfe8d4; }
.home-sub { color: rgba(255, 255, 255, 0.93); font-size: 18px; margin: 0 0 26px; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5); }
.home-search { display: flex; gap: 8px; max-width: 560px; margin: 0 auto 16px; }
.home-search input {
  flex: 1; min-width: 0; font-size: 16px; padding: 15px 18px; border: 0; border-radius: 12px;
  background: #fff; color: var(--ink); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}
.home-search input:focus { outline: none; box-shadow: 0 0 0 3px rgba(47, 107, 79, 0.4), 0 8px 30px rgba(0, 0, 0, 0.25); }
.home-search-btn { border: 0; background: var(--brand); color: #fff; font-weight: 700; font-size: 16px; padding: 0 22px; border-radius: 12px; cursor: pointer; }
.home-search-btn:hover { background: var(--brand-dark); }
.hero-cta { background: transparent; border: 1.5px solid rgba(255, 255, 255, 0.85); color: #fff; font-weight: 700; font-size: 15px; padding: 11px 20px; border-radius: 10px; cursor: pointer; }
.hero-cta:hover { background: rgba(255, 255, 255, 0.15); }

/* sections */
.home-section { max-width: 1160px; margin: 0 auto; padding: 54px 24px; }
.home-section.band { max-width: none; background: var(--bg); }
.band-inner { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; gap: 12px; }
.home-section h2 { font-size: 28px; margin: 0; letter-spacing: -0.02em; color: var(--ink); }
.section-center { text-align: center; margin-bottom: 28px; }
.section-link { background: none; border: 0; color: var(--brand); font-weight: 700; font-size: 15px; cursor: pointer; white-space: nowrap; }
.band-sub { color: var(--ink-soft); font-size: 17px; margin: 0 0 26px; max-width: 640px; }

/* featured row */
.featured-row { display: grid; grid-auto-flow: column; grid-auto-columns: 260px; gap: 16px; overflow-x: auto; padding-bottom: 10px; }
.featured-row .card-lot { width: 260px; }

/* financing features */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.feature-ic { font-size: 30px; }
.feature h3 { margin: 10px 0 6px; font-size: 18px; color: var(--brand-dark); }
.feature p { margin: 0; color: var(--ink-soft); font-size: 15px; line-height: 1.5; }

/* how-it-works steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.step { text-align: center; padding: 10px; }
.step-n { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; font-size: 20px; }
.step h3 { margin: 12px 0 6px; font-size: 17px; }
.step p { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* contact */
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-info h2 { margin-bottom: 10px; }
.contact-phone { display: inline-block; font-size: 24px; font-weight: 800; color: var(--brand-dark); text-decoration: none; margin: 14px 0; }
.contact-form { margin: 0; }
/* Header of the contact form inside a property page: names the lot the lead
   is about, so the buyer can see what they're sending before they send it. */
.dlf-about {
  margin: 0 0 12px; padding: 10px 14px; border-radius: 10px;
  background: rgba(47, 107, 79, 0.08); border: 1px solid rgba(47, 107, 79, 0.25);
  color: var(--brand-dark); font-size: 14px; font-weight: 700;
}
.ok-msg { color: var(--brand); font-weight: 700; font-size: 15px; margin: 12px 0 0; text-align: center; }

/* footer */
.home-footer { background: var(--ink); color: #fff; text-align: center; padding: 34px 24px; }
.footer-logo { height: 54px; background: #fff; padding: 8px 14px; border-radius: 12px; }
.footer-phone { display: block; color: #fff; font-size: 20px; font-weight: 800; text-decoration: none; margin: 16px 0 8px; }
.footer-copy { color: rgba(255, 255, 255, 0.6); font-size: 13px; margin: 6px 0 0; }
.footer-disclaimer { color: rgba(255, 255, 255, 0.5); font-size: 11.5px; line-height: 1.55; margin: 12px auto 0; max-width: 620px; }

/* ---------- Hero / gate ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  background: #1c2620; /* dark fallback behind the background video */
}
/* Hero background photo. It's 4:3, so `cover` crops height on a wide desktop
   hero and width on a phone — each viewport keeps a different part of the frame,
   which is why the source isn't pre-cropped. */
.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(12, 20, 16, 0.5) 0%, rgba(12, 20, 16, 0.6) 55%, rgba(12, 20, 16, 0.74) 100%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--maxw);
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 700;
  color: #bfe8d4;
  margin: 0 0 10px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}
h1 {
  font-size: clamp(28px, 6vw, 40px);
  line-height: 1.1;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
}
.sub {
  color: rgba(255, 255, 255, 0.92);
  font-size: 17px;
  margin: 0 0 24px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

/* Logo — black line art on white; multiply blend drops the white background. */
.brand-logo {
  display: block;
  width: 100%;
  max-width: 260px;
  height: auto;
  margin: 0 0 18px;
  mix-blend-mode: multiply;
}
/* Over the video the logo sits on a white chip so the black art stays crisp. */
.hero .brand-logo {
  max-width: 240px;
  margin: 0 auto 20px; /* centered above the form */
  background: #fff;
  padding: 12px 18px;
  border-radius: 14px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.35);
  mix-blend-mode: normal;
}
.hero .card {
  border-radius: 16px;
  padding: 26px;
  border: 0;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.38);
}

/* ---------- Form card ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-size: 16px;         /* 16px avoids iOS zoom on focus */
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  appearance: none;
}
/* Textareas don't inherit the page font — left alone they render monospace at
   the browser default size. Vertical-only resize so a drag can't break the
   sidebar's width. */
.field textarea {
  font-family: inherit;
  line-height: 1.45;
  resize: vertical;
  min-height: 96px;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(47, 107, 79, 0.15);
}
.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--ink-soft);
  margin: 6px 0 18px;
  cursor: pointer;
}
.consent input { margin-top: 3px; flex: 0 0 auto; }

.btn-primary {
  width: 100%;
  border: 0;
  background: var(--brand);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  padding: 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}
.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.6; cursor: default; }

.error {
  color: var(--error);
  font-size: 14px;
  margin: 12px 0 0;
}
.privacy {
  color: var(--ink-soft);
  font-size: 12px;
  text-align: center;
  margin: 14px 0 0;
}

/* ---------- Loading screen (returning visitors) ---------- */
.loading {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
  background: var(--bg);
}
.loading .brand-logo { max-width: 240px; margin: 0; }
.loading p { color: var(--ink-soft); font-size: 15px; margin: 0; }
.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Browse (Zillow-style) ---------- */
.browse { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: var(--surface); }

/* top filter bar */
.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  z-index: 500;
}
.topbar-logo { height: 40px; width: auto; flex: 0 0 auto; }
.topbar-pills { display: flex; gap: 8px; align-items: center; flex: 0 1 auto; min-width: 0; }

/* Zillow-style controls: rounded search box + pill dropdowns */
.tb-field {
  font-size: 15px;
  height: 42px;
  box-sizing: border-box;
  border: 1px solid #d3d3d8;
  background: #fff;
  color: var(--ink);
}
.tb-field:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47, 107, 79, 0.15); }

/* search: rounded rectangle with a magnifier on the left */
.tb-search {
  flex: 1 1 240px;
  min-width: 160px;
  border-radius: 8px;
  padding: 0 14px 0 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.5-4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 13px center;
}

/* dropdowns: rounded "pill" buttons with a chevron */
select.tb-field {
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  font-weight: 600;
  color: #2a2a33;
  padding: 0 36px 0 16px;
  border-radius: 22px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 12 8' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
select.tb-field:hover { border-color: #8a8a93; }
/* Promo filter pill: outlined by default, hot orange while active */
button.tb-promo {
  cursor: pointer; font-weight: 700; color: #c2410c; white-space: nowrap;
  padding: 0 16px; border-radius: 22px; border-color: rgba(234, 88, 12, 0.5);
  background: #fff; flex: 0 0 auto;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
button.tb-promo:hover { border-color: #ea580c; }
button.tb-promo.active {
  background: linear-gradient(135deg, #f97316, #dc2626);
  border-color: transparent; color: #fff;
  box-shadow: 0 2px 10px rgba(220, 38, 38, 0.35);
}

.topbar-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

/* floating map/list toggle — only shown on phones (see media query) */
.map-toggle {
  display: none;
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  z-index: 700;
  align-items: center; gap: 8px;
  background: var(--ink); color: #fff;
  border: 0; border-radius: 24px;
  padding: 12px 22px; font-size: 15px; font-weight: 700; cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}
.map-toggle:active { transform: translateX(-50%) scale(0.97); }

/* "Zoom out" pill on the map (shown while a lot is selected) */
.map-zoomout {
  align-items: center; gap: 7px; margin-top: 12px;
  background: #fff; color: var(--ink); border: 0; border-radius: 999px;
  padding: 9px 16px; font-size: 14px; font-weight: 700; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
.map-zoomout:hover { background: #f2f4f3; }

/* hamburger — only shown on phones (see media query) */
.nav-burger { display: none; }

/* split body: map + results */
.browse-body { flex: 1; display: flex; min-height: 0; }
.browse-map { flex: 1 1 58%; min-height: 0; }
.results {
  flex: 1 1 42%;
  max-width: 660px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-left: 1px solid var(--line);
  background: var(--bg);
}
.results-head {
  padding: 12px 18px;
  font-size: 14px;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.results-head strong { color: var(--brand); font-size: 16px; }

/* card grid */
.cards {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  grid-auto-rows: max-content;
  gap: 14px;
}
.lot-empty { grid-column: 1 / -1; color: var(--ink-soft); font-size: 14px; padding: 24px; text-align: center; }

.card-lot {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  padding: 0;
  display: block;
  width: 100%;
  transition: box-shadow 0.15s, transform 0.05s, border-color 0.15s;
}
.card-lot:hover, .card-lot.active { box-shadow: 0 10px 26px rgba(0, 0, 0, 0.15); }
.card-lot.active { border-color: var(--brand); }
.card-thumb { position: relative; height: 150px; background: #dfe6e1; overflow: hidden; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-numbadge {
  position: absolute; top: 8px; left: 8px;
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 800;
  padding: 2px 8px; border-radius: 999px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.card-soldribbon {
  position: absolute; top: 8px; right: 8px;
  background: rgba(85, 90, 95, 0.95); color: #fff; font-size: 11px; font-weight: 800;
  letter-spacing: 0.04em; padding: 3px 9px; border-radius: 999px;
}
/* $5,000-down promotion */
.card-promoribbon {
  position: absolute; top: 8px; right: 8px;
  background: linear-gradient(135deg, #f97316, #dc2626); color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: 0.04em;
  padding: 3px 9px; border-radius: 999px; box-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}
.card-down-promo { color: #c2410c; font-weight: 800; }
.card-down-promo s, .pc-down-promo s, .dp-instead s { color: var(--ink-soft); font-weight: 500; margin-left: 3px; }
/* Promo card wears the same revolving ember ring as the map pin */
.card-promo {
  position: relative;
  border-color: transparent;
  box-shadow: 0 0 14px rgba(249, 115, 22, 0.28);
}
.card-promo:hover, .card-promo.active {
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.15), 0 0 18px rgba(249, 115, 22, 0.4);
}
.card-promo::after {
  content: ""; position: absolute; inset: 0; border-radius: 14px;
  padding: 4px; /* as chunky as the map pin's ring */
  background: conic-gradient(from var(--ember-ang),
    #fde68a, #f59e0b, #dc2626, #7f1d1d, #dc2626, #f59e0b, #fde68a);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: ember-spin 3.2s linear infinite;
  pointer-events: none;
  z-index: 2;
}
.card-body { padding: 10px 12px 12px; }
.card-price { font-weight: 800; font-size: 19px; color: var(--brand-dark); }
.card-down { font-size: 12px; color: var(--brand); font-weight: 700; margin-top: 1px; }
.card-monthly { font-size: 12px; color: var(--ink-soft); font-weight: 600; margin-top: 2px; }
.card-address { font-size: 14px; font-weight: 700; color: var(--ink); margin-top: 5px; line-height: 1.3; }
.card-meta { font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; }
.card-sub { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.card-sold .card-price { color: #6b7280; }

/* detail modal — opens over the list + map (they stay put), like Zillow */
.detail-modal {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(18, 24, 20, 0.55);
  display: flex; align-items: stretch; justify-content: center;
  padding: 0 clamp(16px, 5vw, 90px); /* side margins only — full height top to bottom */
}
.detail-modal-inner {
  position: relative; width: 100%; max-width: 1200px; height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--surface); overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
}
/* branded header bar */
.detail-head {
  flex: 0 0 auto;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 10px 18px; background: var(--surface); border-bottom: 1px solid var(--line);
}
/* Prev/next property arrows, pinned to the screen edges over the modal */
.detail-nav-arrow {
  position: fixed; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%; z-index: 1201;
  display: flex; align-items: center; justify-content: center;
  background: #fff; color: var(--ink); border: 1px solid var(--line);
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.22); cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.detail-nav-arrow.prev { left: clamp(10px, 3vw, 44px); }
.detail-nav-arrow.next { right: clamp(10px, 3vw, 44px); }
.detail-nav-arrow:hover:not([disabled]) { background: var(--bg); }
.detail-nav-arrow:active:not([disabled]) { transform: translateY(-50%) scale(0.93); }
.detail-nav-arrow[disabled] { opacity: 0.32; cursor: default; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); }
.detail-back {
  justify-self: start;
  display: inline-flex; align-items: center; gap: 9px;
  background: none; border: 0; cursor: pointer;
  color: #3a3a3a; font-weight: 500; font-size: 16px; white-space: nowrap;
}
.detail-back svg { stroke: #222; }
.detail-back:hover { color: var(--brand-dark); }
.detail-back:hover svg { stroke: var(--brand-dark); }
.detail-logo { justify-self: center; height: 100px; width: auto; }
.share-wrap { justify-self: end; position: relative; }
.detail-share {
  display: inline-flex; align-items: center; gap: 7px;
  background: none; border: 0; cursor: pointer;
  color: #3a3a3a; font-weight: 500; font-size: 16px; white-space: nowrap;
}
.detail-share svg { stroke: #222; }
.detail-share:hover { color: var(--brand-dark); }
.detail-share:hover svg { stroke: var(--brand-dark); }
/* share options menu */
.share-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 6;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); padding: 6px; min-width: 220px;
}
.share-opt {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: none; border: 0; cursor: pointer; text-align: left;
  padding: 10px 12px; border-radius: 8px; font-size: 15px; font-weight: 600; color: var(--ink);
}
.share-opt:hover { background: var(--bg); }
.share-opt svg { width: 22px; height: 22px; flex: 0 0 auto; }
.detail { flex: 1 1 auto; overflow-y: auto; padding: 22px 24px 26px; } /* body scrolls; header stays */
/* hero photo (rounded corners) */
.detail-hero { position: relative; margin-bottom: 22px; }
.detail-img { display: block; width: 100%; height: 400px; object-fit: cover; background: #dfe6e1; border-radius: 16px; }
.detail-status {
  position: absolute; top: 14px; left: 14px;
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 800;
  padding: 5px 12px; border-radius: 999px; letter-spacing: 0.02em;
}
.detail-status.sold { background: #6b7280; }
.detail-numbadge {
  position: absolute; top: 14px; right: 14px;
  background: rgba(20, 30, 25, 0.8); color: #fff; font-size: 12px; font-weight: 700;
  padding: 5px 11px; border-radius: 999px;
}
/* two columns: details on the left, contact box on the right */
.detail-cols { display: grid; grid-template-columns: 1fr 320px; gap: 30px; align-items: start; }
.detail-main { min-width: 0; }
.detail-side { min-width: 0; }
.detail-side-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.detail-side-actions > * { text-align: center; }
/* "Talk now" pair: WhatsApp + Call share a row; min-width:0 lets them shrink
   evenly instead of the flex default (auto) forcing overflow on narrow sidebars. */
.detail-cta-row { display: flex; gap: 10px; }
.detail-cta-row > * { flex: 1; min-width: 0; justify-content: center; white-space: nowrap; }
.detail-call-hint {
  margin: -2px 0 0; font-size: 12.5px; color: var(--ink-soft); font-weight: 600;
}
/* The contact form inside a property page (revealed by "Contáctenos"). */
.detail-lead-form {
  text-align: left; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; background: #fff;
}
.detail-lead-form .field { margin-bottom: 10px; }
.detail-lead-form .btn-primary { margin-top: 4px; }
.detail-price { font-weight: 800; font-size: 30px; color: var(--ink); line-height: 1.1; }
.detail-price.sold { color: #6b7280; letter-spacing: 0.04em; }
.detail-down { font-size: 15px; color: var(--brand-dark); font-weight: 700; margin-top: 4px; }
/* Monthly payment — the question buyers ask first, so it sits under the price. */
.detail-monthly { margin-top: 8px; font-size: 17px; color: var(--ink); }
.detail-monthly strong { font-weight: 800; color: var(--brand-dark); }
.dm-terms { color: var(--ink-soft); font-weight: 600; font-size: 14px; margin-left: 4px; }
.detail-monthly-note { margin: 4px 0 0; font-size: 11.5px; color: var(--ink-soft); }
.detail-promo {
  margin-top: 8px; display: inline-block;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.12), rgba(220, 38, 38, 0.1));
  border: 1px solid rgba(234, 88, 12, 0.4); color: #c2410c;
  font-size: 15px; font-weight: 800; padding: 8px 14px; border-radius: 10px;
}
.dp-instead { font-weight: 600; font-size: 13px; color: var(--ink-soft); text-decoration: line-through; margin-left: 6px; }
/* Deadline sits on its own line: it's a separate fact from the price, and
   line-through must not bleed onto it. */
.dp-until { display: block; margin-top: 4px; font-weight: 700; font-size: 12.5px; color: #9a3412; }
.detail-address { font-size: 22px; font-weight: 700; color: var(--ink); margin: 0 0 8px; line-height: 1.25; }
.detail-apn { font-size: 13px; color: var(--ink-soft); margin-top: 5px; }
.detail-boundary { margin-top: 18px; font-size: 12px; color: var(--ink-soft); line-height: 1.5; font-style: italic; }
/* stat tiles */
.detail-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0 4px; }
.detail-stat { border: 1px solid var(--line); border-radius: 12px; padding: 12px 10px; text-align: center; }
.ds-val { display: block; font-weight: 800; font-size: 15px; color: var(--ink); line-height: 1.25; }
.ds-lbl { display: block; font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
/* facts + financing */
.detail-h { font-size: 17px; font-weight: 800; color: var(--ink); margin: 22px 0 9px; }
.detail-facts { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.df-row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 14px; font-size: 14px; }
.df-row + .df-row { border-top: 1px solid var(--line); }
.df-row span { color: var(--ink-soft); }
.df-row b { color: var(--ink); font-weight: 700; text-align: right; }
.df-sub { display: block; color: var(--ink-soft); font-weight: 500; font-size: 12px; margin-top: 2px; }
.detail-fin {
  margin-top: 16px; background: rgba(47, 107, 79, 0.08); border: 1px solid rgba(47, 107, 79, 0.2);
  color: var(--brand-dark); border-radius: 12px; padding: 12px 14px; font-size: 14px; font-weight: 600;
}
/* Plain-language zoning explainer */
.zoning-note {
  display: flex; gap: 10px; align-items: flex-start; margin-top: 12px;
  padding: 14px; background: rgba(47, 107, 79, 0.06);
  border: 1px solid var(--line); border-radius: 12px;
}
.zn-ic { font-size: 18px; line-height: 1.3; }
.zn-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.zn-body > b { color: var(--brand-dark); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.zn-intro { color: var(--ink-soft); font-size: 14px; line-height: 1.55; }
.zn-intro strong { color: var(--brand-dark); font-weight: 700; }
.zn-disc { color: var(--ink-soft); font-size: 11.5px; font-style: italic; }
/* "Good to know" — practical raw-land essentials */
.gtk-list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.gtk-row { display: flex; gap: 11px; align-items: flex-start; padding: 11px 14px; font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); }
.gtk-row + .gtk-row { border-top: 1px solid var(--line); }
.gtk-ic { font-size: 16px; line-height: 1.45; flex-shrink: 0; }
.gtk-row strong { color: var(--ink); font-weight: 700; }
.nearby-note { margin: 8px 0 0; font-size: 11.5px; color: var(--ink-soft); font-style: italic; }
/* "What's nearby" list */
.nearby-list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.nb-row { display: flex; align-items: center; gap: 11px; padding: 10px 14px; font-size: 14px; }
.nb-row + .nb-row { border-top: 1px solid var(--line); }
.nb-ic { font-size: 18px; flex: 0 0 auto; line-height: 1; }
.nb-label { flex: 1 1 auto; color: var(--ink); font-weight: 600; min-width: 0; }
.nb-name { color: var(--ink-soft); font-weight: 400; }
.nb-dist { flex: 0 0 auto; color: var(--brand-dark); font-weight: 800; white-space: nowrap; }
.detail-tbl { width: 100%; border-collapse: collapse; font-size: 15px; margin-top: 16px; }
.detail-tbl th { text-align: left; color: var(--ink-soft); font-weight: 600; padding: 9px 12px 9px 0; white-space: nowrap; vertical-align: top; border-bottom: 1px solid var(--line); width: 42%; }
.detail-tbl td { padding: 9px 0; border-bottom: 1px solid var(--line); }
.detail-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.detail-actions > * { flex: 1 1 45%; text-align: center; }
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px solid var(--brand); color: var(--brand); background: #fff;
  font-weight: 700; font-size: 15px; text-decoration: none; padding: 12px 16px; border-radius: 10px; cursor: pointer;
}
.btn-outline:hover { background: rgba(47, 107, 79, 0.06); }

/* price pins */
.pin-wrap { background: none; border: 0; }
.pin {
  font-weight: 800;
  font-size: 11px;
  color: #fff;
  text-align: center;
  line-height: 22px;
  height: 22px;
  border-radius: 11px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
  border: 1.5px solid #fff;
  white-space: nowrap;
  padding: 0 6px;
}
.pin-a { background: #2f6b4f; }   /* < $40k */
.pin-b { background: #2563eb; }   /* $40k–80k */
.pin-c { background: #c6892f; }   /* $80k–150k */
.pin-d { background: #9333ea; }   /* $150k+ */
.pin-na { background: #6b7280; }  /* no price */
.pin-sold { background: #9aa0a6; font-size: 9px; letter-spacing: 0.03em; opacity: 0.92; }
/* $5,000-down promo pin — elegant "on fire" treatment: a slowly revolving
   ember ring around the pill, a breathing heat glow, and a few tiny sparks
   drifting upward. Suggestion of fire, no cartoon flames. */
@property --ember-ang {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
.pin-promo {
  position: relative;
  background: linear-gradient(135deg, #f97316, #dc2626);
  font-size: 12px;
  height: 24px; line-height: 24px; border-radius: 12px; padding: 0 9px;
  border: 0;
  box-shadow: 0 0 12px rgba(249, 115, 22, 0.55), 0 3px 10px rgba(0, 0, 0, 0.45);
  animation: heat-breathe 2.6s ease-in-out infinite;
}
/* revolving ember ring (masked conic gradient, gold -> orange -> crimson) */
.pin-promo::before {
  content: ""; position: absolute; inset: -3.5px; border-radius: 999px;
  padding: 2.5px;
  background: conic-gradient(from var(--ember-ang),
    #fde68a, #f59e0b, #dc2626, #7f1d1d, #dc2626, #f59e0b, #fde68a);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: ember-spin 3.2s linear infinite;
  pointer-events: none;
}
@keyframes ember-spin { to { --ember-ang: 360deg; } }
@keyframes heat-breathe {
  0%, 100% { box-shadow: 0 0 10px rgba(249, 115, 22, 0.45), 0 3px 10px rgba(0, 0, 0, 0.45); }
  50%      { box-shadow: 0 0 18px rgba(251, 191, 36, 0.75), 0 3px 12px rgba(0, 0, 0, 0.5); }
}
/* tiny sparks rising off the pin */
.pin-promo .sparks { position: absolute; inset: 0; pointer-events: none; }
.pin-promo .sparks i {
  position: absolute; bottom: 90%; width: 3px; height: 3px; border-radius: 50%;
  background: radial-gradient(circle, #fef3c7 0%, #fbbf24 55%, rgba(249, 115, 22, 0) 100%);
  opacity: 0;
  animation: spark-rise 2.4s ease-out infinite;
}
.pin-promo .sparks i:nth-child(1) { left: 22%; animation-delay: 0s; }
.pin-promo .sparks i:nth-child(2) { left: 55%; animation-delay: -0.9s; animation-duration: 2.8s; }
.pin-promo .sparks i:nth-child(3) { left: 78%; animation-delay: -1.7s; animation-duration: 2.1s; }
@keyframes spark-rise {
  0%   { transform: translateY(2px) scale(0.6); opacity: 0; }
  15%  { opacity: 0.95; }
  60%  { opacity: 0.55; }
  100% { transform: translateY(-20px) translateX(2px) scale(0.25); opacity: 0; }
}
.pin-hi { transform: scale(1.28); box-shadow: 0 3px 12px rgba(0, 0, 0, 0.6); outline: 2px solid #fff; z-index: 1000; }

/* city area labels */
.leaflet-tooltip.zone-label {
  background: rgba(47, 107, 79, 0.92);
  color: #fff;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  padding: 3px 10px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
}
.leaflet-tooltip.zone-label::before { display: none; }

/* color legend */
.map-legend {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink);
  box-shadow: var(--shadow);
}
.legend-title {
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  margin-bottom: 4px;
}
.legend-row { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
  flex: 0 0 auto;
}
.dot-a { background: #2f6b4f; }
.dot-b { background: #2563eb; }
.dot-c { background: #c6892f; }
.dot-d { background: #9333ea; }
.dot-sold { background: #9aa0a6; }
.dot-promo { background: linear-gradient(135deg, #f97316, #dc2626); }

/* popup */
.pop-num {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: var(--brand);
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.pop-price { font-weight: 800; font-size: 18px; color: var(--brand-dark); margin-bottom: 6px; }
.pop-sold { color: #9aa0a6; letter-spacing: 0.05em; }
.pop-tbl { border-collapse: collapse; font-size: 13px; }
.pop-tbl th { text-align: left; color: var(--ink-soft); font-weight: 600; padding: 2px 10px 2px 0; vertical-align: top; white-space: nowrap; }
.pop-tbl td { padding: 2px 0; }
.pop-down td { color: var(--brand-dark); font-weight: 800; }
.pop-dir { display: inline-block; margin-top: 8px; color: var(--brand); font-weight: 700; text-decoration: none; font-size: 13px; }

/* ---------- Zillow-style photo preview popup ---------- */
.pc-card { position: relative; width: 240px; cursor: pointer; overflow: hidden; border-radius: 12px; }
.pc-photo { position: relative; height: 150px; background: #e3e8e4; }
.pc-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-badge {
  position: absolute; top: 8px; left: 8px;
  background: rgba(20, 30, 25, 0.82); color: #fff;
  font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
}
.pc-badge-sold { background: #6b7280; }
.pc-badge-promo { background: linear-gradient(135deg, #f97316, #dc2626); left: auto; right: 8px; }
.pc-body { padding: 9px 12px 12px; background: #fff; }
.pc-price { font-size: 20px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.pc-card.pc-sold .pc-price { color: #6b7280; letter-spacing: 0.04em; }
.pc-down { color: var(--brand-dark); font-weight: 700; font-size: 12.5px; margin-top: 3px; }
.pc-down-promo { color: #c2410c; font-weight: 800; }
.pc-facts { color: var(--ink); font-size: 13.5px; margin-top: 6px; }
.pc-addr { color: var(--ink-soft); font-size: 11.5px; margin-top: 3px; text-transform: uppercase; letter-spacing: 0.03em; }
/* strip Google's InfoWindow chrome so the photo card fills the bubble; we render
   our own single close ✕ (.pc-close) instead of Google's built-in one */
.gm-style-iw.gm-style-iw-c {
  padding: 0 !important; border-radius: 12px !important; overflow: hidden !important;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28) !important;
}
.gm-style-iw-d { overflow: hidden !important; padding: 0 !important; max-height: none !important; }
.gm-style-iw-chr { display: none !important; } /* hide Google's built-in close button */
.pc-close {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 28px; height: 28px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.92); color: #333; font-size: 13px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}
.pc-close:hover { background: #fff; }

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--wa);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  padding: 11px 16px;
  border-radius: 10px;
  white-space: nowrap;
}
.btn-whatsapp:hover { filter: brightness(0.95); }

.sign-out {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
}
.sign-out:hover { border-color: var(--ink-soft); color: var(--ink); }

/* ============ Zillow-style phone layout ============ */
@media (max-width: 820px) {
  /* --- browse: full-width card list, map hidden behind a floating toggle --- */
  .browse-body { flex-direction: column; }
  .browse-map { display: none; }                 /* list mode is the default */
  .results { flex: 1; max-width: none; border-left: 0; }
  .cards { grid-template-columns: 1fr; }          /* single full-width column */

  /* map mode: the map takes over, the list hides */
  .browse.map-mode .browse-map { display: block; flex: 1; }
  .browse.map-mode .results { display: none; }

  .map-toggle { display: inline-flex; }           /* reveal the floating toggle */

  /* header: logo + big search on row 1, filter pills scroll on row 2 */
  .topbar { gap: 8px 10px; padding: 10px 14px; }
  .topbar-logo { height: 32px; }
  .tb-search { order: 1; flex: 1 1 120px; }
  .topbar-actions { order: 2; }
  .topbar-pills {
    order: 3; flex: 1 1 100%;
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .topbar-pills::-webkit-scrollbar { display: none; }
  .topbar-pills select.tb-field { flex: 0 0 auto; }

  /* --- homepage: hamburger menu reveals the nav links --- */
  .nav {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; padding: 10px 16px; position: sticky;
  }
  .nav-burger {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
    width: 42px; height: 42px; padding: 10px; border: 0; background: none; cursor: pointer;
    order: 0;
  }
  .nav-burger span { display: block; height: 2px; border-radius: 2px; background: var(--ink); transition: 0.2s; }
  .nav-logo-link { order: 1; }
  .nav-logo { height: 60px; }
  .nav-right { order: 2; }
  .nav-links { display: none; }                   /* collapsed by default */
  .nav.nav-open .nav-links {
    display: flex; flex-direction: column; gap: 2px;
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 8px 12px; box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  }
  .nav.nav-open .nav-link { padding: 12px; font-size: 16px; }
  /* burger → X when open */
  .nav.nav-open .nav-burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav.nav-open .nav-burger span:nth-child(2) { opacity: 0; }
  .nav.nav-open .nav-burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  .home-section { padding: 40px 18px; }
  .band-inner { padding: 0 18px; }
  .home-section h2 { font-size: 23px; }
  .contact-inner { grid-template-columns: 1fr; gap: 24px; }

  /* detail modal: full-screen on phones, single column */
  .detail-modal { padding: 0; }
  .detail-modal-inner { border-radius: 0; max-width: none; min-height: 100%; }
  /* Phones have no side gutters, so pin the pager to the bottom corners instead
     of floating over the middle of the description text. */
  .detail-nav-arrow {
    width: 44px; height: 44px; top: auto; bottom: 16px; transform: none;
    background: #fff; box-shadow: 0 3px 14px rgba(0, 0, 0, 0.3);
  }
  .detail-nav-arrow.prev { left: 14px; }
  .detail-nav-arrow.next { right: 14px; }
  .detail-nav-arrow:active:not([disabled]) { transform: scale(0.93); }
  .detail { padding: 16px 16px 86px; } /* clear the fixed bottom arrows */
  .detail-logo { height: 60px; }
  .detail-back { font-size: 13px; }
  .detail-img { height: 220px; }
  .detail-cols { grid-template-columns: 1fr; gap: 20px; }
}

/* ---------- Fade in on reveal ---------- */
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.browse:not([hidden]) { animation: fade-in 0.3s ease; }
