/* ========== Base Reset ========== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #0f172a;
  background: #ffffff;
  line-height: 1.6;
}

/* ========== Utilities ========== */
.container { width: min(1100px, 92vw); margin-inline: auto; }
.grid { display: grid; gap: 1.25rem; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

img { max-width: 100%; height: auto; display: block; }
a { color: #0ea5e9; text-decoration: none; }
a:hover { text-decoration: underline; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .7rem 1rem; border-radius: .75rem; font-weight: 600; border: 1px solid transparent;
  text-decoration: none;
}
.btn--primary { background: #0ea5e9; color: #ffffff; }
.btn--primary:hover { background: #0284c7; }
.btn--ghost { background: transparent; border-color: #0ea5e9; color: #0ea5e9; }
.btn--ghost:hover { background: #e0f2fe; }

/* ========== Header & Navigation ========== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #ffffff; border-bottom: 1px solid #e2e8f0;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .75rem 0;
}
.brand { display: inline-flex; align-items: center; gap: .75rem; color: inherit; text-decoration: none; }
.brand-mark { width: 48px; aspect-ratio: 1/1; }
.brand-text { font-weight: 800; line-height: 1.1; }

.nav { position: relative; }
.nav-toggle {
  display: none; width: 42px; height: 42px;
  border: 1px solid #e2e8f0; background: #ffffff; border-radius: .75rem;
  align-items: center; justify-content: center; cursor: pointer;
}
.nav-toggle .bar { width: 20px; height: 2px; background: #0f172a; display: block; }
.nav-toggle .bar + .bar { margin-top: 4px; }

/* Desktop menu */
.nav-menu {
  list-style: none; display: flex; gap: 1rem; margin: 0; padding: 0; align-items: center;
}
.nav-menu a { color: inherit; font-weight: 600; padding: .5rem .6rem; border-radius: .5rem; }
.nav-menu a:hover { background: #f1f5f9; text-decoration: none; }

/* Mobile off‑canvas */
@media (max-width: 900px) {
  .grid.two, .grid.three { grid-template-columns: 1fr; }

  .nav-toggle { display: inline-flex; }
  .nav-menu {
    position: fixed; inset: 0 0 0 auto; width: min(82vw, 340px);
    background: #ffffff; border-left: 1px solid #e2e8f0;
    display: flex; flex-direction: column; gap: .25rem;
    padding: 1rem; transform: translateX(100%); transition: transform .3s ease;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.15);
  }
  .nav-menu.open { transform: translateX(0); }
  .nav-menu li { list-style: none; }
  .nav-menu a { padding: .8rem .75rem; }
  .nav-menu .btn { width: 100%; }

  .nav-overlay {
    position: fixed; inset: 0; background: rgba(2, 6, 23, .4);
    opacity: 0; pointer-events: none; transition: opacity .3s ease;
  }
  .nav-overlay.open { opacity: 1; pointer-events: auto; }

  body.no-scroll { overflow: hidden; }
}

/* ========== Main Content & Sections ========== */
main { display: block; }
.section { padding: 3rem 0; }
.section--alt { background: #f8fafc; }
.strip { background: #0ea5e9; color: white; }
.strip--info { background: #f1f5f9; color: #0f172a; }
.strip-inner { padding: .6rem 0; display: grid; grid-auto-flow: column; gap: 1rem; align-items: center; }
.strip-item { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; }

/* Hero */
.hero { padding: 2.5rem 0; }
.hero-inner {
  display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 2rem;
}
.hero-text h1 { margin: 0 0 .5rem 0; font-size: clamp(2rem, 3vw + 1rem, 3rem); line-height: 1.1; }
.hero-text p { margin: 0 0 1rem 0; color: #334155; }
.hero-cta { display: flex; gap: .75rem; flex-wrap: wrap; }
.hero-image { display: flex; justify-content: center; }
.hero-image img { max-width: 420px; width: 100%; }

/* Cards / Lists */
.card { border: 1px solid #e2e8f0; border-radius: 1rem; padding: 1rem; background: #ffffff; }
.checklist { padding-left: 1.1rem; }
.checklist li { margin-bottom: .35rem; }
.note { font-size: .93rem; color: #475569; }

/* Hours table */
.hours { width: 100%; border-collapse: collapse; }
.hours th, .hours td { padding: .5rem .75rem; border-bottom: 1px solid #e2e8f0; text-align: left; }
.hours th { background: #f8fafc; }

/* Contact */
.contact .grid.two { align-items: start; }
.address { font-style: normal; }
.map-embed { border: 0; width: 100%; height: 320px; border-radius: .75rem; }

/* Donate */
.donate { background: radial-gradient(100% 70% at 10% 10%, #e0f2fe 0%, #ffffff 70%); }
.donate-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: .5rem; }

/* Footer */
.site-footer { background: #0f172a; color: #cbd5e1; padding: 2rem 0; }
.footer-inner { display: grid; gap: 1rem; align-items: center; }
.footer-links { list-style: none; display: flex; gap: 1rem; margin: 0; padding: 0; flex-wrap: wrap; }
.footer-links a { color: #cbd5e1; }
.footer-links a:hover { color: #ffffff; }
.copyright { font-size: .9rem; color: #94a3b8; }

/* Accessibility */
.skip-link {
  position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus { left: 1rem; top: 1rem; width: auto; height: auto; background: #0ea5e9; color: white; padding: .5rem .75rem; border-radius: .5rem; }
:focus-visible { outline: 3px solid #0ea5e9; outline-offset: 2px; }

/* ========== Mobile Tweaks: tighten whitespace ========== */
@media (max-width: 900px) {
  .section { padding: 1.5rem 0; }
  .hero { padding: 1.25rem 0; }
  .hero-inner { grid-template-columns: 1fr; gap: 1.25rem; }
  .hero-cta { gap: .5rem; }
  .brand-mark { width: 40px; }
  .brand-text { font-size: 1rem; }

  /* Reduce gaps that cause excessive whitespace on mobile */
  .container { width: min(1000px, 94vw); }
  h1, h2, h3, p { margin-top: .6rem; margin-bottom: .6rem; }
  .card { padding: .85rem; }
  .footer-inner { gap: .5rem; }
  .map-embed { height: 280px; }
}


/* Enhanced toggle styling & animated 'X' state */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid #e2e8f0; background: #ffffff;
  border-radius: .9rem; cursor: pointer;
  align-items: center; justify-content: center;
  transition: background .2s ease, box-shadow .2s ease, border-color .2s ease;
  box-shadow: 0 2px 8px rgba(15,23,42,.06);
}
.nav-toggle:hover { background: #f8fafc; border-color: #e2e8f0; }
.nav-toggle:focus-visible { outline: 3px solid #0ea5e9; outline-offset: 2px; }

.nav-toggle .bar {
  width: 22px; height: 2px; background: #0f172a; display: block;
  border-radius: 2px; transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle .bar + .bar { margin-top: 5px; }

/* Animate to X when menu is open (aria-expanded=true) */
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* Hours list layout (replaces table styles on mobile/desktop) */
.hours {
  list-style: none; margin: 0; padding: 0;
  border: 1px solid #e2e8f0; border-radius: .75rem; overflow: hidden;
}
.hours li {
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem; padding: .6rem .75rem; border-bottom: 1px solid #e2e8f0;
}
.hours li:last-child { border-bottom: none; }
.hours li span { color: #475569; }
.hours li strong { font-weight: 700; color: #0f172a; }



/* === Mobile Fit & Off‑Canvas Menu Fixes (v3) === */
html, body { max-width: 100%; overflow-x: hidden; }

/* Make images and embeds responsive */
img, video { max-width: 100%; height: auto; }
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Slightly widen container on small screens to reduce side gutters */
@media (max-width: 900px) {
  .container { width: min(1100px, 96vw); }

  /* Reduce header brand footprint to prevent wrapping/overflow */
  .brand-mark { width: 40px; }
  .brand-text { font-size: 0.95rem; word-break: break-word; }

  /* Right-side drawer menu layering and placement */
  .nav-menu { z-index: 60; }
  .nav-overlay { z-index: 40; }

  /* Trim vertical whitespace on sections/hero for mobile */
  .section { padding: 1.5rem 0; }
  .hero { padding: 1.5rem 0; }

  /* Make the top strip stack instead of forcing a wide row */
  .strip-inner { grid-auto-flow: row; }
}

/* Ensure any tables or long inline blocks wrap gracefully on small screens */
@media (max-width: 600px) {
  table { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .grid.two, .grid.three { grid-template-columns: 1fr; }
}
