/* legal.css — shared styles for /privacy/* and /terms/* static pages.
   Used by both Arabic (dir="rtl") and English (dir="ltr") versions —
   see the [dir="ltr"] overrides at the bottom for mirrored accents. */

:root {
  --green-950: #07291F;
  --green-900: #0A3A2D;
  --green-800: #0E4D3C;
  --green-700: #14573F;
  --green-600: #1B6B4F;
  --green-100: #E3EFE9;
  --gold: #C9A227;
  --gold-bright: #D4AF37;
  --gold-pale: #F0E2B6;
  --cream: #FAF7F0;
  --cream-dark: #F1EBDD;
  --white: #FFFFFF;
  --ink: #1C2B26;
  --muted: #5C6B64;
  --font: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
  --font-en: 'Inter', 'Segoe UI', Tahoma, sans-serif;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-soft: 0 10px 30px rgba(14,77,60,0.08);
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font-family: var(--font); background: var(--cream); color: var(--ink); line-height: 1.8; -webkit-font-smoothing: antialiased; }
html[dir="ltr"] body { font-family: var(--font-en); }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ─── Navbar ─── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  /* Background is already 98% opaque, so a live backdrop-blur behind it is
     visually a no-op — dropping it removes a needless per-frame scroll cost
     on a sticky element with zero visual change. */
  background: rgba(7,41,31,0.98);
  border-bottom: 1px solid rgba(201,162,39,0.12);
  padding: 0 24px;
}
.nav-inner {
  max-width: 1100px; margin: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 64px;
  gap: 16px;
}
.nav-start { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.nav-center { display: flex; align-items: center; gap: 10px; justify-content: center; }
.nav-end { display: flex; align-items: center; justify-content: flex-start; }
.nav-brand { display: flex; align-items: center; gap: 8px; }
.nav-brand img { height: 34px; }
.nav-divider { width: 1px; height: 18px; background: rgba(255,255,255,0.15); }
.nav-title {
  color: rgba(255,255,255,0.55); font-size: 12px; font-weight: 500;
  display: flex; align-items: center; gap: 6px;
}
.nav-title-sep { color: rgba(255,255,255,0.2); font-size: 11px; }
.nav-title-page { color: rgba(255,255,255,0.85); font-weight: 600; }
.nav-back, .nav-lang {
  display: inline-flex; align-items: center; gap: 7px;
  color: rgba(255,255,255,0.75); font-size: 13px; font-weight: 600;
  padding: 7px 14px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  transition: all 0.2s var(--ease-out);
  white-space: nowrap;
}
.nav-back:hover, .nav-lang:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(201,162,39,0.4);
  color: var(--gold-bright);
}
.nav-back svg { flex-shrink: 0; }

/* ─── Hero ─── */
.hero {
  background: linear-gradient(135deg, var(--green-950) 0%, var(--green-800) 60%, #1a5c46 100%);
  padding: 72px 24px 60px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 80% 50%, rgba(201,162,39,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner { max-width: 760px; margin: auto; position: relative; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(201,162,39,0.15);
  border: 1px solid rgba(201,162,39,0.3);
  color: var(--gold-bright);
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  padding: 6px 14px; border-radius: 100px;
  margin-bottom: 20px;
}
.hero-badge svg { flex-shrink: 0; }
.hero h1 { font-size: clamp(28px, 5vw, 40px); font-weight: 800; color: var(--white); line-height: 1.25; margin-bottom: 16px; }
.hero h1 span { color: var(--gold-bright); }
.hero-sub { color: rgba(255,255,255,0.65); font-size: 15px; max-width: 560px; }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 20px; margin-top: 32px;
  padding-top: 28px; border-top: 1px solid rgba(255,255,255,0.1);
}
.hero-meta-item { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,0.55); font-size: 13px; }
.hero-meta-item svg { color: var(--gold); flex-shrink: 0; }
.hero-meta-item strong { color: rgba(255,255,255,0.85); }

/* ─── Layout ─── */
.layout { max-width: 1100px; margin: 0 auto; padding: 56px 24px 80px; display: grid; grid-template-columns: 240px 1fr; gap: 48px; align-items: start; }
@media (max-width: 800px) { .layout { grid-template-columns: 1fr; } .toc { display: none; } }

/* ─── TOC ─── */
.toc { position: sticky; top: 84px; }
.toc-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 12px; }
.toc-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.toc-link {
  display: block; padding: 8px 12px;
  font-size: 13px; color: var(--muted);
  border-radius: 8px; border-right: 2px solid transparent;
  transition: all 0.2s var(--ease-out);
}
.toc-link:hover, .toc-link.is-active {
  color: var(--green-800); background: var(--green-100);
  border-right-color: var(--green-700);
}

/* ─── Content ─── */
.content { min-width: 0; }
.section { margin-bottom: 52px; scroll-margin-top: 90px; }
.section-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--green-100); color: var(--green-800);
  font-size: 13px; font-weight: 700; margin-bottom: 12px;
}
.section h2 { font-size: 22px; font-weight: 700; color: var(--green-900); margin-bottom: 16px; line-height: 1.3; }
.section p, .section li { font-size: 15px; color: #2d3f38; line-height: 1.85; }
.section p + p { margin-top: 12px; }

/* lists */
.section ul, .section ol { margin: 14px 0 14px 0; padding-inline-start: 22px; display: flex; flex-direction: column; gap: 8px; }
.section li::marker { color: var(--gold); }

/* highlight box */
.callout {
  background: var(--green-100);
  border: 1px solid rgba(14,77,60,0.12);
  border-right: 3px solid var(--green-700);
  border-radius: 12px;
  padding: 18px 20px;
  margin: 20px 0;
  font-size: 14px; color: var(--green-900);
  display: flex; gap: 12px; align-items: flex-start;
}
.callout svg { flex-shrink: 0; margin-top: 1px; color: var(--green-700); }
.callout-body { flex: 1; }
.callout-body strong { display: block; margin-bottom: 4px; }

.callout-warn {
  background: #FEF9EC;
  border-color: rgba(201,162,39,0.2);
  border-right-color: var(--gold);
}
.callout-warn svg { color: var(--gold); }
.callout-warn strong, .callout-warn { color: #4a3800; }

/* data table */
.data-table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; border-radius: 12px; overflow: hidden; }
.data-table thead { background: var(--green-800); color: white; }
.data-table th { padding: 12px 16px; text-align: right; font-weight: 600; }
.data-table td { padding: 12px 16px; border-bottom: 1px solid rgba(14,77,60,0.08); color: #2d3f38; vertical-align: top; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:nth-child(even) { background: rgba(14,77,60,0.03); }

/* rights grid */
.rights-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 20px 0; }
.right-card {
  background: var(--white);
  border: 1px solid rgba(14,77,60,0.1);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow-soft);
}
.right-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--green-100); display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px; color: var(--green-700);
}
.right-card h4 { font-size: 14px; font-weight: 700; color: var(--green-900); margin-bottom: 4px; }
.right-card p { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* third party list */
.third-party-list { display: flex; flex-direction: column; gap: 12px; margin: 20px 0; }
.third-party-item {
  background: var(--white);
  border: 1px solid rgba(14,77,60,0.08);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex; align-items: flex-start; gap: 14px;
  box-shadow: 0 2px 8px rgba(14,77,60,0.04);
}
.tp-icon {
  width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.tp-body { flex: 1; min-width: 0; }
.tp-body strong { display: block; font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 3px; }
.tp-body span { font-size: 13px; color: var(--muted); }
.tp-purpose {
  font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px;
  background: var(--green-100); color: var(--green-800); white-space: nowrap; align-self: flex-start; margin-top: 3px;
}

/* divider */
.divider { height: 1px; background: rgba(14,77,60,0.08); margin: 48px 0; }

/* ─── Contact card ─── */
.contact-card {
  background: var(--green-900);
  border-radius: var(--radius-lg);
  padding: 32px;
  color: white;
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  margin-top: 20px;
}
@media (max-width: 600px) { .contact-card { grid-template-columns: 1fr; } }
.contact-item { display: flex; align-items: flex-start; gap: 12px; }
.contact-ico { width: 38px; height: 38px; background: rgba(201,162,39,0.15); border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--gold); }
.contact-text strong { display: block; font-size: 13px; color: rgba(255,255,255,0.55); margin-bottom: 4px; }
.contact-text a, .contact-text span { font-size: 15px; color: white; font-weight: 600; }

/* ─── location permission box (customer privacy page) ─── */
.location-box { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }
@media (max-width: 560px) { .location-box { grid-template-columns: 1fr; } }
.loc-card { background: var(--white); border: 1px solid rgba(14,77,60,0.1); border-radius: 12px; padding: 16px; }
.loc-card h4 { font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--green-900); display: flex; gap: 8px; align-items: center; }
.loc-card p { font-size: 13px; color: var(--muted); line-height: 1.6; }
.loc-badge { font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: 700; }
.loc-badge-yes { background: #D1FAE5; color: #065F46; }
.loc-badge-no { background: #FEE2E2; color: #991B1B; }

/* ─── Footer ─── */
.page-footer {
  background: var(--green-950);
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 24px;
  font-size: 13px;
}
.page-footer a { color: var(--gold); }

/* ─── Responsive ─── */
@media (max-width: 767px) {
  .hero { padding: 48px 16px 40px; }
  .hero h1 { font-size: clamp(22px, 6vw, 32px); }
  .hero-sub { font-size: 14px; }
  .hero-meta { gap: 14px; margin-top: 24px; padding-top: 20px; }

  .layout { padding: 28px 16px 48px; gap: 24px; }
  .toc { display: none; }

  .section { margin-bottom: 36px; }
  .section h2 { font-size: 20px; }
  .section p, .section li { font-size: 15px; line-height: 1.7; }

  .contact-card { padding: 22px 18px; grid-template-columns: 1fr; gap: 16px; }

  .data-table { font-size: 13px; }
  .data-table th, .data-table td { padding: 9px 11px; }

  .callout { padding: 14px 16px; font-size: 13px; }

  .rights-grid { grid-template-columns: 1fr; }
  .location-box { grid-template-columns: 1fr; }
}

@media (max-width: 400px) {
  .hero { padding: 36px 14px 32px; }
  .layout { padding: 20px 14px 40px; }
  .section p, .section li { font-size: 14px; }
  .nav-back, .nav-lang { padding: 6px 10px; font-size: 12px; }
}

/* ─── LTR (English) mirroring ─── */
html[dir="ltr"] .data-table th { text-align: left; }
html[dir="ltr"] .toc-link { border-right: none; border-left: 2px solid transparent; }
html[dir="ltr"] .toc-link:hover, html[dir="ltr"] .toc-link.is-active { border-left-color: var(--green-700); }
html[dir="ltr"] .callout { border-right: none; border-left: 3px solid var(--green-700); }
html[dir="ltr"] .callout-warn { border-left-color: var(--gold); }
