:root {
  --black: #0a0a0a;
  --deep: #111111;
  --card: #1a1a1a;
  --red: #c0161b;
  --red-dark: #8b0f13;
  --red-light: #e01e24;
  --gold: #c9a84c;
  --white: #f8f5f0;
  --gray: #888;
  --font-main: 'Cairo', sans-serif;
  --font-display: 'Amiri', serif;
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--black);
  color: var(--white);
  direction: rtl;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--red); border-radius: 3px; }

/* FLOATING BUTTONS */
.float-group {
  position: fixed;
  bottom: 24px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
}

.float-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 26px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  transition: transform 0.2s, box-shadow 0.2s;
  animation: pulse-float 2.5s infinite;
}

.float-btn:hover { transform: scale(1.12); box-shadow: 0 6px 30px rgba(0,0,0,0.6); }
.float-call { background: var(--red); animation-delay: 0s; }
.float-wa { background: #25d366; animation-delay: 0.4s; }

@keyframes pulse-float {
  0%, 100% { box-shadow: 0 4px 20px rgba(0,0,0,0.5); }
  50% { box-shadow: 0 4px 30px rgba(192,22,27,0.7); }
}

/* HEADER */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10,10,10,0.97);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--red);
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }

.logo-icon {
  width: 42px; height: 42px;
  background: var(--red);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 700;
  color: var(--white); line-height: 1.2;
}

.logo-sub { font-size: 11px; color: var(--gold); font-family: var(--font-main); font-weight: 400; }

.header-cta { display: flex; align-items: center; gap: 14px; }

.header-phone {
  display: flex; align-items: center; gap: 8px;
  font-size: 20px; font-weight: 900;
  color: var(--white); text-decoration: none; letter-spacing: 1px;
}

.header-phone span.icon { color: var(--red); font-size: 18px; }

.btn-call {
  background: var(--red);
  color: var(--white);
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: var(--font-main);
  font-size: 14px; font-weight: 700;
  cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}

.btn-call:hover { background: var(--red-light); transform: scale(1.03); }
.btn-call:active { transform: scale(0.97); }

/* PAGE HERO (للصفحات الداخلية) */
.page-hero {
  position: relative;
  padding: 64px 20px 48px;
  background: var(--deep);
  border-bottom: 1px solid rgba(192,22,27,0.25);
  text-align: center;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(45deg, rgba(192,22,27,0.04) 0px, rgba(192,22,27,0.04) 1px, transparent 1px, transparent 40px);
  z-index: 0;
}

.page-hero-inner { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }

.breadcrumb {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 18px;
}

.breadcrumb a { color: var(--gray); text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb span.sep { color: rgba(255,255,255,0.25); }
.breadcrumb span.current { color: var(--gold); }

.page-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 6vw, 46px);
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--white);
}

.page-title em { color: var(--red); font-style: normal; }

.page-updated {
  font-size: 13px;
  color: var(--gray);
  letter-spacing: 0.5px;
}

.page-updated strong { color: var(--gold); font-weight: 700; }

/* LEGAL CONTENT */
.legal-wrap { padding: 64px 20px 96px; background: var(--black); }

.legal-container {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
}

/* TOC (جدول المحتويات الجانبي) */
.legal-toc {
  position: sticky;
  top: 90px;
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 22px 18px;
}

.legal-toc-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 10px;
}

.legal-toc ol {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  counter-reset: toc;
}

.legal-toc li { counter-increment: toc; }

.legal-toc a {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: var(--gray);
  text-decoration: none;
  line-height: 1.5;
  transition: color 0.2s;
}

.legal-toc a::before {
  content: counter(toc);
  flex-shrink: 0;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(192,22,27,0.15);
  color: var(--red);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.legal-toc a:hover { color: var(--white); }

/* BODY */
.legal-body { min-width: 0; }

.legal-section { margin-bottom: 40px; scroll-margin-top: 90px; }

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

.legal-section-num {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.legal-section-num::before {
  content: '';
  width: 18px;
  height: 2px;
  background: var(--red);
}

.legal-section h2 {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 14px;
  line-height: 1.4;
}

.legal-section p {
  font-size: 15px;
  line-height: 1.9;
  color: rgba(248,245,240,0.78);
  margin-bottom: 14px;
}

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

.legal-section ul, .legal-section ol.legal-list {
  margin: 0 0 14px;
  padding-right: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal-section ul li, .legal-section ol.legal-list li {
  font-size: 15px;
  line-height: 1.8;
  color: rgba(248,245,240,0.78);
}

.legal-section ul li::marker { color: var(--red); }
.legal-section ol.legal-list li::marker { color: var(--red); font-weight: 700; }

.legal-highlight {
  background: rgba(192,22,27,0.08);
  border-right: 3px solid var(--red);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 18px 0;
}

.legal-highlight p { margin-bottom: 0; color: rgba(248,245,240,0.85); }

.legal-contact-box {
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 8px;
}

.legal-contact-box .row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.legal-contact-box .row:last-child { margin-bottom: 0; }

.legal-contact-box .row a {
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  transition: color 0.2s;
}

.legal-contact-box .row a:hover { color: var(--red); }

.legal-contact-box .row .ico {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(192,22,27,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

/* CTA strip at bottom of legal pages */
.legal-cta {
  margin-top: 56px;
  background: linear-gradient(135deg, var(--red-dark) 0%, var(--red) 100%);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}

.legal-cta p {
  color: rgba(255,255,255,0.9);
  font-size: 15px;
  margin-bottom: 18px;
}

.legal-cta-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.legal-cta .cta-btn-call {
  background: var(--white); color: var(--red);
  text-decoration: none; padding: 12px 28px;
  border-radius: var(--radius); font-size: 15px; font-weight: 900;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform 0.15s;
}

.legal-cta .cta-btn-call:hover { transform: scale(1.04); }

.legal-cta .cta-btn-wa {
  background: #25d366; color: var(--white);
  text-decoration: none; padding: 12px 24px;
  border-radius: var(--radius); font-size: 15px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform 0.15s;
}

.legal-cta .cta-btn-wa:hover { transform: scale(1.04); }

/* FOOTER */
footer {
  background: var(--deep);
  border-top: 2px solid rgba(192,22,27,0.3);
  padding: 48px 20px 24px;
}

.footer-grid {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700;
  color: var(--white); margin-bottom: 12px;
  display: flex; align-items: center; gap: 10px;
}

.footer-desc { font-size: 14px; color: var(--gray); line-height: 1.7; margin-bottom: 20px; }

.footer-phone {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 22px; font-weight: 900; color: var(--red);
  text-decoration: none; letter-spacing: 1px;
}

.footer-title {
  font-size: 13px; font-weight: 700; color: var(--white);
  letter-spacing: 2px; text-transform: uppercase; margin-bottom: 16px;
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: var(--gray); text-decoration: none; font-size: 14px; transition: color 0.2s; }
.footer-links a:hover { color: var(--red); }

.footer-bottom {
  max-width: 1080px;
  margin: 0 auto;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 20px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}

.footer-copy { font-size: 13px; color: var(--gray); }
.footer-legal { display: flex; gap: 20px; }
.footer-legal a { font-size: 12px; color: var(--gray); text-decoration: none; }
.footer-legal a.active { color: var(--red); }
.footer-legal a:hover { color: var(--white); }

/* MOBILE */
@media (max-width: 768px) {
  .header-phone { font-size: 16px; }
  .btn-call { padding: 8px 14px; font-size: 13px; }
  .legal-container { grid-template-columns: 1fr; }
  .legal-toc { position: static; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .float-group { bottom: 16px; left: 12px; }
  .float-btn { width: 52px; height: 52px; font-size: 22px; }
}

@media (max-width: 480px) {
  .legal-wrap { padding: 48px 16px 72px; }
  .page-hero { padding: 48px 16px 36px; }
}
