/* =========================
   🎨 FIXIFY DESIGN SYSTEM
========================= */

:root {
  --primary: #0E0E25;
  --secondary: #4B4DAE;
  --accent: #CC921D;
  --accent-light: #FFD166;

  --bg: #ffffff;
  --text: #0E0E25;
  --card: #f5f7fa;
  --border: #e5e7eb;
}

body.dark {
  --bg: #0b0b1a;
  --text: #f3f4f6;
  --card: #1a1a2e;
  --border: #2a2a40;
}

/* =========================
   BASE
========================= */

 
body {
  margin: 0;
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
}

html {
  scroll-behavior: smooth;
}

/* =========================
   TOPBAR
========================= */

.topbar {
  height: 60px;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  padding: 0 20px;
  justify-content: space-between;
}

.topbar .left {
  display: flex;
  align-items: center;
  gap: 10px;
}

#menuToggle {
  display: none;
  font-size: 20px;
  cursor: pointer;
}

.topbar input {
  padding: 8px;
  border-radius: 6px;
  border: none;
  width: 200px;
}

 
.topbar .right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-switch {
  color: white;
  text-decoration: none;
  background: var(--secondary);
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: bold;
  transition: 0.2s;
}

.lang-switch:hover {
  background: var(--accent);
}

/* =========================
   LAYOUT
========================= */

.layout {
  display: flex;
}

/* =========================
   SIDEBAR
========================= */

.sidebar {
  width: 260px;
  height: calc(100vh - 60px);
  overflow-y: auto;
  border-right: 1px solid var(--border);
  padding: 20px;
  transition: 0.3s;
  background: var(--bg);
}

.menu-title {
  font-weight: bold;
  margin-top: 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
}

.menu-items {
  margin-top: 10px;
}

.menu-group.collapsed .menu-items {
  display: none;
}

.sidebar a {
  display: block;
  margin: 6px 0;
  text-decoration: none;
  color: var(--text);
  padding: 6px 10px;
  border-radius: 6px;
}

.sidebar a:hover {
  background: rgba(75, 77, 174, 0.1);
}

.sidebar a.active {
  background: rgba(75, 77, 174, 0.2);
  color: var(--secondary);
}



/* =========================
   CONTENT
========================= */

.content {
  flex: 1;
  padding: 40px;
}

.doc-section {
  margin-bottom: 60px;
  animation: fadeIn 0.4s ease;
}

/* =========================
   CARDS
========================= */

.card {
  background: var(--card);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  margin-top: 20px;
}

/* =========================
   HEADINGS
========================= */

h1, h2 {
  color: var(--primary);
}

h3 {
  color: var(--secondary);
}


.step {
  padding: 15px;
  border-left: 3px solid var(--secondary);
  margin-bottom: 15px;
  position: relative;
}


.step::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--secondary);
  border-radius: 50%;
  position: absolute;
  left: -6px;
  top: 20px;
}

/* RTL FIX */
html[dir="rtl"] .step {
  border-left: none;
  border-right: 3px solid var(--secondary);
}

/* RTL */
html[dir="rtl"] .step::before {
  left: auto;
  right: -6px;
}

.image-box {
  margin-top: 20px;
  display: flex;
  justify-content: center; /* توسيط */
}

.image-box img {
  width: 100%;
  max-width: 700px;   /* 🔥 أهم شي: تحديد الحجم */
  height: auto;       /* يمنع التمدد */
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.image-box img {
  cursor: zoom-in;
  transition: 0.3s;
}

.image-box img {
  image-rendering: auto;
}

.image-box img:hover {
  transform: scale(1.02);
}

/* NOTE */
.note {
  margin-top: 10px;
  background: rgba(255, 209, 102, 0.15);
  padding: 10px;
  border-radius: 8px;
  border-left: 4px solid var(--accent);
  font-size: 14px;
}

section {
  scroll-margin-top: 80px;
}

/* =========================
   ANIMATION
========================= */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {
  #menuToggle {
    display: block;
  }

  .sidebar {
    position: absolute;
    left: -260px;
    top: 60px;
    height: calc(100vh - 60px);
    z-index: 100;
  }

  .sidebar.active {
    left: 0;
  }
}