/* ============================================================
   NOBIN FOUNDATION, style.css
   Design system: deep green + gold, ivory canvas
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --green-900: #062e1d;
  --green-800: #07391f;
  --green-700: #0b5d3b;
  --green-600: #0e7a4e;
  --green-500: #159a63;
  --green-50: #edf5f0;

  --gold-600: #b8860b;
  --gold-500: #d4a017;
  --gold-400: #f2b705;
  --gold-300: #f7cf5a;

  --ivory: #fdfbf5;
  --white: #ffffff;
  --ink: #1b2a25;
  --ink-60: rgba(27, 42, 37, 0.68);
  --ink-40: rgba(27, 42, 37, 0.45);
  --line: rgba(11, 93, 59, 0.14);

  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-bn: "Hind Siliguri", "Plus Jakarta Sans", system-ui, sans-serif;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 4px 16px rgba(6, 46, 29, 0.07);
  --shadow: 0 14px 40px rgba(6, 46, 29, 0.12);
  --shadow-lg: 0 26px 70px rgba(6, 46, 29, 0.22);

  --pattern-gold: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cg fill='none' stroke='%23D4A017' stroke-opacity='0.35' stroke-width='1'%3E%3Crect x='17' y='17' width='30' height='30'/%3E%3Crect x='17' y='17' width='30' height='30' transform='rotate(45 32 32)'/%3E%3C/g%3E%3C/svg%3E");

  --container: 1180px;
  --header-h: 76px;
}

html[data-lang="bn"] body { font-family: var(--font-bn); }
html[data-lang="bn"] body { line-height: 1.75; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
picture { display: contents; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }

.container { width: min(var(--container), 92%); margin-inline: auto; }

.ic {
  width: 1.25em; height: 1.25em;
  fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}

/* [hidden] must always win over layout display values below */
[hidden] { display: none !important; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--green-700); color: #fff; padding: 10px 18px;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--gold-400); outline-offset: 2px; border-radius: 4px; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 26px; border-radius: 10px;
  font-weight: 700; font-size: 0.97rem; letter-spacing: 0.01em;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  border: none; line-height: 1.2;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--gold {
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  color: var(--green-900);
  box-shadow: 0 10px 24px rgba(212, 160, 23, 0.35);
}
.btn--gold:hover { box-shadow: 0 14px 30px rgba(212, 160, 23, 0.45); }

.btn--green { background: var(--green-700); color: #fff; box-shadow: 0 10px 24px rgba(11, 93, 59, 0.3); }
.btn--green:hover { background: var(--green-600); }

.btn--ghost { color: #fff; border: 2px solid rgba(255, 255, 255, 0.55); background: rgba(255, 255, 255, 0.06); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.14); border-color: #fff; }

.btn--outline { color: var(--green-700); border: 2px solid var(--green-700); }
.btn--outline:hover { background: var(--green-700); color: #fff; }

.btn--sm { padding: 10px 20px; font-size: 0.9rem; }
.btn--lg { padding: 16px 32px; font-size: 1.03rem; }
.btn--block { width: 100%; }

.btn[disabled] { opacity: 0.65; cursor: progress; transform: none; }

/* ---------- Section scaffolding ---------- */
.section { padding: 92px 0; position: relative; }
.section--tint { background: var(--green-50); }
.section--green { background: linear-gradient(160deg, var(--green-800), var(--green-700) 55%, var(--green-900)); color: #fff; overflow: hidden; }

.section__head { max-width: 720px; margin: 0 auto 54px; text-align: center; }
.section__title {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  font-weight: 800; line-height: 1.2; letter-spacing: -0.01em;
}
.section__title--light { color: #fff; }
.section__title .grad, .grad {
  display: block;
  background: linear-gradient(100deg, var(--gold-500), var(--gold-300));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section__sub { margin-top: 14px; color: var(--ink-60); font-size: 1.05rem; }
.section__sub--light { color: rgba(255, 255, 255, 0.82); }

.eyebrow {
  display: inline-block; margin-bottom: 12px;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--green-600);
}
.eyebrow--gold { color: var(--gold-300); }

/* ---------- Topbar ---------- */
.topbar { background: var(--green-900); color: rgba(255, 255, 255, 0.86); font-size: 0.83rem; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 0; flex-wrap: wrap; }
.topbar__left, .topbar__right { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.topbar__item { display: inline-flex; align-items: center; gap: 7px; transition: color 0.2s; }
.topbar__item:hover { color: var(--gold-300); }
.topbar__tagline { color: rgba(255, 255, 255, 0.6); font-style: italic; }
.topbar__item .ic { width: 15px; height: 15px; }

.lang-switch { display: inline-flex; background: rgba(255, 255, 255, 0.1); border-radius: 8px; padding: 3px; }
.lang-btn { padding: 4px 13px; border-radius: 6px; font-size: 0.8rem; font-weight: 700; color: rgba(255, 255, 255, 0.7); transition: 0.2s; }
.lang-btn.is-active { background: var(--gold-400); color: var(--green-900); }
html[data-lang="bn"] .lang-btn[data-set-lang="bn"] { font-family: var(--font-bn); }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(253, 251, 245, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.header.is-scrolled { box-shadow: 0 8px 30px rgba(6, 46, 29, 0.1); border-color: var(--line); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: var(--header-h); }

.brand img { height: 56px; width: auto; transition: height 0.25s ease; }
.header.is-scrolled .brand img { height: 48px; }

.nav__list { display: flex; align-items: center; gap: 4px; }
.nav__link {
  display: block; padding: 9px 13px; border-radius: 8px;
  font-weight: 600; font-size: 0.94rem; color: var(--ink);
  transition: background 0.2s, color 0.2s;
}
.nav__link:hover { background: var(--green-50); color: var(--green-700); }
.nav__link.is-active { background: var(--green-700); color: #fff; }

.header__actions { display: flex; align-items: center; gap: 12px; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 10px; }
.nav-toggle span { width: 24px; height: 2.5px; background: var(--green-800); border-radius: 2px; transition: 0.3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(92vh, 820px); display: flex; align-items: center; padding: 90px 0 120px; color: #fff; overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0;
  background-image: url("assets/photo-hero.jpg");
  background-image: -webkit-image-set(url("assets/photo-hero.avif") type("image/avif"), url("assets/photo-hero.jpg") type("image/jpeg"));
  background-image: image-set(url("assets/photo-hero.avif") type("image/avif"), url("assets/photo-hero.jpg") type("image/jpeg"));
  background-position: center 30%;
  background-size: cover;
  background-repeat: no-repeat;
}
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(6, 46, 29, 0.94) 8%, rgba(11, 93, 59, 0.84) 46%, rgba(11, 93, 59, 0.45) 100%);
}
.hero__content { position: relative; z-index: 2; max-width: 780px; }

.hero__badge {
  display: inline-flex; align-items: center; gap: 9px;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(247, 207, 90, 0.45);
  padding: 8px 18px; border-radius: 8px;
  font-size: 0.86rem; font-weight: 600; color: var(--gold-300);
  margin-bottom: 26px;
}
.hero__title { font-size: clamp(2.1rem, 5.4vw, 3.7rem); font-weight: 800; line-height: 1.13; letter-spacing: -0.02em; }
.hero__title-gold { background: linear-gradient(100deg, var(--gold-300), var(--gold-400)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__sub { margin-top: 22px; font-size: clamp(1rem, 1.6vw, 1.14rem); color: rgba(255, 255, 255, 0.87); max-width: 640px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 36px; }

.hero__wave { position: absolute; left: 0; right: 0; bottom: -1px; z-index: 2; line-height: 0; }
.hero__wave svg { width: 100%; height: 88px; display: block; }

/* ---------- About ---------- */
.about__grid { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: 64px; align-items: center; }

.about__media { position: relative; }
.about__img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; height: auto; aspect-ratio: 4 / 4.6; object-fit: cover; }
.about__pattern {
  position: absolute; inset: auto auto -26px -26px; width: 150px; height: 150px; z-index: -1;
  background: var(--pattern-gold); opacity: 0.5; border-radius: var(--radius-sm);
}

.about__text { margin-top: 8px; color: var(--ink-60); font-size: 1.04rem; }
.about__points { margin-top: 30px; display: grid; gap: 20px; }
.point { display: flex; gap: 16px; align-items: flex-start; }
.point__ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; flex-shrink: 0; border-radius: 14px;
  background: var(--green-700); color: var(--gold-300);
}
.point__title { font-size: 1.06rem; font-weight: 700; }
.point__text { color: var(--ink-60); font-size: 0.95rem; margin-top: 3px; }

.about__quote {
  margin-top: 34px; padding: 22px 26px; border-left: 4px solid var(--gold-500);
  background: var(--green-50); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.about__quote-ic { width: 26px; height: 26px; color: var(--gold-600); fill: currentColor; stroke: none; margin-bottom: 8px; }
.about__quote p { font-style: italic; color: var(--green-800); font-size: 1.02rem; }
.about__quote cite { display: block; margin-top: 8px; font-style: normal; font-weight: 700; font-size: 0.86rem; color: var(--green-600); }

/* ---------- Program cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: var(--white); border-radius: var(--radius); padding: 32px 28px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--line);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative; overflow: hidden;
}
.card::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--green-600), var(--gold-400));
  transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card:hover::after { transform: scaleX(1); }
.card__ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 58px; height: 58px; border-radius: 16px; margin-bottom: 18px;
  background: linear-gradient(140deg, var(--green-700), var(--green-600)); color: var(--gold-300);
}
.card__ic .ic { width: 28px; height: 28px; }
.card__title { font-size: 1.16rem; font-weight: 700; }
.card__text { margin-top: 9px; color: var(--ink-60); font-size: 0.96rem; }

/* ---------- Journey timeline ---------- */
.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; position: relative; }
.timeline::before {
  content: ""; position: absolute; top: 44px; left: 6%; right: 6%; height: 3px;
  background: repeating-linear-gradient(90deg, var(--gold-500) 0 12px, transparent 12px 22px);
  border-radius: 3px; opacity: 0.65;
}
.timeline__step {
  position: relative; text-align: center; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 58px 18px 26px; box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.timeline__step:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.timeline__num {
  position: absolute; top: -20px; left: 50%; transform: translateX(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  color: var(--green-900); font-weight: 800; box-shadow: 0 6px 16px rgba(212, 160, 23, 0.4);
}
.timeline__ic { display: inline-flex; color: var(--green-700); margin-bottom: 10px; }
.timeline__ic .ic { width: 30px; height: 30px; }
.timeline__title { font-size: 1rem; font-weight: 700; color: var(--green-800); }
.timeline__text { margin-top: 7px; font-size: 0.88rem; color: var(--ink-60); }

/* Fork after Education: two alternative paths */
.paths__lead {
  position: relative; margin: 52px auto 26px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  flex-wrap: wrap; text-align: center;
  font-weight: 700; color: var(--green-800); font-size: 1.02rem;
}
.paths__lead::before {
  content: ""; position: absolute; left: 50%; top: -44px; transform: translateX(-50%);
  width: 3px; height: 44px; border-radius: 3px;
  background: repeating-linear-gradient(180deg, var(--gold-500) 0 10px, transparent 10px 18px);
  opacity: 0.65;
}
.paths__num {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  color: var(--green-900); font-weight: 800; font-size: 0.9rem;
  box-shadow: 0 6px 16px rgba(212, 160, 23, 0.4);
}
.paths__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 780px; margin: 0 auto; }
.path {
  text-align: center; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 24px; box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.path:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.journey__end { position: relative; margin-top: 52px; display: flex; justify-content: center; }
.journey__end::before {
  content: ""; position: absolute; left: 50%; top: -44px; transform: translateX(-50%);
  width: 3px; height: 44px; border-radius: 3px;
  background: repeating-linear-gradient(180deg, var(--gold-500) 0 10px, transparent 10px 18px);
  opacity: 0.65;
}
.timeline__step--solo { width: 100%; max-width: 360px; }

/* ---------- Zakat calculator ---------- */
.zakat__pattern { position: absolute; inset: 0; background-image: var(--pattern-gold); opacity: 0.16; pointer-events: none; }
.zakat .section__head { position: relative; }

.zakat__grid { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 28px; align-items: start; }

.zakat__card, .zakat__result { border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.zakat__card { background: var(--white); color: var(--ink); }
.zakat__result { background: linear-gradient(160deg, var(--gold-300), var(--gold-500)); color: var(--green-900); position: sticky; top: calc(var(--header-h) + 20px); }

.zakat__card-title { font-size: 1.1rem; font-weight: 800; color: var(--green-800); margin-bottom: 18px; }
.zakat__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.zakat__nisab { margin-top: 18px; padding: 16px; background: var(--green-50); border-radius: var(--radius-sm); display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.field--grow { flex: 1; min-width: 220px; }
.zakat__nisab-info { font-size: 0.9rem; color: var(--ink-60); padding-bottom: 10px; }
.zakat__nisab-info strong { color: var(--green-700); display: block; font-size: 1.05rem; }

.check { display: flex; align-items: flex-start; gap: 10px; margin-top: 18px; font-size: 0.92rem; color: var(--ink-60); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--green-700); margin-top: 2px; flex-shrink: 0; }

.zakat__result-title { font-size: 1.05rem; font-weight: 800; margin-bottom: 18px; }
.zakat__rows { display: grid; gap: 10px; }
.zakat__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 9px; border-bottom: 1px dashed rgba(6, 46, 29, 0.25); }
.zakat__row dt { font-size: 0.93rem; font-weight: 600; opacity: 0.85; }
.zakat__row dd { font-weight: 800; font-size: 1.02rem; font-variant-numeric: tabular-nums; }
.zakat__row--net dt, .zakat__row--net dd { font-size: 1.05rem; }

.zakat__nisab-status {
  display: flex; align-items: center; gap: 10px; margin-top: 18px;
  background: rgba(255, 255, 255, 0.55); border-radius: var(--radius-sm);
  padding: 11px 14px; font-size: 0.9rem; font-weight: 600;
}
.zakat__nisab-status.is-good { background: rgba(14, 122, 78, 0.18); color: var(--green-800); }
.zakat__nisab-status.is-low { background: rgba(184, 90, 20, 0.16); color: #7a3d0a; }

.zakat__due { margin-top: 20px; text-align: center; padding: 18px; background: var(--green-900); border-radius: var(--radius-sm); color: #fff; }
.zakat__due-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--gold-300); letter-spacing: 0.08em; text-transform: uppercase; }
.zakat__due-amount { display: block; font-size: clamp(2rem, 4vw, 2.6rem); font-weight: 800; line-height: 1.15; margin-top: 4px; font-variant-numeric: tabular-nums; }

.zakat__result .btn { margin-top: 18px; }
.zakat__note { margin-top: 14px; font-size: 0.78rem; opacity: 0.75; line-height: 1.5; }

/* ---------- Forms (shared) ---------- */
.form { display: grid; gap: 16px; position: relative; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form__title { font-size: 1.25rem; font-weight: 800; color: var(--green-800); }

.field { display: grid; gap: 7px; }
.field__label { font-size: 0.87rem; font-weight: 700; color: var(--green-800); }

.field input, .field select, .field textarea, .input-money {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--white); font-size: 0.96rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; min-height: 88px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--green-600);
  box-shadow: 0 0 0 4px rgba(14, 122, 78, 0.14);
}
.field input.is-invalid, .field textarea.is-invalid, .field select.is-invalid { border-color: #d64545; }

.input-money { display: inline-flex; align-items: center; gap: 8px; padding-inline: 14px; }
.input-money input { border: 0; padding: 0; background: transparent; box-shadow: none !important; font-weight: 700; }
.input-money__sym { color: var(--green-700); font-weight: 800; white-space: nowrap; flex-shrink: 0; }
.input-money--minus .input-money__sym { color: #c2410c; }
.input-money:focus-within { border-color: var(--green-600); box-shadow: 0 0 0 4px rgba(14, 122, 78, 0.14); }

.botcheck { display: none; }

.form__hint { font-size: 0.82rem; color: var(--ink-40); text-align: center; }

.form__success {
  position: absolute; inset: 0; z-index: 4;
  display: grid; place-content: center; text-align: center; gap: 8px;
  background: var(--white); border-radius: var(--radius); padding: 32px;
}
.form__success-ic { display: inline-flex; justify-content: center; color: var(--green-600); }
.form__success-ic .ic { width: 56px; height: 56px; stroke-width: 1.6; }
.form__success h4 { font-size: 1.3rem; color: var(--green-800); }
.form__success p { color: var(--ink-60); max-width: 380px; margin-inline: auto; font-size: 0.95rem; }
.form__success .btn { justify-self: center; margin-top: 10px; }

.form__error { color: #d64545; font-size: 0.85rem; font-weight: 600; text-align: center; }

/* ---------- Ways to help ---------- */
.help__grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 32px; align-items: start; }

.donate { background: var(--white); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); border: 1px solid var(--line); }

.donate__tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 24px; }
.tier {
  text-align: left; padding: 16px 18px; border-radius: var(--radius-sm);
  border: 2px solid var(--line); background: var(--ivory);
  transition: 0.2s; display: grid; gap: 3px;
}
.tier:hover { border-color: var(--green-600); transform: translateY(-2px); }
.tier.is-active { border-color: var(--gold-500); background: linear-gradient(140deg, rgba(247, 207, 90, 0.22), rgba(242, 183, 5, 0.12)); }
.tier__amt { font-size: 1.25rem; font-weight: 800; color: var(--green-700); }
.tier__desc { font-size: 0.83rem; color: var(--ink-60); line-height: 1.4; }

.help__side { display: grid; gap: 22px; }
.helpcard {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-sm); transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.helpcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.helpcard__ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 14px; margin-bottom: 14px;
  background: var(--green-50); color: var(--green-700);
}
.helpcard__title { font-size: 1.12rem; font-weight: 800; color: var(--green-800); }
.helpcard__text { margin-top: 8px; color: var(--ink-60); font-size: 0.94rem; }

.link-arrow { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-weight: 700; color: var(--green-700); font-size: 0.93rem; }
.link-arrow:hover { color: var(--gold-600); gap: 12px; }
.link-arrow .ic { transition: transform 0.2s; }

.helpcard--photo { padding: 0; overflow: hidden; }
.helpcard--photo img { width: 100%; height: 170px; object-fit: cover; }
.helpcard--photo-body { padding: 24px 28px 28px; }

/* ---------- Gallery ---------- */
.gallery__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gallery__item {
  position: relative; border-radius: var(--radius-sm); overflow: hidden;
  aspect-ratio: 1; padding: 0; box-shadow: var(--shadow-sm); cursor: zoom-in;
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s ease; }
.gallery__item::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(6, 46, 29, 0.55));
  opacity: 0; transition: opacity 0.3s ease;
}
.gallery__item:hover img { transform: scale(1.04); }
.gallery__item:hover::after { opacity: 1; }

/* ---------- Contact ---------- */
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }

.contact__list { margin-top: 30px; display: grid; gap: 18px; }
.contact__list li { display: flex; gap: 14px; align-items: flex-start; }
.contact__ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px;
  background: rgba(255, 255, 255, 0.12); color: var(--gold-300);
}
.contact__list strong { display: block; font-size: 0.95rem; color: var(--gold-300); }
.contact__list span { font-size: 0.94rem; color: rgba(255, 255, 255, 0.85); }

.newsletter { margin-top: 34px; padding: 22px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16); border-radius: var(--radius); }
.newsletter .field__label { color: var(--gold-300); }
.newsletter__row { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.newsletter__row input {
  flex: 1; min-width: 210px;
  padding: 12px 16px; border-radius: 10px; border: 1.5px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1); color: #fff;
}
.newsletter__row input::placeholder { color: rgba(255, 255, 255, 0.55); }
.newsletter__row input:focus { outline: none; border-color: var(--gold-400); }
.newsletter__msg { margin-top: 10px; font-size: 0.88rem; font-weight: 600; color: var(--gold-300); }

.contact__formwrap { background: var(--white); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow-lg); color: var(--ink); }

/* ---------- Footer ---------- */
.footer { background: var(--green-900); color: rgba(255, 255, 255, 0.78); }
.footer__grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 44px;
  padding: 68px 0 44px;
}
.footer__logo { height: 54px; width: auto; background: var(--ivory); padding: 6px 10px; border-radius: var(--radius-sm); }
.footer__about { margin-top: 18px; font-size: 0.93rem; line-height: 1.7; }

.socials { display: flex; gap: 10px; margin-top: 20px; }
.socials a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.8);
  transition: 0.25s;
}
.socials a:hover { background: var(--gold-400); color: var(--green-900); transform: translateY(-3px); }

.footer__title { color: #fff; font-size: 1.02rem; font-weight: 700; margin-bottom: 18px; position: relative; padding-bottom: 10px; }
.footer__title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 34px; height: 2.5px; background: var(--gold-400); border-radius: 2px; }

.footer__links { display: grid; gap: 11px; }
.footer__links a { font-size: 0.93rem; transition: 0.2s; display: inline-block; }
.footer__links a:hover { color: var(--gold-300); transform: translateX(4px); }

.footer__contact { display: grid; gap: 12px; font-size: 0.93rem; margin-bottom: 20px; }

.footer__legal { border-top: 1px solid rgba(255, 255, 255, 0.1); padding: 18px 0; font-size: 0.82rem; }
.footer__legal-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: rgba(255, 255, 255, 0.55); }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--green-700); color: var(--gold-300);
  display: grid; place-items: center; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: 0.3s ease;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--gold-500); color: var(--green-900); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(6, 30, 20, 0.93);
  display: flex; align-items: center; justify-content: center; padding: 26px;
}
.lightbox__img { max-width: min(1100px, 92vw); max-height: 84vh; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.lightbox__close {
  position: absolute; top: 22px; right: 22px;
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.12); color: #fff; display: grid; place-items: center;
  transition: 0.2s;
}
.lightbox__close:hover { background: var(--gold-400); color: var(--green-900); }
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 50px; height: 50px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.12); color: #fff; display: grid; place-items: center;
  transition: 0.2s;
}
.lightbox__nav:hover { background: var(--gold-400); color: var(--green-900); }
.lightbox__nav--prev { left: 22px; }
.lightbox__nav--next { right: 22px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .nav__link { padding: 8px 10px; font-size: 0.89rem; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: repeat(3, 1fr); row-gap: 40px; }
  .timeline::before { display: none; }
  .zakat__grid, .help__grid { grid-template-columns: 1fr; }
  .zakat__result { position: static; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .gallery__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 920px) {
  /* backdrop-filter would make the header the containing block for the
     fixed nav drawer, disable it so the drawer covers the full viewport */
  .header { backdrop-filter: none; }
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(320px, 84vw); z-index: 150;
    background: var(--ivory); box-shadow: var(--shadow-lg);
    padding: 96px 26px 32px;
    transform: translateX(105%); transition: transform 0.35s ease;
    overflow-y: auto;
  }
  .nav.is-open { transform: none; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 4px; }
  .nav__link { padding: 13px 16px; font-size: 1.02rem; border-radius: var(--radius-sm); }
  .nav-toggle { display: flex; }

  .nav-overlay {
    position: fixed; inset: 0; z-index: 140;
    background: rgba(6, 30, 20, 0.5); backdrop-filter: blur(2px);
  }

  .about__grid, .contact__grid { grid-template-columns: 1fr; gap: 44px; }
  .about__img { aspect-ratio: 16 / 9; }
}

@media (max-width: 640px) {
  .section { padding: 68px 0; }

  /* Compact topbar: one row, tagline hidden, email kept as the only contact */
  .topbar__inner { padding: 6px 0; gap: 10px; }
  .topbar__left, .topbar__right { gap: 12px; }
  .topbar__tagline { display: none; }
  .topbar__item { font-size: 0.78rem; }

  /* Tight header: smaller logo + compact donate button */
  .header__inner { gap: 10px; min-height: 64px; }
  .brand img { height: 40px; }
  .header .btn { padding: 9px 14px; font-size: 0.82rem; gap: 7px; }
  .header .btn .ic { display: none; }
  .nav-toggle { padding: 8px; }

  .hero { padding: 56px 0 96px; min-height: auto; }
  .hero__badge { font-size: 0.78rem; padding: 7px 14px; margin-bottom: 20px; }
  .hero__title { font-size: clamp(1.7rem, 8vw, 2.3rem); }
  .hero__sub { font-size: 0.95rem; margin-top: 16px; }
  .hero__cta { margin-top: 26px; gap: 12px; }
  .hero__cta .btn { flex: 1 1 auto; justify-content: center; }
  .hero__wave svg { height: 54px; }

  /* About: shorter image, pattern contained inside */
  .about__img { aspect-ratio: 4 / 3.2; }
  .about__pattern { display: none; }

  .cards, .zakat__fields, .form__row, .donate__tiers { grid-template-columns: 1fr; }
  .card, .helpcard { padding: 24px 20px; }
  .timeline { grid-template-columns: 1fr; }
  .timeline__step { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; text-align: left; padding: 22px 20px 22px 66px; }
  .timeline__num { left: 20px; top: 22px; transform: none; }
  .timeline__ic { grid-row: span 2; align-self: start; }
  .paths__grid { grid-template-columns: 1fr; }
  .timeline__step--solo { max-width: none; }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .footer__grid { grid-template-columns: 1fr; gap: 34px; padding: 52px 0 34px; }
  .footer__legal-inner { justify-content: center; text-align: center; }
  .donate, .contact__formwrap, .zakat__card, .zakat__result { padding: 22px; }
  .btn--lg { padding: 14px 24px; }
}

/* ---------- Legal pages & footer legal links ---------- */
.footer__legal-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer__legal-links a { color: rgba(255, 255, 255, 0.72); transition: color 0.2s; }
.footer__legal-links a:hover { color: var(--gold-300); }

.legal { max-width: 780px; margin-inline: auto; }
.legal p { margin-top: 10px; color: var(--ink-60); }
.legal h2 { margin-top: 34px; font-size: 1.25rem; color: var(--green-800); }
.legal ul { margin-top: 10px; display: grid; gap: 8px; }
.legal li { position: relative; padding-left: 20px; color: var(--ink-60); }
.legal li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--gold-500); }
.legal__updated { margin-top: 8px; font-size: 0.88rem; color: var(--ink-40); font-weight: 600; }
.legal a { color: var(--green-700); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.legal a:hover { color: var(--gold-600); }
