/* Homegroup map — styles. Brand palette: see style/design info/ */
/* Liberté brand palette — see style/design info/design info.pdf */
:root{
  --navy:#272940;   /* primary ink, buttons, pins */
  --sage:#8CA28E;   /* cards, active state */
  --sky:#73A2E4;    /* accent, links */
  --tan:#DFA068;    /* "you are here" pin */
  --paper:#E3E3DF;  /* page background */
  --slate:#516C88;  /* secondary text */
  --white:#FFFFFF;
  --line:#D3D5CF;
  --sans:Raleway,system-ui,sans-serif;
  --serif:Merriweather,Georgia,serif;
}
*{box-sizing:border-box}
html,body{margin:0;height:100%;background:var(--paper);color:var(--navy);font-family:var(--sans);font-weight:500}
body{display:flex;flex-direction:column}

header{background:var(--navy);color:var(--paper);padding:18px 24px 16px;display:flex;align-items:flex-start;gap:20px;flex-wrap:nowrap}
header>div:first-child{flex:1 1 22rem;min-width:0}   /* title wraps inside its column instead of pushing the toggle down */
.brand{margin:0 0 4px;font-size:.78rem;letter-spacing:.18em;text-transform:uppercase;color:var(--sky);font-weight:600}
header h1{margin:0;font-family:var(--serif);font-weight:700;font-size:1.55rem;line-height:1.2}
header p{margin:0;color:var(--paper);opacity:.85;font-size:.95rem;max-width:34rem}
header>p[data-t="intro"]{flex:1 1 22rem;max-width:34rem;padding-top:4px}
header>p.intro-short{display:none}

main{flex:1;display:grid;grid-template-columns:400px 1fr;min-height:0}
aside{background:var(--white);border-right:1px solid var(--line);display:flex;flex-direction:column;min-height:0}
.locate{margin:14px;padding:12px 16px;border:2px solid var(--navy);background:var(--white);color:var(--navy);border-radius:999px;font:inherit;font-weight:700;cursor:pointer;display:flex;gap:10px;align-items:center;justify-content:center}
.locate:hover,.locate:focus-visible{background:var(--navy);color:var(--paper);outline:none}
.locate[disabled]{opacity:.6;cursor:wait}
.status{margin:-6px 14px 8px;font-size:.85rem;color:var(--slate);min-height:1.2em}

ul{list-style:none;margin:0;padding:0;overflow:auto}
li{border-top:1px solid var(--line)}
li button{width:100%;text-align:left;background:none;border:0;padding:16px 18px;font:inherit;color:inherit;cursor:pointer;display:grid;grid-template-columns:56px 1fr auto;gap:14px;align-items:start;transition:background .15s}
li button:hover,li button:focus-visible,li.active button{background:var(--sage);color:var(--white);outline:none}
li button:hover .meta,li button:focus-visible .meta,li.active .meta,
li button:hover .dist,li button:focus-visible .dist,li.active .dist,
li button:hover .name,li button:focus-visible .name,li.active .name{color:var(--white)}
.thumb{width:56px;height:56px;border-radius:50%;object-fit:cover;background:var(--paper);border:2px solid var(--white);box-shadow:0 1px 3px rgba(39,41,64,.2)}
.dot{width:56px;height:56px;border-radius:50%;background:var(--navy);color:var(--paper);display:grid;place-items:center;font-family:var(--serif);font-weight:700}
.name{font-family:var(--serif);font-weight:700;font-size:1.05rem;color:var(--navy)}
.meta{color:var(--slate);font-size:.9rem;margin-top:3px}
.dist{font-size:.85rem;color:var(--slate);white-space:nowrap;padding-top:3px;font-weight:600}

#map{height:100%;min-height:420px;background:var(--paper)}

/* Popups */
.leaflet-popup-content-wrapper{border-radius:14px;box-shadow:0 6px 22px rgba(39,41,64,.28);padding:0;overflow:hidden}
.leaflet-popup-content{margin:0;font-family:var(--sans);font-weight:500;font-size:14px;line-height:1.45;color:var(--navy)}
.leaflet-popup-content p{margin:0}
.leaflet-container a.leaflet-popup-close-button{top:8px;right:8px;width:26px;height:26px;font-size:20px;line-height:26px;color:var(--slate)}
.leaflet-popup-tip{box-shadow:none}
.pop{padding:16px 18px 16px}
.pop-head{display:flex;gap:12px;align-items:center;margin-bottom:10px;padding-right:16px}
.face{width:60px;height:60px;border-radius:50%;object-fit:cover;flex:none;background:var(--paper);border:3px solid var(--sage)}
.pop .banner{display:block;width:100%;aspect-ratio:900/320;height:auto;object-fit:contain;background:var(--navy)}
.pop.church~a.leaflet-popup-close-button,.leaflet-popup:has(.pop.church) a.leaflet-popup-close-button{color:var(--paper)}
.pop.church .body{padding:14px 18px 16px}
.pop.church{padding:0}
.pop h3{margin:0;font-family:var(--serif);font-weight:700;font-size:17px;line-height:1.25;color:var(--navy)}
.pop .who{margin-top:3px;color:var(--slate);font-size:13px;font-weight:600}
.pop .when{font-weight:700;font-size:14px;margin-bottom:3px}
.pop .sub{color:var(--slate);font-size:13px}
.pop .note{margin-top:8px;font-size:13px;line-height:1.4}
.pop .tight{margin-bottom:6px}
.pop.me{padding:10px 14px}
.pop .actions{margin-top:12px;display:flex;flex-direction:column;gap:8px}
.leaflet-container .pop a.go{display:block;text-align:center;padding:10px 14px;background:var(--navy);color:var(--paper);border-radius:999px;text-decoration:none;font-weight:700;font-size:13.5px}
.leaflet-container .pop a.go:hover{background:var(--slate);color:var(--white)}
.leaflet-container .pop a.contact{display:block;text-align:center;color:var(--sky);font-weight:600;font-size:13px;text-decoration:none}
.leaflet-container .pop a.contact:hover{color:var(--slate);text-decoration:underline}

/* Church reference point */
.church-marker{border-radius:50%;border:3px solid var(--sage);box-shadow:0 2px 6px rgba(0,0,0,.3);background:var(--navy)}
li.church{margin-top:auto;border-top:2px solid var(--line);background:var(--paper)}
li.church .thumb{border-color:var(--navy);background:var(--navy)}
li.church .name{font-size:.95rem}

.pin{width:36px;height:36px;border-radius:50% 50% 50% 0;transform:rotate(-45deg);background:var(--navy);border:2px solid var(--white);box-shadow:0 2px 6px rgba(0,0,0,.3);display:grid;place-items:center;color:var(--paper);font-family:var(--serif);font-weight:700}
.pin span{transform:rotate(45deg);font-size:.95rem}
.pin.me{background:var(--tan);border-radius:50%;transform:none;animation:pulse 1.6s ease-out infinite}
@keyframes pulse{0%{box-shadow:0 0 0 0 rgba(223,160,104,.65)}100%{box-shadow:0 0 0 18px rgba(223,160,104,0)}}
@media (prefers-reduced-motion:reduce){.pin.me{animation:none}}

/* Language toggle */
.lang{display:inline-flex;border:1.5px solid var(--sky);border-radius:999px;overflow:hidden;flex:none;align-self:flex-start;margin-left:auto}
.lang button{font:inherit;font-weight:700;font-size:.8rem;letter-spacing:.06em;padding:5px 12px;border:0;background:transparent;color:var(--sky);cursor:pointer}
.lang button[aria-pressed="true"]{background:var(--sky);color:var(--navy)}
.lang button:focus-visible{outline:2px solid var(--paper);outline-offset:-2px}

@media (max-width:760px){
  html,body{height:auto;min-height:100%}
  body{display:block}
  header{padding:10px 16px 10px;gap:4px 10px;align-items:center;flex-wrap:wrap}
  .brand{font-size:.68rem;margin:0 0 2px}
  header h1{font-size:1.15rem}
  header>div:first-child{flex:1 1 60%;order:1}
  .lang{order:2;margin-left:0}
  .lang button{padding:4px 10px;font-size:.75rem}
  header>p[data-t="intro"]{display:none}
  header>p.intro-short{display:block;order:3;flex:1 1 100%;font-size:.85rem;padding-top:2px}
  main{display:flex;flex-direction:column;min-height:0}
  #map{order:1;height:min(52vh,460px);min-height:340px;border-bottom:1px solid var(--line)}
  aside{order:2;border-right:0}
  ul{overflow:visible}
  .locate{margin:12px 16px 6px;padding:10px 14px}
  .status{margin:0 16px 6px}
  li button{padding:14px 16px}
  li.church{margin-top:0}
  .pop .banner{aspect-ratio:900/220}
  .pop.church .body{padding:12px 16px 14px}
}

/* Map credits: keep them legible but quiet */
.leaflet-control-attribution{font-family:var(--sans);font-size:10px;color:var(--slate);background:rgba(255,255,255,.75);padding:2px 6px}
.leaflet-control-attribution a{color:var(--slate)}
