/* ── Legal Hero ───────────────────────────────────────────────── */
.legal-hero { background: var(--grad); padding: 56px 0 48px; text-align: center; color: #fff; }
.legal-hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3);
  border-radius: 99px; padding: 4px 16px; font-size: 13px; font-weight: 600;
  margin-bottom: 16px; backdrop-filter: blur(4px);
}
.legal-hero h1 { font-size: 2.25rem; font-weight: 800; margin-bottom: 10px; line-height: 1.2; }
.legal-hero-meta { font-size: 14px; opacity: .75; }

/* ── Body layout ──────────────────────────────────────────────── */
.legal-body {
  display: flex; gap: 40px; align-items: flex-start;
  max-width: 1000px; margin: 48px auto; padding: 0 24px;
}

/* ── TOC ──────────────────────────────────────────────────────── */
.legal-toc { width: 220px; flex-shrink: 0; position: sticky; top: 80px; }
.toc-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--light); margin-bottom: 8px; padding: 0 10px;
}
.toc-link {
  display: block; padding: 7px 10px; border-radius: var(--radius-sm);
  font-size: 13.5px; color: var(--muted); border-left: 2px solid transparent;
  transition: background .15s, color .15s, border-color .15s; line-height: 1.4;
}
.toc-link:hover { background: var(--surface); color: var(--dark); }
.toc-link.active { background: #eff6ff; color: #2563eb; border-left-color: #3b82f6; font-weight: 600; }

/* ── Content ──────────────────────────────────────────────────── */
.legal-content { flex: 1; min-width: 0; }
.legal-section { margin-bottom: 48px; scroll-margin-top: 88px; }
.legal-section h2 {
  font-size: 1.25rem; font-weight: 700; color: var(--dark);
  margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--surface);
  display: flex; align-items: center; gap: 10px;
}
.section-num {
  width: 28px; height: 28px; border-radius: 99px;
  background: var(--grad); color: #fff; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.legal-section p { font-size: 15px; color: var(--mid); margin-bottom: 12px; }
.legal-section ul { padding-left: 20px; margin-bottom: 12px; }
html[lang="ar"] .legal-section ul { padding-left: 0; padding-right: 20px; }
.legal-section ul li { font-size: 15px; color: var(--mid); margin-bottom: 6px; list-style: disc; }
.legal-section h3 { font-size: 1rem; font-weight: 600; color: var(--dark); margin: 18px 0 8px; }
.highlight-box {
  background: #eff6ff; border: 1px solid #bfdbfe; border-left: 4px solid #3b82f6;
  border-radius: var(--radius-sm); padding: 14px 18px; margin: 16px 0;
  font-size: 14px; color: #1e40af; line-height: 1.6;
}
html[lang="ar"] .highlight-box { border-left: 1px solid #bfdbfe; border-right: 4px solid #3b82f6; }

/* ── Contact card ─────────────────────────────────────────────── */
.contact-card {
  background: var(--grad); border-radius: var(--radius-lg);
  padding: 32px; text-align: center; color: #fff; margin-top: 24px;
}
.contact-card h3 { font-size: 1.125rem; font-weight: 700; margin-bottom: 8px; }
.contact-card p { opacity: .85; font-size: 14px; margin-bottom: 16px; }
.contact-card a {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.35);
  border-radius: var(--radius-md); padding: 10px 22px;
  font-size: 14px; font-weight: 600; color: #fff; transition: background .2s;
}
.contact-card a:hover { background: rgba(255,255,255,.32); }

/* ── Footer (legal pages) ─────────────────────────────────────── */
footer {
  background: var(--dark); color: rgba(255,255,255,.65);
  font-size: 14px; padding: 40px 0 20px; margin-top: 60px;
}
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1);
}
.footer-bottom p { font-size: 13px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 13px; color: rgba(255,255,255,.55); }
.footer-links a:hover { color: #fff; }
.footer-back { display: flex; align-items: center; gap: 8px; }
.footer-back a {
  display: inline-flex; align-items: center; gap: 6px;
  color: rgba(255,255,255,.7); font-size: 13px; font-weight: 500;
  border: 1px solid rgba(255,255,255,.2); border-radius: 99px;
  padding: 5px 14px; transition: all .2s;
}
.footer-back a:hover { background: rgba(255,255,255,.08); color: #fff; }

/* ── RTL: Legal ───────────────────────────────────────────────── */
html[dir="rtl"] .toc-link { border-left: none; border-right: 2px solid transparent; }
html[dir="rtl"] .toc-link.active { border-right-color: #3b82f6; border-left: none; }
html[dir="rtl"] .footer-bottom { flex-direction: row-reverse; }
html[dir="rtl"] .footer-links { flex-direction: row-reverse; }

/* ── Responsive: Legal ────────────────────────────────────────── */
@media (max-width: 820px) {
  .legal-body { flex-direction: column; gap: 24px; }
  .legal-toc { width: 100%; position: static; display: flex; flex-wrap: wrap; gap: 6px; }
  .toc-label { width: 100%; }
  .toc-link {
    border-left: none; border: 1px solid var(--border);
    border-radius: 99px; font-size: 12.5px; padding: 5px 12px;
  }
  .toc-link.active { border-color: #3b82f6; }
  html[dir="rtl"] .toc-link { border-right: none; border: 1px solid var(--border); }
}
@media (max-width: 640px) {
  .legal-hero h1 { font-size: 1.75rem; }
}
