/* ============================================================
   TECHNZONE — Legal Pages (Privacy, Terms, Cookies)
   legal.css — shared styles for all three legal pages
   ============================================================ */

/* ── Hero ───────────────────────────────────────────────────── */
.legal-hero {
  background: linear-gradient(135deg, #0a0a12 0%, #120a10 60%, #0a0a12 100%);
  padding: 140px 0 72px;
  position: relative;
  overflow: hidden;
}

.legal-hero::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(237,72,95,0.08) 0%, transparent 70%);
  top: -100px;
  right: -80px;
  pointer-events: none;
}

.legal-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(237,72,95,0.12);
  border: 1px solid rgba(237,72,95,0.25);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.legal-hero-title {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800;
  color: #fff;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
}

.legal-hero-sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.7;
  max-width: 620px;
  margin: 0 0 24px;
}

.legal-last-updated {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.3);
  font-weight: 500;
}

.legal-last-updated span {
  color: rgba(255,255,255,0.55);
}

/* ── Page nav (anchor links) ────────────────────────────────── */
.legal-nav {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 80px;
  z-index: 50;
}

.legal-nav-inner {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0;
}

.legal-nav-inner::-webkit-scrollbar { display: none; }

.legal-nav-link {
  padding: 14px 20px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.legal-nav-link:hover,
.legal-nav-link.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ── Body / Content ──────────────────────────────────────────── */
.legal-body {
  background: #fff;
  padding: 72px 0 96px;
}

.legal-content {
  max-width: 780px;
}

.legal-section {
  margin-bottom: 56px;
  scroll-margin-top: 120px;
}

.legal-section:last-child { margin-bottom: 0; }

.legal-section-num {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 10px;
}

.legal-section h2 {
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  line-height: 1.2;
}

.legal-section p {
  font-size: 0.9375rem;
  color: var(--gray);
  line-height: 1.8;
  margin-bottom: 14px;
}

.legal-section p:last-child { margin-bottom: 0; }

.legal-section ul,
.legal-section ol {
  margin: 0 0 16px 20px;
  padding: 0;
}

.legal-section li {
  font-size: 0.9375rem;
  color: var(--gray);
  line-height: 1.8;
  margin-bottom: 8px;
}

.legal-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  margin: 24px 0 10px;
}

.legal-section a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.legal-section a:hover { text-decoration: underline; }

/* Highlight box */
.legal-highlight {
  padding: 20px 24px;
  background: rgba(237,72,95,0.05);
  border-left: 3px solid var(--primary);
  border-radius: 0 12px 12px 0;
  margin: 20px 0;
}

.legal-highlight p {
  margin: 0;
  color: var(--dark);
  font-weight: 500;
  font-size: 0.9rem;
}

/* Info table */
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.875rem;
}

.legal-table th {
  background: var(--neutral);
  color: var(--dark);
  font-weight: 700;
  padding: 12px 16px;
  text-align: left;
  border: 1px solid var(--border);
}

.legal-table td {
  padding: 12px 16px;
  border: 1px solid var(--border);
  color: var(--gray);
  line-height: 1.6;
  vertical-align: top;
}

.legal-table tr:nth-child(even) td { background: #fafafa; }

/* Contact card */
.legal-contact-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 24px 28px;
  background: var(--neutral);
  border-radius: 16px;
  border: 1px solid var(--border);
  margin-top: 20px;
}

.legal-contact-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(237,72,95,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.legal-contact-info p {
  margin: 0 0 4px;
  font-size: 0.875rem;
  color: var(--gray);
}

.legal-contact-info strong {
  font-size: 0.9375rem;
  color: var(--dark);
  display: block;
  margin-bottom: 6px;
}

/* ── Sidebar / TOC ───────────────────────────────────────────── */
.legal-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 64px;
  align-items: start;
}

.legal-sidebar {
  position: sticky;
  top: 130px;
}

.legal-toc-heading {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 14px;
}

.legal-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.legal-toc-list a {
  display: block;
  padding: 8px 12px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gray);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
  line-height: 1.4;
}

.legal-toc-list a:hover {
  background: var(--neutral);
  color: var(--dark);
}

.legal-toc-list a.active {
  background: rgba(237,72,95,0.08);
  color: var(--primary);
  font-weight: 600;
}

/* ── Divider ──────────────────────────────────────────────────── */
.legal-divider {
  height: 1px;
  background: var(--border);
  margin: 40px 0;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .legal-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .legal-sidebar { display: none; }

  .legal-nav { display: block; }
}

@media (max-width: 768px) {
  .legal-hero { padding: 110px 0 56px; }
  .legal-body { padding: 48px 0 72px; }
  .legal-section { margin-bottom: 40px; }
  .legal-table { font-size: 0.8125rem; }
  .legal-table th,
  .legal-table td { padding: 9px 12px; }
}

/* ── Arabic RTL ──────────────────────────────────────────────── */
body:lang(ar) .legal-content,
body:lang(ar) .legal-hero-title,
body:lang(ar) .legal-hero-sub,
body:lang(ar) .legal-section {
  direction: rtl;
  text-align: right;
}

body:lang(ar) .legal-section ul,
body:lang(ar) .legal-section ol {
  margin: 0 20px 16px 0;
}

body:lang(ar) .legal-highlight {
  border-left: none;
  border-right: 3px solid var(--primary);
  border-radius: 12px 0 0 12px;
}

body:lang(ar) .legal-table th { text-align: right; }

body:lang(ar) .legal-sidebar { direction: rtl; }

body:lang(ar) .legal-hero-eyebrow { flex-direction: row-reverse; }
