/* صفحات الشروط وسياسة الخصوصية — تنسيق مستقل خفيف يعمل بلا JavaScript */

:root {
  --brand: #0d9488;
  --brand-dark: #0f766e;
  --brand-ink: #134e4a;
  --brand-soft: #ccfbf1;
  --ink: #1e293b;
  --body: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --surface: #ffffff;
  --bg: #f8fafc;
  --radius: 20px;
  --font-ar: 'Cairo', 'Segoe UI', Tahoma, 'Noto Sans Arabic', 'Dubai', 'Geeza Pro', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ar);
  direction: rtl;
  text-align: right;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--brand-dark);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  right: 12px;
  top: -60px;
  z-index: 50;
  background: var(--brand-dark);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  transition: top .15s ease;
}
.skip-link:focus { top: 10px; }

/* ── الترويسة ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  flex: none;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px -8px rgba(15, 118, 110, .8);
}
.brand-mark svg { width: 20px; height: 20px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 13px;
  font-weight: 700;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 11px;
  border-radius: 10px;
  color: var(--muted);
}
.site-nav a:hover { background: #f1f5f9; color: var(--ink); text-decoration: none; }
.site-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-ink); }

/* ── المقدمة ── */
.hero {
  margin: 26px 0 20px;
  padding: 30px 26px;
  border-radius: 26px;
  color: #fff;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, .16), transparent 46%),
    linear-gradient(135deg, #115e59, var(--brand-dark) 42%, #0d9488);
  box-shadow: 0 18px 40px -24px rgba(15, 118, 110, .55);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2px;
  color: #ccfbf1;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
  padding: 4px 11px;
  border-radius: 999px;
}

.hero h1 {
  margin: 12px 0 8px;
  font-size: 28px;
  line-height: 1.45;
  font-weight: 800;
}

.hero p {
  margin: 0;
  max-width: 62ch;
  font-size: 14px;
  color: #d1fae5;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.chip {
  font-size: 11px;
  color: #ecfdf5;
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .22);
  padding: 4px 10px;
  border-radius: 999px;
}

/* ── الفهرس ── */
.toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 18px;
}

.toc h2 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: .2px;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px 20px;
  grid-template-columns: 1fr;
}

.toc a {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}
.toc a:hover { color: var(--brand-dark); text-decoration: none; }

.toc a span {
  flex: none;
  min-width: 18px;
  color: var(--brand);
  font-size: 11.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* ── الأقسام ── */
.legal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 14px;
}

.legal h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 17.5px;
  line-height: 1.5;
  font-weight: 800;
}

.legal h2 .num {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-size: 12.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.legal h3 {
  margin: 16px 0 6px;
  font-size: 14.5px;
  font-weight: 800;
}

.legal p {
  margin: 0 0 9px;
  font-size: 14px;
  color: var(--body);
}

.legal ul {
  list-style: none;
  margin: 6px 0 10px;
  padding: 0;
}

.legal li {
  position: relative;
  margin-bottom: 7px;
  padding-right: 18px;
  font-size: 13.5px;
  color: var(--body);
}

.legal li::before {
  content: "";
  position: absolute;
  right: 2px;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}

.note {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 13px;
  line-height: 1.8;
}

.note strong { color: #78350f; }

.contact-box {
  margin-top: 10px;
  padding: 14px;
  border-radius: 14px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  font-size: 13.5px;
  color: #065f46;
}

.contact-box a { font-weight: 700; }

.back-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 20px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.back-home:hover { color: var(--brand-dark); text-decoration: none; }

/* ── التذييل ── */
.site-footer {
  margin-top: 32px;
  padding: 28px 0;
  background: #0f172a;
  color: #94a3b8;
  font-size: 12.5px;
}

.site-footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.site-footer strong { color: #f1f5f9; font-size: 14px; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #5eead4; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
}

/* ── شاشات أوسع ── */
@media (min-width: 640px) {
  .hero { padding: 34px 34px; }
  .hero h1 { font-size: 32px; }
  .toc ol { grid-template-columns: 1fr 1fr; }
  .legal { padding: 26px 28px; }
  .site-footer .wrap {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (max-width: 479px) {
  .site-nav .nav-home { display: none; }
  .site-nav a { padding: 8px 10px; font-size: 12.5px; }
}

@media (max-width: 400px) {
  .site-nav a { padding: 8px; font-size: 12px; }
  .hero { padding: 24px 20px; }
  .hero h1 { font-size: 24px; }
  .legal { padding: 18px 16px; }
}

/* ── الطباعة ── */
@media print {
  html { scroll-padding-top: 0; }
  body { background: #fff; color: #000; }
  .site-header, .site-footer, .toc, .back-home, .skip-link { display: none !important; }
  .hero {
    margin: 0 0 16px;
    padding: 0 0 12px;
    border-radius: 0;
    background: #fff;
    color: #000;
    box-shadow: none;
    border-bottom: 2px solid #000;
  }
  .hero p, .hero-eyebrow, .chip { color: #333; background: none; border: 0; }
  .legal {
    border: 0;
    border-radius: 0;
    padding: 0;
    margin: 0 0 18px;
    break-inside: avoid;
  }
  .legal a { color: #000; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
