:root {
  /* Light, professional palette */
  --bg-page: #fbfbf9;         /* warm off-white, not stark white */
  --bg-alt: #f3f6f2;          /* soft sage-tinted section background */
  --surface: #ffffff;

  --green-deep: #1f5e3f;      /* primary brand green, deep & serious */
  --green-mid: #2f7a52;
  --green-light: #4d9c6f;
  --green-tint: #e7f3ec;      /* pale green for chips/backgrounds */

  --accent: #c9822f;          /* warm terracotta/amber accent, not neon */
  --accent-light: #e0a866;

  --text-main: #1c2420;
  --text-muted: #5c6b62;
  --text-faint: #8a978f;

  --border: #e2e7e2;
  --border-strong: #cfd8cf;

  --radius: 16px;
  --radius-lg: 22px;
  --shadow-soft: 0 8px 24px rgba(31,94,63,0.08);
  --shadow-strong: 0 20px 46px rgba(31,94,63,0.14);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  color: var(--text-main);
  background: var(--bg-page);
  min-height: 100vh;
  line-height: 1.65;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; border-radius: var(--radius); }
::selection { background: var(--green-tint); color: var(--green-deep); }

/* ---------- Surface / card ---------- */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

/* ---------- Scroll-reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal-delay-1.in-view { transition-delay: 0.1s; }
.reveal-delay-2.in-view { transition-delay: 0.2s; }
.reveal-delay-3.in-view { transition-delay: 0.3s; }

/* ---------- Navbar ---------- */
.navbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 30px; margin: 14px;
  border-radius: 100px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
}
.navbar .logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; color: var(--green-deep); }
.navbar .logo img { width: 36px; height: 36px; border-radius: 50%; }
.nav-links { display: flex; gap: 26px; list-style: none; }
.nav-links a { font-size: 0.92rem; color: var(--text-muted); padding: 6px 2px; border-bottom: 2px solid transparent; transition: 0.25s; }
.nav-links a:hover, .nav-links a.active { color: var(--green-deep); border-color: var(--green-mid); }
.nav-cta {
  padding: 10px 20px; border-radius: 100px;
  background: linear-gradient(135deg, var(--green-mid), var(--green-light));
  color: #fff; font-weight: 600; font-size: 0.92rem;
  box-shadow: 0 6px 18px rgba(47,122,82,0.25);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(47,122,82,0.35); }
.nav-toggle { display: none; background: none; border: none; color: var(--text-main); font-size: 1.5rem; cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  position: relative; margin: 14px; padding: 100px 40px 90px;
  overflow: hidden; text-align: center; min-height: 58vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--green-tint) 0%, var(--surface) 100%);
}
.hero::before {
  content: ""; position: absolute; inset: -20px;
  background-image: var(--hero-img);
  background-size: cover; background-position: center;
  opacity: 0.12; z-index: 0;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(251,251,249,0.4), rgba(251,251,249,0.95));
  z-index: 0;
}
.hero > * { position: relative; z-index: 1; }
.hero .eyebrow {
  display: inline-block; padding: 6px 16px; border-radius: 100px;
  border: 1px solid var(--border-strong); color: var(--green-deep);
  font-size: 0.78rem; letter-spacing: 1.5px; text-transform: uppercase;
  margin-bottom: 22px; background: var(--green-tint);
}
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 700; color: var(--text-main); margin-bottom: 18px; letter-spacing: -0.5px; }
.hero p { max-width: 620px; margin: 0 auto 32px; color: var(--text-muted); font-size: 1.05rem; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 30px; border-radius: 100px;
  background: linear-gradient(135deg, var(--green-mid), var(--green-light));
  color: #fff; font-weight: 700; font-size: 0.95rem;
  box-shadow: 0 10px 24px rgba(47,122,82,0.24);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
  border: none; cursor: pointer;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(47,122,82,0.32); }
.btn.outline { background: transparent; border: 1px solid var(--border-strong); color: var(--text-main); box-shadow: none; }
.btn.outline:hover { border-color: var(--green-mid); color: var(--green-deep); }
.btn.accent { background: linear-gradient(135deg, var(--accent), var(--accent-light)); box-shadow: 0 10px 24px rgba(201,130,47,0.24); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ---------- Sections ---------- */
.section { padding: 70px 32px; max-width: 1180px; margin: 0 auto; }
.section.alt { background: var(--bg-alt); border-radius: var(--radius-lg); }
.section-eyebrow { text-align: center; color: var(--accent); font-size: 0.78rem; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 10px; font-weight: 700; }
.section-title { text-align: center; font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 12px; color: var(--text-main); }
.section-sub { text-align: center; color: var(--text-muted); max-width: 620px; margin: 0 auto 48px; }

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card { padding: 30px; transition: transform 0.35s var(--ease), box-shadow 0.35s, border-color 0.35s; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-strong); border-color: var(--green-light); }
.card img { margin-bottom: 20px; height: 180px; width: 100%; object-fit: cover; }
.card h3 { margin-bottom: 10px; color: var(--green-deep); font-size: 1.1rem; }
.card p { color: var(--text-muted); font-size: 0.94rem; }

/* ---------- Donation widget ---------- */
.donate-card { padding: 40px; max-width: 480px; margin: 0 auto; position: relative; }
.donate-amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0 24px; }
.amount-pill {
  padding: 12px 8px; text-align: center; border-radius: 12px;
  border: 1px solid var(--border-strong); background: var(--bg-alt);
  cursor: pointer; font-weight: 600; font-size: 0.92rem; color: var(--text-muted);
  transition: all 0.25s var(--ease);
}
.amount-pill:hover { border-color: var(--green-mid); color: var(--green-deep); }
.amount-pill.selected {
  background: linear-gradient(135deg, var(--green-mid), var(--green-light));
  color: #fff; border-color: transparent;
}
.verse-box {
  background: var(--green-tint); border: 1px solid var(--green-light);
  border-radius: 14px; padding: 18px; margin: 22px 0; text-align: center;
}
.verse-box .arabic-note { font-style: italic; color: var(--green-deep); font-size: 0.92rem; line-height: 1.6; }
.verse-box .ref { color: var(--accent); font-weight: 700; font-size: 0.8rem; margin-top: 8px; display: block; }

.form-glass { padding: 36px; max-width: 560px; margin: 0 auto; }
.form-glass label { display: block; margin-bottom: 6px; font-size: 0.88rem; color: var(--text-muted); }
.form-glass .required { color: var(--accent); }
.form-glass input, .form-glass textarea, .form-glass select {
  width: 100%; padding: 12px 14px; margin-bottom: 18px; border-radius: 12px;
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text-main); font-family: inherit; font-size: 0.95rem;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.form-glass input:focus, .form-glass textarea:focus {
  outline: none; border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(47,122,82,0.14);
}
.field-hint { font-size: 0.78rem; color: var(--text-faint); margin-top: -12px; margin-bottom: 16px; }

/* ---------- Stats with count-up ---------- */
.stats { display: flex; justify-content: center; gap: 60px; flex-wrap: wrap; text-align: center; padding: 44px 0; }
.stats .stat h2 { font-size: 2.6rem; color: var(--green-deep); font-weight: 700; }
.stats .stat p { color: var(--text-muted); margin-top: 4px; font-size: 0.9rem; }

/* ---------- Progress bar for Quran fund ---------- */
.progress-wrap { max-width: 640px; margin: 0 auto; }
.progress-track { height: 10px; border-radius: 100px; background: var(--bg-alt); overflow: hidden; margin: 10px 0; border: 1px solid var(--border); }
.progress-fill { height: 100%; border-radius: 100px; background: linear-gradient(90deg, var(--green-mid), var(--accent)); width: 0%; transition: width 1.4s var(--ease); }
.progress-labels { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--text-muted); }
.progress-labels strong { color: var(--green-deep); }

/* ---------- Status banners ---------- */
.status-banner { padding: 14px 18px; border-radius: 12px; font-size: 0.9rem; margin-bottom: 18px; display: none; align-items: center; gap: 10px; }
.status-banner.error { background: #fdf1ef; border: 1px solid #eec3ba; color: #a1452f; }
.status-banner.success { background: var(--green-tint); border: 1px solid var(--green-light); color: var(--green-deep); }

.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-strong); border-top-color: var(--green-mid); animation: spin 0.8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- FAQ accordion ---------- */
.faq-item { padding: 20px 26px; margin-bottom: 12px; cursor: pointer; transition: border-color 0.25s; }
.faq-item:hover { border-color: var(--green-light); }
.faq-item .q { display: flex; justify-content: space-between; align-items: center; font-weight: 600; color: var(--text-main); }
.faq-item .a { max-height: 0; overflow: hidden; color: var(--text-muted); transition: max-height 0.35s var(--ease); }
.faq-item.open .a { max-height: 300px; margin-top: 12px; }
.faq-item .icon { transition: transform 0.35s var(--ease); color: var(--accent); }
.faq-item.open .icon { transform: rotate(45deg); }

/* ---------- Footer ---------- */
footer { margin: 14px; padding: 54px 40px 24px; text-align: center; background: var(--green-deep); border-radius: var(--radius-lg); color: #eef4ef; }
footer .footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; text-align: left; margin-bottom: 30px; }
footer h4 { color: var(--accent-light); margin-bottom: 12px; font-size: 0.95rem; }
footer ul { list-style: none; }
footer ul li { margin-bottom: 8px; color: rgba(238,244,239,0.75); font-size: 0.9rem; }
footer .bottom { border-top: 1px solid rgba(255,255,255,0.15); padding-top: 18px; color: rgba(238,244,239,0.65); font-size: 0.82rem; }

@media (max-width: 768px) {
  .nav-links { position: fixed; top: 76px; right: 14px; left: 14px; flex-direction: column; padding: 20px; display: none; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-strong); }
  .nav-links.show { display: flex; }
  .nav-toggle { display: block; }
}