/* =====================================================
   VSRA Shared Stylesheet
   Vancouver Seniors Resource Alliance
   ===================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  font-family: 'Poppins', sans-serif;
  background-color: #fafaf8;
  font-size: 17px;
  line-height: 1.6;
}
html { overflow-x: clip; }

body { display: flex; flex-direction: column; min-height: 100vh; }

/* ── HEADER ── */
header {
  background: #1a2b4a;
  color: white;
  padding: 0 1rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
}

.logo {
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: opacity 0.2s;
  text-decoration: none;
  color: white;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo:hover { opacity: 0.9; }

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  min-width: 0;
}

.logo-name {
  font-size: 1.2rem;
  font-weight: 700;
  white-space: nowrap;
}

.logo-sub {
  font-size: 0.6rem;
  font-weight: 500;
  opacity: 0.82;
  line-height: 1.2;
  white-space: nowrap;
  margin-top: 0.12rem;
}

.nav-group { display: flex; align-items: center; gap: 0.75rem; }

.nav-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 0.95rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.2s;
  text-decoration: none;
  display: inline-block;
}
.nav-btn:hover { background-color: rgba(255,255,255,0.15); }
.nav-btn.active { background-color: rgba(255,255,255,0.2); }

.hamburger {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  transition: transform 0.2s;
}
.hamburger:hover { transform: scale(1.1); }
.hamburger.active { transform: rotate(90deg); }

@media (max-width: 1100px) {
  .nav-btn { display: none; }
}
@media (max-width: 480px) {
  header { padding: 0 0.75rem; height: 60px; }
  .logo-name { font-size: 0.92rem; }
  .logo-sub { font-size: 0.5rem; }
  .nav-group { gap: 0.35rem; }
  .hamburger { font-size: 1.25rem; }
}

/* ── MENU DRAWER ── */
.menu-drawer {
  position: fixed;
  left: 0; top: 0;
  width: 280px;
  height: 100vh;
  background: white;
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 99;
  overflow-y: auto;
  padding-top: 64px;
}
.menu-drawer.active { transform: translateX(0); }

.menu-drawer h3 {
  padding: 1rem 1.5rem 0.5rem;
  font-size: 0.95rem;
  color: #2d5f4f;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 1rem;
}

.menu-drawer a,
.menu-drawer button {
  display: block;
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: none;
  border: none;
  text-align: left;
  color: #333;
  text-decoration: none;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  transition: background-color 0.2s;
}
.menu-drawer a:hover,
.menu-drawer button:hover { background-color: #f0f0f0; }

.menu-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 98;
}
.menu-overlay.active { opacity: 1; visibility: visible; }

/* ── MAIN ── */
main { flex: 1; padding: 64px 1rem 1.5rem; }

.container { max-width: 1200px; margin: 0 auto; width: 100%; }

/* ── HERO ── */
.hero {
  position: relative;
  background: #1a2b4a;
  overflow: hidden;
  color: white;
  padding: 1.75rem max(1.8rem, calc(50vw - 600px)) 2.35rem;
  border-radius: 0;
  margin: -1.5rem calc(-50vw + 50%) 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 0.95rem;
  align-items: start;
  transition: gap 0.14s ease-out, padding 0.14s ease-out;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(26, 43, 74, 0.9); /* #1a2b4a with opacity */
  z-index: 1;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -120px;
  bottom: -120px;
  inset: 0;
  background-image: url('images/library-seniors.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center 60%;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.hero > :first-child {
  min-width: 0;
  max-width: 28rem;
  margin-top: 0.16rem;
}

.hero-pretitle {
  font-size: 0.76rem;
  font-weight: 400;
  opacity: 0.8;
  margin-bottom: 0.14rem;
  transition: font-size 0.14s ease-out, margin-bottom 0.14s ease-out;
}
.hero-title {
  font-size: clamp(2.52rem, 5.4vw, 3.55rem);
  font-weight: 700;
  margin-bottom: 0.28rem;
  line-height: 0.98;
  transition: font-size 0.14s ease-out, margin-bottom 0.14s ease-out;
}
.hero-subtitle {
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
  opacity: 0.9;
  line-height: 1.32;
  max-width: 24rem;
  transition: font-size 0.14s ease-out, margin-bottom 0.14s ease-out, max-width 0.14s ease-out;
}
.hero-subtitle-mobile { display: none; }
.hero-subtitle-desktop,
.hero-subtitle-mobile { display: block; }

@media (max-width: 800px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 0.58rem;
    padding: 1.55rem 1.2rem 1.95rem;
    margin: -1.5rem -1rem 0;
  }
  .hero > :first-child {
    max-width: 26rem;
  }
  .hero-news-panel { display: none; }
}
@media (min-width: 801px) and (max-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 286px;
    padding: 1.52rem 1.18rem 1.85rem;
    gap: 0.7rem;
  }
  .hero > :first-child {
    padding-top: 0.12rem;
    padding-bottom: 0.24rem;
  }
  .hero-pretitle { font-size: 0.72rem; }
  .hero-subtitle { font-size: 0.77rem; margin-bottom: 0.42rem; max-width: 22rem; }
}
@media (min-width: 961px) {
  .hero > :first-child {
    padding-top: 0.12rem;
    padding-bottom: 0.24rem;
  }
}
@media (max-width: 640px) {
  .hero {
    padding: 1.25rem 0.72rem 1.55rem;
    gap: 0.44rem;
  }
  .hero > :first-child {
    max-width: 100%;
  }
  .hero-subtitle { font-size: 0.74rem; max-width: 18.5rem; }
}

:root {
  --type-body: 1rem;
  --type-body-small: 0.92rem;
  --type-heading-1: clamp(2rem, 3.4vw, 2.4rem);
  --type-heading-2: 1.5rem;
  --type-heading-3: 1.2rem;
  --vsra-teal-btn: #58c7c0;
  --vsra-teal-btn-hover: #46b8b1;
  --vsra-urgent-yellow: #ffd700;
  --vsra-urgent-yellow-hover: #ffea57;
}

.hero-button {
  background-color: var(--vsra-teal-btn);
  color: #142033;
  border: none;
  padding: 0.66rem 1rem;
  font-size: 0.92rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.14s ease-out, transform 0.14s ease-out, padding 0.14s ease-out, font-size 0.14s ease-out;
  display: inline-block;
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
  white-space: nowrap;
}
.hero-button:hover {
  background-color: var(--vsra-teal-btn-hover);
  transform: translateY(-1px);
}

.hero-button-primary {
  background: #ffffff;
  color: #142033;
  box-shadow: 0 10px 22px rgba(10, 20, 34, 0.18);
}
.hero-button-primary:hover {
  background: #f2f7fb;
}

.hero-button-map {
  border: 1px solid rgba(255, 255, 255, 0.80);
  background-image:
    linear-gradient(rgba(0,0,0,0.30), rgba(0,0,0,0.30)), /* darken map layer */
    linear-gradient(rgba(45,95,79,0.75), rgba(45,95,79,0.75)), /* green overlay */
    url("maps/map-button.png");
  background-size: cover;
  background-position: center;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

.hero-button-map:hover {
  background-image:
    linear-gradient(rgba(0,0,0,0.20), rgba(0,0,0,0.20)),
    linear-gradient(rgba(26,43,74,0.75), rgba(26,43,74,0.75)),
    url("maps/map-button.png");
  transform: translateY(-1px);
}

.hero-news-panel {
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 1.2rem 1.5rem;
  backdrop-filter: blur(4px);
  margin-top: 0.16rem;
}
.hero-news-panel h3,
.hero-news-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  opacity: 1;
  color: white;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.3);
}
.hero-news-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.hero-news-item:last-of-type { border-bottom: none; }
.hero-news-item .hn-date { font-size: 0.7rem; opacity: 0.6; margin-bottom: 0.15rem; }
.hero-news-item .hn-title {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
  transition: opacity 0.15s;
}
.hero-news-item .hn-title:hover { opacity: 0.8; text-decoration: underline; }
.hero-news-more {
  margin-top: 0.9rem;
  background: rgba(255,255,255,0.18);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  font-family: 'Poppins', sans-serif;
  text-decoration: none;
  display: inline-block;
}
.hero-news-more:hover { background: rgba(255,255,255,0.28); }

.hero-feature-list {
  list-style: none;
  display: grid;
  gap: 0.22rem;
  margin: 0 0 0.85rem;
  padding: 0;
}
.hero-feature-list li {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  font-size: 0.9rem;
  line-height: 1.34;
  opacity: 0.92;
}
@media (max-width: 1100px) {
  .hero-feature-list { display: none; }
}

/* ── SEARCH ── */
.search-container {
  background: white;
  padding: 1.1rem 1.25rem;
  border-radius: 12px;
  margin-top: -1.35rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 6px 24px rgba(0,0,0,0.13);
  position: relative;
  z-index: 10;
}
.search-oval {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: stretch;
}

.search-oval input {
  min-width: 0; /* allow input to shrink in grid so button never overflows container */
  padding: 0.8rem 0.95rem;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  transition: border-color 0.2s;
}
.search-oval input:focus { outline: none; border-color: #394f77; }

.search-oval button {
  padding: 0.8rem 1.2rem;
  min-width: 3.25rem;
  background-color: #2d5f4f;
  color: #FFFFFF;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  transition: background-color 0.2s, transform 0.2s;
  white-space: nowrap;
}
.search-oval button:hover {
  background-color: #1a2b4a;
  transform: translateY(-1px);
}

.search-label-compact { display: none; }

@media (max-width: 399px) {
  .search-label-default { display: none; }
  .search-label-compact { display: inline; }
  .search-oval button { min-width: 3rem; padding-inline: 0.95rem; }
}

/* ── MAP ── */
.map-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
  align-items: start;
}
@media (max-width: 768px) { .map-layout { grid-template-columns: 1fr; } }

.map-sidebar {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  overflow-y: auto;
  max-height: 400px;
}
.map-sidebar h3 { color: #2d5f4f; font-size: 1.1rem; margin-bottom: 1rem; font-weight: 600; }

.nb-item {
  padding: 0.75rem;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color 0.2s;
  margin-bottom: 0.5rem;
}
.nb-item:hover { background-color: #f0f0f0; }
.nb-item.active { background-color: #e8f4f1; color: #2d5f4f; font-weight: 600; }

.map-container {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  position: relative;
  width: min(100%, 1120px);
  margin: 0 auto;
}

svg { width: 100%; height: auto; display: block; }

@media (max-width: 768px) {
  .map-layout {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }
  .map-container {
    width: 100%;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    background: transparent;
  }
  #vcmap {
    width: 108vw;
    max-width: none;
    margin-left: -4vw;
  }
}

.neighbourhood, .n-zone {
  fill: #cdd8ae;
  stroke: white;
  stroke-width: 1.8;
  cursor: pointer;
  transition: fill .18s;
}
.neighbourhood:hover, .n-zone:hover { fill: #a8ba72; }
.neighbourhood.selected, .n-zone.selected { fill: #5a8a3a; }

.neighbourhood-label, .n-label {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 9px;
  font-weight: 800;
  fill: #3a3010;
  text-anchor: middle;
  pointer-events: none;
  user-select: none;
  letter-spacing: .02em;
}
.n-leader { stroke:#888; stroke-width:.8; fill:none; pointer-events:none; stroke-dasharray:3 2; }

/* ── RESOURCES ── */
.resources-section {
  background: white;
  border-radius: 12px;
  padding: 1rem 1.25rem 1.1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin-bottom: 1.5rem;
  transition: padding 0.14s ease-out;
}
@media (max-width: 640px) {
  .resources-section { padding: 0.72rem 0.85rem 0.8rem; }
}
.resources-section h2 {
  color: #2d5f4f;
  text-align: center;
  margin-bottom: 0.62rem;
  font-size: clamp(0.98rem, 2.6vw, 1.18rem);
  line-height: 1.08;
  white-space: nowrap;
  transition: font-size 0.14s ease-out, margin-bottom 0.14s ease-out;
}

body.resources-page .resources-section {
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.resources-tile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(9.75rem, 11.5rem));
  justify-content: center;
  gap: 0.9rem;
}
@media (min-width: 700px) {
  .resources-tile-grid {
    grid-template-columns: repeat(4, minmax(9.25rem, 10.75rem));
  }
}

.resources-tile-btn {
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: #ffffff;
  border: 2px solid rgba(26, 43, 74, 0.22);
  border-radius: 14px;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.09);
  padding: clamp(0.36rem, 1vw, 0.62rem);
  cursor: pointer;
  width: 100%;
  aspect-ratio: 1 / 1;
  text-align: center;
  font-family: 'Poppins', sans-serif;
  transition: border-color 0.2s, background-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.resources-tile-btn:hover {
  border-color: #2d5f4f;
  background: #f5faf8;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.resources-tile-btn.active {
  background: var(--cat-active-bg, #eef4f2);
  border-color: var(--cat-active-color, #1a2b4a);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.resources-tile-btn-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.26rem, 0.95vw, 0.48rem);
  width: 100%;
  height: 100%;
}

.resources-tile-icon {
  width: clamp(3.55rem, 10.8vw, 4.45rem);
  height: clamp(3.55rem, 10.8vw, 4.45rem);
  flex-shrink: 0;
  filter: brightness(0) saturate(100%) invert(14%) sepia(21%) saturate(981%) hue-rotate(179deg) brightness(93%) contrast(94%);
}

.resources-tile-label {
  font-size: clamp(1.14rem, 0.99rem + 0.48vw, 1.24rem);
  font-weight: 700;
  color: #1a2b4a;
  line-height: 1.16;
  min-height: 3.48em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow-wrap: anywhere;
  max-width: 12ch;
}

.resources-tile-btn.active .resources-tile-label {
  color: var(--cat-active-color, #1a2b4a);
}

body.resources-page .hero > :first-child {
  position: relative;
  z-index: 2;
}

.content-copy {
  color: #555;
  font-size: var(--type-body);
  line-height: 1.75;
}

.content-copy p,
.content-copy ul {
  margin-bottom: 1.5rem;
}

.content-copy h2,
.content-copy h3 {
  color: #2d5f4f;
  font-weight: 600;
}

.content-copy h2 {
  font-size: var(--type-heading-2);
  margin: 0 0 1rem;
}

.content-copy h3 {
  font-size: var(--type-heading-3);
  margin: 1.5rem 0 1rem;
}

.content-copy ul {
  padding-left: 1.5rem;
}

.content-copy a,
.content-link {
  color: #2d5f4f;
}

.content-meta {
  color: #666;
  font-size: var(--type-body-small);
  line-height: 1.6;
}

.content-note {
  color: #777;
  font-size: var(--type-body-small);
  line-height: 1.7;
}

.content-block {
  margin-top: 2rem;
}

.content-block.compact {
  margin-top: 1.5rem;
}

.contact-intro-card {
  background: #e8f4f1;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
}

.contact-intro-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #2d5f4f;
  margin-bottom: 0.25rem;
}

.contact-intro-divider {
  color: #aaa;
  font-size: 1.2rem;
}

.section-subtitle {
  color: #555;
  font-size: var(--type-body);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.content-heading {
  color: #2d5f4f;
  font-size: var(--type-heading-3);
  margin-bottom: 0.75rem;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  margin-bottom: 0;
  grid-auto-rows: 1fr;
}
@media (max-width: 900px) { .category-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.48rem; } }
@media (max-width: 430px) { .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem; } }
@media (max-width: 360px) { .category-grid { grid-template-columns: 1fr; } }

.cat-btn {
  padding: 0.58rem 0.66rem;
  border: 1.5px solid #d0d8d6;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
  font-family: 'Poppins', sans-serif;
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr) 1.5rem;
  align-items: center;
  column-gap: 0.5rem;
  width: 100%;
  height: 100%;
  min-height: 4.35rem;
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  overflow: hidden;
}
@media (max-width: 640px) {
  .cat-btn { padding: 0.52rem 0.54rem; column-gap: 0.42rem; min-height: 4.55rem; }
}
.cat-btn:hover {
  border-color: #2d5f4f;
  background: #f0f8f6;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(45,95,79,0.15);
}
.cat-btn.active {
  border-color: #2d5f4f;
  background: #2d5f4f;
  box-shadow: 0 2px 8px rgba(45,95,79,0.3);
}
.cat-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  line-height: 1;
  width: 1.5rem;
  text-align: center;
  justify-self: start;
}
.cat-label {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
  color: #1a2b4a;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  min-height: calc(0.78rem * 1.3 * 3);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.cat-icon-spacer {
  width: 1.5rem;
  visibility: hidden;
  text-align: center;
  justify-self: end;
}
.cat-btn.active .cat-label { color: white; }
@media (max-width: 640px) {
  .cat-label { font-size: 0.76rem; min-height: calc(0.76rem * 1.3 * 3); }
  .cat-icon { font-size: 1.2rem; }
}
@media (max-width: 430px) {
  .cat-btn {
    padding: 0.46rem 0.46rem;
    min-height: 4rem;
    column-gap: 0.32rem;
  }
  .cat-label {
    min-height: auto;
    justify-content: center;
    text-align: center;
    word-break: normal;
    overflow-wrap: anywhere;
    hyphens: none;
  }
  .cat-icon { font-size: 1.05rem; }
}

.resource-card {
  background: white;
  border-left: 4px solid #2d5f4f;
  padding: 1rem 1rem 0.9rem;
  margin-bottom: 0.8rem;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.resource-card h3 {
  color: #2d5f4f;
  margin-bottom: 0.32rem;
  font-size: 1rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.resource-card .location { color: #666; font-size: 0.86rem; margin-bottom: 0.28rem; }
.resource-card .phone { color: #2d5f4f; font-weight: 700; font-size: 0.98rem; margin-bottom: 0.32rem; }
.resource-card .phone a { color: #2d5f4f; text-decoration: none; }
.resource-card .phone a:hover { text-decoration: underline; }
.resource-card .hours { color: #666; font-size: 0.86rem; margin-bottom: 0.4rem; }
.description-wrap { margin-bottom: 0.55rem; }
.resource-card .description {
  color: #555;
  line-height: 1.58;
  margin-bottom: 0.32rem;
  font-size: 0.9rem;
}
.resource-card .description.is-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.description-toggle {
  border: none;
  background: none;
  padding: 0;
  color: #2d5f4f;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
}
.description-toggle:hover { text-decoration: underline; }
.description-toggle[hidden] { display: none; }
.resource-card .website { display: inline-block; }
.resource-card .website a {
  color: white;
  background-color: #2d5f4f;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background-color 0.2s;
}
.resource-card .website a:hover { background-color: #3a7a5f; }

/* ── NEWS ── */
.news-item {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border-left: 4px solid #ffd700;
}
.news-item h3 { color: #2d5f4f; margin-bottom: 0.5rem; font-size: 1.1rem; }
.news-item .date { color: #999; font-size: 0.85rem; margin-bottom: 0.75rem; }
.news-item p { color: #555; line-height: 1.6; }

.news-header { margin-bottom: 1.5rem; }
.news-header h1 { color: #1a2b4a; margin-bottom: 0.4rem; }
.news-subtitle { color: #666; font-size: 1rem; margin: 0; }

.news-controls { display: flex; gap: 1rem; margin-bottom: 1rem; align-items: stretch; }
.news-search-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  flex: 1;
  max-width: 480px;
  background: #ffffff;
  padding: 0.55rem 0.9rem;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
}
.news-search-wrap input {
  padding: 0.52rem 0.85rem;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}
.news-search-wrap input:focus { outline: none; border-color: #1a2b4a; }
.news-search-wrap button {
  background: #2d5f4f;
  color: white;
  border: none;
  padding: 0.52rem 1.05rem;
  border-radius: 6px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s, transform 0.2s;
}
.news-search-wrap button:hover { background: #1a2b4a; transform: translateY(-1px); }
@media (max-width: 399px) {
  .news-search-wrap .search-label-default { display: none; }
  .news-search-wrap .search-label-compact { display: inline; }
  .news-search-wrap button { min-width: 3rem; padding-inline: 0.95rem; }
}

.news-cat-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }
.nc-btn {
  background: #f0f0f0;
  color: #555;
  border: 2px solid transparent;
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.nc-btn:hover { background: #e0e0e0; color: #333; }
.nc-btn.active { background: #1a2b4a; color: white; border-color: #1a2b4a; }

.news-count { font-size: 0.85rem; color: #888; margin-bottom: 1rem; }
.news-cat-tag { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 12px; font-size: 0.75rem; font-weight: 600; }
.news-date-tag { font-size: 0.8rem; color: #999; }

.news-pagination {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}
.np-btn {
  background: white;
  color: #1a2b4a;
  border: 2px solid #e0e0e0;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  min-width: 2.5rem;
}
.np-btn:hover:not(.disabled):not(.active) { border-color: #1a2b4a; color: #1a2b4a; }
.np-btn.active { background: #1a2b4a; color: white; border-color: #1a2b4a; font-weight: 700; }
.np-btn.disabled { opacity: 0.35; cursor: default; }
.np-ellipsis { color: #aaa; padding: 0 0.3rem; font-size: 1rem; line-height: 2; }

/* ── FORMS ── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 768px) { .form-grid { grid-template-columns: 1fr; } }

.form-group { display: flex; flex-direction: column; }
.form-group label { color: #2d5f4f; font-weight: 600; margin-bottom: 0.5rem; font-size: 0.95rem; }
.form-group input,
.form-group textarea {
  padding: 0.75rem;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus { outline: none; border-color: #2d5f4f; }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-grid.full { grid-template-columns: 1fr; }

.submit-btn {
  background-color: #2d5f4f;
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  transition: background-color 0.2s;
  width: fit-content;
}
.submit-btn:hover { background-color: #3a7a5f; }

.form-success {
  display: none;
  background: #e8f4f1;
  border: 2px solid #2d5f4f;
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
  color: #1a3a2a;
}
.form-success h3 { font-size: 1.4rem; margin-bottom: 0.75rem; color: #2d5f4f; }
.form-success p { font-size: 1rem; line-height: 1.7; }

/* ── FOOTER ── */
footer { background: #1a2b4a; color: white; font-size: 0.88rem; margin-top: auto; }

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.2rem 1.5rem 0.78rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
  justify-items: center;
  text-align: center;
}
@media (max-width: 480px) { .footer-grid { padding: 1rem 1rem 0.72rem; gap: 0.65rem; } }

.footer-brand {
  display: grid;
  justify-items: center;
  text-align: center;
}
.footer-col p,
.footer-brand p { opacity: 0.75; line-height: 1.45; margin-bottom: 0; }
.footer-subtitle {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.62;
}
.footer-links-row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0;
  margin: 0;
  padding: 0;
  align-items: center;
}
.footer-links-line {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
}
.footer-links-line a,
.footer-links-line a:visited,
.footer-links-line button.flink {
  display: inline-flex;
  align-items: center;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  cursor: pointer;
  margin: 0;
  text-align: center;
  transition: color 0.15s;
}
.footer-links-line a + a::before,
.footer-links-line button.flink + a::before,
.footer-links-line a + button.flink::before,
.footer-links-line button.flink + button.flink::before,
.footer-links-line + .footer-links-line::before {
  content: "•";
  color: rgba(255,255,255,0.38);
  margin: 0 0.48rem;
}
.footer-links-line a:hover,
.footer-links-line a:focus-visible,
.footer-links-line a:visited:hover,
.footer-links-line a:visited:focus-visible,
.footer-links-line button.flink:hover { color: white; }
@media (max-width: 620px) {
  .footer-links-row {
    flex-direction: column;
    gap: 0.22rem;
  }
  .footer-links-line + .footer-links-line::before {
    content: none;
  }
}
.footer-logo-mark { font-size: 1.08rem; font-weight: 700; margin-bottom: 0.12rem; }

.map-data-attribution {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 0.55rem;
  font-size: 0.72rem;
  line-height: 1.45;
  color: rgba(255,255,255,0.52);
  text-align: center;
}
.map-data-attribution a {
  color: rgba(255,255,255,0.66);
  text-decoration: underline;
  text-underline-offset: 0.14em;
}
.map-data-attribution a:hover {
  color: rgba(255,255,255,0.86);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  text-align: center;
  padding: 0.65rem 1.5rem 0.75rem;
  opacity: 0.56;
  font-size: 0.73rem;
}

/* ── UTILITIES ── */
.tooltip {
  position: absolute;
  background: #2d5f4f;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.85rem;
  z-index: 200;
  pointer-events: none;
  white-space: nowrap;
}

.no-results { text-align: center; padding: 2rem; color: #999; font-size: 1.1rem; }

.filter-active {
  background: #e8f4f1;
  padding: 0.5rem 0.62rem;
  border-radius: 9px;
  margin-bottom: 0.8rem;
  display: grid;
  gap: 0.42rem;
}
.filter-active button {
  background: none;
  border: none;
  color: #2d5f4f;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.72rem;
}
.filter-active button:hover { text-decoration: underline; }

/* ── PAGE HEADER (non-home pages) ── */
.page-header {
  position: relative;
  background: #1a2b4a;
  overflow: hidden;
  color: white;
  padding: 2rem max(2rem, calc(50vw - 600px)) 3.1rem;
  margin: -1.5rem calc(-50vw + 50%) 0;
}
.page-header h1 { font-size: var(--type-heading-1); margin-bottom: 0.4rem; line-height: 1.1; }
.page-header p { opacity: 0.9; font-size: var(--type-body); line-height: 1.7; max-width: 52rem; }
.map-hero-actions {
  margin-top: 0.9rem;
}

.page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(26, 43, 74, 0.9); /* #1a2b4a with opacity */
  z-index: 1;
}

.page-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -120px;
  bottom: -120px;
  inset: 0;
  background-image: url('images/library-seniors.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center 55%;
  z-index: 0;
}

.page-header h1, 
.page-header p {
  position: relative;
  z-index: 2;
}

.map-hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.62rem 1rem;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.28);
  color: white;
}
.map-hero-button:hover {
  background: rgba(255,255,255,0.22);
}

/* ── SCROLL ANCHOR HIGHLIGHT ── */
#results-anchor {
  scroll-margin-top: 80px;
}


body.modal-open { overflow: hidden; }

.hero-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 0.34rem 0.42rem;
  align-items: center;
  justify-content: stretch;
  width: 100%;
  max-width: none;
  margin-bottom: 0.08rem;
}
.hero-actions .hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.62rem 0.92rem;
  font-size: 0.95rem;
  width: 100%;
  height: 100%;
  min-height: 3.15rem;
  max-width: none;
  flex: 0 1 auto;
  min-width: 0;
  text-align: center;
  white-space: normal;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.hero-button-text-default { display: inline; }
.hero-button-text-mobile {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.12;
}
.hero-button-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.hero-button-urgent {
  background: var(--vsra-urgent-yellow);
  color: #1a2b4a;
  border: none;
}
.hero-button-urgent:hover {
  background: #e6c200;
  color: #1a2b4a;
  border: none;
}

.hero-button-resources {
  background: #2d5f4f;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.80);
  transition: background-color 0.2s, transform 0.2s;
}
.hero-button-resources:hover {
  background: #1a2b4a;
  transform: translateY(-1px);
}

.section-groups {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.cat-section {
  margin-bottom: 0;
  background: #eef4f2;
  border: 1px solid #ccddd9;
  border-radius: 12px;
  padding: 1rem 1rem 1.05rem;
}
@media (max-width: 640px) {
  .cat-section { padding: 0.7rem 0.7rem 0.75rem; }
}

.cat-section .category-grid {
  margin-bottom: 0;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  grid-auto-rows: 1fr;
}
@media (max-width: 900px) {
  .cat-section .category-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
}
@media (max-width: 399px) {
  .cat-section .category-grid { grid-template-columns: 1fr; }
}

.cat-section-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 800;
  color: #2d5f4f;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin: 0 0 0.45rem;
  padding: 0;
  background: transparent;
  border-left: none;
  border-radius: 0;
}
.cat-section-emoji {
  font-size: 1rem;
  line-height: 1;
}

/* ── HELP MODAL ── */
.help-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 22, 38, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 120;
}
.help-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.help-modal {
  width: min(620px, 100%);
  background: #fff;
  color: #23324a;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.25);
  padding: 1rem 1.1rem 0.9rem;
  position: relative;
}
.help-modal h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  color: #1a2b4a;
  padding-right: 2.5rem;
}
.help-modal-intro {
  color: #48576a;
  font-size: 0.8rem;
  line-height: 1.4;
  margin-bottom: 0.65rem;
}
.help-emergency-note {
  margin-bottom: 0.75rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #dce5ef;
  color: #314155;
  font-size: 0.78rem;
  line-height: 1.45;
}
.help-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border: none;
  background: #f1f4f8;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: #4d5a6a;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.help-modal-close:hover { background: #e2e8f0; }

.help-quick-list {
  display: grid;
  gap: 0.45rem;
}
.help-quick-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 0.7rem;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #dce5ef;
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
}
.help-action {
  display: grid;
  gap: 0.25rem;
  align-items: start;
}
.help-call-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  text-align: center;
}
.help-num {
  font-size: 1.08rem;
  font-weight: 700;
  color: #1a2b4a;
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e8f0fb;
  border: 1px solid #c5d4e9;
  border-radius: 9px;
  padding: 0.55rem 0.3rem;
  min-height: 2.9rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.help-num:hover,
.help-num:active {
  background: #1a2b4a;
  color: #fff;
  transform: translateY(-1px);
}
.help-copy {
  display: grid;
  gap: 0.14rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #334155;
}
.help-copy strong {
  color: #1a2b4a;
  font-size: 0.9rem;
  line-height: 1.25;
}
.help-copy span {
  display: block;
}

@media (max-width: 380px) {
  .help-modal {
    padding: 0.85rem 0.9rem 0.75rem;
  }
  .help-modal h2 { font-size: 1.1rem; }
  .help-quick-item {
    grid-template-columns: 1fr;
    gap: 0.45rem;
    padding: 0.45rem 0.6rem;
  }
  .help-action { gap: 0.22rem; }
  .help-call-label { text-align: left; }
  .help-num { font-size: 1rem; min-height: 2.2rem; }
  .help-copy { font-size: 0.76rem; }
}

/* ── Quick Search Modal ── */
.quick-search-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 22, 38, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 120;
}
.quick-search-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.quick-search-modal {
  width: min(520px, 100%);
  background: #fff;
  color: #23324a;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.25);
  padding: 1.1rem;
  position: relative;
}
.quick-search-modal h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: #1a2b4a;
  padding-right: 2.5rem;
}
.quick-search-modal-intro {
  color: #48576a;
  font-size: 0.84rem;
  line-height: 1.45;
  margin-bottom: 0.8rem;
}
.quick-search-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border: none;
  background: #f1f4f8;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: #4d5a6a;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.quick-search-modal-close:hover { background: #e2e8f0; }
.quick-search-options {
  display: grid;
  gap: 0.6rem;
}
.quick-search-option {
  width: 100%;
  text-align: left;
  border: 1px solid #d7e2ea;
  border-radius: 10px;
  background: #f8fafc;
  color: #1a2b4a;
  padding: 0.8rem 0.9rem;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, transform 0.15s;
}
.quick-search-option:hover {
  background: #eef6f6;
  border-color: #2a7a7a;
  transform: translateY(-1px);
}
@media (max-width: 480px) {
  .quick-search-modal {
    padding: 1rem 0.9rem 0.9rem;
  }
  .quick-search-option {
    font-size: 0.9rem;
    padding: 0.75rem 0.8rem;
  }
}


@media (max-width: 768px) {
  .hero-news-panel { display: none; }
  .section-groups { grid-template-columns: 1fr; }
}


.quick-actions {
  display:flex;
  flex-wrap:wrap;
  gap:0.75rem;
  margin:0 0 1.5rem;
}
.quick-actions .hero-button,
.quick-actions .submit-btn {
  text-decoration:none;
}
.resource-tag-row {
  display:flex;
  flex-wrap:wrap;
  gap:0.32rem;
  margin:0 0 0.45rem;
}
.resource-tag {
  display:inline-flex;
  align-items:center;
  background:#eef5f4;
  color:#24453f;
  border:1px solid #d5e6e3;
  border-radius:999px;
  padding:0.14rem 0.42rem;
  font-size:0.66rem;
  font-weight:600;
  line-height:1.2;
}
.resource-section-nav {
  display:grid;
  gap:0.34rem;
}
.resource-section-summary {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:0.5rem;
  min-width:0;
  flex-wrap: wrap;
}
.resource-section-summary-text {
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  font-size:0.75rem;
  line-height:1.2;
  color:#567468;
}
.resource-section-nav .left-links {
  display:flex;
  flex-wrap:wrap;
  gap:0.45rem;
  margin-left:auto;
}
.resource-filter-row {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.filter-inline-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #476256;
  line-height: 1.35;
  padding-top: 0.28rem;
  flex: 0 0 auto;
}
.text-link-btn {
  background:none;
  border:none;
  color:#2d5f4f;
  cursor:pointer;
  font-family:'Poppins', sans-serif;
  font-size:0.72rem;
  font-weight:600;
  padding:0;
}
.text-link-btn:hover { text-decoration: underline; }
.topbar-tools {
  display: none;
  align-items: center;
  gap: 0.4rem;
}
.utility-fab-wrap {
  display: none;
}
.utility-fab {
  border: 2px solid rgba(255,255,255,0.28);
  border-radius: 8px;
  background: rgba(255,255,255,0.14);
  color: white;
  width: 3rem;
  height: 2.2rem;
  padding: 0;
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}
.utility-fab:hover {
  background: rgba(255,255,255,0.22);
}
#back-to-top { display:none; }
#back-to-top.visible { display:inline-flex; align-items:center; justify-content:center; }
body.large-text { font-size: 19px; }
body.large-text .hero-title { font-size: clamp(3rem, 6.4vw, 4.6rem); }
body.large-text .resource-card .description,
body.large-text .help-copy,
body.large-text .page-header p,
body.large-text .hero-subtitle { font-size: 1.04rem; }
body.large-text .cat-label,
body.large-text .nav-btn,
body.large-text .menu-drawer a,
body.large-text .menu-drawer button { font-size: 1rem; }
body.large-text .search-oval input,
body.large-text .search-oval button,
body.large-text .hero-button,
body.large-text .submit-btn { font-size: 1.03rem; }
@media (max-width: 800px) {
  .hero-news-panel { display: none; }
}
@media (max-width: 980px) {
  .topbar-tools {
    display: inline-flex;
  }
  .utility-fab {
    width: 2.8rem;
    height: 2.15rem;
    padding: 0;
    font-size: 0.82rem;
  }
}
@media (max-width: 768px) {
  .hero-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    max-width: none;
    justify-content: stretch;
    gap: 0.34rem;
  }
  .hero-actions .hero-button {
    width: 100%;
    min-height: 3rem;
    padding: 0.58rem 0.78rem;
    font-size: 0.88rem;
    justify-content: center;
  }
}
@media (max-width: 480px) {
  .topbar-tools { gap: 0.3rem; }
  .utility-fab {
    width: 2.55rem;
    height: 2rem;
    padding: 0;
    font-size: 0.78rem;
  }
}



@media (max-width: 1100px) {
  .hero-actions {
    justify-content: flex-start;
  }
}
@media (max-width: 700px) {
  .hero-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 0.32rem;
  }
}
@media (max-width: 640px) {
  .hero-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    margin-bottom: 0.3rem;
  }
}
@media (max-width: 430px) {
  .hero-actions .hero-button,
  .hero-actions .hero-button-urgent {
    padding: 0.54rem 0.68rem;
    font-size: 0.81rem;
  }
  .hero-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 0.28rem;
  }
}

/* ── Collapsible menu categories ── */
.menu-cat-details {
  margin-top: 0.25rem;
}
.menu-cat-details > summary {
  display: block;
  padding: 0.6rem 1rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  color: #2d5f4f;
  border-radius: 6px;
  user-select: none;
  list-style: none;
  transition: background 0.15s;
}
.menu-cat-details > summary::-webkit-details-marker { display: none; }
.menu-cat-details > summary:hover { background: #f0f4f0; }
.menu-cat-details[open] > summary { background: #e8f0eb; }
.menu-cat-list {
  padding: 0.25rem 0 0.25rem 0.5rem;
}
.menu-cat-list a {
  padding: 0.4rem 1rem !important;
  font-size: 0.87rem !important;
}
.menu-cat-group {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #888;
  padding: 0.6rem 1rem 0.2rem;
  margin-top: 0.25rem;
}

/* ── Footer view-all link ── */
.footer-view-all {
  font-weight: 700 !important;
  color: #a8d5ce !important;
  margin-top: 0.4rem !important;
  border-top: 1px solid rgba(255,255,255,0.1) !important;
  padding-top: 0.5rem !important;
  white-space: nowrap;
}
.footer-view-all:hover { color: #fff !important; }

body.home-page .hero {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  padding: 1.8rem 1.8rem 2.55rem;
}

body.home-page .hero > :first-child {
  max-width: 1200px;
}

body.home-page .hero-copy {
  max-width: 42rem;
}

body.home-page .hero-subtitle {
  max-width: 33rem;
  margin-bottom: 0.9rem;
}

body.home-page .hero-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0;
}

body.home-page .hero-actions .hero-button {
  font-size: 1.075rem;
}

body.home-page .search-container {
  padding: 0.55rem 0.9rem;
  margin-top: -1.05rem;
  margin-bottom: 1.35rem;
  box-shadow: 0 4px 18px rgba(0,0,0,0.1);
}

body.home-page .search-oval {
  gap: 0.42rem;
}

body.home-page .search-oval input {
  padding: 0.52rem 0.85rem;
  border-color: #d8dee5;
}

body.home-page .search-oval input::placeholder {
  color: #68778a;
  opacity: 1;
}

body.home-page .search-oval button {
  padding: 0.52rem 1.05rem;
}

body.home-page .home-categories {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 1.7rem;
}

body.home-page .home-categories h2 {
  color: #2d5f4f;
  margin: 0 auto 0.75rem;
  width: min(100%, 26rem);
  font-size: clamp(1rem, 2.6vw, 1.18rem);
  line-height: 1.12;
  text-align: center;
}

/* ── Home topic category cards ── */
.home-topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(9.75rem, 11.5rem));
  justify-content: center;
  gap: 0.6rem;
}
@media (min-width: 700px) {
  .home-topic-grid {
    grid-template-columns: repeat(4, minmax(9.25rem, 10.75rem));
  }
}
.home-topic-btn {
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: #ffffff;
  border: 2px solid rgba(26, 43, 74, 0.42);
  border-radius: 14px;
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.15);
  padding: clamp(0.36rem, 1vw, 0.62rem);
  cursor: pointer;
  width: 100%;
  max-width: none;
  margin-inline: 0;
  aspect-ratio: 1 / 1;
  text-align: left;
  font-family: 'Poppins', sans-serif;
  transition: border-color 0.2s, background-color 0.2s, transform 0.2s;
}
.home-topic-btn-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.26rem, 0.95vw, 0.48rem);
  width: 100%;
  height: 100%;
}
.home-topic-btn:hover {
  border-color: #2d5f4f;
  background: #f5faf8;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
}
.home-topic-icon {
  width: clamp(3.55rem, 10.8vw, 4.45rem);
  height: clamp(3.55rem, 10.8vw, 4.45rem);
  flex-shrink: 0;
  filter: brightness(0) saturate(100%) invert(14%) sepia(21%) saturate(981%) hue-rotate(179deg) brightness(93%) contrast(94%);
}
.home-topic-label {
  font-size: clamp(1.14rem, 0.99rem + 0.48vw, 1.24rem);
  font-weight: 700;
  color: #1a2b4a;
  line-height: 1.16;
  min-height: 2.32em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow-wrap: anywhere;
  max-width: 10ch;
}

body.home-page .section-groups {
  gap: 0.62rem;
}

body.home-page .cat-section {
  background: #eef4f2;
  border: 1px solid #ccddd9;
  border-radius: 12px;
  padding: 0.9rem 0.9rem 0.95rem;
}

body.home-page .cat-section-title {
  margin-bottom: 0.5rem;
}

body.home-page .cat-section .category-grid {
  gap: 0.55rem;
}

body.home-page .cat-btn {
  padding: 0.52rem 0.56rem;
  min-height: 3.9rem;
}

body.home-page .cat-label {
  font-size: 0.875rem;
  line-height: 1.2;
  min-height: auto;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

body.home-page .footer-grid {
  gap: 0.7rem;
}

@media (max-width: 899px) {
  body.home-page .hero-pretitle { display: none; }
  body.home-page .hero-subtitle-desktop { display: none; }
  body.home-page .hero-subtitle-mobile { display: block; }
  body.home-page .hero {
    padding: 1.2rem 0.85rem 1.95rem;
  }
  body.home-page .hero-subtitle {
    max-width: 20rem;
    margin-bottom: 0.72rem;
  }
}

@media (min-width: 900px) {
  body.home-page .hero-subtitle-mobile { display: none; }
}

@media (max-width: 700px) {
  body.home-page .hero-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.3rem;
  }
}

@media (max-width: 480px) {
  body.home-page .search-container {
    padding: 0.48rem 0.75rem;
    margin-bottom: 1.15rem;
  }
  body.home-page .search-oval input {
    padding: 0.5rem 0.75rem;
  }
  body.home-page .search-oval button {
    padding: 0.5rem 0.88rem;
  }
  body.home-page .cat-btn {
    padding: 0.48rem 0.5rem;
    min-height: 3.7rem;
  }
  body.home-page .cat-label {
    font-size: 0.84rem;
  }
}

/* ── Map flow: special buttons + transit action ── */
.map-flow-wrap {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
  margin: -2.65rem 0 1rem;
  z-index: 2;
}
.map-special-wrap {
  position: relative;
  z-index: 2;
  padding-top: 0;
  margin-top: -20px;
  margin-left: 0.9rem;
}
.map-special-nbs {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: clamp(0.75rem, 1.8vw, 1.15rem);
}
.map-special-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0.35rem 0.15rem;
  border-radius: 8px;
  transition: transform 0.15s, background 0.15s;
  width: clamp(58px, 6vw, 72px);
  min-width: 0;
  flex: 0 0 auto;
}
.map-special-btn:hover { transform: translateY(-2px); }
.map-special-btn.active { background: #e0ede8; }
.map-special-btn img {
  width: clamp(58px, 6vw, 72px);
  height: clamp(58px, 6vw, 72px);
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #2d5f4f;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: border-color 0.15s;
}
.map-special-btn.active img { border-color: #1a2b4a; }
.map-special-btn span {
  width: max-content;
  max-width: none;
  font-size: 0.72rem;
  font-weight: 600;
  color: #2d5f4f;
  text-align: center;
  line-height: 1.2;
}
.map-special-btn.active span { color: #1a2b4a; }
.map-special-icon {
  width: clamp(58px, 6vw, 72px);
  height: clamp(58px, 6vw, 72px);
  border-radius: 50%;
  border: 3px solid #2d5f4f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.45rem, 1.8vw, 1.85rem);
  background: #e8f4f1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: border-color 0.15s;
}
.map-special-btn.active .map-special-icon { border-color: #1a2b4a; background: #d0e8e2; }
.map-translink-center {
  text-align: center;
  margin: 1.25rem 0 0.5rem;
}
.map-translink-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.8rem 1.2rem;
  border-radius: 6px;
  background: var(--vsra-teal-btn);
  border: 2px solid #e0e0e0;
  color: #111;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 6px 24px rgba(0,0,0,0.13);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.map-translink-btn:hover {
  border-color: #2d5f4f;
  box-shadow: 0 0 0 3px rgba(45,95,79,0.12);
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .map-flow-wrap {
    margin: -1.45rem 0 0.8rem;
    justify-content: flex-start;
  }
  .map-special-nbs { gap: clamp(0.5rem, 2.6vw, 0.75rem); }
  .map-special-btn {
    gap: 0.35rem;
    padding: 0.25rem 0.1rem;
    width: 52px;
  }
  .map-special-btn img,
  .map-special-icon {
    width: 52px;
    height: 52px;
    font-size: 1.35rem;
  }
  .map-special-btn span {
    width: max-content;
    max-width: none;
    font-size: 0.68rem;
  }
  .map-translink-btn {
    padding: 0.76rem 1rem;
    font-size: 0.86rem;
  }
}

@media (max-width: 499px) {
  .map-flow-wrap {
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .map-special-wrap {
    margin-left: 0;
  }
  .map-special-nbs {
    justify-content: center;
  }
}

/* ── Resource card: adjusted prominence ── */
.resource-card .location { color: #444; font-size: 0.88rem; margin-bottom: 0.24rem; }
.resource-card .rc-neighbourhood { color: #2d5f4f; font-weight: 600; }
.resource-card .rc-address { font-size: 0.84rem; color: #555; }
.resource-card .hours { color: #444; font-size: 0.86rem; margin-bottom: 0.32rem; }
.resource-card .description { color: #666; line-height: 1.58; margin-bottom: 0.32rem; font-size: 0.86rem; }

/* ── Resource card action buttons ── */
.rc-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  margin-bottom: 0;
  flex: 1 1 auto;
  min-width: 0;
}
.rc-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.42rem 0.72rem;
  border-radius: 5px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: background-color 0.15s;
  white-space: nowrap;
  flex: 0 1 auto;
  min-width: 0;
}
.rc-btn-call { background: #2d5f4f; color: white; }
.rc-btn-call:hover { background: #3a7a5f; }
.rc-btn-web  { background: #24454d; color: white; }
.rc-btn-web:hover  { background: #2f5862; }
.rc-btn-map  { background: #1a2b4a; color: white; border: 1.5px solid #1a2b4a; }
.rc-btn-map:hover  { background: #2a3b5a; }
.rc-btn-label-short { display: none; }

/* ── Resource card footer ── */
.resource-card-footer {
  display: grid;
  gap: 0.18rem;
  margin-top: 0.05rem;
}
.rc-action-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  flex-wrap: nowrap;
  min-width: 0;
}
.resource-context-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-width: 0;
}
.resource-context-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.3;
  border: 1px solid transparent;
  white-space: nowrap;
}
.resource-context-badge.women {
  background: #fdecef;
  color: #9b5462;
  border-color: #f4cfd6;
}
.resource-context-badge.indigenous {
  background: #f6efe4;
  color: #8a6a3c;
  border-color: #eadbc3;
}

/* ── Report Info Error link ── */
.report-error-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: -0.04rem;
  margin-left: auto;
  padding-left: 0;
  font-size: 0.66rem;
  color: #b7bfc7;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: 'Poppins', sans-serif;
  text-decoration: none;
  white-space: nowrap;
  flex: 0 0 auto;
  line-height: 1.2;
  width: fit-content;
}
.report-error-link:hover { color: #8b96a2; text-decoration: underline; }

/* ── Report Info Error modal ── */
.report-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 22, 38, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 120;
}
.report-modal-overlay.active { opacity: 1; visibility: visible; }
.report-modal {
  width: min(440px, 100%);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.25);
  padding: 1.25rem;
  position: relative;
}
.report-modal h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a2b4a;
  margin-bottom: 0.2rem;
  padding-right: 2.5rem;
}
.report-modal-intro { font-size: 0.82rem; color: #666; margin-bottom: 0.65rem; }
.report-modal-close {
  position: absolute;
  top: 0.75rem; right: 0.75rem;
  border: none;
  background: #f1f4f8;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: #4d5a6a;
  width: 2rem; height: 2rem;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
}
.report-modal-close:hover { background: #e2e8f0; }
.report-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0;
  font-size: 0.88rem;
  color: #333;
  cursor: pointer;
}
.report-check input[type=checkbox] { width: 1rem; height: 1rem; cursor: pointer; flex-shrink: 0; }
.report-modal-actions {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid #eee;
}

/* ── Subcategory select ── */
.subcat-select-wrap {
  flex: 1 1 14rem;
  min-width: min(100%, 14rem);
}
.subcat-select {
  width: 100%;
  padding: 0.42rem 0.72rem;
  border: 1px solid #c5dbd2;
  border-radius: 8px;
  background: #fff;
  color: #26453c;
  font-family: 'Poppins', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
}
.geo-scope-toggle {
  display: inline-flex;
  border: 1px solid #c5dbd2;
  border-radius: 10px;
  overflow: hidden;
  background: white;
}
.geo-btn {
  background: none;
  border: none;
  padding: 0.38rem 0.72rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #2d5f4f;
  cursor: pointer;
  line-height: 1.3;
}
.geo-scope-toggle .geo-btn.active { background: #2d5f4f; color: white; }
.geo-btn:hover:not(.active) { background: #e4f1e8; text-decoration: none; }
@media (max-width: 640px) {
  .resource-section-summary {
    gap: 0.4rem;
  }
  .resource-filter-row {
    gap: 0.35rem;
  }
  .filter-inline-label {
    padding-top: 0.18rem;
  }
  .subcat-select-wrap {
    flex-basis: 100%;
    min-width: 0;
  }
}

/* ── MAP: Neighbourhood dropdown bar (replaces sidebar list) ── */
.map-layout { grid-template-columns: 1fr; }  /* single column — sidebar removed */

.map-nb-bar {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1.3rem;
  background: white;
  padding: 0.72rem 0.95rem 0.8rem;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  position: relative;
  z-index: 10;
  width: fit-content;
  max-width: min(100%, 760px);
  margin-left: auto;
  margin-right: auto;
  margin-top: -1.15rem;
}
.map-nb-status {
  font-size: 0.72rem;
  font-weight: 700;
  color: #496358;
  letter-spacing: 0.02em;
  line-height: 1.3;
}
.map-nb-status strong {
  color: #1a2b4a;
  font-weight: 700;
}
.map-nb-status.is-selected {
  color: #35534f;
}
.map-nb-controls {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
}
.map-nb-select {
  flex: 0 1 460px;
  min-width: 300px;
  width: 460px;
  max-width: 460px;
  padding: 0.64rem 0.8rem;
  border: 1.5px solid #d7e0e8;
  border-radius: 8px;
  background: white;
  color: #1a2b4a;
  font-family: 'Poppins', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  appearance: auto;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.map-nb-select:focus {
  outline: none;
  border-color: #2d5f4f;
  box-shadow: 0 0 0 3px rgba(45,95,79,0.12);
}
@media (max-width: 680px) {
  .map-nb-bar {
    width: 100%;
    margin-top: -0.9rem;
    padding: 0.68rem 0.82rem 0.76rem;
  }
  .map-nb-controls {
    gap: 0;
  }
  .map-nb-select {
    max-width: none;
    width: 100%;
    min-width: 0;
  }
}

/* ── MapLibre GL Map ──────────────────────────────────────────────────────── */

#map-gl {
  width: 100%;
  height: 480px;
  border-radius: 8px;
  display: block;
}

@media (max-width: 768px) {
  #map-gl { height: 340px; border-radius: 0; }
}

/* Back to overview button — floats inside .map-container (position:relative) */
#map-back-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(26,43,74,0.14);
  border-radius: 8px;
  padding: 0.4rem 0.8rem;
  min-height: 2.4rem;
  font-size: 0.84rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: #1a2b4a;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(12,22,38,0.14);
  transition: background 0.15s, box-shadow 0.15s;
}
#map-back-btn:hover { background: #f7f9fc; box-shadow: 0 3px 10px rgba(12,22,38,0.16); }

/* Full Screen button — top right, mirrors back button style */
#map-fullscreen-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(26,43,74,0.14);
  border-radius: 8px;
  padding: 0.4rem 0.8rem;
  min-height: 2.4rem;
  font-size: 0.84rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: #1a2b4a;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(12,22,38,0.14);
  transition: background 0.15s, box-shadow 0.15s;
}
#map-fullscreen-btn:hover { background: #f7f9fc; box-shadow: 0 3px 10px rgba(12,22,38,0.16); }

@media (max-width: 768px) {
  .map-page .page-header {
    padding: 1.35rem 1rem 2rem;
  }
  .map-page .page-header p {
    font-size: 0.98rem;
    line-height: 1.45;
    max-width: 26rem;
  }
  .map-hero-actions {
    margin-top: 0.72rem;
  }
  .map-hero-button {
    min-height: 2.55rem;
    padding: 0.58rem 0.9rem;
    font-size: 0.88rem;
  }
  .map-translink-center {
    margin: 0.95rem 0 0.4rem;
  }
}

@media (max-width: 551px) {
  .hero-button-text-default { display: none; }
  .hero-button-text-mobile { display: inline-flex; }
  .hero-actions .hero-button {
    padding: 0.56rem 0.45rem;
    font-size: 0.88rem;
    line-height: 1.08;
  }
}

@media (max-width: 440px) {
  .rc-actions {
    flex-wrap: nowrap;
    gap: 0.3rem;
  }
  .rc-btn {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
    padding: 0.42rem 0.45rem;
    font-size: 0.72rem;
  }
  .rc-btn-label-full { display: none; }
  .rc-btn-label-short { display: inline; }
}

/* Map fills the container when fullscreen */
.map-container:fullscreen #map-gl,
.map-container:-webkit-full-screen #map-gl {
  height: 100%;
  border-radius: 0;
}

/* Remove container padding so map fills the fullscreen viewport edge-to-edge */
.map-container:fullscreen,
.map-container:-webkit-full-screen {
  padding: 0;
  border-radius: 0;
}

/* Pin overlay — full-page modal centred over everything */
#map-pin-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

#map-pin-overlay-inner {
  position: relative;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.22);
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.2rem 1.4rem;
}

#map-pin-overlay-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #888;
  z-index: 1;
  font-family: inherit;
}
#map-pin-overlay-close:hover { color: #333; }

/* Strip outer shadow/border from resource card inside the overlay */
#map-pin-overlay-inner .resource-card {
  box-shadow: none;
  border: none;
  padding: 0;
  margin: 0;
}

/* ── Homepage Map ────────────────────────────────────────────────────────────
   All rules scoped to body.home-page to avoid affecting map.html or other pages.
   The shared .map-nb-bar / .map-nb-select rules on map.html are untouched.
   ─────────────────────────────────────────────────────────────────────────── */

body.home-page .home-map-section {
  margin-bottom: 1.5rem;
  margin-top: 1.6rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(26, 43, 74, 0.08);
}

body.home-page .home-map-container {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body.home-page #home-map-gl {
  width: 100%;
  height: 480px;
  display: block;
}

@media (max-width: 768px) {
  body.home-page #home-map-gl {
    height: 340px;
  }
}

body.home-page .home-map-nb-bar {
  display: grid;
  gap: 0.35rem;
  width: min(100%, 26rem);
  margin-inline: auto;
  margin-bottom: 0.85rem;
  background: white;
  padding: 0.6rem 0.85rem 0.7rem;
  border-radius: 10px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.09);
  justify-items: center;
}

body.home-page .home-map-nb-status {
  font-size: 0.68rem;
  font-weight: 700;
  color: #496358;
  letter-spacing: 0.02em;
  line-height: 1.3;
  text-align: center;
}

body.home-page .home-map-nb-status.is-selected {
  color: #35534f;
}

body.home-page .home-map-nb-status strong {
  color: #1a2b4a;
  font-weight: 700;
}

body.home-page .home-map-nb-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* Much smaller than .map-nb-select (460px wide on map.html) */
body.home-page .home-map-nb-select {
  width: 220px;
  min-width: 0;
  padding: 0.45rem 0.65rem;
  border: 1.5px solid #d7e0e8;
  border-radius: 7px;
  background: white;
  color: #1a2b4a;
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  appearance: auto;
  transition: border-color 0.2s, box-shadow 0.2s;
}

body.home-page .home-map-nb-select:focus {
  outline: none;
  border-color: #2d5f4f;
  box-shadow: 0 0 0 3px rgba(45, 95, 79, 0.12);
}

body.home-page .home-map-top-controls {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 10;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem;
  pointer-events: none;
}

body.home-page .home-map-left-controls {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

body.home-page .home-map-control-btn {
  pointer-events: auto;
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(26,43,74,0.14);
  border-radius: 8px;
  padding: 0.36rem 0.72rem;
  min-height: 2.15rem;
  font-size: 0.78rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: #1a2b4a;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(12,22,38,0.14);
  transition: background 0.15s, box-shadow 0.15s, opacity 0.15s;
  white-space: nowrap;
}

body.home-page .home-map-control-btn:hover {
  background: #f7f9fc;
  box-shadow: 0 3px 10px rgba(12,22,38,0.16);
}

body.home-page .home-map-control-btn.active {
  background: #e0ede8;
  border-color: rgba(26,43,74,0.28);
}

body.home-page .home-map-control-btn.is-hidden {
  display: none;
}

body.home-page .home-map-control-btn:disabled {
  opacity: 0.52;
  cursor: default;
  box-shadow: 0 2px 8px rgba(12,22,38,0.1);
}

@media (max-width: 480px) {
  body.home-page .home-map-nb-bar {
    display: grid;
    width: 100%;
  }
  body.home-page .home-map-nb-select {
    width: 100%;
  }
  body.home-page .home-map-top-controls {
    top: 8px;
    left: 8px;
    right: 8px;
    gap: 0.4rem;
  }
  body.home-page .home-map-left-controls {
    gap: 0.35rem;
  }
  body.home-page .home-map-control-btn {
    padding: 0.34rem 0.58rem;
    min-height: 2rem;
    font-size: 0.74rem;
  }
}
