/* Partner Map — Heroes Housing branding: navy + flag red.
   Logo rule (same as Hot Deals): the logo only ever sits on white. */
:root {
  --navy: #14213d;        /* Heroes Housing navy */
  --navy-dark: #0f1e3d;
  --red: #C8102E;         /* flag red */
  --red-dark: #8f0b21;
  --ink: #1b2a3a;
  --muted: #5b6b7b;
  --line: #dbe2ee;
  --bg: #f6f7fc;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 33, 61, .06), 0 4px 14px rgba(20, 33, 61, .07);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 96px; }
body { margin: 0; background: var(--bg); line-height: 1.5; min-height: 100vh; display: flex; flex-direction: column; }
img { max-width: 100%; }
.wrap { width: 100%; max-width: 820px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.notice { background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }

/* ---------- header (same topbar shape as Hot Deals) ---------- */
.topbar { background: #fff; border-bottom: 3px solid var(--red); position: sticky; top: 0; z-index: 1000; padding-top: env(safe-area-inset-top); }
.topbar-inner { display: flex; align-items: center; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); }
.brand img { display: block; height: 56px; width: auto; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-size: 20px; font-weight: 800; letter-spacing: .2px; line-height: 1.15; }
.brand-sub { font-size: 12.5px; color: var(--muted); font-weight: 600; }
@media (max-width: 560px) { .brand img { height: 48px; } .brand-name { font-size: 18px; } }

/* ---------- buttons (same family as Hot Deals) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 12px; font: inherit; font-weight: 700; padding: 10px 14px; cursor: pointer; text-decoration: none; min-height: 44px; line-height: 1.2; white-space: nowrap; }
.btn-text { background: var(--red); color: #fff; }
.btn-text:hover { background: var(--red-dark); }
.btn-call { background: var(--navy); color: #fff; }
.btn-call:hover { background: var(--navy-dark); }
.btn-pin { background: #fff; color: var(--navy); border: 2px solid var(--navy); min-height: 40px; padding: 8px 11px; }

/* ---------- map (front of the app) ---------- */
#map-wrap { background: var(--navy-dark); }
#map { height: 52vh; min-height: 320px; width: 100%; z-index: 0; }
.map-fallback { color: #c8d2e8; font-size: 14px; text-align: center; padding: 120px 20px 0; margin: 0; }

/* ---------- directory ---------- */
#directory { flex: 1; padding-top: 12px; padding-bottom: 30px; outline: none; }
.search-row { position: sticky; top: 84px; padding: 4px 0 8px; background: var(--bg); z-index: 10; }
#search { width: 100%; font-size: 16px; padding: 11px 14px; border-radius: 12px; border: 2px solid var(--line); background: #fff; color: var(--ink); outline: none; }
#search:focus { border-color: var(--navy); }
.state-head { display: flex; align-items: baseline; gap: 8px; margin: 18px 2px 8px; font-size: 16px; color: var(--navy); }
.state-head .count { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.row { display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; box-shadow: var(--shadow); cursor: pointer; }
.row .info { flex: 1; min-width: 0; }
.row .nm { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .ct { font-size: 13px; color: var(--muted); }
.row.no-match, .state-block.no-match { display: none; }
.note { font-size: 12.5px; color: var(--muted); margin: 14px 2px 0; line-height: 1.45; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: #fff; padding: 18px 0 26px; font-size: 13.5px; color: var(--muted); }
.footer-main { color: var(--navy); }
.footer a { color: var(--navy); }
.footer .fine { font-size: 12.5px; }

/* ---------- map popup (partner detail) ---------- */
.pop .nm { font-weight: 800; font-size: 15px; color: var(--ink); }
.pop .ct { font-size: 13px; color: var(--muted); margin: 2px 0 4px; }
.pop .ph { font-size: 13.5px; font-weight: 600; margin: 0 0 9px; }
.pop .btn { margin-right: 6px; padding: 8px 12px; min-height: 40px; }
.leaflet-popup-content { margin: 13px 14px; }
