/* ================================================================
   legal.css  —  Privacy & Terms pages
   Wajd Technology Innovations
   Extends style.css — same palette, different layout
   ================================================================ */

/* ── Nav ─────────────────────────────────────────────────────── */
.legal-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 48px;
  background: rgba(6,8,15,0.97);
  border-bottom: 1px solid rgba(201,168,76,0.12);
  backdrop-filter: blur(10px);
}
[dir=rtl] .legal-nav { flex-direction: row-reverse; }

.legal-nav__back {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: rgba(212,196,168,0.55);
  letter-spacing: 0.08em;
  transition: color 0.3s;
}
[dir=rtl] .legal-nav__back { flex-direction: row-reverse; font-family: 'Noto Kufi Arabic', sans-serif; letter-spacing: 0; }
.legal-nav__back:hover { color: #c9a84c; }
.legal-nav__back-arrow { font-size: 16px; line-height: 1; color: #c9a84c; }

.legal-nav__logo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.legal-nav__logo-img {
  width: 30px; height: 30px;
  /* filter: brightness(0) saturate(100%) invert(35%) sepia(80%) saturate(600%) hue-rotate(200deg) brightness(110%); */
}
.legal-nav__logo-name {
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.1em;
  color: #f5ede0;
}
[dir=rtl] .legal-nav__logo-name { font-family: 'Noto Kufi Arabic', sans-serif; letter-spacing: 0; }

.legal-nav__lang {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(201,168,76,0.12);
  border-radius: 3px;
  padding: 5px 12px;
  transition: border-color 0.3s;
}
.legal-nav__lang:hover { border-color: #c9a84c; }
.legal-nav__lang span {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: rgba(212,196,168,0.45);
  letter-spacing: 0.1em;
  transition: color 0.3s;
}
.legal-nav__lang span.active { color: #c9a84c; }
.legal-nav__lang-div { width: 1px; height: 11px; background: rgba(201,168,76,0.2); }

/* ── Header ──────────────────────────────────────────────────── */
.legal-header {
  position: relative;
  padding: 140px 64px 80px;
  background: #06080f;
  overflow: hidden;
  border-bottom: 1px solid rgba(201,168,76,0.1);
}
.legal-header__pattern {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='rgba(201,168,76,0.06)' stroke-width='0.5'%3E%3Cpolygon points='30,2 58,16 58,44 30,58 2,44 2,16'/%3E%3Cpolygon points='30,10 50,20 50,40 30,50 10,40 10,20'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 100% at 50% 0%, black 30%, transparent 80%);
}
.legal-header__inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin-inline: auto;
}
.legal-header__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #c9a84c;
  margin-bottom: 20px;
}
[dir=rtl] .legal-header__badge { font-family: 'Noto Kufi Arabic', sans-serif; letter-spacing: 0; text-transform: none; font-size: 1rem; }
.legal-header__badge::before { content: '◆'; font-size: 7px; }

.legal-header__title {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #f5ede0;
  margin-bottom: 16px;
}
[dir=rtl] .legal-header__title { font-family: 'Noto Kufi Arabic', sans-serif; letter-spacing: 0; line-height: 1.3; }

.legal-header__subtitle {
  font-size: 1.5rem;
  font-weight: 300;
  color: #d4c4a8;
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 560px;
}
[dir=rtl] .legal-header__subtitle { font-family: 'Noto Kufi Arabic', sans-serif; line-height: 2; font-size: 1.5rem; }

.legal-header__date {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(212,196,168,0.4);
}
[dir=rtl] .legal-header__date { font-family: 'Noto Kufi Arabic', sans-serif; letter-spacing: 0; text-transform: none; }

/* ── Layout: TOC sidebar + main ──────────────────────────────── */
.legal-toc-wrap {
  position: sticky;
  top: 57px;
  z-index: 100;
  background: rgba(6,8,15,0.96);
  border-bottom: 1px solid rgba(201,168,76,0.08);
  backdrop-filter: blur(8px);
  padding: 0 64px;
  display: none; /* shown only on desktop via grid */
}

/* Desktop: sidebar TOC */
@media (min-width: 1024px) {
  .legal-toc-wrap {
    display: block;
    position: fixed;
    top: 57px;
    left: 0;
    bottom: 0;
    width: 280px;
    border-bottom: none;
    border-right: 1px solid rgba(201,168,76,0.08);
    padding: 32px 0;
    overflow-y: auto;
    background: rgba(6,8,15,0.98);
  }
  [dir=rtl] .legal-toc-wrap {
    left: auto;
    right: 0;
    border-right: none;
    border-left: 1px solid rgba(201,168,76,0.08);
  }
  .legal-main {
    margin-left: 280px;
  }
  [dir=rtl] .legal-main {
    margin-left: 0;
    margin-right: 280px;
  }
  .legal-header {
    padding-left: calc(280px + 64px);
  }
  [dir=rtl] .legal-header {
    padding-left: 64px;
    padding-right: calc(280px + 64px);
  }
}

.legal-toc { padding: 0 24px; }

.legal-toc__label {
  font-family: 'Outfit', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(201,168,76,0.5);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(201,168,76,0.1);
}
[dir=rtl] .legal-toc__label { font-family: 'Noto Kufi Arabic', sans-serif; letter-spacing: 0; text-transform: none; font-size: 1rem; }

.legal-toc__list { list-style: none; display: flex; flex-direction: column; gap: 2px; }

.legal-toc__list a {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: rgba(212,196,168,0.45);
  padding: 7px 10px;
  border-radius: 3px;
  border-left: 2px solid transparent;
  transition: color 0.25s, background 0.25s, border-color 0.25s;
  line-height: 1.45;
  [dir=rtl] & {
    font-family: 'Noto Kufi Arabic', sans-serif;
    border-left: none;
    border-right: 2px solid transparent;
  }
}
.legal-toc__list a:hover,
.legal-toc__list a.active {
  color: #c9a84c;
  background: rgba(201,168,76,0.06);
  border-left-color: #c9a84c;
}
[dir=rtl] .legal-toc__list a:hover,
[dir=rtl] .legal-toc__list a.active {
  border-left-color: transparent;
  border-right-color: #c9a84c;
}

/* Mobile TOC — horizontal scrollable strip */
@media (max-width: 1023px) {
  .legal-toc-wrap {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    padding: 12px 24px;
    -webkit-overflow-scrolling: touch;
  }
  .legal-toc { padding: 0; }
  .legal-toc__label { display: none; }
  .legal-toc__list { flex-direction: row; gap: 6px; }
  .legal-toc__list a {
    display: inline-block;
    font-size: 1rem;
    padding: 5px 12px;
    border-left: none;
    border-bottom: 2px solid transparent;
    border-radius: 2px;
  }
  .legal-toc__list a:hover,
  .legal-toc__list a.active {
    border-left-color: transparent;
    border-bottom-color: #c9a84c;
  }
  [dir=rtl] .legal-toc__list a { border-right: none; }
}

/* ── Main content ────────────────────────────────────────────── */
.legal-main {
  max-width: 760px;
  margin-inline: auto;
  padding: 64px 64px 100px;
}

.legal-section {
  margin-bottom: 56px;
  scroll-margin-top: 120px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(201,168,76,0.07);
}
.legal-section:last-child { border-bottom: none; }

.legal-section__heading {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: clamp(18px, 2.5vw, 24px);
  color: #f5ede0;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(201,168,76,0.15);
  position: relative;
}
[dir=rtl] .legal-section__heading { font-family: 'Noto Kufi Arabic', sans-serif; }
.legal-section__heading::before {
  content: '';
  position: absolute;
  bottom: -1px; left: 0;
  width: 40px; height: 1px;
  background: #c9a84c;
}
[dir=rtl] .legal-section__heading::before { left: auto; right: 0; }

.legal-section__body p {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 300;
  color: #d4c4a8;
  line-height: 1.9;
  margin-bottom: 14px;
}
[dir=rtl] .legal-section__body p { font-family: 'Noto Kufi Arabic', sans-serif; line-height: 2.1; font-size: 1.5rem; }
.legal-section__body p:last-child { margin-bottom: 0; }

.legal-bullet {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 300;
  color: #d4c4a8;
  line-height: 1.8;

  [dir=rtl] & { font-family: 'Noto Kufi Arabic', sans-serif; font-size: 1.5rem; line-height: 2; }
}
.legal-bullet__dot {
  font-size: 7px;
  color: #c9a84c;
  flex-shrink: 0;
  margin-top: 7px;
}

/* ── Footer ──────────────────────────────────────────────────── */
.legal-footer {
  background: #06080f;
  border-top: 1px solid rgba(201,168,76,0.1);
  padding: 32px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.legal-footer__links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.legal-footer__links a {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: rgba(212,196,168,0.45);
  transition: color 0.3s;
}
[dir=rtl] .legal-footer__links a { font-family: 'Noto Kufi Arabic', sans-serif; }
.legal-footer__links a:hover,
.legal-footer__links a.active { color: #c9a84c; }
.legal-footer__sep { color: rgba(201,168,76,0.25); font-size: 1.5rem; line-height: 1; }
.legal-footer__copy {
  font-size: 1rem;
  color: rgba(212,196,168,0.3);
  letter-spacing: 0.05em;
}
[dir=rtl] .legal-footer__copy { font-family: 'Noto Kufi Arabic', sans-serif; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .legal-nav { padding: 12px 20px; }
  .legal-header { padding: 120px 24px 60px; }
  .legal-main { padding: 40px 24px 80px; }
  .legal-footer { padding: 28px 24px; }
}
@media (max-width: 480px) {
  .legal-nav { padding: 10px 14px; }
  .legal-nav__back span:last-child { display: none; }
  .legal-header { padding: 110px 16px 48px; }
  .legal-main { padding: 32px 16px 60px; }
  .legal-footer { padding: 24px 16px; }
  .legal-section { margin-bottom: 40px; padding-bottom: 40px; }
}
@media (max-width: 360px) {
  .legal-header { padding: 100px 12px 40px; }
  .legal-main { padding: 28px 12px 48px; }
  .legal-section__heading { font-size: 1.6rem; }
  .legal-section__body p, .legal-bullet { font-size: 1.25rem; }
}
