/* ── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px; line-height: 1.6; color: #0f172a;
  background: #ffffff; -webkit-font-smoothing: antialiased;
  transition: font-family 0.1s;
}
html[lang="ar"] body { font-family: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif; }
a { text-decoration: none; color: inherit; }
img, svg { display: block; }
ul { list-style: none; }

/* ── CSS Variables ────────────────────────────────────────────── */
:root {
  --blue: #0ea5e9; --indigo: #6366f1; --navy: #1e3a5f;
  --grad: linear-gradient(135deg, #1e3a5f 0%, #0ea5e9 60%, #6366f1 100%);
  --grad-text: linear-gradient(90deg, #0ea5e9, #6366f1);
  --dark: #0f172a; --mid: #334155; --muted: #64748b; --light: #94a3b8;
  --border: #e2e8f0; --surface: #f8fafc; --white: #ffffff;
  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 16px rgba(0,0,0,.1);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.14);
  --shadow-glow: 0 0 40px rgba(14,165,233,.25);
}

/* ── Container ────────────────────────────────────────────────── */
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 600; cursor: pointer;
  border: none; transition: all 0.2s; white-space: nowrap;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 4px 20px rgba(14,165,233,.35); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 28px rgba(14,165,233,.45); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--dark); }

/* ── Lang Switcher ────────────────────────────────────────────── */
.lang-switcher {
  display: flex; align-items: center; gap: 2px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 3px;
}
.lang-btn {
  padding: 4px 10px; border-radius: 6px; font-size: 13px; font-weight: 600;
  cursor: pointer; border: none; background: transparent;
  color: var(--muted); transition: all .15s; line-height: 1.4;
}
.lang-btn.active { background: var(--white); color: var(--dark); box-shadow: var(--shadow-sm); }

/* ── Navbar ───────────────────────────────────────────────────── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.nav-logo { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; color: var(--dark); flex-shrink: 0; }
.nav-logo-icon {
  width: 36px; height: 36px; background: var(--grad); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-glow); flex-shrink: 0; overflow: hidden;
}
.nav-logo-icon svg { width: 100%; height: 100%; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-link {
  padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: var(--mid);
  transition: color .15s, background .15s;
}
.nav-link:hover { color: var(--dark); background: var(--surface); }
.nav-cta { display: flex; align-items: center; gap: 8px; }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; border-radius: var(--radius-sm); }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--dark); border-radius: 2px; }
.mobile-menu {
  display: none; flex-direction: column;
  padding: 12px 24px 20px; border-top: 1px solid var(--border);
  gap: 4px; background: var(--white);
}
.mobile-menu.open { display: flex; }
.mobile-menu .nav-link { padding: 10px 12px; }
.mobile-menu .btn { width: 100%; justify-content: center; margin-top: 4px; }
.mobile-menu .lang-switcher { align-self: flex-start; margin-top: 8px; }

/* ── RTL: Nav ─────────────────────────────────────────────────── */
html[dir="rtl"] .nav-inner { flex-direction: row-reverse; }
html[dir="rtl"] .nav-links { flex-direction: row-reverse; }
html[dir="rtl"] .nav-cta { flex-direction: row-reverse; }
html[dir="rtl"] .nav-logo { flex-direction: row-reverse; }
html[dir="rtl"] .btn { flex-direction: row-reverse; }
html[dir="rtl"] .mobile-menu .lang-switcher { align-self: flex-end; }

/* ── Responsive: Nav (legal pages breakpoint) ─────────────────── */
@media (max-width: 640px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
}
