/* ==========================================================================
   ApnaBlood — Premium Design System
   ========================================================================== */

:root {
  --ink:        #0F1117;
  --ink-2:      #161923;
  --ink-3:      #1E2230;
  --paper:      #FFFFFF;
  --paper-2:    #F7F8FA;
  --paper-3:    #EFF1F5;

  --crimson:      #E11D48;
  --crimson-dark: #9F1239;
  --crimson-lite: #FB7185;
  --gold:         #F59E0B;
  --teal:         #0D9488;

  --text:       #0F1117;
  --text-soft:  #4B5563;
  --muted:      #9CA3AF;
  --on-dark:    #F9FAFB;
  --on-dark-soft: rgba(249,250,251,0.72);

  --success:    #059669;
  --success-bg: #ECFDF5;
  --error:      #DC2626;
  --error-bg:   #FEF2F2;

  --line:       #E5E7EB;

  --r-sm: 8px;
  --r:    14px;
  --r-lg: 22px;
  --r-full: 999px;

  --sh-sm: 0 1px 2px rgba(15,17,23,0.04), 0 1px 3px rgba(15,17,23,0.06);
  --sh:    0 4px 6px -1px rgba(15,17,23,0.06), 0 2px 4px -2px rgba(15,17,23,0.04);
  --sh-lg: 0 20px 25px -5px rgba(15,17,23,0.08), 0 8px 10px -6px rgba(15,17,23,0.04);

  --display: 'Fraunces', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper-2);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  color: var(--text);
}
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.125rem; }
h4 { font-size: 0.95rem; }

p { color: var(--text-soft); margin: 0 0 1em; }
a { color: var(--crimson-dark); text-decoration: none; transition: color .18s var(--ease); }
a:hover { color: var(--crimson); }

/* ---------- Background layer ---------- */
#site-bg-layer {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(900px 500px at 12% -5%, rgba(225,29,72,0.06), transparent 60%),
    radial-gradient(700px 460px at 92% 8%, rgba(245,158,11,0.05), transparent 60%),
    var(--paper-2);
}
.page-content { position: relative; z-index: 1; }

.blood-cell { position: absolute; animation: drift linear infinite; will-change: transform, opacity; }
.blood-cell svg { width: 100%; height: 100%; display: block; }
@keyframes drift {
  0%   { transform: translate3d(0,0,0) rotate(0deg); opacity: 0; }
  10%  { opacity: var(--op, .18); }
  90%  { opacity: var(--op, .18); }
  100% { transform: translate3d(var(--dx,20px), -120vh, 0) rotate(var(--rot,25deg)); opacity: 0; }
}

.ecg-band { position: absolute; left: 0; width: 100%; height: 150px; }
.ecg-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.ecg-path {
  fill: none; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round;
  animation: ecgTrace linear infinite;
}
@keyframes ecgTrace {
  0%   { stroke-dashoffset: var(--len, 4000); opacity: 1; }
  72%  { stroke-dashoffset: 0; opacity: 1; }
  88%  { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}

/* ---------- Ticker ---------- */
.site-ticker {
  background: linear-gradient(90deg, var(--ink) 0%, var(--ink-3) 50%, var(--ink) 100%);
  color: var(--on-dark);
  overflow: hidden; white-space: nowrap;
  padding: 9px 0; font-size: 0.78rem; font-weight: 500;
  position: relative; z-index: 3;
}
.site-ticker-track { display: inline-block; animation: ticker 38s linear infinite; }
.site-ticker-track span { margin-right: 52px; opacity: 0.88; }
@keyframes ticker { from { transform: translate3d(0,0,0); } to { transform: translate3d(-50%,0,0); } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.72);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(15,17,23,0.06);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--crimson), var(--crimson-dark));
  color: #fff; border-radius: 10px; font-weight: 800; font-size: 1.05rem;
  box-shadow: 0 4px 12px -2px rgba(225,29,72,0.45);
}
.brand-text {
  font-family: var(--display); font-weight: 700; font-size: 1.18rem;
  letter-spacing: -0.02em; color: var(--text);
}

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  color: var(--text-soft); font-weight: 500; font-size: 0.9rem;
  padding: 9px 14px; border-radius: var(--r-full);
  transition: background .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);
}
.main-nav a:hover { background: var(--paper-3); color: var(--text); }
.main-nav a.active { color: var(--text); font-weight: 600; background: var(--paper-3); }
.main-nav a.nav-cta {
  background: linear-gradient(135deg, var(--crimson), var(--crimson-dark));
  color: #fff !important; font-weight: 600; margin-left: 6px;
  box-shadow: 0 4px 14px -3px rgba(225,29,72,0.5);
}
.main-nav a.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -4px rgba(225,29,72,0.55); }

/* ---------- Language toggle ---------- */
.lang-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: 6px; padding: 8px 13px !important;
  border: 1px solid var(--line); border-radius: var(--r-full);
  font-size: 0.83rem !important; font-weight: 600 !important;
  color: var(--text-soft) !important; background: var(--paper);
  transition: border-color .18s var(--ease), color .18s var(--ease), background .18s var(--ease);
}
.lang-toggle:hover { border-color: var(--crimson); color: var(--crimson) !important; background: var(--paper); }
.lang-toggle svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ---------- Buttons ---------- */
.btn-search, .btn-primary, .btn-muted {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-weight: 600; font-size: 0.94rem;
  padding: 13px 26px; border: none; border-radius: var(--r-full);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.btn-search, .btn-primary.solid {
  background: linear-gradient(135deg, var(--crimson), var(--crimson-dark));
  color: #fff !important; box-shadow: 0 6px 18px -4px rgba(225,29,72,0.45);
}
.btn-search:hover, .btn-primary.solid:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -6px rgba(225,29,72,0.55); }
.btn-search:active, .btn-primary.solid:active { transform: translateY(0); }
.btn-primary {
  background: #fff; color: var(--crimson-dark) !important;
  box-shadow: var(--sh); border: 1px solid var(--line);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--sh-lg); }
.btn-primary.btn-full { width: 100%; }
.btn-muted { background: var(--ink-3); color: #fff !important; }
.btn-muted:hover { background: var(--ink); }

/* ---------- Cards & forms ---------- */
.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 28px; margin-bottom: 20px;
  box-shadow: var(--sh-sm);
}

.donor-form { display: flex; flex-direction: column; gap: 16px; }
.donor-form label {
  display: flex; flex-direction: column; gap: 7px;
  font-size: 0.82rem; font-weight: 600; color: var(--text-soft);
}
select, input, textarea {
  font-family: var(--sans); font-size: 0.94rem;
  padding: 12px 14px; width: 100%;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--paper); color: var(--text);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
select:focus, input:focus, textarea:focus {
  outline: none; border-color: var(--crimson);
  box-shadow: 0 0 0 3px rgba(225,29,72,0.12);
}
input[type="checkbox"] {
  width: 20px; height: 20px; min-width: 20px; flex-shrink: 0;
  accent-color: var(--crimson); cursor: pointer;
}
input[type="color"] { padding: 4px; height: 44px; cursor: pointer; }
input[type="file"] { padding: 9px; font-size: 0.85rem; }

.error-box {
  background: var(--error-bg); color: var(--error);
  border: 1px solid rgba(220,38,38,0.18);
  padding: 12px 16px; border-radius: var(--r-sm);
  margin-bottom: 16px; font-size: 0.88rem; font-weight: 500;
}
.success-box {
  background: var(--success-bg); color: var(--success);
  border: 1px solid rgba(5,150,105,0.18);
  padding: 22px; border-radius: var(--r); text-align: center;
}
.success-box h2 { color: var(--success); font-size: 1.25rem; }

/* ---------- Banner carousel ---------- */
.banner-carousel {
  position: relative; height: 340px; overflow: hidden;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.banner-track { display: flex; height: 100%; transition: transform .7s var(--ease-out); }
.banner-slide { flex: 0 0 100%; position: relative; display: flex; align-items: flex-end; }
.banner-slide-bg { position: absolute; inset: 0; }
.banner-slide-bg img { width: 100%; height: 100%; object-fit: cover; }
.banner-slide-bg .illus-fallback { width: 100%; height: 100%; display: grid; place-items: center; }
.banner-slide-bg .illus-fallback svg { width: 130px; height: 130px; opacity: .92; }
.banner-overlay {
  position: relative; z-index: 2; width: 100%; padding: 40px 44px;
  background: linear-gradient(to top, rgba(15,17,23,0.86) 0%, rgba(15,17,23,0.45) 48%, transparent 100%);
}
.banner-overlay .b-title {
  color: #fff; font-family: var(--display); font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700; margin: 0 0 6px; letter-spacing: -0.02em;
}
.banner-overlay .b-sub { color: rgba(255,255,255,0.86); font-size: 0.98rem; margin: 0; }
.banner-dots { position: absolute; bottom: 18px; right: 30px; z-index: 3; display: flex; gap: 7px; }
.banner-dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.42); transition: all .3s var(--ease);
}
.banner-dots span.active { background: #fff; width: 26px; border-radius: var(--r-full); }
.banner-nav-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,0.16); backdrop-filter: blur(8px);
  color: #fff; font-size: 1.2rem; display: grid; place-items: center;
  transition: background .2s var(--ease);
}
.banner-nav-btn:hover { background: rgba(255,255,255,0.3); }
.banner-nav-btn.prev { left: 20px; } .banner-nav-btn.next { right: 20px; }

/* ---------- Hero ---------- */
.home-hero-strip { position: relative; padding: 72px 0 56px; text-align: center; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--paper); border: 1px solid var(--line);
  color: var(--text-soft); font-size: 0.78rem; font-weight: 600;
  padding: 7px 16px; border-radius: var(--r-full); margin-bottom: 20px;
  box-shadow: var(--sh-sm);
}
.home-hero-strip h1 { margin-bottom: 18px; }
.home-hero-strip > .wrap > p { font-size: 1.08rem; max-width: 620px; margin: 0 auto 28px; }
.home-cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.impact-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  margin: 52px auto 0; max-width: 820px;
}
.impact-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r); padding: 26px 18px; text-align: center;
  box-shadow: var(--sh-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.impact-card:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); }
.impact-card strong {
  display: block; font-family: var(--display); font-size: 2.4rem; font-weight: 700;
  background: linear-gradient(135deg, var(--crimson), var(--crimson-dark));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; line-height: 1.1;
}
.impact-card span { font-size: 0.82rem; color: var(--muted); font-weight: 500; }

/* ---------- Sections ---------- */
.section-pad { padding: 64px 0; }
.section-head { text-align: center; margin-bottom: 40px; }
.section-head p { max-width: 560px; margin: 0 auto; }

.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.why-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r); padding: 28px 22px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.why-card:hover { transform: translateY(-5px); box-shadow: var(--sh-lg); border-color: rgba(225,29,72,0.2); }
.why-card svg { width: 34px; height: 34px; margin-bottom: 14px; }
.why-card h3 { font-size: 1rem; margin-bottom: 6px; }
.why-card p { font-size: 0.88rem; margin: 0; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.steps li { display: flex; gap: 16px; align-items: flex-start; }
.step-num {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--crimson), var(--crimson-dark));
  color: #fff; font-family: var(--display); font-weight: 700; font-size: 1.05rem;
  box-shadow: 0 4px 12px -3px rgba(225,29,72,0.45);
}
.steps h3 { margin-bottom: 5px; }
.steps p { font-size: 0.9rem; margin: 0; }

/* ---------- CTA band ---------- */
.donate-cta {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-3) 55%, var(--crimson-dark) 130%);
  border-radius: var(--r-lg); padding: 48px;
}
.donate-cta::after {
  content: ''; position: absolute; top: -60%; right: -8%;
  width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, rgba(225,29,72,0.32), transparent 68%);
  pointer-events: none;
}
.donate-cta-inner {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
}
.donate-cta h2 { color: #fff; margin-bottom: 8px; }
.donate-cta p { color: var(--on-dark-soft); margin: 0; max-width: 460px; }

/* ---------- Motivation block ---------- */
.motive-block {
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-3) 60%, var(--crimson-dark) 150%);
  border-radius: var(--r-lg); padding: 26px 28px; margin-bottom: 24px;
  position: relative; overflow: hidden;
}
.motive-block::after {
  content: ''; position: absolute; top: -55%; right: -10%;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(225,29,72,0.3), transparent 70%);
  pointer-events: none;
}
.motive-line {
  display: flex; gap: 13px; align-items: flex-start;
  color: rgba(249,250,251,0.92); font-size: 0.95rem; line-height: 1.6;
  padding: 9px 0; position: relative; z-index: 2;
}
.motive-line + .motive-line { border-top: 1px solid rgba(255,255,255,0.08); }
.motive-line svg { width: 17px; height: 20px; flex-shrink: 0; margin-top: 3px; color: var(--crimson-lite); }

/* ---------- Find donor ---------- */
.find-donor-page { padding: 64px 0 80px; }
.find-donor-card {
  max-width: 680px; margin: 0 auto;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 40px;
  box-shadow: var(--sh-lg);
}
.search-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.search-field { flex: 1; min-width: 150px; display: flex; flex-direction: column; gap: 7px; }
.search-field label { font-size: 0.8rem; font-weight: 600; color: var(--text-soft); }

/* ---------- Searchable city picker ---------- */
.city-picker { position: relative; }
.city-picker .city-select-hidden { position: absolute; opacity: 0; pointer-events: none; height: 0; padding: 0; border: 0; }
.city-search-wrap { position: relative; }
.city-search-wrap::after {
  content: ''; position: absolute; right: 14px; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); pointer-events: none; transition: transform .2s var(--ease);
}
.city-picker.open .city-search-wrap::after { transform: translateY(-30%) rotate(-135deg); }
.city-search { padding-right: 36px !important; }
.city-options {
  position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 6px);
  margin: 0; padding: 6px; list-style: none;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--sh-lg); max-height: 300px; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.city-options[hidden] { display: none; }
.city-options li {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 12px; border-radius: var(--r-sm); cursor: pointer;
  font-size: 0.94rem; line-height: 1.3;
}
.city-options li:hover, .city-options li.active { background: var(--paper-3); }
.city-options li.city-empty { cursor: default; color: var(--muted); font-size: 0.88rem; }
.city-options li.city-empty:hover { background: none; }
.city-prov { font-size: 0.72rem; color: var(--muted); white-space: nowrap; flex-shrink: 0; }

/* ---------- Results ---------- */
.pickup-note {
  background: var(--success-bg); border: 1px solid rgba(5,150,105,0.16);
  color: var(--text-soft); border-radius: var(--r);
  padding: 16px 20px; font-size: 0.88rem; margin-bottom: 24px;
}
.pickup-note strong { color: var(--success); }

.donor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px,100%), 1fr)); gap: 18px; }
.donor-card {
  position: relative; overflow: hidden;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r); padding: 22px;
  box-shadow: var(--sh-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.donor-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--crimson), var(--crimson-dark));
}
.donor-card:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); }
.donor-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.donor-bg { font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--crimson-dark); }
.donor-city {
  font-size: 0.72rem; font-weight: 600; color: var(--muted);
  background: var(--paper-3); padding: 4px 10px; border-radius: var(--r-full);
}
.donor-card h3 { margin-bottom: 10px; font-size: 1.05rem; }
.donor-meta { font-size: 0.8rem; color: var(--muted); margin: 0 0 8px; }
.donor-phone {
  display: block; font-weight: 700; color: var(--text) !important;
  font-size: 1rem; margin-bottom: 8px;
}
.donor-whatsapp {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.84rem; color: var(--success) !important; font-weight: 600;
}
.empty-state {
  text-align: center; padding: 52px 32px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-sm);
}
.reminder-box {
  background: var(--paper-2); border: 1px dashed var(--line);
  border-radius: var(--r); padding: 24px; margin: 28px auto 0; text-align: left;
  max-width: 420px;
}

/* ---------- Blog ---------- */
.blog-hero { padding: 72px 0 64px; position: relative; overflow: hidden; }
.blog-hero::after {
  content: ''; position: absolute; top: -50%; right: -5%;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.12), transparent 70%);
}
.blog-hero-inner { display: flex; align-items: center; gap: 26px; position: relative; z-index: 2; }
.blog-hero-icon {
  width: 76px; height: 76px; flex-shrink: 0; padding: 15px;
  background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--r); display: grid; place-items: center;
  backdrop-filter: blur(8px);
}
.blog-hero-icon svg { width: 100%; height: 100%; }
.blog-date { font-size: 0.78rem; color: var(--muted); font-weight: 500; }
.blog-date.light { color: rgba(255,255,255,0.75); }
.blog-hero-title { color: #fff; margin: 6px 0 0; font-size: clamp(1.6rem, 3.5vw, 2.5rem); }
.blog-intro {
  font-size: 1.12rem; line-height: 1.7; color: var(--text-soft);
  border-left: 3px solid var(--crimson); padding-left: 20px;
  margin: 0 0 32px; font-style: italic;
}
.blog-post-body { white-space: pre-line; line-height: 1.85; color: var(--text); font-size: 1.02rem; }
.blog-cta-box {
  border-radius: var(--r-lg); padding: 40px 32px; text-align: center; margin-top: 44px;
  position: relative; overflow: hidden;
}
.blog-cta-box h2 { color: #fff; margin-bottom: 8px; }
.blog-cta-box p { color: rgba(255,255,255,0.86); max-width: 480px; margin: 0 auto 22px; }

.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px,100%), 1fr)); gap: 22px; margin-top: 32px; }
.blog-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r); padding: 26px; display: block; color: inherit;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
  box-shadow: var(--sh-sm);
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); }
.blog-card h3 { margin: 8px 0 10px; }
.blog-card p { font-size: 0.9rem; margin: 0; }

/* ---------- Ownership & team ---------- */
.owner-card {
  display: flex; gap: 22px; align-items: flex-start;
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-3) 65%, var(--crimson-dark) 160%);
  border-radius: var(--r-lg); padding: 30px; position: relative; overflow: hidden;
}
.owner-card::after {
  content: ''; position: absolute; top: -60%; right: -8%;
  width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(circle, rgba(225,29,72,0.28), transparent 70%);
  pointer-events: none;
}
.owner-badge {
  flex-shrink: 0; width: 60px; height: 60px; border-radius: var(--r);
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.18);
  display: grid; place-items: center; color: var(--crimson-lite);
  position: relative; z-index: 2;
}
.owner-badge svg { width: 30px; height: 30px; }
.owner-body { position: relative; z-index: 2; }
.owner-card h2 { color: #fff; font-size: 1.25rem; }
.owner-card p { color: var(--on-dark-soft); }
.owner-name { font-family: var(--display); font-size: 1.15rem; font-weight: 700; color: #fff !important; margin: 0 0 2px; }
.owner-title { font-family: var(--sans); font-weight: 500; font-size: 0.9rem; color: var(--on-dark-soft) !important; }
.owner-quote {
  margin: 14px 0 0; padding: 12px 0 12px 16px;
  border-left: 3px solid var(--crimson-lite);
  color: rgba(249,250,251,0.9); font-style: italic; font-size: 0.95rem;
}
.owner-meta {
  display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 16px;
  font-size: 0.85rem; color: rgba(249,250,251,0.62);
}
.owner-meta a { color: rgba(249,250,251,0.85); }
.owner-meta a:hover { color: #fff; }

.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(210px,100%),1fr)); gap: 18px; margin-top: 18px; }
.team-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  padding: 24px 20px; text-align: center; box-shadow: var(--sh-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.team-card:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); }
.team-avatar {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 12px;
  background: linear-gradient(135deg, var(--crimson), var(--crimson-dark));
  color: #fff; display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 1.35rem;
  box-shadow: 0 6px 16px -4px rgba(225,29,72,0.45);
}
.team-card h3 { margin: 0 0 3px; font-size: 1rem; }
.team-role { font-size: 0.82rem; color: var(--crimson-dark); font-weight: 600; margin: 0 0 6px; }
.team-note { font-size: 0.84rem; margin: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink); color: var(--on-dark);
  padding: 56px 0 40px; margin-top: 72px;
}
.footer-inner { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; }
.footer-block .brand-text { color: #fff; }
.footer-block p { color: var(--on-dark-soft); font-size: 0.9rem; }
.footer-block h4 {
  font-family: var(--sans); font-size: 0.74rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.09em;
  color: rgba(249,250,251,0.45); margin: 0 0 16px;
}
.footer-block a {
  display: block; color: var(--on-dark-soft); font-size: 0.9rem;
  margin-bottom: 10px; transition: color .18s var(--ease);
}
.footer-block a:hover { color: #fff; }
.footer-note p { font-size: 0.82rem; color: rgba(249,250,251,0.5); }

.footer-credit {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  margin-top: 36px; padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,0.09);
  font-size: 0.84rem; color: rgba(249,250,251,0.5);
}
.footer-credit .credit-line {
  font-family: var(--display); font-weight: 600; font-size: 0.92rem;
  color: rgba(249,250,251,0.8); letter-spacing: 0.01em;
}

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px,100%), 1fr));
  gap: 16px; margin-top: 24px;
}
.gallery-item {
  position: relative; overflow: hidden; border-radius: var(--r);
  background: var(--paper-3); box-shadow: var(--sh-sm);
  aspect-ratio: 4 / 3;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.gallery-item:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 16px 14px;
  background: linear-gradient(to top, rgba(15,17,23,0.85), transparent);
  color: #fff; font-size: 0.86rem; line-height: 1.4;
}
.gallery-empty {
  text-align: center; padding: 48px 24px; color: var(--muted);
  background: var(--paper); border: 1px dashed var(--line); border-radius: var(--r-lg);
}
.gallery-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px,100%),1fr)); gap: 14px; margin-top: 18px; }
.gallery-admin-item { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--paper); }
.gallery-admin-item img { width: 100%; height: 104px; object-fit: cover; display: block; }
.gallery-admin-item .ga-body { padding: 10px; }
.gallery-admin-item p { font-size: 0.78rem; margin: 0 0 8px; }

/* ---------- Floating mail button ---------- */
.floating-mail {
  position: fixed; bottom: 26px; right: 26px; z-index: 500;
  width: 58px; height: 58px; border-radius: 50%;
  background: linear-gradient(135deg, var(--crimson), var(--crimson-dark));
  color: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 26px -8px rgba(225,29,72,0.75);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.floating-mail::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid rgba(225,29,72,0.5);
  animation: mailPulse 2.6s ease-out infinite;
}
.floating-mail:hover { transform: scale(1.08); box-shadow: 0 14px 32px -8px rgba(225,29,72,0.85); }
.floating-mail svg { width: 26px; height: 26px; position: relative; z-index: 2; }
@keyframes mailPulse {
  0%   { transform: scale(1); opacity: .85; }
  100% { transform: scale(1.75); opacity: 0; }
}

/* ---------- Ad slot ---------- */
.ad-slot {
  min-height: 90px; margin: 8px auto 32px;
  border: 1px dashed var(--line); border-radius: var(--r);
  display: grid; place-items: center; color: var(--muted); font-size: 0.8rem;
}

/* ---------- Modal ---------- */
.modal-backdrop {
  display: none; position: fixed; inset: 0; z-index: 600;
  background: rgba(15,17,23,0.55); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; padding: 20px;
}
.modal-box {
  background: var(--paper); border-radius: var(--r-lg);
  padding: 32px; max-width: 400px; width: 100%;
  box-shadow: 0 30px 60px -15px rgba(15,17,23,0.35);
  animation: modalIn .3s var(--ease-out);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Dashboard / logs ---------- */
.log-item { border-bottom: 1px solid var(--line); padding: 12px 0; font-size: 0.9rem; }
.log-item:last-child { border-bottom: none; }
.other-city-input { display: none; margin-top: 8px; }

/* ---------- Honeypot ---------- */
.hp-field {
  position: absolute !important; left: -9999px !important; top: auto !important;
  width: 1px !important; height: 1px !important; overflow: hidden !important;
}

/* ---------- Admin ---------- */
.admin-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 28px; flex-wrap: wrap; }
.admin-tab {
  padding: 12px 18px; cursor: pointer; font-weight: 600; font-size: 0.88rem;
  color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.admin-tab:hover { color: var(--text-soft); }
.admin-tab.active { color: var(--crimson); border-bottom-color: var(--crimson); }
.admin-panel { display: none; }
.admin-panel.active { display: block; animation: fadeUp .35s var(--ease-out); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.admin-table th, .admin-table td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--line); }
.admin-table th { color: var(--muted); font-weight: 600; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em; }
.admin-table tr:hover td { background: var(--paper-2); }
.banner-edit-row {
  display: flex; gap: 18px; align-items: center;
  border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin-bottom: 14px;
  background: var(--paper);
}
.banner-edit-row img, .banner-edit-row .thumb-fallback {
  width: 84px; height: 58px; object-fit: cover; border-radius: var(--r-sm); flex-shrink: 0;
}
.banner-edit-row .fields { flex: 1; display: flex; flex-direction: column; gap: 9px; }
.import-result {
  background: var(--success-bg); color: var(--success);
  border: 1px solid rgba(5,150,105,0.18);
  padding: 16px 20px; border-radius: var(--r-sm); margin-bottom: 20px; font-size: 0.88rem;
}
.import-errors { color: var(--error); font-size: 0.82rem; margin-top: 10px; }

/* ---------- Scroll reveal ---------- */
.reveal { transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.js-reveal .reveal { opacity: 0; transform: translateY(22px); }
.js-reveal .reveal.in { opacity: 1; transform: none; }

/* ---------- Mobile hardening ---------- */
h1, h2, h3, h4, p, a, span, td, th, li, label {
  overflow-wrap: anywhere;
  word-break: break-word;
}
img, svg, video, table { max-width: 100%; }
textarea { resize: vertical; }
html, body { max-width: 100%; overflow-x: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 760px) {
  .banner-carousel { height: 250px; }
  .banner-overlay { padding: 26px 24px; }
  .impact-row, .steps { grid-template-columns: 1fr; gap: 16px; }
  .section-pad { padding: 44px 0; }
  .home-hero-strip { padding: 48px 0 40px; }
  .donate-cta { padding: 32px 26px; }
  .find-donor-card { padding: 28px 22px; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .site-footer { padding: 40px 0 32px; margin-top: 48px; }
  .blog-hero { padding: 48px 0 44px; }
  .blog-hero-inner { gap: 18px; }
  .blog-hero-icon { width: 58px; height: 58px; padding: 11px; }
  .search-row { flex-direction: column; gap: 14px; }
  .owner-card { flex-direction: column; gap: 16px; padding: 24px 20px; }
  .owner-badge { width: 50px; height: 50px; }
}
@media (max-width: 620px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 12px 0; row-gap: 10px; }
  .main-nav { width: 100%; justify-content: center; flex-wrap: wrap; gap: 4px; }
  .main-nav a { padding: 8px 12px; font-size: 0.85rem; }
  .main-nav a.nav-cta { margin-left: 0; }
  .lang-toggle { padding: 7px 11px !important; font-size: 0.78rem !important; }
  .footer-credit { flex-direction: column; align-items: flex-start; gap: 8px; }
  .banner-carousel { height: 210px; border-radius: 0 0 var(--r) var(--r); }
  .banner-nav-btn { width: 34px; height: 34px; font-size: 1rem; }
  .banner-nav-btn.prev { left: 12px; } .banner-nav-btn.next { right: 12px; }
  .banner-dots { right: 18px; bottom: 14px; }
  .home-cta-row { flex-direction: column; align-items: stretch; }
  .home-cta-row .btn-search, .home-cta-row .btn-primary { width: 100%; }
  .card { padding: 22px; }
  .donor-grid { grid-template-columns: 1fr; }
  .floating-mail { width: 52px; height: 52px; bottom: 18px; right: 18px; }
  .floating-mail svg { width: 23px; height: 23px; }
  .admin-tab { padding: 10px 13px; font-size: 0.82rem; }
  .banner-edit-row { flex-direction: column; align-items: stretch; }
  .banner-edit-row img, .banner-edit-row .thumb-fallback { width: 100%; height: 110px; }
  .site-ticker { font-size: 0.72rem; }
  .blog-intro { font-size: 1rem; padding-left: 14px; }
  .city-options { max-height: 46vh; }
  .city-options li { padding: 13px 12px; font-size: 1rem; }
  .city-prov { font-size: 0.7rem; }

  input, select, textarea { font-size: 16px; padding: 12px 13px; }
  input[type="checkbox"] { width: 22px; height: 22px; min-width: 22px; }
  input[type="file"] { font-size: 13px; padding: 10px; }
  button, .btn-search, .btn-primary, .btn-muted { min-height: 46px; padding: 13px 22px; }
  .main-nav a { min-height: 40px; display: inline-flex; align-items: center; }
  .footer-block a { padding: 3px 0; }
}
@media (max-width: 380px) {
  .wrap { padding: 0 16px; }
  .card, .find-donor-card { padding: 20px 16px; }
  .banner-overlay { padding: 18px 16px; }
  .motive-block { padding: 20px 18px; }
  .donate-cta { padding: 26px 20px; }
  .blog-cta-box { padding: 28px 20px; }
  .impact-card { padding: 20px 12px; }
  .impact-card strong { font-size: 1.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .reveal, .js-reveal .reveal { opacity: 1 !important; transform: none !important; }
}
