/* =========================================================
   ZAMZAM — SERVICE-AREA / LOCATIONS RADAR  (test build)
   Adapted from 5 Star Pros: orange → Zamzam gold (#c9a24a),
   neutral darks → emerald darks, Bebas/Barlow → Playfair/Inter.
   ========================================================= */

/* ---------- layout ---------- */
.radar-section { padding: 100px 60px; background: #081310; position: relative; overflow: hidden; }
.radar-layout { max-width: 1200px; margin: 48px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.radar-vis-wrap { display: flex; justify-content: center; }
.radar-vis {
  position: relative; width: 540px; height: 540px; border-radius: 50%;
  background: radial-gradient(ellipse at center,#10231c 0%,#081410 70%);
  overflow: hidden; flex-shrink: 0;
  box-shadow: 0 0 70px rgba(201,162,74,.16),0 0 140px rgba(201,162,74,.07),inset 0 0 50px rgba(0,0,0,.6);
  border: 1px solid rgba(201,162,74,.24);
}

/* ---------- CSS-only radar (fallback until the live map loads) ---------- */
.radar-sweep {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg,transparent 0deg 310deg,rgba(201,162,74,.02) 310deg 330deg,rgba(201,162,74,.1) 330deg 348deg,rgba(201,162,74,.52) 348deg 360deg);
  animation: sweepRotate 4s linear infinite; transform-origin: center;
}
@keyframes sweepRotate { to { transform: rotate(360deg); } }
.radar-ring {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  border-radius: 50%; border: 1px solid rgba(201,162,74,.18); pointer-events: none;
}
.radar-ring.r25 { width: 80%; height: 80%; border-color: rgba(201,162,74,.42); animation: ringPulse 4s ease-in-out infinite; }
.radar-ring.r15 { width: 48%; height: 48%; border-color: rgba(201,162,74,.2); }
.radar-ring.r8  { width: 25%; height: 25%; border-color: rgba(201,162,74,.14); }
@keyframes ringPulse { 0%,100%{transform:translate(-50%,-50%) scale(1); opacity:.42;} 50%{transform:translate(-50%,-50%) scale(1.05); opacity:.18;} }
.radar-cross-h,.radar-cross-v { position: absolute; background: rgba(201,162,74,.07); pointer-events: none; }
.radar-cross-h { top: 50%; left: 0; right: 0; height: 1px; transform: translateY(-50%); }
.radar-cross-v { left: 50%; top: 0; bottom: 0; width: 1px; transform: translateX(-50%); }
.radar-rlabel { position: absolute; font-size: 9px; font-weight: 700; color: rgba(201,162,74,.55); letter-spacing: 2px; text-transform: uppercase; white-space: nowrap; pointer-events: none; font-family: var(--sans); }
.radar-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); display: flex; align-items: center; justify-content: center; z-index: 10; width: 0; height: 0; }
.rc-pulse { position: absolute; width: 72px; height: 72px; border-radius: 50%; border: 2px solid #c9a24a; opacity: 0; animation: rcPulse 2.4s ease-out infinite; }
.rc-pulse.p2 { animation-delay: 1.2s; }
@keyframes rcPulse { 0%{transform:scale(.2);opacity:.9;} 100%{transform:scale(1);opacity:0;} }
.rc-dot { width: 13px; height: 13px; background: #c9a24a; border-radius: 50%; box-shadow: 0 0 14px #c9a24a,0 0 28px rgba(201,162,74,.55); position: relative; z-index: 2; }
.rc-label { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 9px; font-weight: 700; color: #c9a24a; letter-spacing: 2px; text-transform: uppercase; background: rgba(6,16,12,.9); padding: 2px 7px; border-radius: 2px; z-index: 3; font-family: var(--sans); }
.city-pin { position: absolute; transform: translate(-50%,-50%); z-index: 5; display: flex; align-items: center; justify-content: center; }
.cp-dot { width: 7px; height: 7px; background: rgba(201,162,74,.8); border-radius: 50%; border: 1px solid rgba(201,162,74,.95); box-shadow: 0 0 8px rgba(201,162,74,.45); position: relative; z-index: 2; }
.cp-label { position: absolute; white-space: nowrap; font-size: 9px; font-weight: 700; color: rgba(245,239,225,.72); letter-spacing: 1.5px; text-transform: uppercase; background: rgba(6,16,12,.8); padding: 2px 6px; border-radius: 1px; pointer-events: none; font-family: var(--sans); }
.cp-label.n  { bottom: 12px; left: 50%; transform: translateX(-50%); }
.cp-label.s  { top: 12px;    left: 50%; transform: translateX(-50%); }
.cp-label.e  { left: 12px;   top: 50%; transform: translateY(-50%); }
.cp-label.w  { right: 12px;  top: 50%; transform: translateY(-50%); }
.cp-label.ne { bottom: 9px; left: 10px; }
.cp-label.nw { bottom: 9px; right: 10px; }
.cp-label.se { top: 9px; left: 10px; }
.cp-label.sw { top: 9px; right: 10px; }

/* ---------- info panel (right column) ---------- */
.ri-eyebrow { font-size: 11px; font-weight: 700; color: #c9a24a; letter-spacing: 4px; text-transform: uppercase; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; font-family: var(--sans); }
.ri-eyebrow::before { content: ''; width: 26px; height: 1px; background: #c9a24a; }
.ri-title { font-family: var(--display); font-weight: 600; font-size: 40px; letter-spacing: 1px; line-height: 1.05; color: var(--ivory); margin-bottom: 18px; }
.ri-title span { color: #c9a24a; font-style: italic; }
.ri-desc { font-size: 15px; color: var(--ivory-dim); line-height: 1.85; margin-bottom: 28px; font-family: var(--serif); }
.ri-zones { display: flex; flex-direction: column; gap: 3px; }
.ri-zone { background: #0d1a15; padding: 16px 20px; display: flex; align-items: flex-start; gap: 14px; transition: background .2s; }
.ri-zone:hover { background: #12241d; }
.rz-badge { font-family: var(--sans); font-weight: 700; font-size: 11px; letter-spacing: 1.5px; color: var(--ink); background: #c9a24a; padding: 4px 9px; border-radius: 2px; flex-shrink: 0; margin-top: 1px; }
.rz-name { font-size: 14px; font-weight: 600; color: var(--ivory); margin-bottom: 2px; font-family: var(--serif); }
.rz-cities { font-size: 12.5px; color: rgba(245,239,225,.55); line-height: 1.6; font-family: var(--sans); }

/* self-contained header + CTA so the component drops onto any page */
.radar-head { text-align: center; margin: 0 auto 8px; max-width: 720px; }
.radar-head .r-eye {
  display: block; font-family: var(--sans); font-size: 12px; font-weight: 700;
  letter-spacing: 4px; text-transform: uppercase; color: #c9a24a; margin-bottom: 14px;
}
.radar-head .r-h2 { font-family: var(--display); font-weight: 600; font-size: clamp(30px, 4vw, 46px); line-height: 1.1; color: var(--ivory); }
.radar-head .r-h2 .accent { color: #c9a24a; font-style: italic; }
body.ar .radar-head .r-h2 .accent { font-style: normal; }
.radar-cta {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
  color: var(--ink); background: #c9a24a; border: 1px solid #c9a24a; padding: 14px 26px; border-radius: 2px;
  transition: background .2s, color .2s, border-color .2s;
}
.radar-cta:hover { background: var(--gold-bright); border-color: var(--gold-bright); }

/* the section's own header + layout sit above the map; buttons/links stay clickable */
.radar-section .radar-head, .radar-section .radar-layout { position: relative; z-index: 3; }
.radar-section.map-bg .radar-head, .radar-section.map-bg .radar-layout { pointer-events: none; }
.radar-section.map-bg .radar-layout a, .radar-section.map-bg .radar-layout .ri-zone,
.radar-section.map-bg .radar-layout .radar-cta { pointer-events: auto; }
.radar-section.map-bg .radar-vis { background: transparent; box-shadow: 0 0 90px rgba(201,162,74,.18),0 0 180px rgba(201,162,74,.08); }

/* ---------- live MapLibre layer ---------- */
#radarMap { position: absolute; inset: 0; z-index: 1; opacity: 0; transition: opacity .9s ease; }
.radar-section.map-bg #radarMap { opacity: 1; }
#radarMap .maplibregl-canvas { outline: none; }
#radarMap .maplibregl-ctrl-attrib { background: rgba(6,16,12,.7); font-size: 9px; }
#radarMap .maplibregl-ctrl-attrib a { color: #7d8a80; }
#radarMap .maplibregl-cooperative-gesture-screen { display: none; }
@media (hover: none) {
  #radarMap .maplibregl-cooperative-gesture-screen {
    display: flex; align-items: center; justify-content: center; text-align: center;
    padding: 0 34px; background: rgba(6,16,12,.75); color: var(--ivory);
    font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: 1px;
  }
}

/* dim veil over the map everywhere EXCEPT the radar circle (the "lens") */
.rm-dim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: rgba(5,13,10,.9);
  --hx: 50%; --hy: 50%; --hr: 270px;
  -webkit-mask-image: radial-gradient(circle at var(--hx) var(--hy), transparent calc(var(--hr) - 26px), rgba(0,0,0,.45) calc(var(--hr) + 40px), rgba(0,0,0,.8) calc(var(--hr) + 150px), #000 calc(var(--hr) + 300px));
  mask-image: radial-gradient(circle at var(--hx) var(--hy), transparent calc(var(--hr) - 26px), rgba(0,0,0,.45) calc(var(--hr) + 40px), rgba(0,0,0,.8) calc(var(--hr) + 150px), #000 calc(var(--hr) + 300px));
}

/* once the live map runs, hide the CSS-only radar props (sweep stays as overlay) */
.radar-vis.map-live .radar-ring, .radar-vis.map-live .radar-cross-h, .radar-vis.map-live .radar-cross-v,
.radar-vis.map-live .radar-rlabel, .radar-vis.map-live .radar-center, .radar-vis.map-live .city-pin,
.radar-vis.map-live .radar-sweep { display: none; }

/* overlay: sweep + vignette + hint (never blocks map input) */
.rm-overlay { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; pointer-events: none; z-index: 6; }
.rm-sweep {
  position: absolute; inset: 0; border-radius: 50%; opacity: .4; will-change: transform;
  background: conic-gradient(from 0deg,transparent 0deg 318deg,rgba(201,162,74,.02) 318deg 334deg,rgba(201,162,74,.08) 334deg 350deg,rgba(201,162,74,.35) 350deg 360deg);
  animation: sweepRotate 6s linear infinite;
}
.rm-vignette { position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 90px rgba(0,0,0,.85), inset 0 0 26px rgba(201,162,74,.09); }
.rm-hint {
  position: absolute; top: 7%; left: 50%; transform: translateX(-50%); white-space: nowrap;
  font-size: 9px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: rgba(245,239,225,.62); background: rgba(6,16,12,.8); padding: 5px 12px; border-radius: 20px;
  border: 1px solid rgba(201,162,74,.28); font-family: var(--sans);
}

/* interactive key — click to fly between locations */
.rm-key {
  position: absolute; left: 28px; top: 50%; transform: translateY(-50%); z-index: 4;
  display: flex; flex-direction: column; gap: 7px; width: 186px;
  background: rgba(6,16,12,.82); border: 1px solid rgba(201,162,74,.24); border-radius: 10px;
  padding: 14px 12px; opacity: 0; transition: opacity .9s ease; pointer-events: auto;
}
.radar-section.map-bg .rm-key { opacity: 1; }
.rm-key-title {
  font-size: 10px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase;
  color: #c9a24a; margin-bottom: 5px; padding-left: 2px; font-family: var(--sans);
}
.rm-key-btn {
  display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer;
  background: transparent; border: 1px solid rgba(201,162,74,.3); border-radius: 7px;
  padding: 7px 10px; font-family: var(--sans); font-size: 10px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase; color: var(--ivory); transition: background .2s, color .2s, border-color .2s;
}
.rm-key-btn small { display: block; font-size: 8.5px; font-weight: 600; letter-spacing: 1px; color: rgba(245,239,225,.5); margin-top: 1px; }
.rm-key-btn:hover { border-color: #c9a24a; background: rgba(201,162,74,.12); color: var(--gold-bright); }
.rm-key-btn.active { background: #c9a24a; border-color: #c9a24a; color: var(--ink); }
.rm-key-btn.active small { color: rgba(10,22,18,.65); }
.rm-key-dot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid #c9a24a; flex-shrink: 0; }
.rm-key-dot.filled { background: #c9a24a; box-shadow: 0 0 7px rgba(201,162,74,.5); }
.rm-key-btn.active .rm-key-dot { border-color: var(--ink); }
.rm-key-btn.active .rm-key-dot.filled { background: var(--ink); box-shadow: none; }

/* map controls: auto-spin switch + re-center / north */
.rm-key-ctrls { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; padding-top: 11px; border-top: 1px solid rgba(201,162,74,.2); }
.rm-tgl {
  flex: 1 1 100%; display: flex; align-items: center; justify-content: space-between; cursor: pointer;
  background: transparent; border: 1px solid rgba(201,162,74,.3); border-radius: 7px; padding: 7px 10px;
  font-family: var(--sans); font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ivory);
  transition: border-color .2s, color .2s;
}
.rm-tgl:hover { border-color: #c9a24a; color: var(--gold-bright); }
.rm-tgl-track { width: 28px; height: 15px; border-radius: 9px; border: 1px solid rgba(201,162,74,.5); position: relative; transition: background .2s, border-color .2s; flex-shrink: 0; }
.rm-tgl-knob { position: absolute; top: 1px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: rgba(245,239,225,.5); transition: left .2s, background .2s; }
.rm-tgl.on .rm-tgl-track { background: #c9a24a; border-color: #c9a24a; }
.rm-tgl.on .rm-tgl-knob { left: 13px; background: var(--ink); }
.rm-ctl {
  flex: 1 1 calc(50% - 3px); display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
  background: transparent; border: 1px solid rgba(201,162,74,.3); border-radius: 7px; padding: 7px 6px;
  font-family: var(--sans); font-size: 9.5px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ivory);
  transition: background .2s, color .2s, border-color .2s;
}
.rm-ctl:hover { border-color: #c9a24a; background: rgba(201,162,74,.12); color: var(--gold-bright); }
.rm-ctl-ico { color: #c9a24a; display: inline-flex; line-height: 1; }
.rm-needle { transition: transform .15s linear; }

/* distance lookup */
.rm-zip { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; padding-top: 11px; border-top: 1px solid rgba(201,162,74,.2); }
.rm-zip-in {
  flex: 1 1 auto; min-width: 0; width: 80px;
  background: rgba(245,239,225,.06); border: 1px solid rgba(201,162,74,.3); border-radius: 7px;
  padding: 7px 10px; color: var(--ivory); font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: 1px; outline: none;
}
.rm-zip-in::placeholder { color: rgba(245,239,225,.45); text-transform: uppercase; letter-spacing: 1.2px; font-size: 9.5px; }
.rm-zip-in:focus { border-color: #c9a24a; }
.rm-zip-go {
  flex: 0 0 auto; background: #c9a24a; color: var(--ink); border: 1px solid #c9a24a; border-radius: 7px;
  padding: 7px 13px; font-family: var(--sans); font-weight: 700; font-size: 10px; letter-spacing: 1.5px; cursor: pointer;
  transition: background .2s;
}
.rm-zip-go:hover { background: var(--gold-bright); }
.rm-zip-msg { flex: 1 1 100%; font-size: 8.5px; font-weight: 700; letter-spacing: .8px; color: rgba(245,239,225,.6); text-transform: uppercase; min-height: 11px; line-height: 1.5; font-family: var(--sans); }
.rm-zip-msg.ok { color: #6bc98a; }
.rm-zip-msg.err { color: #e07a6a; }
.rm-zip-msg.warn { color: var(--gold-bright); }

/* visitor's location pin */
.rm-zip-pin { position: relative; width: 0; height: 0; display: flex; align-items: center; justify-content: center; }
.rm-zip-pin-dot { width: 12px; height: 12px; background: var(--ivory); border: 2px solid #c9a24a; border-radius: 50%; box-shadow: 0 0 12px rgba(245,239,225,.7); position: relative; z-index: 2; flex-shrink: 0; }
.rm-zip-pin-pulse { position: absolute; width: 58px; height: 58px; border-radius: 50%; border: 2px solid var(--ivory); opacity: 0; animation: rcPulse 2s ease-out infinite; flex-shrink: 0; }
.rm-zip-pin-label { position: absolute; top: 11px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 9px; font-weight: 700; color: var(--ink); letter-spacing: 1.5px; background: var(--ivory); padding: 2px 7px; border-radius: 2px; z-index: 3; font-family: var(--sans); }

/* residences beacon marker */
.rm-hq { position: relative; width: 0; height: 0; display: flex; align-items: center; justify-content: center; }
.rm-hq-dot { width: 13px; height: 13px; background: #c9a24a; border-radius: 50%; box-shadow: 0 0 14px #c9a24a,0 0 28px rgba(201,162,74,.55); position: relative; z-index: 2; flex-shrink: 0; }
.rm-hq-pulse { position: absolute; width: 72px; height: 72px; border-radius: 50%; border: 2px solid #c9a24a; opacity: 0; animation: rcPulse 2.4s ease-out infinite; flex-shrink: 0; }
.rm-hq-pulse.d2 { animation-delay: 1.2s; }
.rm-hq-label { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 9px; font-weight: 700; color: #c9a24a; letter-spacing: 2px; text-transform: uppercase; background: rgba(6,16,12,.9); padding: 2px 7px; border-radius: 2px; z-index: 3; font-family: var(--sans); }

/* location pin markers (clickable → listings / contact) */
.rm-pin { position: relative; width: 0; height: 0; display: flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer; }
.rm-pin-dot { width: 8px; height: 8px; background: rgba(201,162,74,.85); border-radius: 50%; border: 1px solid rgba(201,162,74,.95); box-shadow: 0 0 8px rgba(201,162,74,.5); flex-shrink: 0; transition: transform .2s; }
.rm-pin-label { position: absolute; top: 9px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 9px; font-weight: 700; color: rgba(245,239,225,.8); letter-spacing: 1.5px; text-transform: uppercase; background: rgba(6,16,12,.85); padding: 2px 6px; border-radius: 1px; transition: color .2s, background .2s; font-family: var(--sans); }
.rm-pin:hover .rm-pin-dot { transform: scale(1.5); }
.rm-pin:hover .rm-pin-label { color: var(--ink); background: #c9a24a; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .radar-section { padding: 74px 24px; }
  .radar-layout { grid-template-columns: 1fr; gap: 44px; }
  .radar-vis { width: 380px; height: 380px; }
  .rm-key {
    position: relative; z-index: 4; left: auto; top: auto; transform: none;
    margin: 34px auto 0; flex-direction: row; flex-wrap: wrap; justify-content: center;
    width: auto; max-width: 480px; padding: 8px; gap: 6px;
  }
  .rm-key-title { display: none; }
  .rm-key-btn { padding: 6px 9px; }
  .rm-key-btn small { display: none; }
  .rm-key-ctrls { display: contents; }
  .rm-tgl, .rm-ctl { flex: 0 0 auto; gap: 8px; }
  .rm-zip { flex: 1 1 100%; border-top: none; padding-top: 2px; margin-top: 0; }
  .rm-zip-in { font-size: 16px; } /* ≥16px stops iOS auto-zoom on focus */
}
@media (max-width: 480px) {
  .radar-vis { width: 300px; height: 300px; }
  .rm-hint { font-size: 8px; top: 6%; max-width: 86%; white-space: normal; text-align: center; line-height: 1.5; }
}
@media (prefers-reduced-motion: reduce) {
  .rm-sweep { animation: none; opacity: .18; }
  .rc-pulse, .radar-ring.r25 { animation: none; }
}
