/* site-footer.css — the footer of every Arabic page (2026-09-13).
 *
 * Replaces the four-column .mabarrah-footer. Reviewed with Mohamed Fahim from a
 * prototype: the old columns were one width with very different contents
 * (contact and newsletter 478px, «مجالات العطاء» 141px at 1440px), which left a
 * dark hole under the middle columns; «تواصل معنا» and «الزكاة» appeared twice;
 * the column headings were smaller than their links; the licence number was
 * buried in the copyright sentence.
 *
 * Three rows now: identity + newsletter, four balanced link columns, then the
 * licence, payment marks and legal links. On a phone the three link columns
 * fold (site-footer.js) and «تواصل معنا» stays open.
 *
 * Its own class (.mbf) on purpose: the old .mabarrah-footer rules in theme.css,
 * v9-*.css and aegov-dls.css do not reach it, so nothing here fights them. */

.mbf {
  --mbf-navy: #0A2A3D;
  --mbf-gold: #C9A227;
  --mbf-gold-2: #DFBE55;
  --mbf-ink: #E7F0F3;
  --mbf-mist: rgba(231, 240, 243, 0.74);
  --mbf-line: rgba(231, 240, 243, 0.10);
  background: var(--mbf-navy);
  color: var(--mbf-ink);
  font-family: "Alexandria", "Noto Kufi Arabic", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}
.mbf a { color: inherit; text-decoration: none; }
.mbf ul { list-style: none; margin: 0; padding: 0; }
.mbf h2 { font-family: inherit; }
.mbf__in { max-width: 1240px; margin: 0 auto; padding-inline: 32px; }
.mbf a:focus-visible, .mbf button:focus-visible, .mbf input:focus-visible {
  outline: 3px solid var(--mbf-gold); outline-offset: 3px; border-radius: 6px;
}
.mbf [dir="ltr"] { display: inline-block; unicode-bidi: isolate; direction: ltr; }

/* ---- row 1: identity and newsletter ---- */
.mbf__top {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 56px; align-items: center;
  padding-block: 56px 44px; border-block-end: 1px solid var(--mbf-line);
}
.mbf__logo { display: block; width: 210px; max-width: 100%; height: auto; }
.mbf__tag { margin: 18px 0 8px; color: var(--mbf-gold); font-size: 22px; font-weight: 700; line-height: 1.4; }
.mbf__about { margin: 0; color: var(--mbf-mist); line-height: 1.9; max-width: 46ch; }
.mbf__social { display: flex; gap: 10px; margin-block-start: 22px; }
.mbf__social a {
  width: 42px; height: 42px; border-radius: 999px; display: grid; place-items: center;
  border: 1px solid var(--mbf-line); color: var(--mbf-ink);
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}
.mbf__social a:hover { background: var(--mbf-gold); border-color: var(--mbf-gold); color: var(--mbf-navy); }
.mbf__social svg { width: 18px; height: 18px; fill: currentColor; }

.mbf__news {
  margin: 0;
  background: linear-gradient(160deg, rgba(18, 82, 92, 0.55), rgba(18, 82, 92, 0.18));
  border: 1px solid rgba(201, 162, 39, 0.28); border-radius: 18px; padding: 26px 28px;
}
.mbf__news h2 { margin: 0 0 6px; font-size: 21px; font-weight: 700; color: #fff; line-height: 1.4; }
.mbf__news p { margin: 0 0 16px; color: var(--mbf-mist); font-size: 14px; line-height: 1.8; }
.mbf__row { display: flex; gap: 10px; }
.mbf__row input {
  flex: 1; min-width: 0; height: 50px; border-radius: 12px;
  border: 1px solid rgba(231, 240, 243, 0.22); background: rgba(10, 42, 61, 0.55);
  color: #fff; padding: 0 16px; font: inherit; font-size: 15px; text-align: start;
}
.mbf__row input::placeholder { color: rgba(231, 240, 243, 0.55); }
.mbf__row button {
  height: 50px; padding: 0 24px; border: 0; border-radius: 12px;
  background: var(--mbf-gold); color: var(--mbf-navy);
  font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap;
  transition: background-color 180ms ease, transform 120ms ease;
}
.mbf__row button:hover { background: var(--mbf-gold-2); }
.mbf__row button:active { transform: scale(0.98); }
.mbf__row button:disabled { opacity: 0.7; cursor: progress; }
/* Written by header-services.js under the form. */
.mbf .mb-news-status { margin: 10px 0 0; font-size: 13.5px; }
.mbf .mb-news-status.is-ok { color: #9BE3B4; }
.mbf .mb-news-status.is-error { color: #FFB4A8; }
/* The bot trap must never be seen. Measured on the home page: the site's own
   input rules gave it a width, so every size is forced here. */
.mbf .mb-news-hp {
  position: absolute !important; inset-inline-start: -9999px !important;
  width: 1px !important; height: 1px !important; min-width: 0 !important;
  padding: 0 !important; margin: 0 !important; border: 0 !important;
  opacity: 0 !important; overflow: hidden !important; clip: rect(0 0 0 0) !important;
  pointer-events: none !important;
}

/* ---- row 2: four balanced columns ---- */
.mbf__cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; padding-block: 44px; }
.mbf__col h2 { margin: 0 0 14px; font-size: 17px; font-weight: 700; color: var(--mbf-gold); line-height: 1.4; }
.mbf__col ul { display: grid; gap: 4px; }
.mbf__col li a, .mbf__col li > span { display: inline-block; padding-block: 5px; color: var(--mbf-mist); line-height: 1.6; }
.mbf__col li a { transition: color 160ms ease; }
.mbf__col li a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--mbf-gold); text-underline-offset: 6px; }
.mbf__contact li { display: flex; gap: 10px; align-items: flex-start; }
.mbf__contact li > svg {
  flex: none; width: 18px; height: 18px; margin-block-start: 9px;
  stroke: var(--mbf-gold); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.mbf__contact small { display: block; color: rgba(231, 240, 243, 0.55); font-size: 12.5px; }

/* The phone fold (site-footer.js). Without the script every list shows. */
.mbf__fold {
  all: unset; box-sizing: border-box; width: 100%; min-height: 44px; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.mbf__fold::after {
  content: ""; width: 9px; height: 9px; margin-inline-end: 4px;
  border-inline-end: 2px solid var(--mbf-gold); border-block-end: 2px solid var(--mbf-gold);
  transform: translateY(-3px) rotate(45deg); transition: transform 220ms ease;
}
.mbf__fold[aria-expanded="true"]::after { transform: translateY(2px) rotate(-135deg); }
.mbf__col.is-folded ul { display: none; }

/* ---- row 3: licence, payments, legal ---- */
.mbf__bottom { border-block-start: 1px solid var(--mbf-line); padding-block: 22px 26px; display: grid; gap: 14px; }
.mbf__trust { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.mbf__licence {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px;
  background: rgba(201, 162, 39, 0.10); border: 1px solid rgba(201, 162, 39, 0.32);
  color: var(--mbf-ink); font-size: 13.5px; margin: 0;
}
.mbf__licence svg { flex: none; width: 18px; height: 18px; stroke: var(--mbf-gold); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mbf__licence b { color: var(--mbf-gold); font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.mbf__pay { display: flex; align-items: center; gap: 8px; color: var(--mbf-mist); font-size: 13px; }
.mbf__pay ul { display: flex; gap: 6px; }
.mbf__pay li { background: #fff; border-radius: 6px; width: 46px; height: 30px; display: grid; place-items: center; }
.mbf__pay img { width: 38px; height: auto; display: block; }
.mbf__legal { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 22px; font-size: 13px; color: var(--mbf-mist); }
.mbf__legal nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.mbf__legal a { padding-block: 4px; }
.mbf__legal a:hover { color: #fff; }
.mbf__legal p { margin: 0; }

@media (max-width: 960px) {
  .mbf__top { grid-template-columns: 1fr; gap: 30px; }
  .mbf__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .mbf__in { padding-inline: 18px; }
  .mbf__top { padding-block: 30px 24px; gap: 20px; }
  .mbf__brand { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 12px; }
  .mbf__logo { width: 168px; }
  .mbf__tag { grid-column: 1 / -1; font-size: 18px; margin: 4px 0 0; }
  .mbf__about { display: none; }
  .mbf__social { margin: 0; grid-row: 1; grid-column: 2; }
  .mbf__social a { width: 40px; height: 40px; }
  .mbf__news { padding: 18px; }
  .mbf__news h2 { font-size: 18px; }
  .mbf__news p { font-size: 13px; margin-bottom: 12px; }
  .mbf__row { flex-direction: column; }
  .mbf__row input { flex: none; width: 100%; }
  .mbf__row button { width: 100%; }
  .mbf__cols { grid-template-columns: 1fr; gap: 0; padding-block: 8px 18px; }
  .mbf__col { border-block-end: 1px solid var(--mbf-line); }
  .mbf__col h2 { margin: 0; padding-block: 6px; }
  .mbf__col ul { padding-block-end: 14px; }
  .mbf__contact h2 { padding-block: 16px 8px; }
  .mbf__trust, .mbf__legal { flex-direction: column; align-items: flex-start; }
  .mbf__licence { border-radius: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .mbf__social a, .mbf__row button, .mbf__col li a, .mbf__fold::after { transition: none; }
}
