/* ============================================================
   PUBLIC.CSS — Premium Public-Facing UI
   ATLAS Real Estate — v2026.06.16
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800;900&display=swap');

/* ── CSS Tokens ──────────────────────────────────────────── */
:root {
  --pub-topbar-h: 68px;
  --pub-brand-green:  var(--identity-primary, #10b981);
  --pub-brand-glow:   rgba(16, 185, 129, 0.25);
  --pub-glass:        rgba(7, 12, 22, 0.88);
  --pub-glass-hover:  rgba(7, 12, 22, 0.96);
  --pub-border:       rgba(255, 255, 255, 0.09);
  --pub-shadow:       0 18px 46px rgba(0,0,0,0.46);
  --pub-shadow-sm:    0 4px 14px rgba(0,0,0,0.26);
  --pub-radius:       12px;
  --pub-radius-sm:    8px;
  --pub-transition:   all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Topbar ──────────────────────────────────────────────── */
.pub-topbar {
  position: relative;
  z-index: 200;
  height: var(--pub-topbar-h);
  background: rgba(4, 8, 18, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--pub-border);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04), 0 4px 24px rgba(0,0,0,0.4);
}

.pub-topbar-inner {
  height: 100%;
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Brand */
.pub-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  min-width: 0;
}

.pub-brand > div {
  min-width: 0;
}

.pub-brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--identity-primary, #10b981), var(--identity-secondary, #059669));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 1px rgba(16,185,129,.3), 0 4px 12px rgba(16,185,129,.25);
  flex-shrink: 0;
}

.pub-brand-name {
  font-size: 17px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0;
  line-height: 1.2;
  background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pub-brand-tagline {
  font-size: 10px;
  color: var(--pub-brand-green);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.pub-brand .site-logo {
  width: 40px;
  height: 40px;
  margin-left: 0;
  border-radius: 12px;
}

/* District Selector */
.pub-district-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 360px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--pub-border);
  border-radius: var(--pub-radius-sm);
  padding: 0 14px;
  height: 44px;
  transition: var(--pub-transition);
}

.pub-district-wrap:focus-within {
  border-color: rgba(16,185,129,0.4);
  background: rgba(255,255,255,0.07);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.1);
}

.pub-district-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--pub-brand-green);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0;
}

.pub-district-select {
  flex: 1;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  padding: 0;
  -webkit-appearance: none;
}

.pub-district-select option {
  background: #060b16;
  color: #fff;
}

/* Navigation */
.pub-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
}

.pub-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: var(--pub-transition);
  white-space: nowrap;
}

.pub-nav-btn.accent {
  background: linear-gradient(135deg, var(--identity-primary, #10b981), var(--identity-secondary, #059669));
  color: #fff;
  box-shadow: 0 4px 14px rgba(16,185,129,0.3);
}

.pub-nav-btn.accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16,185,129,0.4);
}

.pub-nav-btn.ghost {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.1);
}

.pub-nav-btn.ghost:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
  transform: translateY(-1px);
}

/* ── Search Bar ──────────────────────────────────────────── */
.pub-search-wrap {
  position: absolute;
  top: 20px;
  right: 24px;
  width: min(500px, calc(100vw - 48px));
  z-index: 10;
}
.pub-search-btn-text {
  display: none;
}

.pub-search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 54px;
  background: rgba(5, 9, 20, 0.90);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--pub-radius);
  padding: 0 16px 0 20px;
  box-shadow: var(--pub-shadow);
  transition: var(--pub-transition);
}

.pub-search-box:focus-within {
  border-color: rgba(59,130,246,0.5);
  box-shadow: var(--pub-shadow), 0 0 0 3px rgba(59,130,246,0.12);
}

.pub-search-icon {
  color: rgba(255,255,255,0.35);
  flex-shrink: 0;
  transition: color 0.2s;
}

.pub-search-box:focus-within .pub-search-icon {
  color: var(--identity-secondary, #3b82f6);
}

.pub-search-input {
  flex: 1;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  padding: 0;
}

.pub-search-input::placeholder {
  color: rgba(255,255,255,0.3);
}

.pub-search-kbd {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.pub-search-results {
  display: none;
  margin-top: 8px;
  background: rgba(5, 9, 20, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--pub-radius-sm);
  overflow: hidden;
  box-shadow: var(--pub-shadow);
  animation: pubFadeIn 0.18s ease-out;
}

.pub-search-results.show {
  display: block;
}

.search-result {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: right;
  padding: 12px 18px;
  cursor: pointer;
  transition: var(--pub-transition);
  font-family: inherit;
}

.search-result:last-child {
  border-bottom: 0;
}

.search-result:hover {
  background: rgba(59,130,246,0.08);
}

.search-result strong {
  color: #fff;
  font-size: 14px;
  display: block;
}

.search-result span {
  color: rgba(255,255,255,0.45);
  font-size: 12px;
}

.search-result-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(59,130,246,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── FAB Group ───────────────────────────────────────────── */
.pub-fab-group {
  position: absolute;
  right: 24px;
  top: 94px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9;
}

.pub-fab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  background: rgba(5, 9, 20, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--pub-shadow-sm);
  transition: var(--pub-transition);
  position: relative;
  white-space: nowrap;
}

.pub-fab:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.18);
  color: #fff;
  transform: translateX(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.pub-fab.active {
  background: linear-gradient(135deg, var(--identity-primary, #10b981), var(--identity-secondary, #059669));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 16px rgba(16,185,129,0.35);
}

.pub-fab-sale {
  border-color: rgba(16,185,129,0.2);
  color: var(--identity-primary, #10b981);
}

.pub-fab-sale:hover {
  background: rgba(16,185,129,0.12);
  border-color: rgba(16,185,129,0.35);
  color: var(--identity-primary, #10b981);
}

.pub-fab-sale.active {
  background: linear-gradient(135deg, var(--identity-primary, #10b981), var(--identity-secondary, #059669));
  color: #fff;
}

.pub-fab-badge {
  position: absolute;
  top: -6px;
  left: -6px;
  min-width: 20px;
  height: 20px;
  background: #ef4444;
  color: #fff;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
  padding: 0 4px;
  box-shadow: 0 2px 6px rgba(239,68,68,0.4);
  animation: pubPulse 2s infinite;
}

/* ── Stats Bar ───────────────────────────────────────────── */
.pub-stats-bar {
  position: absolute;
  left: 24px;
  top: 20px;
  background: rgba(5,9,20,0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--pub-radius-sm);
  padding: 0 20px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 0;
  z-index: 8;
  box-shadow: var(--pub-shadow-sm);
  animation: pubFadeIn 0.4s ease-out 0.5s both;
}

.pub-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px;
  gap: 1px;
}

.pub-stat-num {
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transition: all 0.4s;
}

.pub-stat-label {
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.pub-stat-green .pub-stat-num { color: var(--identity-primary, #10b981); }
.pub-stat-amber .pub-stat-num { color: var(--identity-accent, #f59e0b); }
.pub-stat-red   .pub-stat-num { color: #ef4444; }

.pub-stat-divider {
  width: 1px;
  height: 28px;
  background: rgba(255,255,255,0.08);
}

/* ── Results Panel ───────────────────────────────────────── */
.pub-results {
  position: absolute;
  left: 24px;
  top: 96px;
  width: 310px;
  max-height: calc(100vh - 160px);
  z-index: 8;
  background: rgba(5,9,20,0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--pub-radius);
  overflow: hidden;
  box-shadow: var(--pub-shadow);
  display: flex;
  flex-direction: column;
}

.pub-results-head {
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.pub-results-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 15px;
  color: #fff;
}

.pub-results-count {
  background: rgba(59,130,246,0.15);
  color: #93c5fd;
  border-radius: 99px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 800;
  min-width: 28px;
  text-align: center;
}

.pub-mini-select {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: rgba(255,255,255,0.7);
  font-size: 12px;
  font-family: inherit;
  padding: 5px 10px;
  outline: none;
  cursor: pointer;
}

/* Result cards with premium design */
.results-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.result-card {
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.03);
  border-radius: var(--pub-radius-sm);
  padding: 14px 16px;
  text-align: right;
  color: rgba(255,255,255,0.8);
  display: grid;
  gap: 5px;
  cursor: pointer;
  transition: var(--pub-transition);
  font-family: inherit;
  position: relative;
  overflow: hidden;
}

.result-card::before {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
  border-radius: 0 var(--pub-radius-sm) var(--pub-radius-sm) 0;
  transition: background 0.2s;
}

.result-card:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.13);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.result-card:hover::before {
  background: var(--identity-secondary, #3b82f6);
}

.result-card[data-sale="for_sale"]::before { background: var(--identity-primary, #10b981); }
.result-card[data-sale="reserved"]::before { background: var(--identity-accent, #f59e0b); }
.result-card[data-sale="sold"]::before     { background: #ef4444; }

.result-card strong {
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.result-card span {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
}

.result-card small {
  color: rgba(255,255,255,0.3);
  font-size: 11px;
}

.result-card .result-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--identity-primary, #10b981);
}

/* ── Legends ─────────────────────────────────────────────── */
.pub-legend {
  position: absolute;
  left: 24px;
  bottom: 24px;
  background: rgba(5,9,20,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--pub-radius-sm);
  padding: 14px 18px;
  z-index: 7;
  display: grid;
  gap: 7px;
  box-shadow: var(--pub-shadow-sm);
  font-size: 12px;
  font-weight: 700;
}

.pub-zoom-indicator {
  bottom: 192px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  min-width: 140px;
}
.pub-zoom-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.pub-zoom-label {
  font-size: 10px;
  font-weight: 800;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0;
}
.pub-zoom-value {
  font-size: 18px;
  font-weight: 900;
  color: #10b981;
  font-variant-numeric: tabular-nums;
}
.pub-zoom-hint {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.75);
}

.pub-legend-title {
  font-size: 10px;
  font-weight: 800;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 6px;
  margin-bottom: 2px;
}

/* ── Filter improvements ─────────────────────────────────── */
.filter-chips-group {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.filter-chip {
  cursor: pointer;
}

.filter-chip input[type="checkbox"] {
  display: none;
}

.filter-chip span {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  transition: var(--pub-transition);
  -webkit-user-select: none;
  user-select: none;
}

.filter-chip input:checked + span {
  background: rgba(16,185,129,0.15);
  border-color: rgba(16,185,129,0.4);
  color: var(--identity-primary, #10b981);
  box-shadow: 0 0 0 1px rgba(16,185,129,0.2);
}

.filter-chip:hover span {
  background: rgba(255,255,255,0.09);
  color: #fff;
}

.filter-price-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-price-row .input {
  flex: 1;
}

/* ── Layer list improvements ─────────────────────────────── */
.layer-list {
  gap: 8px !important;
  display: grid !important;
}

.layer-list label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row-reverse;
  background: rgba(255,255,255,0.03);
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  transition: var(--pub-transition);
}

.layer-list label:hover {
  background: rgba(255,255,255,0.07);
  color: #fff;
}

.layer-list input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--identity-primary, #10b981);
  border-radius: 4px;
  cursor: pointer;
}

/* ── Bottom Sheet improvements ───────────────────────────── */
.bottom-sheet {
  position: absolute;
  right: 50%;
  transform: translateX(50%);
  bottom: 24px;
  width: 620px;
  max-width: calc(100vw - 48px);
  max-height: 70vh;
  overflow-y: auto;
  background: rgba(5, 9, 20, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 24px;
  padding: 28px;
  z-index: 1000;
  display: none;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  animation: pubSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bottom-sheet.show {
  display: block;
}

/* ── Map Loading Overlay ─────────────────────────────────── */
.map-loading-overlay {
  position: absolute;
  inset: 0;
  background: var(--bg);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease;
}

.map-loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.map-loading-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.map-loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(16,185,129,0.15);
  border-top-color: var(--identity-primary, #10b981);
  border-radius: 50%;
  animation: pubSpin 0.9s linear infinite;
}

  .map-loading-text {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0;
  }

  /* ── Parcel Tile Loading Indicator (transparent, non-blocking) ── */
  .tile-loading-indicator {
    position: absolute;
    bottom: 84px;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    z-index: 6;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s;
  }
  .tile-loading-indicator.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }
  .tile-loading-indicator.error {
    pointer-events: auto;
  }
  .tile-loading-indicator.error .tile-loading-indicator-inner {
    background: rgba(71, 18, 18, 0.92);
    border-color: rgba(248, 113, 113, 0.45);
  }
  .tile-loading-indicator.error .tile-loading-indicator-spinner {
    display: none;
  }
  .tile-loading-indicator-inner {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px 8px 18px;
    background: rgba(5, 9, 20, 0.55);
    backdrop-filter: blur(14px) saturate(1.1);
    -webkit-backdrop-filter: blur(14px) saturate(1.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);
  }
  .tile-loading-indicator-spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(16, 185, 129, 0.22);
    border-top-color: var(--identity-primary, #10b981);
    animation: pubSpin 0.8s linear infinite;
    flex-shrink: 0;
  }
  .tile-loading-indicator-text {
    font-size: 12.5px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.82);
    white-space: nowrap;
    letter-spacing: 0;
  }
  .tile-loading-indicator-retry {
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    color: #fff;
    padding: 4px 9px;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
  }
  .tile-loading-indicator-retry[hidden] {
    display: none;
  }
  @media (max-width: 768px) {
    .tile-loading-indicator { bottom: 18px; }
    .tile-loading-indicator-inner { padding: 7px 14px 7px 16px; gap: 9px; }
    .tile-loading-indicator-text { font-size: 11.5px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .tile-loading-indicator-spinner { animation: none; }
    .tile-loading-indicator { transition: opacity 0.2s ease; }
  }

.pub-footer {
  background: rgba(4, 8, 18, 0.96);
  border-top: 1px solid var(--pub-border);
  color: rgba(255,255,255,.65);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 24px;
  font-size: 13px;
}
.pub-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.pub-footer a {
  color: rgba(255,255,255,.82);
  font-weight: 700;
}
.public-page {
  min-height: calc(100vh - var(--pub-topbar-h));
  background: var(--bg);
  padding: 36px 20px 52px;
}
.public-page-hero,
.public-page-body {
  max-width: 920px;
  margin: 0 auto;
}
.public-page-hero {
  padding: 32px 0 24px;
}
.public-page-hero h1 {
  color: #fff;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.15;
  margin: 0 0 12px;
}
.public-page-hero p {
  color: rgba(255,255,255,.68);
  font-size: 18px;
  line-height: 1.8;
  margin: 0;
}
.public-page-body {
  background: rgba(13,23,42,.78);
  border: 1px solid var(--line);
  border-radius: var(--pub-radius);
  padding: 26px;
  line-height: 2;
  color: rgba(255,255,255,.82);
}
.public-page-body a {
  color: var(--identity-secondary, #3b82f6);
  font-weight: 700;
}

/* App download page */
.app-download-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 24px 80px;
}
.app-download-hero {
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  align-items: center;
  gap: 64px;
}
.app-download-copy h1 {
  max-width: 720px;
  margin: 14px 0 18px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.08;
  color: #fff;
}
.app-download-copy > p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.9;
}
.app-version-badge,
.app-download-requirement {
  display: inline-flex;
  margin-top: 18px;
  padding: 7px 12px;
  border: 1px solid rgba(16,185,129,.28);
  border-radius: 999px;
  background: rgba(16,185,129,.09);
  color: #a7f3d0;
  font-size: 12px;
  font-weight: 800;
}
.app-download-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.app-store-button {
  min-width: 190px;
  min-height: 62px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  color: #fff;
  box-shadow: 0 12px 28px rgba(0,0,0,.22);
}
.app-store-button.primary {
  border-color: rgba(16,185,129,.5);
  background: linear-gradient(135deg, var(--identity-primary, #10b981), var(--identity-secondary, #059669));
}
.app-store-button:not(.disabled):hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.28);
}
.app-store-button.disabled {
  opacity: .58;
  cursor: not-allowed;
}
.app-store-button small,
.app-store-button strong { display: block; }
.app-store-button small {
  margin-bottom: 2px;
  color: rgba(255,255,255,.68);
  font-size: 10px;
}
.app-store-button strong { font-size: 16px; }
.app-store-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(3,7,18,.24);
  font-size: 12px;
  font-weight: 900;
}
.app-download-requirement {
  border-color: rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  color: var(--muted);
}
.app-phone-preview {
  display: flex;
  justify-content: center;
}
.app-phone-frame {
  width: 292px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 42px;
  background: linear-gradient(145deg, #1e293b, #020617);
  box-shadow: 0 40px 90px rgba(0,0,0,.55), 0 0 70px rgba(16,185,129,.13);
  transform: rotate(-3deg);
}
.app-phone-speaker {
  width: 68px;
  height: 5px;
  margin: 2px auto 10px;
  border-radius: 999px;
  background: #475569;
}
.app-phone-screen {
  min-height: 500px;
  overflow: hidden;
  border-radius: 31px;
  background: #07101e;
  border: 1px solid rgba(255,255,255,.08);
}
.app-phone-top {
  height: 62px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  background: #050b16;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: 12px;
}
.app-phone-top .site-logo {
  width: 30px;
  height: 30px;
  margin: 0;
}
.app-phone-search {
  margin: 14px;
  padding: 11px 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  color: #64748b;
  font-size: 11px;
}
.app-phone-map {
  position: relative;
  height: 292px;
  overflow: hidden;
  background:
    linear-gradient(27deg, transparent 45%, rgba(255,255,255,.16) 46%, rgba(255,255,255,.16) 49%, transparent 50%),
    radial-gradient(circle at 28% 38%, rgba(16,185,129,.3), transparent 38%),
    #334155;
}
.parcel-shape {
  position: absolute;
  width: 82px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: skew(-12deg);
  border: 2px solid #67e8f9;
  background: rgba(8,145,178,.2);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}
.parcel-shape.one { top: 32px; right: 30px; }
.parcel-shape.two { top: 94px; right: 44px; }
.parcel-shape.three { top: 58px; left: 26px; }
.parcel-shape.four { top: 128px; left: 36px; }
.app-phone-sheet {
  display: grid;
  gap: 7px;
  margin: -22px 10px 0;
  padding: 18px;
  position: relative;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px 18px 10px 10px;
  background: rgba(7,12,22,.96);
}
.app-phone-sheet span {
  color: var(--muted);
  font-size: 10px;
}
.app-feature-section { margin-top: 70px; }
.app-section-heading {
  max-width: 680px;
  margin-bottom: 24px;
}
.app-section-heading h2 {
  margin: 10px 0 0;
  font-size: clamp(28px, 4vw, 42px);
}
.app-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.app-feature-grid article {
  min-height: 104px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
}
.app-feature-grid article > span {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(16,185,129,.13);
  color: #6ee7b7;
  font-weight: 900;
}
.app-feature-grid p {
  margin: 0;
  color: var(--text);
  line-height: 1.7;
}
.app-download-note {
  margin-top: 28px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid rgba(250,204,21,.2);
  border-radius: 14px;
  background: rgba(250,204,21,.055);
}
.app-download-note p {
  max-width: 760px;
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.7;
}
@media (max-width: 800px) {
  .app-download-page { padding: 38px 16px 56px; }
  .app-download-hero { grid-template-columns: 1fr; gap: 48px; }
  .app-download-copy { text-align: center; }
  .app-download-actions { justify-content: center; }
  .app-feature-grid { grid-template-columns: 1fr; }
  .app-download-note { align-items: stretch; flex-direction: column; }
}

.about-page {
  min-height: calc(100vh - var(--pub-topbar-h));
  background:
    linear-gradient(180deg, #08111f 0%, #070c15 46%, #09121d 100%);
  padding: 34px 20px 56px;
}
.about-hero,
.about-section,
.about-stats,
.about-final-cta {
  max-width: 1180px;
  margin: 0 auto;
}
.about-hero {
  min-height: min(620px, calc(100vh - var(--pub-topbar-h) - 78px));
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, .72fr);
  gap: 34px;
  align-items: center;
}
.about-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid rgba(16,185,129,.3);
  background: rgba(16,185,129,.09);
  color: #86efac;
  font-size: 12px;
  font-weight: 900;
}
.about-hero h1,
.about-section h2,
.about-final-cta h2 {
  color: #fff;
  margin: 14px 0 12px;
  line-height: 1.16;
  letter-spacing: 0;
}
.about-hero h1 {
  font-size: clamp(38px, 6vw, 72px);
  max-width: 840px;
}
.about-hero p,
.about-section p,
.about-final-cta p {
  color: rgba(255,255,255,.68);
  font-size: 17px;
  line-height: 1.9;
  margin: 0;
}
.about-hero-actions,
.about-final-cta div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.about-visual {
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--pub-radius);
  background:
    linear-gradient(180deg, rgba(17,31,52,.86), rgba(10,17,32,.92)),
    rgba(13,23,42,.78);
  box-shadow: var(--pub-shadow);
  padding: 18px;
  display: grid;
  gap: 16px;
}
.about-visual-top {
  display: grid;
  grid-template-columns: 48px minmax(0,1fr);
  align-items: center;
  gap: 12px;
}
.about-visual-top .site-logo,
.about-visual-top .pub-brand-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--pub-radius-sm);
}
.about-visual-top strong,
.about-visual-top span {
  display: block;
}
.about-visual-top strong {
  color: #fff;
  font-size: 16px;
}
.about-visual-top span {
  color: rgba(255,255,255,.48);
  font-size: 12px;
  margin-top: 3px;
}
.about-visual-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 8px;
}
.about-visual-grid span {
  aspect-ratio: 1.25;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.045);
}
.about-visual-grid .active {
  border-color: rgba(59,130,246,.5);
  background: rgba(59,130,246,.18);
}
.about-visual-grid .sale {
  border-color: rgba(16,185,129,.52);
  background: rgba(16,185,129,.18);
}
.about-visual-note {
  padding: 12px;
  border-radius: var(--pub-radius-sm);
  background: rgba(255,255,255,.045);
  color: rgba(255,255,255,.72);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}
.about-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 10px;
  margin-bottom: 44px;
}
.about-stats div,
.about-body-card,
.about-steps article,
.about-audience article,
.about-trust,
.about-final-cta {
  border: 1px solid rgba(255,255,255,.09);
  background: rgba(13,23,42,.7);
  border-radius: var(--pub-radius);
}
.about-stats div {
  padding: 18px;
  display: grid;
  gap: 5px;
}
.about-stats strong {
  color: #fff;
  font-size: clamp(24px, 4vw, 42px);
  line-height: 1;
}
.about-stats span {
  color: rgba(255,255,255,.54);
  font-size: 13px;
  font-weight: 800;
}
.about-section {
  padding: 34px 0;
}
.about-two-col {
  display: grid;
  grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr);
  gap: 18px;
  align-items: start;
}
.about-section h2 {
  font-size: clamp(28px, 4vw, 44px);
}
.about-body-card {
  padding: 22px;
  color: rgba(255,255,255,.76);
  line-height: 2;
}
.about-steps,
.about-audience {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
  margin-top: 18px;
}
.about-steps article,
.about-audience article {
  padding: 20px;
}
.about-steps article span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--pub-radius-sm);
  background: var(--identity-primary, #10b981);
  color: #041a12;
  font-weight: 900;
}
.about-steps h3,
.about-audience h3 {
  margin: 14px 0 8px;
  color: #fff;
}
.about-steps p,
.about-audience p {
  font-size: 14px;
}
.about-trust {
  display: grid;
  grid-template-columns: minmax(0,1fr) 340px;
  gap: 18px;
  padding: 24px;
}
.about-checks {
  display: grid;
  gap: 9px;
}
.about-checks span {
  padding: 11px 13px;
  border-radius: var(--pub-radius-sm);
  background: rgba(255,255,255,.045);
  color: rgba(255,255,255,.76);
  font-weight: 800;
}
.about-final-cta {
  padding: 26px;
  margin-top: 28px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}
.about-final-cta h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 36px);
}

@media (max-width: 860px) {
  .about-hero,
  .about-two-col,
  .about-trust,
  .about-final-cta {
    grid-template-columns: 1fr;
  }
  .about-stats,
  .about-steps,
  .about-audience {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
  .about-final-cta {
    display: grid;
  }
}

@media (max-width: 560px) {
  .about-page {
    padding: 22px 14px 42px;
  }
  .about-hero {
    min-height: auto;
    padding: 18px 0 26px;
  }
  .about-stats,
  .about-steps,
  .about-audience {
    grid-template-columns: 1fr;
  }
}

.offices-page {
  max-width: 1180px;
  margin: 0 auto;
}
.offices-hero {
  max-width: 1180px;
}
.office-directory-filters {
  max-width: 1180px;
  margin: 0 auto 22px;
}
.office-directory-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(180px, .9fr) minmax(180px, .9fr) auto auto;
  gap: 10px;
  align-items: center;
  background: rgba(13,23,42,.78);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}
.office-directory-grid {
  display: grid;
  gap: 14px;
  max-width: 1180px;
  margin: 0 auto;
}
.office-directory-card {
  display: grid;
  grid-template-columns: 96px minmax(0,1fr);
  gap: 16px;
  background: rgba(13,23,42,.78);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}
.office-directory-logo,
.office-public-logo {
  width: 96px;
  height: 96px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.05);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.office-directory-logo img,
.office-public-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.office-directory-logo span,
.office-public-logo span {
  font-size: 40px;
  font-weight: 900;
  color: #fff;
}
.office-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.office-card-head h2 {
  margin: 0;
}
.office-verified-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border-radius: 99px;
  background: rgba(16,185,129,.13);
  border: 1px solid rgba(16,185,129,.34);
  color: #bbf7d0;
  font-size: 12px;
  font-weight: 800;
}
.office-directory-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.office-directory-meta span {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 6px 10px;
  color: rgba(255,255,255,.72);
  font-size: 12px;
  font-weight: 700;
}
.office-public-page {
  min-height: calc(100vh - var(--pub-topbar-h));
  background: var(--bg);
}
.office-public-hero {
  background: linear-gradient(90deg, rgba(4,8,18,.94), rgba(4,8,18,.72));
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--line);
}
.office-public-hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 20px;
  display: grid;
  grid-template-columns: 116px minmax(0,1fr);
  gap: 18px;
  align-items: center;
}
.office-public-logo {
  width: 116px;
  height: 116px;
}
.office-public-hero h1 {
  margin: 10px 0 8px;
  color: #fff;
  font-size: clamp(30px, 5vw, 54px);
}
.office-public-hero p {
  max-width: 760px;
  color: rgba(255,255,255,.74);
  line-height: 1.8;
}
.office-public-actions,
.office-public-listing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.office-public-content {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 20px 52px;
}
.office-public-grid {
  display: grid;
  grid-template-columns: 320px minmax(0,1fr);
  gap: 18px;
  align-items: start;
}
.office-public-side {
  position: sticky;
  top: 86px;
}
.office-public-stats {
  grid-template-columns: repeat(3, minmax(0,1fr));
}
.office-public-map {
  height: 420px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,.04);
}
.office-public-listings {
  display: grid;
  gap: 12px;
}
.office-public-listing {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255,255,255,.035);
}
.office-public-listing-thumb {
  width: 92px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  flex: 0 0 auto;
}
.office-public-listing h3 {
  margin: 0 0 4px;
}

@media (max-width: 800px) {
  .office-directory-form,
  .office-directory-card,
  .office-public-hero-inner,
  .office-public-grid {
    grid-template-columns: 1fr;
  }
  .office-public-side {
    position: static;
  }
  .office-public-listing {
    display: grid;
  }
  .office-public-map {
    height: 330px;
  }
  .office-public-stats {
    grid-template-columns: 1fr;
  }
}

/* ── Animations ──────────────────────────────────────────── */
@keyframes pubFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pubSlideUp {
  from { opacity: 0; transform: translate(50%, 24px); }
  to   { opacity: 1; transform: translate(50%, 0); }
}

@keyframes pubSpin {
  to { transform: rotate(360deg); }
}

@keyframes pubPulse {
  0%, 100% { box-shadow: 0 2px 6px rgba(239,68,68,0.4); }
  50%       { box-shadow: 0 2px 12px rgba(239,68,68,0.7); }
}

/* ── Mobile Navigation Drawer & Drawer Classes ───────────── */
.pub-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  transition: var(--pub-transition);
  margin-right: auto; /* Push to left in RTL */
}
.pub-menu-toggle:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
}

.drawer {
  position: fixed;
  z-index: 2000;
  background: rgba(7, 12, 22, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  padding: 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  display: flex;
  flex-direction: column;
}
.drawer-right {
  top: 0;
  bottom: 0;
  right: 0;
  width: min(340px, 85vw);
  transform: translateX(105%);
  opacity: 0;
  border-right: 0;
}
.drawer.open {
  transform: translateX(0) translateY(0);
  opacity: 1;
}
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.drawer-head h2 {
  font-size: 18px;
  font-weight: 800;
  margin: 0;
  color: #fff;
}
.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: grid;
  gap: 14px;
  align-content: start;
}
.pub-results-close {
  display: none;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  margin-right: auto;
}
.pub-results-close:hover {
  color: #fff;
}

#resultsButton {
  display: none;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .pub-topbar-inner { padding: 0 14px; gap: 10px; }
  .pub-brand-tagline { display: none; }
  .pub-brand-name { font-size: 15px; }
  .pub-district-wrap { display: none !important; }
  .pub-stats-bar { display: none !important; }
  .pub-legend { display: none !important; }
  .pub-search-kbd { display: none !important; }
  
  .pub-nav { display: none !important; }
  .pub-menu-toggle { display: flex; }
  
  #resultsButton { display: inline-flex; }
  
  .pub-results {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: auto !important;
    width: min(340px, 85vw) !important;
    max-height: 100vh !important;
    transform: translateX(-105%) !important;
    z-index: 2000 !important;
    background: rgba(7, 12, 22, 0.98) !important;
    border-right: 1px solid var(--pub-border) !important;
    transition: var(--pub-transition) !important;
    display: flex !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border: none !important;
  }
  .pub-results.open {
    transform: translateX(0) !important;
  }
  .pub-results-close {
    display: block;
  }
  
  .pub-search-wrap {
    position: absolute;
    top: 14px;
    right: 14px;
    left: auto;
    width: 80px;
    height: 44px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), left 0.3s cubic-bezier(0.4, 0, 0.2, 1), right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
  }
  .pub-search-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    width: 100%;
    border-radius: 12px;
    padding: 0 16px;
    cursor: pointer;
    background: rgba(5, 9, 20, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: var(--pub-shadow-sm);
    transition: border-radius 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .pub-search-btn-text {
    display: inline-block;
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
  }
  .pub-search-input {
    opacity: 0;
    width: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, width 0.2s ease;
    font-size: 13px;
  }
  .pub-search-wrap:focus-within,
  .pub-search-wrap.expanded {
    left: 14px;
    right: 14px;
    width: auto;
  }
  .pub-search-wrap:focus-within .pub-search-box,
  .pub-search-wrap.expanded .pub-search-box {
    justify-content: flex-start;
    border-radius: 12px;
    padding: 0 14px;
  }
  .pub-search-wrap:focus-within .pub-search-btn-text,
  .pub-search-wrap.expanded .pub-search-btn-text {
    display: none;
  }
  .pub-search-wrap:focus-within .pub-search-input,
  .pub-search-wrap.expanded .pub-search-input {
    opacity: 1;
    width: 100%;
    pointer-events: auto;
    margin-right: 8px;
  }
  .pub-fab-group { right: 14px; top: 72px; }
}

@media (max-width: 600px) {
  .pub-brand-icon { width: 34px; height: 34px; }
  .pub-footer { display: grid; padding: 14px; }
  .public-page-body { padding: 18px; }
}

.map-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(16, 185, 129, 0.08);
  overflow: hidden;
  z-index: 10;
  display: none;
}
.map-progress-bar::after {
  content: '';
  display: block;
  width: 35%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--identity-primary, #10b981), transparent);
  animation: mapLoadingProgress 1.1s infinite linear;
}
@keyframes mapLoadingProgress {
  0% { transform: translateX(-150%); }
  100% { transform: translateX(250%); }
}

/* Public UI refinement pass */
.results-limit-note,
.search-result-note {
  margin: 2px 0 8px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgba(250, 204, 21, 0.24);
  background: rgba(250, 204, 21, 0.07);
  color: rgba(255,255,255,0.62);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}
.search-result-note {
  margin: 0;
  border-radius: 0;
  border-width: 1px 0 0;
  background: rgba(255,255,255,0.035);
}
.grouped-layer-list {
  gap: 7px !important;
}
.layer-group-title {
  margin: 6px 2px 2px;
  padding: 0 2px 4px;
  color: rgba(255,255,255,0.46);
  font-size: 11px;
  font-weight: 900;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.layer-group-title:first-child {
  margin-top: 0;
}
@media (max-width: 900px) {
  .pub-fab-group {
    max-width: calc(100vw - 28px);
  }
  .pub-fab {
    height: 40px;
    padding: 0 12px;
  }
  .bottom-sheet {
    right: 0;
    left: 0;
    bottom: 0;
    width: auto;
    max-width: none;
    max-height: 78vh;
    transform: none;
    border-radius: 18px 18px 0 0;
    padding: 18px;
  }
}
@media (max-width: 600px) {
  .pub-fab span:not(.pub-fab-badge) {
    display: none;
  }
  .pub-fab {
    width: 42px;
    justify-content: center;
    padding: 0;
  }
  .pub-fab-sale span:not(.pub-fab-badge) {
    display: inline;
  }
  .pub-fab-sale {
    width: auto;
    padding: 0 12px;
  }
}

/* ── Mobile Map UX + Performance Overrides ─────────────────
   Reduce GPU-heavy glass/blur and keep controls away from the thumb area. */
@media (max-width: 900px) {
  :root { --pub-topbar-h: 58px; }

  .pub-topbar,
  .pub-search-box,
  .drawer,
  .bottom-sheet,
  .pub-fab,
  .pub-results {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .pub-topbar { height: var(--pub-topbar-h); }
  .pub-topbar-inner { padding: 0 10px; }
  .pub-brand-icon,
  .pub-brand .site-logo { width: 34px; height: 34px; border-radius: 10px; }
  .pub-brand-name { font-size: 14px; }

  .pub-search-wrap {
    top: 9px !important;
    right: 10px !important;
    height: 40px !important;
  }
  .pub-search-box {
    height: 40px !important;
    border-radius: 12px !important;
    box-shadow: 0 6px 18px rgba(0,0,0,.32) !important;
  }
  .pub-search-wrap:focus-within,
  .pub-search-wrap.expanded {
    left: 10px !important;
    right: 10px !important;
  }
  .pub-search-results {
    max-height: min(56vh, 420px) !important;
    overflow-y: auto !important;
  }

  .pub-fab-group {
    top: calc(var(--pub-topbar-h) + 10px) !important;
    right: 10px !important;
    gap: 8px !important;
  }
  .pub-fab {
    height: 38px !important;
    min-width: 38px !important;
    box-shadow: 0 5px 14px rgba(0,0,0,.28) !important;
  }

  .drawer-right {
    width: min(420px, 100vw) !important;
  }
  .drawer-head { padding: 16px 18px !important; }
  .drawer-content {
    padding: 16px 18px calc(24px + env(safe-area-inset-bottom)) !important;
    gap: 12px !important;
  }
  .drawer-actions {
    padding-bottom: env(safe-area-inset-bottom) !important;
  }

  .bottom-sheet {
    max-height: 74vh !important;
    padding: 14px 14px calc(16px + env(safe-area-inset-bottom)) !important;
    border-radius: 16px 16px 0 0 !important;
  }

  .map-note {
    top: calc(var(--pub-topbar-h) + 10px) !important;
    left: 10px !important;
    right: auto !important;
    max-width: calc(100vw - 84px) !important;
    font-size: 11px !important;
  }
}

@media (max-width: 600px) {
  .pub-brand-name {
    max-width: min(230px, 58vw);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .pub-search-wrap { width: 74px !important; }
  .pub-search-wrap:focus-within,
  .pub-search-wrap.expanded { width: auto !important; }
}

@media (prefers-reduced-motion: reduce), (max-width: 900px) {
  .listing-tile-pin .ltp-dot,
  .listing-pulse-pin::after,
  .map-loading-spinner {
    animation: none !important;
  }
}

/* Phase 2B: compact, touch-safe public map controls. */
.pub-search-clear {
  display: none;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.78);
  font: 700 20px/1 Arial, sans-serif;
  cursor: pointer;
}
.pub-search-box.has-query .pub-search-clear {
  display: grid;
}
.pub-search-clear:hover,
.pub-search-clear:focus-visible {
  background: rgba(255,255,255,.15);
  color: #fff;
  outline: 2px solid rgba(59,130,246,.5);
  outline-offset: 1px;
}
.pub-search-box.is-searching .pub-search-icon {
  animation: pubSpin .8s linear infinite;
}

@media (max-width: 900px) {
  button,
  .btn,
  .pub-fab,
  .icon-button,
  .search-result,
  .result-card,
  .filter-chip span,
  .layer-list label {
    touch-action: manipulation;
  }

  .pub-search-wrap {
    top: calc(9px + env(safe-area-inset-top, 0px)) !important;
  }
  .pub-search-box {
    height: 44px !important;
    box-shadow: 0 3px 10px rgba(0,0,0,.28) !important;
  }
  .pub-search-clear {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }
  .pub-search-results {
    border-radius: 12px !important;
    box-shadow: 0 8px 22px rgba(0,0,0,.38) !important;
    overscroll-behavior: contain;
  }
  .search-result {
    min-height: 52px;
    padding: 11px 14px;
  }

  .pub-fab-group {
    top: calc(var(--pub-topbar-h) + 12px + env(safe-area-inset-top, 0px)) !important;
  }
  .pub-fab {
    width: auto;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px;
    box-shadow: 0 3px 10px rgba(0,0,0,.25) !important;
  }
  .pub-fab-badge {
    animation: none !important;
  }
  .pub-menu-toggle {
    min-width: 44px;
    min-height: 44px;
  }

  .drawer,
  .pub-results {
    padding-top: env(safe-area-inset-top, 0px) !important;
    overscroll-behavior: contain;
  }
  .drawer-head {
    min-height: 64px;
    padding: 12px 14px !important;
  }
  .drawer-content {
    padding: 12px 14px calc(20px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .drawer-actions {
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .icon-button,
  .pub-results-close {
    min-width: 44px;
    min-height: 44px;
  }
  .filter-chip span {
    min-height: 44px;
    padding: 8px 13px;
  }
  .layer-list label {
    min-height: 50px;
    padding: 11px 13px;
  }
  .layer-list input[type="checkbox"] {
    width: 22px;
    height: 22px;
  }
  .filter-price-row .input,
  .drawer .input,
  .drawer .select {
    min-height: 46px;
    font-size: 16px;
  }

  .bottom-sheet {
    max-height: min(72vh, calc(100dvh - 92px)) !important;
    padding: 22px 14px calc(16px + env(safe-area-inset-bottom, 0px)) !important;
    border-radius: 18px 18px 0 0 !important;
    box-shadow: 0 -8px 26px rgba(0,0,0,.36) !important;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }
  .bottom-sheet::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    width: 42px;
    height: 4px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: rgba(255,255,255,.28);
  }
  .bottom-sheet .sheet-actions {
    position: sticky;
    bottom: calc(-16px - env(safe-area-inset-bottom, 0px));
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, rgba(5,9,20,0), rgba(5,9,20,.98) 22%);
  }

  .tile-loading-indicator {
    bottom: calc(14px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .tile-loading-indicator-inner {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(5,9,20,.84) !important;
    box-shadow: 0 3px 10px rgba(0,0,0,.24) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pub-search-box.is-searching .pub-search-icon,
  .pub-fab-badge,
  .map-progress-bar::after,
  .tile-loading-indicator-spinner {
    animation: none !important;
  }
  .bottom-sheet,
  .drawer,
  .pub-results,
  .pub-search-wrap,
  .pub-search-input,
  .tile-loading-indicator {
    transition-duration: .01ms !important;
    animation: none !important;
  }
}


/* ──────────────────────────────────────────────────────────
   Mobile UX correction: compact controls + dedicated zoom slider
   ────────────────────────────────────────────────────────── */
.mobile-zoom-control { display: none; }
@media (max-width: 900px) {
  /* Parcels are the product. Keep controls compact and leave the map visible. */
  .pub-fab-group {
    top: calc(var(--pub-topbar-h, 58px) + 8px) !important;
    right: 8px !important;
    gap: 5px !important;
  }
  .pub-fab {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    border-radius: 10px !important;
    justify-content: center !important;
    gap: 0 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.26) !important;
  }
  .pub-fab svg { width: 14px !important; height: 14px !important; }
  .pub-fab span:not(.pub-fab-badge) { display: none !important; }
  .pub-fab-sale { width: 34px !important; padding: 0 !important; }
  .pub-fab-sale span:not(.pub-fab-badge) { display: none !important; }
  .pub-fab-badge {
    min-width: 16px !important;
    height: 16px !important;
    top: -4px !important;
    left: -4px !important;
    font-size: 9px !important;
    padding: 0 3px !important;
    animation: none !important;
  }

  .drawer-right {
    width: min(300px, 84vw) !important;
    background: rgba(7,12,22,.96) !important;
  }
  .drawer-head {
    min-height: 46px !important;
    padding: 8px 10px !important;
  }
  .drawer-head h2 { font-size: 15px !important; }
  .drawer-content {
    padding: 8px 10px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    gap: 8px !important;
  }
  .drawer-actions {
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)) !important;
    gap: 7px !important;
  }
  .filter-section { margin-bottom: 6px !important; }
  .filter-section h3,
  .layer-group-title { font-size: 10.5px !important; margin: 4px 0 !important; }
  .filter-chips-group { gap: 5px !important; }
  .filter-chip span {
    min-height: 30px !important;
    padding: 5px 9px !important;
    font-size: 11.5px !important;
    border-radius: 10px !important;
  }
  .layer-list { gap: 5px !important; }
  .layer-list label {
    min-height: 34px !important;
    padding: 7px 9px !important;
    font-size: 11.5px !important;
    border-radius: 9px !important;
  }
  .layer-list input[type="checkbox"] {
    width: 17px !important;
    height: 17px !important;
  }
  .drawer .input,
  .drawer .select,
  .filter-price-row .input {
    min-height: 34px !important;
    height: 34px !important;
    font-size: 13px !important;
    padding: 5px 8px !important;
  }
  .btn, .icon-button, .pub-results-close {
    min-height: 34px !important;
  }
  .icon-button {
    width: 34px !important;
    height: 34px !important;
    font-size: 18px !important;
  }

  .pub-search-wrap {
    top: calc(7px + env(safe-area-inset-top, 0px)) !important;
    right: 8px !important;
    height: 36px !important;
  }
  .pub-search-box {
    height: 36px !important;
    padding: 0 10px !important;
  }
  .pub-search-clear { width: 30px !important; height: 30px !important; flex-basis: 30px !important; }

  .mobile-zoom-control {
    position: absolute;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    left: 8px;
    top: calc(var(--pub-topbar-h, 58px) + 12px);
    z-index: 12;
    padding: 6px 5px;
    border-radius: 14px;
    background: rgba(5,9,20,.82);
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 4px 14px rgba(0,0,0,.28);
    touch-action: none;
    user-select: none;
  }
  .mobile-zoom-control[hidden] { display: none !important; }
  .mobile-zoom-btn {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 10px;
    background: rgba(255,255,255,.11);
    color: #fff;
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
    display: grid;
    place-items: center;
    font-family: Arial, Tahoma, sans-serif;
  }
  .mobile-zoom-btn:active { transform: scale(.96); background: rgba(16,185,129,.32); }
  .mobile-zoom-slider-wrap {
    width: 32px;
    height: 118px;
    display: grid;
    place-items: center;
    overflow: visible;
  }
  .mobile-zoom-slider {
    width: 112px;
    height: 24px;
    transform: rotate(-90deg);
    accent-color: var(--identity-primary, #10b981);
  }
  .mobile-zoom-slider::-webkit-slider-thumb { cursor: pointer; }

  .pub-legend:not(.pub-zoom-indicator) { display: none !important; }
  .pub-zoom-indicator {
    left: 8px !important;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    min-width: 88px !important;
    padding: 7px 9px !important;
    font-size: 10px !important;
  }
  .pub-zoom-value { font-size: 14px !important; }
  .pub-zoom-hint { display: none !important; }

  .bottom-sheet {
    max-height: 68vh !important;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    border-radius: 16px 16px 0 0 !important;
  }
}
.public-map-type-switcher{
  display:inline-flex;
  align-items:center;
  gap:3px;
  margin-top:10px;
  padding:4px;
  direction:rtl;
  border:1px solid rgba(255,255,255,.22);
  border-radius:12px;
  background:rgba(15,23,42,.88);
  box-shadow:0 8px 24px rgba(15,23,42,.28);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}
.public-map-type-switcher button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:34px;
  padding:7px 13px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:rgba(255,255,255,.72);
  font:800 12px/1.2 Tajawal,Arial,sans-serif;
  cursor:pointer;
  transition:background .18s ease,color .18s ease,box-shadow .18s ease;
}
.public-map-type-switcher button:hover{
  color:#fff;
  background:rgba(255,255,255,.10);
}
.public-map-type-switcher button.active{
  color:#06281f;
  background:#f8fafc;
  box-shadow:0 2px 8px rgba(0,0,0,.18);
}
.public-map-type-switcher svg{
  width:17px;
  height:17px;
  fill:currentColor;
  flex:0 0 auto;
}
@media (max-width:768px){
  .public-map-type-switcher{
    margin-top:7px;
    border-radius:10px;
  }
  .public-map-type-switcher button{
    min-height:32px;
    padding:6px 10px;
    font-size:11px;
  }
}
