/* =====================================================================
   District association sites — public stylesheet
   White background · dark blue accents · responsive · no external fonts
   ===================================================================== */

:root {
  --navy: #12305c;
  --navy-2: #1b3a6b;
  --blue: #1d4e89;
  --ink: #1f2937;
  --muted: #64748b;
  --tint: #f2f6fb;
  --line: #dbe4f0;
  --ok: #0e7a4a;
  --ok-bg: #e8f6ef;
  --err: #b3261e;
  --err-bg: #fdecea;
  --pin: #a16207;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(18, 48, 92, .10), 0 6px 18px rgba(18, 48, 92, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: #fff;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; color: var(--navy); margin: 0 0 .5em; }
code { background: var(--tint); padding: .1em .35em; border-radius: 4px; font-size: .9em; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 1.1rem; }
.narrow { max-width: 780px; }
.muted { color: var(--muted); }

/* ---------------- header ---------------- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.header-main { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .7rem; padding-bottom: .7rem; }
.brand { display: flex; align-items: center; gap: .8rem; min-width: 0; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 52px; height: 52px; object-fit: contain; border-radius: 50%; background: var(--tint); border: 1px solid var(--line); }
.brand-badge, .hero-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--navy); color: #fff; font-weight: 700; font-size: 1.15rem; letter-spacing: .02em;
  flex: none;
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { color: var(--navy); font-size: 1.02rem; line-height: 1.3; }
.brand-district { color: var(--muted); font-size: .8rem; }
.nav-toggle {
  display: none; background: var(--navy); color: #fff; border: 0; border-radius: 8px;
  font-size: 1.25rem; line-height: 1; padding: .45rem .7rem; cursor: pointer;
}
.site-nav { border-top: 1px solid var(--line); background: #fff; }
.nav-links { display: flex; flex-wrap: wrap; gap: .2rem; }
.nav-link {
  display: inline-block; padding: .62rem .85rem; color: var(--navy); font-weight: 600; font-size: .95rem;
  border-bottom: 3px solid transparent; text-decoration: none;
}
.nav-link:hover { background: var(--tint); text-decoration: none; }
.nav-link.is-active { border-bottom-color: var(--blue); color: var(--blue); }

/* ---------------- hero ---------------- */
.hero { background: linear-gradient(160deg, var(--navy) 0%, var(--blue) 78%); color: #fff; padding: 3.2rem 0; text-align: center; }
.hero-inner { display: flex; flex-direction: column; align-items: center; gap: .45rem; }
.hero h1 { color: #fff; font-size: clamp(1.5rem, 3.6vw, 2.35rem); margin: .4rem 0 0; }
.hero-logo { width: 96px; height: 96px; object-fit: contain; background: #fff; border-radius: 50%; padding: 8px; border: 3px solid rgba(255,255,255,.55); }
.hero-badge { width: 96px; height: 96px; font-size: 2.2rem; background: rgba(255,255,255,.14); border: 3px solid rgba(255,255,255,.5); }
.hero-district { margin: 0; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: .8rem; opacity: .92; }
.hero-tagline { margin: .3rem 0 0; font-size: 1.08rem; font-weight: 600; max-width: 46rem; }
.hero-intro { max-width: 46rem; text-align: center; opacity: .95; font-size: .98rem; }
.hero-intro p { margin: .4rem 0; }

/* ---------------- page hero (inner pages) ---------------- */
.page-hero { background: var(--tint); border-bottom: 1px solid var(--line); padding: 2rem 0 1.6rem; }
.page-hero h1 { margin-bottom: .2rem; font-size: clamp(1.4rem, 3vw, 2rem); }
.page-hero p { margin: 0; color: var(--muted); }
.crumbs { font-size: .9rem; margin-bottom: .4rem !important; }

/* ---------------- sections ---------------- */
.section { padding: 2.2rem 0; }
.section-tint { background: var(--tint); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.section-head h2 { margin: 0; font-size: 1.35rem; }
.section-more { font-weight: 600; font-size: .92rem; white-space: nowrap; }
.block-title { font-size: 1.1rem; margin: 1.6rem 0 .8rem; }
.result-count { color: var(--muted); font-size: .92rem; margin: 1rem 0 .4rem; }

.empty-box {
  background: var(--tint); border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 1.4rem; text-align: center; color: var(--muted); font-size: .95rem;
}

/* ---------------- buttons / chips ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  border: 1px solid transparent; border-radius: 8px; cursor: pointer;
  font: inherit; font-weight: 600; font-size: .95rem; padding: .55rem 1.1rem;
  text-decoration: none; transition: background .15s ease, color .15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--blue); color: #fff; }
.btn-ghost { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { background: var(--tint); }
.btn-danger { background: var(--err); color: #fff; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn.is-busy { pointer-events: none; opacity: .75; }

/* ---------- Membership call-to-action (home) ---------- */
.member-cta { max-width: 720px; }
.cta-copy { margin: 0 0 .7rem; color: var(--muted); line-height: 1.65; }
.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 1.1rem; }

.chip {
  display: inline-block; background: var(--tint); border: 1px solid var(--line); color: var(--navy);
  border-radius: 999px; padding: .08rem .6rem; font-size: .76rem; font-weight: 600;
}
.chip-pin { background: #fdf3d7; border-color: #f3e2a7; color: var(--pin); }

/* ---------------- notices ---------------- */
.notice-list { display: flex; flex-direction: column; gap: .8rem; }
.notice-row {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.15rem; box-shadow: var(--shadow);
}
.notice-row.is-pinned { border-left: 4px solid var(--pin); }
.notice-row h3 { font-size: 1.06rem; margin: .25rem 0 .3rem; }
.notice-row h3 a { color: var(--navy); }
.notice-row p { margin: .2rem 0; color: var(--ink); font-size: .95rem; }
.notice-meta { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; color: var(--muted); font-size: .82rem; }
.notice-attach { font-size: .9rem; }
.pinned-block { margin-top: 1.4rem; }
.download-row { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin-top: 1.4rem; }

/* ---------------- search bar ---------------- */
.search-bar {
  display: flex; flex-wrap: wrap; gap: .8rem; align-items: flex-end;
  background: var(--tint); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .9rem 1rem; margin-bottom: 1.2rem;
}
.field { display: flex; flex-direction: column; gap: .25rem; font-size: .88rem; color: var(--muted); flex: 1 1 180px; }
.field-grow { flex: 2 1 260px; }
.field span { font-weight: 600; color: var(--navy); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 8px; padding: .5rem .65rem; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid rgba(29, 78, 137, .35); border-color: var(--blue);
}
.search-actions { display: flex; gap: .5rem; align-items: flex-end; }

/* ---------------- people ---------------- */
.person-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; }
.person-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem 1rem; text-align: center; box-shadow: var(--shadow);
}
.person-photo { width: 110px; height: 110px; margin: 0 auto .7rem; }
.person-photo img, .person-photo .avatar-fallback { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; }
.person-card h3 { font-size: 1.05rem; margin-bottom: .1rem; }
.person-role { color: var(--blue); font-weight: 600; font-size: .9rem; margin: 0; }
.group-title { font-size: 1rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 1.4rem 0 .7rem; }

.avatar-fallback {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--navy); color: #fff; font-weight: 700; font-size: 1.6rem;
  width: 100%; height: 100%; border-radius: 50%;
}

/* ---------------- members ---------------- */
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.member-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem 1rem; text-align: center; box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; gap: .2rem;
}
.member-photo { width: 110px; height: 110px; margin-bottom: .5rem; }
.member-photo img, .member-photo .avatar-fallback { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; }
.member-card h3 { font-size: 1.05rem; margin: 0; }
.member-role { color: var(--blue); font-weight: 600; font-size: .9rem; margin: 0; }
.member-id { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; margin: 0 0 .6rem; }
.member-card .btn { margin-top: auto; }

.profile-card {
  display: flex; gap: 1.6rem; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow);
}
.profile-photo { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; flex: none; border: 4px solid var(--tint); }
.profile-fields { flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .9rem 1.4rem; }
.pf span { display: block; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.pf strong { color: var(--navy); font-size: 1.02rem; }

/* ---------------- gallery ---------------- */
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.1rem; }
.album-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.album-cover { display: block; aspect-ratio: 4/3; background: var(--tint); overflow: hidden; }
.album-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.album-cover:hover img { transform: scale(1.04); }
.cover-fallback { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 2.4rem; opacity: .5; }
.album-body { padding: .9rem 1rem 1.1rem; }
.album-body h3 { font-size: 1.05rem; margin-bottom: .15rem; }
.album-body h3 a { color: var(--navy); }
.album-date { color: var(--muted); font-size: .85rem; }
.album-body p { margin: .4rem 0 0; font-size: .92rem; color: var(--ink); }
.album-count { color: var(--blue); font-weight: 600; font-size: .85rem !important; }
.album-sub { color: var(--muted); }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .8rem; margin-top: 1.2rem; }
.photo-cell { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--tint); cursor: zoom-in; }
.photo-cell img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.photo-cell figcaption { font-size: .84rem; color: var(--muted); padding: .4rem .6rem; background: #fff; border-top: 1px solid var(--line); }

.lightbox {
  position: fixed; inset: 0; background: rgba(8, 18, 36, .92); z-index: 90;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .8rem; padding: 1.2rem;
}
.lightbox[hidden] { display: none; }
.lightbox-img { max-width: min(96vw, 1200px); max-height: 80vh; object-fit: contain; border-radius: 6px; }
.lightbox-caption { color: #e6edf7; margin: 0; text-align: center; }
.lightbox-close {
  position: absolute; top: 1rem; right: 1.2rem; background: rgba(255,255,255,.15); color: #fff;
  border: 0; font-size: 1.8rem; line-height: 1; width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
}
.lightbox-close:hover { background: rgba(255,255,255,.3); }

/* ---------------- quick links ---------------- */
.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.quick-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem 1.1rem; box-shadow: var(--shadow); color: var(--navy);
  display: flex; flex-direction: column; gap: .2rem; transition: transform .15s ease;
}
.quick-card:hover { transform: translateY(-3px); text-decoration: none; }
.quick-card strong { font-size: 1.05rem; }
.quick-card span { color: var(--muted); font-size: .88rem; }
.quick-icon { font-size: 1.5rem !important; }

/* ---------------- contact ---------------- */
.contact-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 1.3rem; align-items: start; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.3rem; box-shadow: var(--shadow); }
.card h2 { font-size: 1.15rem; }
.contact-form .field { margin-bottom: .9rem; flex: none; }
.form-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.form-status { font-size: .9rem; color: var(--muted); }
.contact-info { display: flex; flex-direction: column; gap: 1.1rem; }
.map-frame { width: 100%; height: 260px; border: 0; border-radius: 8px; background: var(--tint); }
.social-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.social-link { font-size: .88rem; font-weight: 600; background: var(--tint); border: 1px solid var(--line); border-radius: 999px; padding: .2rem .75rem; color: var(--navy); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.banner { border-radius: var(--radius); padding: .85rem 1.1rem; margin-bottom: 1.2rem; font-weight: 600; }
.banner-ok { background: var(--ok-bg); color: var(--ok); border: 1px solid #bfe7d3; }
.banner-err { background: var(--err-bg); color: var(--err); border: 1px solid #f5c6c2; }

/* ---------------- pagination ---------------- */
.pager { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-top: 1.6rem; }
.page-link {
  border: 1px solid var(--line); background: #fff; color: var(--navy);
  border-radius: 8px; padding: .38rem .8rem; font-size: .9rem; font-weight: 600;
}
.page-link:hover { background: var(--tint); text-decoration: none; }
.page-link.is-current { background: var(--navy); color: #fff; border-color: var(--navy); }
.page-link.is-disabled { opacity: .45; }

/* ---------------- prose ---------------- */
.prose p { margin: 0 0 1rem; }
.prose { font-size: 1.01rem; }

/* ---------------- footer ---------------- */
.site-footer { background: var(--navy); color: #dbe6f5; margin-top: 2.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 1.6rem; padding: 2.2rem 1.1rem; }
.site-footer strong { color: #fff; }
.site-footer h3 { color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; }
.site-footer a { color: #bcd4f2; }
.footer-note { font-size: .9rem; opacity: .9; }
.footer-links, .footer-contact { list-style: none; margin: 0; padding: 0; font-size: .92rem; display: flex; flex-direction: column; gap: .35rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.16); padding: .9rem 0; font-size: .85rem; }
.social-row .social-link { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.25); color: #dbe6f5; }

/* ---------------- responsive ---------------- */
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.2rem; }
  .contact-grid { grid-template-columns: 1fr; }
  .profile-card { flex-direction: column; align-items: center; text-align: center; }
  .profile-fields { text-align: left; }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; border-top: 1px solid var(--line); }
  .site-nav.is-open { display: block; }
  .nav-links { flex-direction: column; padding: .3rem 0; }
  .nav-link { border-bottom: 0; border-left: 3px solid transparent; }
  .nav-link.is-active { background: var(--tint); border-left-color: var(--blue); }
  .brand-text strong { font-size: .92rem; }
  .brand-logo, .brand-badge { width: 42px; height: 42px; font-size: .95rem; }
  .hero { padding: 2.2rem 0; }
  .search-bar { flex-direction: column; align-items: stretch; }
  .search-actions { justify-content: flex-start; }
  .section { padding: 1.6rem 0; }
}
