:root {
  --purple: #7B4FBE;
  --purple-dark: #5C3494;
  --teal: #1DBFBF;
  --bg: #F4F1FB;
  --bg2: #FFFFFF;
  --card: rgba(123,79,190,0.04);
  --card-border: rgba(123,79,190,0.13);
  --text: #1a1228;
  --text-muted: #7a6e90;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Cairo', sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  line-height: 1.8;
}

/* HEADER */
.legal-header {
  position: sticky;
  top: 0; z-index: 100;
  background: rgba(244,241,251,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--card-border);
  padding: 0 5%;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.legal-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.logo-icon img { width: 100%; height: 100%; object-fit: contain; }
.logo-text { font-size: 18px; font-weight: 800; color: var(--purple); }
.logo-text span { color: var(--teal); }
.legal-nav { display: flex; align-items: center; gap: 8px; }
.legal-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 8px;
  transition: all 0.2s;
}
.legal-nav a:hover { color: var(--purple); background: var(--card); }

/* MAIN */
.legal-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 50px 24px 80px;
}
.legal-back {
  display: inline-block;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 20px;
  transition: color 0.2s;
}
.legal-back:hover { color: var(--purple); }

.legal-tag {
  display: inline-block;
  background: linear-gradient(135deg, rgba(123,79,190,0.12), rgba(29,191,191,0.08));
  color: var(--purple);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 50px;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
  border: 1px solid var(--card-border);
}
h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 8px;
  color: var(--text);
}
h1 span {
  background: linear-gradient(135deg, var(--purple), var(--teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.legal-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 36px;
  font-weight: 600;
}

section {
  background: var(--bg2);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 18px;
  box-shadow: 0 4px 16px rgba(123,79,190,0.04);
}
section:first-of-type {
  background: linear-gradient(135deg, rgba(123,79,190,0.05), rgba(29,191,191,0.03));
}
h2 {
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--card-border);
}
section p {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
section p:last-child { margin-bottom: 0; }
section strong { color: var(--text); font-weight: 700; }
ul, ol {
  list-style: none;
  padding-right: 0;
  margin-top: 8px;
}
ul li, ol li {
  font-size: 14.5px;
  color: var(--text-muted);
  padding: 6px 22px 6px 0;
  position: relative;
  line-height: 1.9;
}
ul li::before {
  content: '';
  position: absolute;
  right: 4px;
  top: 16px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--teal));
}
ol { counter-reset: item; }
ol > li {
  counter-increment: item;
}
ol > li::before {
  content: counter(item);
  position: absolute;
  right: 0;
  top: 6px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--teal));
  color: white;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
ul ul {
  margin-top: 4px;
  margin-right: 0;
}
ul ul li::before {
  background: var(--text-muted);
  width: 5px; height: 5px;
}
section a {
  color: var(--purple);
  font-weight: 700;
  text-decoration: none;
}
section a:hover { text-decoration: underline; }

/* FOOTER */
.legal-footer {
  background: var(--bg2);
  border-top: 1px solid var(--card-border);
  padding: 24px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}
.legal-footer a {
  color: var(--purple);
  text-decoration: none;
  font-weight: 700;
}
.legal-footer a:hover { text-decoration: underline; }
.legal-footer-links a { margin: 0 4px; }

.sbc-banner-wrap {
  display: flex;
  justify-content: center;
  padding: 32px 20px 0;
  background: var(--bg2);
}
.sbc-banner-wrap a { display: block; max-width: 320px; }
.sbc-banner-wrap img { width: 100%; height: auto; display: block; border-radius: 8px; }

@media (max-width: 700px) {
  .legal-header { padding: 0 4%; height: 60px; }
  .logo-icon { width: 36px; height: 36px; }
  .logo-text { font-size: 16px; }
  .legal-nav { gap: 4px; }
  .legal-nav a { padding: 6px 10px; font-size: 13px; }
  .legal-wrap { padding: 28px 16px 50px; }
  section { padding: 18px; }
  h1 { font-size: clamp(24px, 6vw, 34px) !important; line-height: 1.3 !important; }
  .legal-meta { font-size: 12px; margin-bottom: 24px; }
  h2 { font-size: 17px; }
  section p, ul li, ol li { font-size: 14px; }
  .legal-footer { flex-direction: column; text-align: center; padding: 20px 5%; }
  .sbc-banner-wrap { padding: 24px 16px 0; }
  .sbc-banner-wrap a { max-width: 280px; }
}
@media (max-width: 420px) {
  .legal-nav a:not(:last-child) { display: none; }
}
