/* ==========================================================================
   Ndemaleckah Foundation — Design System
   Palette drawn from the foundation's own logo (sky blue / crimson / magenta)
   plus a savanna gold, warm against the deep clay earth of the North.
   Signature motif: a woven stripe band, echoing Northern Ghana textile
   traditions, used as section dividers instead of generic gradient blobs.
   ========================================================================== */

:root {
  --blue: #1E88C7;
  --blue-deep: #0F5D8F;
  --red: #E13A2E;
  --red-deep: #B72A20;
  --magenta: #9C2966;
  --gold: #E7A83B;
  --cream: #FBF5EA;
  --cream-2: #F3E9D6;
  --ink: #201C1A;
  --ink-soft: #55504A;
  --line: #E7DDC9;
  --white: #FFFFFF;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px -12px rgba(32, 28, 26, 0.25);
  --shadow-sm: 0 4px 14px -6px rgba(32, 28, 26, 0.18);

  --bg: var(--cream);
  --bg-alt: var(--white);
  --text: var(--ink);
  --text-soft: var(--ink-soft);
  --border: var(--line);
  --card-bg: var(--white);

  --transition: 0.25s ease;
}

[data-theme="dark"] {
  --bg: #12131C;
  --bg-alt: #191B27;
  --text: #F3EFE6;
  --text-soft: #B7B2A8;
  --border: #2A2C3B;
  --card-bg: #191B27;
  --cream-2: #1E2030;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

/* ---- Global overflow safety net: nothing should ever push past the
   viewport edge on any screen size ---- */
img, svg, video, iframe, table { max-width: 100%; }
img { display: block; }
h1, h2, h3, h4, p, a, span, li, td, th, label, blockquote {
  overflow-wrap: break-word;
  word-break: break-word;
}
pre, code { white-space: pre-wrap; word-break: break-word; }

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; max-width: 100%; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 480px) {
  .container { padding: 0 16px; }
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text);
}
h1 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.3rem; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 3px;
  background: var(--gold);
  border-radius: 4px;
}

.section { padding: 80px 0; }
.section-head { max-width: 640px; margin-bottom: 46px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.text-soft { color: var(--text-soft); }

/* ---- signature stripe divider (woven textile motif) ---- */
.stripe-band {
  height: 10px;
  width: 100%;
  background: repeating-linear-gradient(
    115deg,
    var(--red) 0 22px,
    var(--gold) 22px 34px,
    var(--blue) 34px 56px,
    var(--magenta) 56px 62px,
    var(--cream) 62px 74px
  );
}

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--red); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--red-deep); }
.btn-outline { border-color: var(--text); color: var(--text); }
.btn-outline:hover { background: var(--text); color: var(--bg); }
.btn-light { background: #fff; color: var(--ink); }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 9px 18px; font-size: 0.85rem; }

/* ==========================================================================
   Header / Nav
   ========================================================================== */
.topbar {
  background: var(--ink);
  color: #EFE9DC;
  font-size: 0.82rem;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; gap: 8px; }
.topbar-info { display: flex; gap: 22px; flex-wrap: wrap; }
.topbar-info span { display: inline-flex; align-items: center; gap: 6px; opacity: 0.9; }
.topbar-social { display: flex; gap: 14px; }
.topbar-social a { opacity: 0.85; transition: opacity var(--transition); }
.topbar-social a:hover { opacity: 1; color: var(--gold); }

.site-header {
  position: sticky; top: 0; z-index: 500;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 48px; width: auto; }

.nav-menu { display: flex; align-items: center; gap: 30px; }
.nav-menu > li { position: relative; }
.nav-menu > li > a { font-weight: 600; font-size: 0.95rem; padding: 10px 0; display: block; }
.nav-menu > li > a:hover, .nav-menu > li.active > a { color: var(--red); }
.nav-menu .submenu {
  position: absolute; top: 100%; left: 0; min-width: 200px;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); padding: 8px; opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all var(--transition);
}
.nav-menu li:hover .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-menu .submenu a { padding: 9px 12px; border-radius: 6px; display: block; font-weight: 500; font-size: 0.9rem; }
.nav-menu .submenu a:hover { background: var(--cream-2); color: var(--red); }

.nav-actions { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; }
.theme-toggle {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  color: var(--text); transition: all var(--transition);
}
.theme-toggle:hover { border-color: var(--red); color: var(--red); }
.theme-toggle svg { width: 20px; height: 20px; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun, :root:not([data-theme]) .icon-sun { display: none; }

.user-chip { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 100px; border: 1px solid var(--border); }
.user-chip img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }

#desktop-donate { display: inline-flex; }

.hamburger { display: none; width: 42px; height: 42px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); align-items: center; justify-content: center; flex-direction: column; gap: 4px; }
.hamburger span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; }

/* ==========================================================================
   Hero Slider (God Mode)
   ========================================================================== */
.hero-slider { position: relative; height: 640px; overflow: hidden; }
.hero-slide {
  position: absolute; inset: 0; opacity: 0; visibility: hidden;
  transition: opacity 1s ease;
  display: flex; align-items: center;
}
.hero-slide.is-active { opacity: 1; visibility: visible; z-index: 2; }
.hero-slide::before { content: ""; position: absolute; inset: 0; background-size: cover; background-position: center; filter: brightness(0.85); }
.hero-slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(16,15,14,0.82) 0%, rgba(16,15,14,0.5) 45%, rgba(16,15,14,0.15) 80%); }
.hero-slide-inner { position: relative; z-index: 3; color: #fff; max-width: 620px; padding: 0 24px; }
.hero-slide-inner .eyebrow { color: var(--gold); }
.hero-slide-inner .eyebrow::before { background: var(--red); }
.hero-slide-inner h1 { color: #fff; margin-bottom: 16px; }
.hero-slide-inner p { color: #E9E4D8; font-size: 1.08rem; margin-bottom: 28px; max-width: 520px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-dots { position: absolute; z-index: 4; bottom: 28px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; }
.hero-dots button { width: 34px; height: 4px; border-radius: 4px; background: rgba(255,255,255,0.4); border: none; }
.hero-dots button.is-active { background: var(--gold); }
.hero-arrows { position: absolute; z-index: 4; bottom: 28px; right: 28px; display: flex; gap: 10px; }
.hero-arrows button { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.4); color: #fff; display: flex; align-items: center; justify-content: center; }
.hero-arrows button:hover { background: var(--red); border-color: var(--red); }

/* ==========================================================================
   Stats strip
   ========================================================================== */
.stats-strip { background: var(--ink); color: #fff; padding: 46px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat-item .num { font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; color: var(--gold); }
.stat-item .label { font-size: 0.85rem; letter-spacing: 0.03em; color: #C9C3B6; margin-top: 4px; }

/* ==========================================================================
   Programs / Causes
   ========================================================================== */
.programs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.program-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 26px; transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.program-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--red); }
.program-icon { width: 54px; height: 54px; border-radius: 14px; background: var(--cream-2); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; color: var(--red); }
.program-icon svg { width: 26px; height: 26px; }
.program-card h3 { margin-bottom: 10px; }
.program-card a.more { color: var(--red); font-weight: 600; font-size: 0.88rem; display: inline-block; margin-top: 14px; }

.causes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.cause-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform var(--transition); }
.cause-card:hover { transform: translateY(-6px); }
.cause-media { position: relative; height: 210px; overflow: hidden; }
.cause-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.cause-card:hover .cause-media img { transform: scale(1.06); }
.cause-tag { position: absolute; top: 14px; left: 14px; background: var(--red); color: #fff; font-size: 0.72rem; font-weight: 700; padding: 5px 12px; border-radius: 100px; text-transform: uppercase; letter-spacing: 0.03em; }
.cause-body { padding: 22px; }
.cause-body h3 { font-size: 1.15rem; margin-bottom: 10px; }
.progress-track { height: 8px; background: var(--cream-2); border-radius: 100px; overflow: hidden; margin: 14px 0 10px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--red), var(--gold)); border-radius: 100px; }
.cause-meta { display: flex; justify-content: space-between; font-size: 0.84rem; color: var(--text-soft); margin-bottom: 16px; }
.cause-meta b { color: var(--text); }

/* ==========================================================================
   About / Team
   ========================================================================== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-media { position: relative; }
.about-media img { border-radius: var(--radius); }
.about-media { max-width: 100%; overflow: visible; }
.about-media .badge {
  position: absolute; bottom: -20px; left: 16px; right: auto; background: var(--red); color: #fff;
  padding: 18px 22px; border-radius: var(--radius); box-shadow: var(--shadow);
  font-family: var(--font-display); max-width: calc(100% - 32px);
}
.about-media .badge .n { font-size: 2rem; font-weight: 700; display: block; }
.about-media .badge .l { font-size: 0.78rem; opacity: 0.9; }
@media (max-width: 480px) {
  .about-media .badge { padding: 14px 18px; bottom: -14px; left: 10px; }
  .about-media .badge .n { font-size: 1.5rem; }
  .about-media .badge .l { font-size: 0.7rem; }
}

.team-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 22px; }
.team-card { text-align: center; }
.team-photo { position: relative; border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; aspect-ratio: 3/4; }
.team-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-social { position: absolute; bottom: -50px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; padding: 14px; background: linear-gradient(to top, rgba(0,0,0,0.65), transparent); transition: bottom var(--transition); }
.team-photo:hover .team-social { bottom: 0; }
.team-social a { width: 32px; height: 32px; border-radius: 50%; background: #fff; color: var(--ink); display: flex; align-items: center; justify-content: center; font-size: 0.8rem; }
.team-card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.team-card .role { color: var(--red); font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }

/* ==========================================================================
   Testimonials
   ========================================================================== */
.testi-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-sm); }
.testi-quote { font-size: 1.02rem; color: var(--text-soft); margin-bottom: 22px; }
.testi-person { display: flex; align-items: center; gap: 14px; }
.testi-person img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.testi-person .role { font-size: 0.82rem; color: var(--text-soft); }
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* ==========================================================================
   Gallery
   ========================================================================== */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.gallery-item { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/5; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-caption { position: absolute; inset: 0; background: linear-gradient(to top, rgba(16,15,14,0.85), transparent 60%); display: flex; flex-direction: column; justify-content: flex-end; padding: 18px; opacity: 0; transition: opacity var(--transition); }
.gallery-item:hover .gallery-caption { opacity: 1; }
.gallery-caption h3 { color: #fff; font-size: 1rem; }
.gallery-caption span { color: var(--gold); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* ==========================================================================
   Blog
   ========================================================================== */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.blog-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform var(--transition); }
.blog-card:hover { transform: translateY(-6px); }
.blog-media { height: 200px; overflow: hidden; }
.blog-media img { width: 100%; height: 100%; object-fit: cover; }
.blog-body { padding: 22px; }
.blog-meta { font-size: 0.78rem; color: var(--text-soft); margin-bottom: 10px; display: flex; gap: 14px; }
.blog-body h3 { font-size: 1.1rem; margin-bottom: 10px; line-height: 1.35; }
.blog-body h3 a:hover { color: var(--red); }
.blog-read { color: var(--red); font-weight: 600; font-size: 0.85rem; }

/* ==========================================================================
   Forms / Contact / Donate / Auth
   ========================================================================== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 8px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 0.95rem; transition: border-color var(--transition);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--red); }
.field textarea { resize: vertical; min-height: 120px; }
.amount-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.amount-chip { padding: 12px; text-align: center; border: 1px solid var(--border); border-radius: var(--radius-sm); font-weight: 700; cursor: pointer; }
.amount-chip.is-active, .amount-chip:hover { border-color: var(--red); color: var(--red); background: var(--cream-2); }

.auth-card { max-width: 440px; margin: 0 auto; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow-sm); }

/* ==========================================================================
   Auth Modal ("God Mode" popup login / sign up)
   ========================================================================== */
.auth-modal-overlay {
  position: fixed; inset: 0; z-index: 2000; background: rgba(18,15,13,0.6);
  display: none; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(3px);
}
.auth-modal-overlay.is-open { display: flex; }
.auth-modal-box {
  width: 100%; max-width: 440px; max-height: 92vh; overflow-y: auto;
  background: var(--card-bg); border-radius: var(--radius); padding: 38px;
  box-shadow: var(--shadow); position: relative; animation: authPop 0.25s ease;
}
@keyframes authPop { from { transform: translateY(14px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.auth-modal-close {
  position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg); display: flex; align-items: center;
  justify-content: center; font-size: 1.2rem; color: var(--text-soft);
}
.auth-modal-close:hover { color: var(--red); border-color: var(--red); }

.auth-tabs { display: flex; background: var(--cream-2); border-radius: 100px; padding: 4px; margin-bottom: 24px; }
.auth-tab { flex: 1; text-align: center; padding: 10px; border-radius: 100px; font-weight: 700; font-size: 0.88rem; color: var(--text-soft); border: none; background: none; transition: all var(--transition); }
.auth-tab.is-active { background: var(--red); color: #fff; box-shadow: var(--shadow-sm); }

.auth-panel { display: none; }
.auth-panel.is-active { display: block; animation: authFade 0.2s ease; }
@keyframes authFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.auth-modal-box .field { margin-bottom: 16px; }
.auth-modal-box .btn[disabled] { opacity: 0.65; pointer-events: none; }
.auth-modal-msg { display: none; }
.auth-modal-msg.is-visible { display: block; }

@media (max-width: 480px) {
  .auth-modal-box { padding: 28px 20px; max-width: 100%; }
}
.divider-text { display: flex; align-items: center; gap: 14px; color: var(--text-soft); font-size: 0.85rem; margin: 22px 0; }
.divider-text::before, .divider-text::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 13px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg); font-weight: 600; }
.btn-google:hover { border-color: var(--blue); }

.alert { padding: 14px 18px; border-radius: var(--radius-sm); font-size: 0.9rem; margin-bottom: 18px; }
.alert-success { background: #E4F4E9; color: #1E6B3A; }
.alert-error { background: #FBE4E1; color: #A32A1E; }
[data-theme="dark"] .alert-success { background: #143423; color: #7CE0A2; }
[data-theme="dark"] .alert-error { background: #3B1A17; color: #F3A69B; }

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden; }
.faq-q { padding: 18px 22px; display: flex; justify-content: space-between; align-items: center; font-weight: 600; cursor: pointer; }
.faq-q .plus { transition: transform var(--transition); color: var(--red); font-size: 1.3rem; }
.faq-item.is-open .faq-q .plus { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height var(--transition); color: var(--text-soft); }
.faq-item.is-open .faq-a { max-height: 300px; }
.faq-a-inner { padding: 0 22px 18px; }

/* ==========================================================================
   CTA band
   ========================================================================== */
.cta-band { background: linear-gradient(120deg, var(--red), var(--magenta)); color: #fff; padding: 60px 0; text-align: center; border-radius: var(--radius); margin: 0 24px; }
.cta-band h2 { color: #fff; margin-bottom: 12px; }
.cta-band p { color: #F6DEE9; max-width: 560px; margin: 0 auto 26px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--ink); color: #D8D2C4; padding-top: 70px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 50px; }
.footer-grid img { height: 48px; margin-bottom: 16px; }
.footer-grid h4 { color: #fff; font-size: 1rem; margin-bottom: 18px; }
.footer-grid ul li { margin-bottom: 10px; }
.footer-grid ul li a:hover { color: var(--gold); }
.footer-grid p { font-size: 0.9rem; opacity: 0.85; }
.footer-contact li { display: flex; gap: 10px; margin-bottom: 14px; font-size: 0.88rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 22px 0; display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; flex-wrap: wrap; gap: 10px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; }
.footer-social a:hover { background: var(--red); border-color: var(--red); }

/* ==========================================================================
   Page header (interior pages)
   ========================================================================== */
.page-header { padding: 70px 0; text-align: center; position: relative; background: var(--cream-2); }
.page-header .eyebrow { justify-content: center; }
.breadcrumb { color: var(--text-soft); font-size: 0.88rem; margin-top: 10px; }
.breadcrumb a:hover { color: var(--red); }

/* ==========================================================================
   AI Chat Widget
   ========================================================================== */
.chat-launcher { position: fixed; bottom: 26px; right: 26px; z-index: 900; width: 60px; height: 60px; border-radius: 50%; background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); border: none; }
.chat-launcher svg { width: 26px; height: 26px; }
.chat-window { position: fixed; bottom: 100px; right: 26px; z-index: 900; width: 360px; max-width: calc(100vw - 40px); height: 480px; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; opacity: 0; visibility: hidden; transform: translateY(20px); transition: all var(--transition); }
.chat-window.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.chat-head { background: var(--red); color: #fff; padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; }
.chat-body { flex: 1; padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.chat-msg { max-width: 82%; padding: 10px 14px; border-radius: 14px; font-size: 0.88rem; line-height: 1.5; }
.chat-msg.bot { background: var(--cream-2); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg.user { background: var(--red); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-input-row { display: flex; border-top: 1px solid var(--border); padding: 10px; gap: 8px; }
.chat-input-row input { flex: 1; border: none; background: var(--bg); border-radius: 100px; padding: 10px 16px; color: var(--text); }
.chat-input-row input:focus { outline: none; }
.chat-input-row button { background: var(--red); color: #fff; border: none; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

/* ==========================================================================
   Utility & scroll-reveal
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.badge-pill { display: inline-block; padding: 6px 14px; border-radius: 100px; background: var(--cream-2); font-size: 0.78rem; font-weight: 700; color: var(--red); }
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.pagination a, .pagination span { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); font-weight: 600; font-size: 0.88rem; }
.pagination .is-active { background: var(--red); border-color: var(--red); color: #fff; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 992px) {
  .team-grid { grid-template-columns: repeat(3, 1fr); }
  .programs-grid, .causes-grid, .blog-grid, .testi-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .about-grid, .two-col { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
}
.show-mobile-only { display: none; }

/* Mobile / tablet nav breakpoint — the hamburger takes over navigation
   everywhere the inline menu could get squeezed (≤ 992px), so the menu
   is never the thing pushing the page wider than the viewport. */
@media (max-width: 992px) {
  .nav-menu {
    position: fixed; top: 0; right: -100%; width: 82%; max-width: 340px; height: 100vh; height: 100dvh;
    background: var(--bg-alt); flex-direction: column; align-items: flex-start; padding: 90px 24px 40px;
    gap: 4px; transition: right var(--transition); box-shadow: var(--shadow); z-index: 600; overflow-y: auto;
    display: flex;
  }
  .nav-menu.is-open { right: 0; }
  .nav-menu > li { width: 100%; }
  .nav-menu > li > a { padding: 12px 4px; width: 100%; }
  .nav-menu .submenu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; display: none; padding-left: 12px; width: 100%; }
  .nav-menu li.submenu-open .submenu { display: block; }
  .show-mobile-only { display: block; width: 100%; margin-top: 14px; }
  .show-mobile-only a { width: 100%; }
  .hamburger { display: flex; }
  #desktop-donate { display: none !important; }
}

@media (max-width: 768px) {
  .topbar { display: none; }
  .brand img { height: 38px; }
  .hero-slider { height: 520px; }
  .hero-slide-inner { padding: 0 20px; }
  .team-grid, .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .programs-grid, .causes-grid, .blog-grid, .testi-grid, .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; text-align: left; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .amount-grid { grid-template-columns: repeat(2, 1fr); }
  .chat-window { width: calc(100vw - 32px); right: 16px; }
  .chat-launcher { right: 16px; bottom: 16px; }
  .cta-band { margin: 0 16px; padding: 44px 20px; }
  section.section { padding: 56px 0; }
  .about-media .badge { position: static; margin-top: 16px; display: inline-block; }
}

@media (max-width: 420px) {
  .team-grid, .gallery-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .amount-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .auth-modal-box, .auth-card { padding: 26px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
