/* =====================================================================
   LAYOUT  |  هيكل الصفحة: البانر، الهيدر، القايمة، الفوتر، زرار الواتساب
   ===================================================================== */

/* ---------- Promo bar (top) ---------- */
.promo {
  background: var(--accent);
  color: var(--on-brand);
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  padding: 8px 16px;
}

.promo[hidden] {
  display: none;
}

/* ---------- Header ---------- */
header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.logo {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  white-space: nowrap;
}

.logo b {
  color: var(--primary);
}

/* ---------- Menu ---------- */
nav {
  display: flex;
  flex: 1;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

nav a {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  font-weight: 500;
  color: var(--mute);
}

nav a.on {
  background: var(--ink);
  color: var(--bg);
}

/* ---------- Dark mode button ---------- */
.theme-btn {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
}

/* ---------- Main area & page switching ---------- */
main {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 20px 16px 110px;
}

.page {
  display: none;
}

.page.on {
  display: block;
}

/* ---------- Footer ---------- */
footer {
  text-align: center;
  color: var(--mute);
  font-size: 14px;
  padding: 20px 16px 90px;
}

/* ---------- Floating WhatsApp button ---------- */
.wa {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 30;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--whatsapp);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
}

.wa svg {
  width: 32px;
  height: 32px;
  fill: #fff;
}
