/* ==========================================================================
   base.css
   المتغيرات الأساسية، الخطوط، والتنسيق العام للموقع كله
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500&display=swap');

:root {
  /* الألوان الأساسية: أبيض + أخضر بس */
  --color-green-900: #0f3d2e;   /* أخضر غامق - نصوص مهمة/عناوين */
  --color-green-700: #1e6f4c;   /* أخضر أساسي - أزرار وروابط */
  --color-green-600: #22815a;   /* أخضر عند hover */
  --color-green-500: #2c9c6d;   /* أخضر متوسط - تمييزات */
  --color-green-100: #e3f5ec;   /* أخضر فاتح جدًا - خلفيات كروت */
  --color-green-50:  #f2faf6;   /* أخضر فاتح جدًا جدًا - خلفية الصفحة */

  --color-white: #ffffff;
  --color-text: #1c2620;        /* لون النص الأساسي (رمادي مخضر غامق) */
  --color-text-muted: #6b7d74;  /* نص ثانوي */
  --color-border: #dcece3;      /* حدود فاتحة */

  --color-danger: #c0483a;      /* أحمر هادي للرفض/الأخطاء (استخدام محدود جدًا) */
  --color-warning: #b8862f;     /* للحالة "جديد" */

  /* الخطوط */
  --font-main: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
  --weight-text: 300;   /* رفيع للنصوص */
  --weight-title: 400;  /* عادي للعناوين (ممنوع البولد التقيل) */
  --weight-medium: 500; /* للأزرار وأماكن محدودة تحتاج تمييز بسيط */

  /* المسافات (Spacing system) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  /* حواف مدورة موحدة */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 999px;

  /* ظلال خفيفة */
  --shadow-sm: 0 2px 8px rgba(15, 61, 46, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 61, 46, 0.08);

  /* انتقالات ناعمة */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;

  /* أقصى عرض للمحتوى */
  --container-max: 1120px;
}

/* ===== إعادة ضبط عامة ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  direction: rtl;
  text-align: right;
  font-family: var(--font-main);
  font-weight: var(--weight-text);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-green-50);
  min-height: 100vh;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4 {
  font-weight: var(--weight-title);
  color: var(--color-green-900);
  line-height: 1.4;
}

h1 { font-size: 32px; }
h2 { font-size: 24px; }
h3 { font-size: 19px; }
h4 { font-size: 16px; }

p {
  color: var(--color-text-muted);
}

/* ===== أدوات مساعدة عامة (Utilities) ===== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }

.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }

.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }

.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }

.hidden { display: none !important; }

.section {
  padding: var(--space-7) 0;
}

/* شريط تمرير بسيط ومتناسق */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-thumb {
  background: var(--color-green-100);
  border-radius: var(--radius-full);
}

@media (max-width: 640px) {
  h1 { font-size: 26px; }
  h2 { font-size: 20px; }
  .container { padding: 0 var(--space-4); }
  .section { padding: var(--space-6) 0; }
}
