/* Projects Georgia — მთავარი გვერდი. ფერები აღებულია ლოგოდან. */
:root {
  --blue: #023f7e;
  --blue-dark: #012c59;
  --blue-soft: #e8eff8;
  --green: #5aa51b;
  --green-dark: #47861a;
  --yellow: #dacc0c;
  --red: #c62828;
  --red-soft: #fdecec;
  --ink: #1d2733;
  --muted: #5f6b7a;
  --line: #e3e8ef;
  --bg: #f4f6f9;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .08);
  --shadow-hover: 0 10px 24px rgba(2, 63, 126, .12);
  --font-body: 'DejaVu Sans Condensed', 'Sylfaen', system-ui, sans-serif;
  --font-head: 'ALK Rounded Mtav Med', 'DejaVu Sans Condensed', 'Sylfaen', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 var(--font-body);
}

img { max-width: 100%; height: auto; }

a { color: var(--blue); }

h1, h2, h3 { font-family: var(--font-head); font-weight: normal; line-height: 1.3; margin: 0; }

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

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--blue); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(1.4) blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: block; flex-shrink: 0; }
.brand img { display: block; width: auto; height: 52px; }

.site-nav { display: flex; flex-wrap: wrap; gap: 4px; }
.site-nav a {
  color: var(--ink); text-decoration: none; font-size: 14px;
  padding: 8px 12px; border-radius: 999px; transition: background .15s, color .15s;
}
.site-nav a:hover { background: var(--blue-soft); color: var(--blue); }
.site-nav a[aria-current="page"] { background: var(--blue); color: #fff; }

.nav-toggle {
  display: none; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font: inherit; font-size: 14px; padding: 8px 12px; border-radius: 10px; cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(circle at 90% 10%, rgba(218, 204, 12, .25), transparent 40%),
    linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: #fff;
  padding: 40px 0 44px;
}
.hero-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.hero-text { max-width: 680px; }
.hero h1 { font-size: 30px; margin-bottom: 10px; }
.hero p { margin: 0 0 22px; color: rgba(255, 255, 255, .85); font-size: 16px; }

.search {
  display: flex; background: #fff; border-radius: 12px; padding: 5px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18); max-width: 560px;
}
.search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font: inherit; color: var(--ink); padding: 10px 12px;
}
.search button {
  border: 0; border-radius: 9px; background: var(--green); color: #fff;
  font: inherit; font-weight: bold; padding: 10px 22px; cursor: pointer;
}
.search button:hover { background: var(--green-dark); }

.hero-side { display: flex; flex-direction: column; align-items: center; gap: 16px; flex-shrink: 0; }
.hero-stat {
  display: flex; flex-direction: column; align-items: center;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2);
  border-radius: var(--radius); padding: 16px 28px;
}
.hero-stat-num { font-family: var(--font-head); font-size: 44px; line-height: 1; color: var(--yellow); }
.hero-stat-label { font-size: 13px; color: rgba(255, 255, 255, .85); margin-top: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 18px; border-radius: 10px; font-weight: bold; font-size: 14px;
  text-decoration: none; transition: background .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-accent { background: var(--yellow); color: var(--blue-dark); }
.btn-accent:hover { background: #ebdc1b; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-facebook { background: #1877f2; color: #fff; }
.btn-facebook:hover { background: #0f63d0; }

/* ---------- Layout ---------- */
.layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px;
  padding-top: 28px; padding-bottom: 48px;
}

.listing-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px;
}
.listing-head h2 { font-size: 22px; color: var(--blue); }

.sort { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sort-label { font-size: 13px; color: var(--muted); margin-right: 2px; }
.sort-pill {
  font-size: 13px; text-decoration: none; color: var(--ink);
  border: 1px solid var(--line); background: #fff;
  padding: 5px 12px; border-radius: 999px;
}
.sort-pill:hover { border-color: var(--blue); color: var(--blue); }
.sort-pill.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ---------- Cards ---------- */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s, border-color .2s;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); border-color: #c9d6e6; }
.card-expiring { border-left: 4px solid var(--red); }

.card-link { display: flex; gap: 18px; padding: 18px; color: inherit; text-decoration: none; }

.card-img {
  flex-shrink: 0; width: 80px; height: 80px; object-fit: contain;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 6px;
}

.card-body { min-width: 0; flex: 1; }

.card-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.card-code { font-size: 12px; color: var(--muted); letter-spacing: .03em; }
.badge { font-size: 11px; font-weight: bold; padding: 2px 9px; border-radius: 999px; }
.badge-new { background: #e9f6df; color: var(--green-dark); }
.badge-expiring { background: var(--red-soft); color: var(--red); }

.card-title { font-size: 17px; color: var(--blue-dark); margin-bottom: 6px; }
.card-link:hover .card-title { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }

.card-desc {
  margin: 0 0 12px; color: var(--muted); font-size: 14px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.card-meta {
  display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0;
  padding-top: 10px; border-top: 1px dashed var(--line); font-size: 13px;
}
.card-meta div { display: flex; gap: 6px; min-width: 0; }
.card-meta dt { color: var(--muted); }
.card-meta dt::after { content: ":"; }
.card-meta dd { margin: 0; color: var(--ink); font-weight: bold; }
.card-expiring .card-deadline { color: var(--red); }

.card-ad { display: none; text-align: center; }
.card-ad img { border-radius: var(--radius); }

.empty {
  background: #fff; border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 32px; text-align: center; color: var(--muted);
}

/* ---------- Pagination ---------- */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 28px; }
.pagination a, .pagination span {
  min-width: 40px; text-align: center; padding: 8px 12px; border-radius: 10px;
  font-size: 14px; text-decoration: none; border: 1px solid var(--line); background: #fff; color: var(--ink);
}
.pagination a:hover { border-color: var(--blue); color: var(--blue); }
.pagination .is-current { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ---------- Sidebar ---------- */
.sidebar { display: flex; flex-direction: column; gap: 18px; }
.panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
}
.panel-title { font-size: 17px; color: var(--blue); margin-bottom: 12px; }
.panel-title-alert { color: var(--red); }

.expiring { list-style: none; margin: 0; padding: 0; }
.expiring li + li { border-top: 1px solid var(--line); }
.expiring a { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; text-decoration: none; color: inherit; }
.expiring img {
  flex-shrink: 0; width: 44px; height: 44px; object-fit: contain;
  border: 1px solid var(--line); border-radius: 8px; padding: 3px;
}
.expiring-title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 14px; color: var(--blue-dark); line-height: 1.4;
}
.expiring a:hover .expiring-title { color: var(--blue); text-decoration: underline; }
.expiring-date { display: block; font-size: 12px; color: var(--red); margin-top: 3px; }

.panel-subscribe {
  background: linear-gradient(160deg, #f3f9ee 0%, #fff 70%);
  border-color: #d6eac6;
}
.panel-subscribe p { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.panel-subscribe .btn { width: 100%; }
.panel-subscribe .btn + .btn { margin-top: 8px; }

.panel-ad { padding: 10px; text-align: center; }
.panel-ad img { display: block; margin: 0 auto; border-radius: 10px; }

.panel-fb { overflow: hidden; }
.panel-fb:has(.fb-page:empty) { display: none; }

.search-compact { box-shadow: none; border: 1px solid var(--line); max-width: none; }
.search-compact button { padding: 8px 14px; }

/* ---------- Project page ---------- */
.grant-main { min-width: 0; display: flex; flex-direction: column; gap: 18px; }

.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--blue); text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--ink); }

.notice {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
}
.notice-archived { background: #fff8e1; border-color: #f1d98a; color: #6d5200; }
.notice-archived a { color: #6d5200; font-weight: bold; }
.notice-empty { flex-direction: column; align-items: flex-start; padding: 32px; }
.notice-empty h1 { font-size: 24px; color: var(--blue); }
.notice-empty p { margin: 0 0 6px; color: var(--muted); }

.grant {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px;
}

.grant-head { display: flex; gap: 20px; align-items: flex-start; }
.grant-logo {
  flex-shrink: 0; width: 96px; height: 96px; object-fit: contain;
  border: 1px solid var(--line); border-radius: 14px; padding: 8px; background: #fff;
}
.grant-head-text { min-width: 0; }
.grant-title { font-size: 26px; color: var(--blue-dark); margin: 4px 0 8px; overflow-wrap: anywhere; }
.grant-source { margin: 0; color: var(--muted); font-size: 14px; }
.grant-source strong { color: var(--ink); }

.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px;
  margin: 24px 0 0; padding: 0;
}
.fact {
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
}
.fact dt { font-size: 12px; color: var(--muted); }
.fact dd { margin: 4px 0 0; font-size: 17px; font-weight: bold; color: var(--ink); }
.fact .fact-note { font-size: 13px; font-weight: normal; color: var(--green-dark); margin-top: 2px; }
.fact-alert { background: var(--red-soft); border-color: #f5c2c2; }
.fact-alert dd, .fact-alert .fact-note { color: var(--red); }

.grant-tags { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.tag-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tag-row-label { font-size: 13px; color: var(--muted); margin-right: 4px; }
.chip {
  font-size: 13px; text-decoration: none; padding: 4px 12px; border-radius: 999px;
  background: var(--blue-soft); color: var(--blue); border: 1px solid transparent;
}
.chip:hover { border-color: var(--blue); }
.chip-green { background: #e9f6df; color: var(--green-dark); }
.chip-green:hover { border-color: var(--green-dark); }

.prose {
  margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line);
  font-size: 15px; line-height: 1.75; overflow-wrap: anywhere;
}
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 14px; }
.prose h2, .prose h3, .prose h4 { color: var(--blue-dark); margin: 24px 0 10px; }
.prose h2 { font-size: 20px; }
.prose h3 { font-size: 18px; }
.prose h4 { font-size: 16px; }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--green); }
.prose a { color: var(--blue); text-underline-offset: 3px; }
.prose img { border-radius: 10px; margin: 8px 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.prose blockquote { margin: 0 0 14px; padding: 8px 16px; border-left: 4px solid var(--yellow); background: var(--bg); }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 14px; display: block; overflow-x: auto; }
.prose td, .prose th { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }

.attachment {
  display: flex; align-items: center; gap: 14px; margin-top: 22px; padding: 14px 16px;
  border: 1px dashed #b9c9de; border-radius: 12px; background: var(--blue-soft);
  color: inherit; text-decoration: none;
}
.attachment:hover { border-style: solid; border-color: var(--blue); }
.attachment > span:first-of-type { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.attachment strong { color: var(--blue-dark); }
.attachment-name { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.attachment-action { font-weight: bold; color: var(--blue); white-space: nowrap; }

.share {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line);
}
.share-label { font-size: 13px; color: var(--muted); margin-right: 4px; }
.btn-small { padding: 7px 14px; font-size: 13px; }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); font: inherit; font-size: 13px; font-weight: bold; cursor: pointer; }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-ghost.is-done { border-color: var(--green); color: var(--green-dark); }

.grant-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grant-nav-link {
  display: flex; flex-direction: column; gap: 4px; padding: 14px 16px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: inherit; min-width: 0;
}
.grant-nav-link:hover { border-color: var(--blue); box-shadow: var(--shadow-hover); }
.grant-nav-next { text-align: right; grid-column: 2; }
.grant-nav-dir { font-size: 12px; color: var(--muted); }
.grant-nav-title {
  color: var(--blue-dark); font-size: 14px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.section-title { font-size: 20px; color: var(--blue); margin-bottom: 12px; }
.related-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
}
@media (max-width: 760px) {
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.related-card {
  height: 100%; display: flex; flex-direction: column; gap: 8px; padding: 14px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); text-decoration: none; color: inherit;
  transition: box-shadow .2s, transform .2s;
}
.related-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.related-card img { width: 64px; height: 64px; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.related-title {
  color: var(--blue-dark); font-size: 14px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.related-meta { margin-top: auto; font-size: 12px; color: var(--muted); }

.badge-archived { background: #fff3cd; color: #6d5200; }

/* ---------- Filter page ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: #fff; padding: 28px 0 30px;
}
.page-hero h1 { font-size: 26px; margin-bottom: 6px; }
.page-hero p { margin: 0; color: rgba(255, 255, 255, .85); }

.filter-layout {
  display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; align-items: start;
  padding-top: 28px; padding-bottom: 48px;
}

.filter-panel {
  position: sticky; top: 88px; max-height: calc(100vh - 104px); overflow-y: auto;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.filter-form { display: flex; flex-direction: column; }
.filter-block { border: 0; margin: 0; padding: 16px 18px; border-bottom: 1px solid var(--line); min-width: 0; }
.filter-label { display: block; font-family: var(--font-head); color: var(--blue); font-size: 15px; margin-bottom: 10px; padding: 0; }
.filter-group > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; margin-bottom: 0; }
.filter-group > summary::-webkit-details-marker { display: none; }
.filter-group > summary::after { content: "▾"; margin-left: auto; color: var(--muted); transition: transform .15s; }
.filter-group:not([open]) > summary::after { transform: rotate(-90deg); }
.filter-group[open] > summary { margin-bottom: 10px; }
.filter-count {
  font-family: var(--font-body); font-size: 12px; font-weight: bold;
  background: var(--blue); color: #fff; border-radius: 999px; padding: 0 8px;
}

.filter-input {
  width: 100%; font: inherit; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: #fff;
}
.filter-input:focus { border-color: var(--blue); outline: 3px solid var(--blue-soft); }

.check-list { display: flex; flex-direction: column; gap: 2px; }
.check {
  display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px;
  cursor: pointer; font-size: 14px; line-height: 1.35;
}
.check:hover { background: var(--bg); }
.check input { width: 17px; height: 17px; flex-shrink: 0; margin: 0; accent-color: var(--blue); cursor: pointer; }
.check-label { flex: 1; min-width: 0; }
.check-count { font-size: 12px; color: var(--muted); background: var(--bg); border-radius: 999px; padding: 0 8px; }
.check.is-empty .check-label, .check.is-empty .check-count { color: #a3acb8; }
.check:has(input:checked) { background: var(--blue-soft); }
.check:has(input:checked) .check-label { color: var(--blue-dark); font-weight: bold; }
.filter-hint { font-size: 12px; color: var(--muted); margin: 8px 0 0; }

.filter-radios .check-list, .filter-radios { display: flex; flex-direction: column; gap: 2px; }

.filter-actions {
  display: flex; gap: 8px; padding: 16px 18px;
  position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line);
}
.filter-actions .btn { flex: 1; }
.filter-actions button.btn { border: 0; font: inherit; font-weight: bold; font-size: 14px; cursor: pointer; }

.scope-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.scope-tab {
  color: #fff; text-decoration: none; font-size: 14px; padding: 7px 16px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .06);
}
.scope-tab:hover { background: rgba(255, 255, 255, .16); }
.scope-tab.is-active { background: var(--yellow); border-color: var(--yellow); color: var(--blue-dark); font-weight: bold; }

.card-archived .card-img { filter: grayscale(.6); opacity: .85; }
.card-archived .card-title { color: var(--ink); }

.results { min-width: 0; }
.results-count { color: var(--green-dark); }

.active-filters { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.active-chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; text-decoration: none;
  background: var(--blue); color: #fff; padding: 5px 12px; border-radius: 999px;
}
.active-chip span { font-size: 15px; line-height: 1; opacity: .8; }
.active-chip:hover { background: var(--blue-dark); }
.active-chip:hover span { opacity: 1; }

.empty p { margin: 0 0 8px; }
.empty .btn { margin-top: 8px; }

@media (max-width: 860px) {
  .filter-layout { grid-template-columns: 1fr; gap: 20px; }
  .filter-panel { position: static; max-height: none; overflow: visible; }
  .page-hero { padding: 22px 0 24px; }
  .page-hero h1 { font-size: 22px; }
}

/* ---------- Donors page ---------- */
.page-hero-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.page-hero-inner p { max-width: 640px; }
.hero-stats { display: flex; gap: 12px; margin: 0; flex-shrink: 0; }
.hero-stats div {
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2);
  border-radius: var(--radius); padding: 10px 18px; text-align: center;
}
.hero-stats dt { font-size: 12px; color: rgba(255, 255, 255, .8); }
.hero-stats dd { margin: 2px 0 0; font-family: var(--font-head); font-size: 28px; line-height: 1.1; color: var(--yellow); }

.page-main { padding-top: 28px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 36px; }
.section-lead { margin: -4px 0 14px; color: var(--muted); font-size: 14px; }
.donor-search { width: 100%; max-width: 300px; }

.donor-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px;
}
.donor-grid [hidden] { display: none; }
.donor-card {
  height: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  text-decoration: none; color: inherit; transition: box-shadow .2s, transform .2s, border-color .2s;
}
.donor-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); border-color: #c9d6e6; }
.donor-card img { width: 64px; height: 64px; object-fit: contain; border: 1px solid var(--line); border-radius: 12px; padding: 5px; }
.donor-name { font-weight: bold; color: var(--blue-dark); line-height: 1.4; }
.donor-count { margin-top: auto; font-size: 13px; color: var(--green-dark); font-weight: bold; }

.donor-wall {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px;
}
.donor-wall [hidden] { display: none; }
.donor-tile {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  text-decoration: none; color: var(--ink); font-size: 13px;
}
.donor-tile:hover { border-color: var(--blue); color: var(--blue); }
.donor-tile img { width: 40px; height: 40px; object-fit: contain; flex-shrink: 0; }
.donor-tile-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.donor-tile-count { font-size: 12px; color: var(--muted); background: var(--bg); border-radius: 999px; padding: 0 8px; }
.show-more { margin-top: 14px; }

@media (max-width: 860px) {
  .page-hero-inner { flex-direction: column; align-items: stretch; }
  .hero-stats div { flex: 1; }
  .donor-search { max-width: none; }
}
@media (max-width: 560px) {
  .donor-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .donor-card { padding: 14px; }
  .donor-card img { width: 48px; height: 48px; }
  .donor-name { font-size: 14px; }
  .donor-wall { grid-template-columns: 1fr; }
}

/* ---------- About page ---------- */
.prose-plain { margin-top: 0; padding-top: 0; border-top: 0; font-size: 16px; }
.prose-plain h2:first-child { font-size: 22px; }

.feature-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px;
}
.feature {
  display: flex; flex-direction: column; gap: 8px; padding: 20px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.feature-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px; background: var(--blue-soft); color: var(--blue);
}
.feature:nth-child(2) .feature-icon { background: #e9f6df; color: var(--green-dark); }
.feature:nth-child(3) .feature-icon { background: #fff8d6; color: #8a7a00; }
.feature:nth-child(4) .feature-icon { background: var(--red-soft); color: var(--red); }
.feature h3 { font-size: 16px; color: var(--blue-dark); }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }
.feature a { margin-top: auto; font-size: 14px; font-weight: bold; text-decoration: none; }
.feature a:hover { text-decoration: underline; }

.cta-band {
  display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap;
  padding: 24px 28px; border-radius: var(--radius); color: #fff;
  background:
    radial-gradient(circle at 95% 0%, rgba(218, 204, 12, .3), transparent 45%),
    linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
}
.cta-band h2 { font-size: 20px; margin-bottom: 4px; }
.cta-band p { margin: 0; color: rgba(255, 255, 255, .85); }

@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 20px; }
  .cta-band .btn { width: 100%; }
  .hero-stats { flex-wrap: wrap; }
}

/* ---------- Contact page ---------- */
.contact-card .section-title { margin-bottom: 16px; }
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form-field label { font-size: 14px; font-weight: bold; color: var(--ink); }
.form-field input, .form-field textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1px solid #cfd8e3; border-radius: 10px; padding: 10px 12px;
}
.form-field textarea { resize: vertical; min-height: 140px; }
.form-field input:focus, .form-field textarea:focus { border-color: var(--blue); outline: 3px solid var(--blue-soft); }
.form-field [aria-invalid="true"] { border-color: var(--red); background: #fffafa; }
.field-error { margin: 0; font-size: 13px; color: var(--red); }
.req { color: var(--red); }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.form-actions .btn { border: 0; font: inherit; font-weight: bold; padding: 12px 28px; cursor: pointer; }
.form-note { margin: 0; font-size: 13px; color: var(--muted); }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.notice-success { background: #edf7e6; border-color: #bfe0a6; color: var(--green-dark); flex-direction: column; align-items: flex-start; gap: 2px; }
.notice-error { background: var(--red-soft); border-color: #f5c2c2; color: var(--red); margin-bottom: 16px; }
.notice-info { background: var(--blue-soft); border-color: #c4d6ec; color: var(--blue-dark); flex-direction: column; align-items: flex-start; gap: 6px; }
.notice-info form { margin-top: 4px; }
.notice-info button.btn { border: 0; font: inherit; font-weight: bold; cursor: pointer; }

.contact-info { font-size: 14px; line-height: 1.7; }
.contact-info p { margin: 0 0 10px; }
.contact-info h2 { font-size: 15px; }
.contact-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.contact-actions .btn { overflow-wrap: anywhere; }

@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
  .form-actions .btn { width: 100%; }
}

/* ---------- News ---------- */
.search-hero-compact { flex-shrink: 0; width: 100%; max-width: 380px; }

.news-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px;
}
.news-card a {
  height: 100%; display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  text-decoration: none; color: inherit; transition: box-shadow .2s, transform .2s;
}
.news-card a:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.news-card-media { display: block; aspect-ratio: 16 / 9; background: var(--blue-soft); overflow: hidden; }
.news-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.news-card a:hover .news-card-media img { transform: scale(1.03); }
.news-card-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; }
.news-card-meta { font-size: 12px; color: var(--muted); }
.news-card-title { font-family: var(--font-head); font-size: 16px; line-height: 1.35; color: var(--blue-dark); }
.news-card a:hover .news-card-title { color: var(--blue); }
.news-card-desc {
  font-size: 14px; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.news-card-featured { grid-column: span 3; }
.news-card-featured a { flex-direction: row; }
.news-card-featured .news-card-media { flex: 0 0 58%; aspect-ratio: auto; min-height: 300px; }
.news-card-featured .news-card-body { justify-content: center; padding: 28px 32px; gap: 12px; }
.news-card-featured .news-card-title { font-size: 24px; }
.news-card-featured .news-card-desc { -webkit-line-clamp: 5; font-size: 15px; }

.news-grid-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.news-grid-compact .news-card-desc { display: none; }

.news-article .grant-title { margin-top: 0; }
.news-article-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; font-size: 14px; color: var(--muted); }
.news-article-meta strong { color: var(--ink); }
.news-article-image { margin: 22px 0 0; border-radius: 12px; overflow: hidden; background: var(--blue-soft); }
.news-article-image img { display: block; width: 100%; height: auto; max-height: 520px; object-fit: cover; }
.news-article .prose { margin-top: 24px; }

@media (max-width: 1020px) {
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-card-featured { grid-column: span 2; }
}
@media (max-width: 860px) {
  .search-hero-compact { max-width: none; }
  .news-card-featured a { flex-direction: column; }
  .news-card-featured .news-card-media { flex: none; aspect-ratio: 16 / 9; min-height: 0; }
  .news-card-featured .news-card-body { padding: 18px; }
  .news-card-featured .news-card-title { font-size: 19px; }
}
@media (max-width: 560px) {
  .news-grid, .news-grid-compact { grid-template-columns: 1fr; }
  .news-card-featured { grid-column: auto; }
}

/* ---------- Subscribe / unsubscribe ---------- */
.form-field-half { max-width: calc(50% - 8px); }
.sector-picker { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 16px; margin: 0; min-width: 0; }
.sector-picker legend { font-weight: bold; font-size: 14px; padding: 0 6px; }
.sector-picker > .btn { margin: 4px 0 10px; }
.sector-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 12px; }
.benefits { margin: 0; padding-left: 18px; font-size: 14px; color: var(--muted); display: flex; flex-direction: column; gap: 8px; }
.benefits li::marker { color: var(--green); }
.panel-text { margin: 0; font-size: 14px; color: var(--muted); }

.page-narrow { max-width: 720px; }
.notice-panel p { margin: 0 0 12px; }
.notice-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.notice-actions button.btn { border: 0; font: inherit; font-weight: bold; cursor: pointer; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #a61f1f; }

@media (max-width: 560px) {
  .form-field-half { max-width: none; }
  .sector-options { grid-template-columns: 1fr; }
  .notice-actions .btn { flex: 1; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--blue-dark); color: rgba(255, 255, 255, .8); font-size: 14px; }
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 24px; padding-top: 24px; padding-bottom: 24px;
}
.footer-inner p { margin: 0; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
  .panel-ad { display: none; }
  .card-ad { display: block; }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 2px; padding: 8px 16px 16px;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(0, 0, 0, .08);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { border-radius: 10px; padding: 12px; }
  .hero-inner { flex-direction: column; align-items: stretch; }
  .hero-side { flex-direction: row; justify-content: space-between; }
  .hero-stat { flex-direction: row; gap: 10px; padding: 10px 16px; }
  .hero-stat-num { font-size: 28px; }
  .hero-stat-label { margin-top: 0; }
}

@media (max-width: 560px) {
  body { font-size: 14px; }
  .brand img { height: 40px; }
  .header-inner { min-height: 62px; }
  .hero { padding: 26px 0 30px; }
  .hero h1 { font-size: 23px; }
  .hero p { font-size: 14px; }
  .hero-side { flex-direction: column; align-items: stretch; }
  .hero-stat { justify-content: center; }
  .search button { padding: 10px 14px; }
  .card-link { gap: 12px; padding: 14px; }
  .card-img { width: 56px; height: 56px; }
  .card-title { font-size: 15px; }
  .card-meta { flex-direction: column; gap: 4px; }
  .listing-head { flex-direction: column; align-items: flex-start; }
  .grant { padding: 18px; }
  .grant-head { gap: 14px; }
  .grant-logo { width: 64px; height: 64px; padding: 5px; }
  .grant-title { font-size: 20px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .fact dd { font-size: 15px; }
  .grant-nav { grid-template-columns: 1fr; }
  .grant-nav-next { grid-column: auto; }
  .related-grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .card:hover, .btn:hover { transform: none; }
}
