/* =====================================================
   أفق للتكوين - مربوح عصام
   CSS الرئيسي — تصميم عربي RTL حديث
   الإصدار 5.0 — 2026
   ===================================================== */

/* ---- متغيرات التصميم ---- */
:root {
  --primary: #1a6f45;
  --primary-dark: #145538;
  --primary-light: #28a863;
  --primary-ultra: #e8f5ee;
  --secondary: #2563eb;
  --secondary-light: #dbeafe;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --accent-light: #fef3c7;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #0ea5e9;

  /* ألوان الفضاءات الثلاثة */
  --color-mkathaf: #1a6f45;
  --color-mkathaf-light: #e8f5ee;
  --color-sarih: #2563eb;
  --color-sarih-light: #dbeafe;
  --color-mumtad: #7c3aed;
  --color-mumtad-light: #ede9fe;

  --text-dark: #1e293b;
  --text-medium: #475569;
  --text-light: #94a3b8;
  --bg-white: #ffffff;
  --bg-light: #f8fafc;
  --bg-card: #f1f5f9;
  --border: #e2e8f0;
  --border-light: #f1f5f9;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 16px rgba(26,111,69,0.08), 0 2px 6px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 40px rgba(26,111,69,0.10), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-xl: 0 20px 60px rgba(26,111,69,0.12);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --transition: all 0.25s cubic-bezier(.4,0,.2,1);

  --font-arabic: 'Cairo', 'Noto Kufi Arabic', 'Segoe UI', Arial, sans-serif;
  --font-main: 'Cairo', 'Inter', Arial, sans-serif;
}

/* ---- إعادة الضبط والقاعدة ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  font-size: 16px;
  direction: rtl;
}
body {
  font-family: var(--font-arabic);
  color: var(--text-dark);
  background: var(--bg-white);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  direction: rtl;
  text-align: right;
}
a { color: inherit; text-decoration: none; transition: var(--transition); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { font-family: var(--font-arabic); cursor: pointer; }
input, select, textarea { font-family: var(--font-arabic); }

/* ---- الطباعة ---- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-dark);
  font-family: var(--font-arabic);
}
h1 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2.1rem); }
h3 { font-size: clamp(1.1rem, 2.2vw, 1.45rem); }
h4 { font-size: 1.05rem; }
p { color: var(--text-medium); line-height: 1.85; }

/* =====================================================
   شريط التنقل
   ===================================================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.navbar.scrolled {
  box-shadow: var(--shadow-md);
}
.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  direction: rtl;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--primary);
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-logo .logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.nav-logo .brand { color: var(--primary); }
.nav-logo em { color: var(--accent); font-style: normal; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex: 1;
  justify-content: center;
  direction: rtl;
}
.nav-menu a {
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-medium);
  transition: var(--transition);
  white-space: nowrap;
}
.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary);
  background: var(--primary-ultra);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  overflow: visible;
}

/* زر CTA */
.nav-cta {
  padding: 0.45rem 1.1rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.82rem;
  color: white !important;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  box-shadow: 0 3px 10px rgba(26,111,69,.25);
  transition: var(--transition);
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(26,111,69,.35);
}

/* زر اللغة */
.lang-switcher {
  display: flex;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.lang-btn {
  padding: 0.3rem 0.6rem;
  border: none;
  background: transparent;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
}
.lang-btn.active {
  background: var(--primary);
  color: white;
}

/* زر الهامبورجر */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: var(--transition);
}

/* =====================================================
   التذييل
   ===================================================== */
.footer {
  background: linear-gradient(135deg, #0f2617, #1a3d25);
  color: rgba(255,255,255,0.85);
  padding: 3.5rem 0 1.5rem;
  direction: rtl;
  text-align: right;
}
.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 3rem;
}
.footer-brand { }
.footer-brand .brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: white;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.footer-brand p {
  font-size: 0.83rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
  margin-bottom: 1rem;
}
.footer-author {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
}
.footer-col h5 {
  font-size: 0.85rem;
  font-weight: 700;
  color: white;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-col ul li {
  margin-bottom: 0.45rem;
}
.footer-col ul li a {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  transition: var(--transition);
}
.footer-col ul li a:hover {
  color: var(--accent);
  padding-right: 0.3rem;
}
.footer-bottom {
  max-width: 1280px;
  margin: 2rem auto 0;
  padding: 1.25rem 2rem 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.footer-bottom p {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
  margin: 0;
}
.footer-badges { display: flex; gap: 0.5rem; }
.footer-badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.45);
}

/* =====================================================
   الحاوية والتخطيط
   ===================================================== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}
.section {
  padding: 5rem 0;
}
.section-sm { padding: 3rem 0; }
.section-lg { padding: 7rem 0; }

/* ---- رأس القسم ---- */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  background: var(--primary-ultra);
  color: var(--primary);
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  border: 1px solid rgba(26,111,69,0.15);
}
.section-header h2 { margin-bottom: 0.75rem; }
.section-header p {
  max-width: 620px;
  margin: 0 auto;
  font-size: 1rem;
}

/* =====================================================
   الأزرار
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-arabic);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  box-shadow: 0 4px 14px rgba(26,111,69,.25);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26,111,69,.35);
}
.btn-secondary {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-secondary:hover {
  background: var(--primary-ultra);
}
.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  box-shadow: 0 4px 14px rgba(245,158,11,.25);
}
.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245,158,11,.35);
}
.btn-ghost {
  background: transparent;
  color: var(--text-medium);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-light); }
.btn-lg { padding: 0.8rem 1.8rem; font-size: 0.95rem; }
.btn-sm { padding: 0.4rem 1rem; font-size: 0.8rem; }
.btn-block { width: 100%; justify-content: center; }

/* =====================================================
   الهيرو
   ===================================================== */
.hero {
  min-height: 100vh;
  background: linear-gradient(160deg, var(--bg-white) 0%, var(--primary-ultra) 40%, #f0fdf4 100%);
  display: flex;
  align-items: center;
  padding-top: 68px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -100px; left: -100px;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26,111,69,0.04) 0%, transparent 70%);
}
.hero-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 1rem;
  background: white;
  border: 1px solid rgba(26,111,69,0.2);
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.hero-title {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  color: var(--text-dark);
}
.hero-title .highlight {
  color: var(--primary);
  position: relative;
}
.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-medium);
  line-height: 1.85;
  margin-bottom: 2rem;
  max-width: 520px;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.hero-stats {
  display: flex;
  gap: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.hero-stat .number {
  display: block;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}
.hero-stat .label {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 0.2rem;
}

/* الجانب المرئي للهيرو */
.hero-visual {
  position: relative;
}
.spaces-preview {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.space-card-preview {
  background: white;
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: var(--transition);
}
.space-card-preview:hover {
  transform: translateX(-4px);
  box-shadow: var(--shadow-lg);
}
.space-card-preview .sp-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.sp-mkathaf .sp-icon { background: var(--color-mkathaf-light); }
.sp-sarih .sp-icon { background: var(--color-sarih-light); }
.sp-mumtad .sp-icon { background: var(--color-mumtad-light); }
.space-card-preview .sp-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-dark);
  margin-bottom: 0.15rem;
}
.space-card-preview .sp-desc {
  font-size: 0.78rem;
  color: var(--text-light);
  margin: 0;
  line-height: 1.4;
}
.space-card-preview .sp-arrow {
  margin-right: auto;
  color: var(--text-light);
  font-size: 0.9rem;
  transition: var(--transition);
}
.space-card-preview:hover .sp-arrow { color: var(--primary); margin-right: calc(auto - 4px); }

/* =====================================================
   بطاقات الفضاءات الرئيسية
   ===================================================== */
.spaces-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
.space-card {
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--border);
  background: white;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.space-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  border-radius: 0 0 0 80px;
  opacity: 0.07;
}
.space-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.space-card .space-num {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  opacity: 0.6;
}
.space-card .space-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
}
.space-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
}
.space-card p {
  font-size: 0.85rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}
.space-card .space-features {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}
.space-card .space-features li {
  font-size: 0.8rem;
  color: var(--text-medium);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.space-card .space-features li::before {
  content: '✓';
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
}
/* ألوان الفضاءات */
.space-mkathaf { border-top: 4px solid var(--color-mkathaf); }
.space-mkathaf::before { background: var(--color-mkathaf); }
.space-mkathaf .space-num { color: var(--color-mkathaf); }
.space-mkathaf .space-icon { background: var(--color-mkathaf-light); }
.space-mkathaf h3 { color: var(--color-mkathaf); }
.space-mkathaf .space-features li::before { color: var(--color-mkathaf); }
.space-sarih { border-top: 4px solid var(--color-sarih); }
.space-sarih::before { background: var(--color-sarih); }
.space-sarih .space-num { color: var(--color-sarih); }
.space-sarih .space-icon { background: var(--color-sarih-light); }
.space-sarih h3 { color: var(--color-sarih); }
.space-sarih .space-features li::before { color: var(--color-sarih); }
.space-mumtad { border-top: 4px solid var(--color-mumtad); }
.space-mumtad::before { background: var(--color-mumtad); }
.space-mumtad .space-num { color: var(--color-mumtad); }
.space-mumtad .space-icon { background: var(--color-mumtad-light); }
.space-mumtad h3 { color: var(--color-mumtad); }
.space-mumtad .space-features li::before { color: var(--color-mumtad); }

/* =====================================================
   بطاقات الأدوات
   ===================================================== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.tool-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.tool-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.tool-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--primary-ultra);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}
.tool-card h4 {
  font-size: 0.95rem;
  color: var(--text-dark);
}
.tool-card p {
  font-size: 0.82rem;
  line-height: 1.6;
  margin: 0;
  flex: 1;
}
.tool-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
}
.tool-badge.new { background: #fef3c7; color: #92400e; }
.tool-badge.ready { background: var(--primary-ultra); color: var(--primary); }
.tool-badge.beta { background: var(--color-sarih-light); color: var(--color-sarih); }

/* =====================================================
   ألواح النصوص
   ===================================================== */
.card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.card-header h3 { font-size: 1.05rem; margin: 0; }

/* =====================================================
   نموذج البحث الداخلي
   ===================================================== */
.search-bar {
  display: flex;
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: var(--transition);
  max-width: 480px;
  margin: 0 auto;
}
.search-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(26,111,69,0.1);
}
.search-bar input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  outline: none;
  font-size: 0.9rem;
  direction: rtl;
  background: transparent;
}
.search-bar button {
  padding: 0.75rem 1.25rem;
  background: var(--primary);
  border: none;
  color: white;
  cursor: pointer;
  transition: var(--transition);
}
.search-bar button:hover { background: var(--primary-dark); }

/* =====================================================
   الشريط الجانبي / الفلاتر
   ===================================================== */
.filter-tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.filter-tab {
  padding: 0.35rem 0.9rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: white;
  color: var(--text-medium);
  cursor: pointer;
  transition: var(--transition);
}
.filter-tab:hover, .filter-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* =====================================================
   التميز / البطاقات الإحصائية
   ===================================================== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.25rem;
}
.stat-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.stat-card .stat-num {
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.4rem;
}
.stat-card .stat-label {
  font-size: 0.78rem;
  color: var(--text-light);
}

/* =====================================================
   الوميض / التنبيهات
   ===================================================== */
.alert {
  padding: 0.9rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  direction: rtl;
}
.alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.alert-danger { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* =====================================================
   قوائم / مستويات
   ===================================================== */
.level-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.65rem;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
}
.level-1 { background: #fef3c7; color: #92400e; }
.level-2 { background: #fce7f3; color: #9d174d; }
.level-3 { background: var(--color-sarih-light); color: var(--color-sarih); }
.level-4 { background: var(--primary-ultra); color: var(--primary); }
.level-5 { background: var(--color-mumtad-light); color: var(--color-mumtad); }
.level-6 { background: #fef3c7; color: #92400e; }

/* =====================================================
   نموذج (Form)
   ===================================================== */
.form-group {
  margin-bottom: 1.25rem;
}
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.4rem;
}
.form-control {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font-arabic);
  color: var(--text-dark);
  background: white;
  transition: var(--transition);
  direction: rtl;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,111,69,0.12);
}
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2394a3b8' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 0.75rem center;
  padding-left: 2rem;
}
textarea.form-control { resize: vertical; min-height: 100px; }

/* =====================================================
   جدول
   ===================================================== */
.table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  direction: rtl;
}
.data-table th {
  padding: 0.75rem 1rem;
  text-align: right;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--text-medium);
  background: var(--bg-light);
  border-bottom: 2px solid var(--border);
}
.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-dark);
}
.data-table tr:hover td { background: var(--bg-light); }

/* =====================================================
   الصفحة الداخلية / رأس الصفحة
   ===================================================== */
.page-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 6rem 0 3rem;
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-header::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 40px;
  background: var(--bg-white);
  clip-path: ellipse(55% 100% at 50% 100%);
}
.page-header h1 { color: white; margin-bottom: 0.75rem; position: relative; z-index: 1; }
.page-header p { color: rgba(255,255,255,0.8); max-width: 560px; margin: 0 auto; position: relative; z-index: 1; }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  justify-content: center;
  margin-bottom: 1.25rem;
  position: relative; z-index: 1;
}
.breadcrumb a { color: rgba(255,255,255,0.7); }
.breadcrumb a:hover { color: white; }

/* رأس الصفحة بألوان الفضاءات */
.page-header.mkathaf { background: linear-gradient(135deg, #0f4d2e, var(--color-mkathaf)); }
.page-header.sarih { background: linear-gradient(135deg, #1e3a8a, var(--color-sarih)); }
.page-header.mumtad { background: linear-gradient(135deg, #4c1d95, var(--color-mumtad)); }

/* =====================================================
   لوحة التحكم / Dashboard
   ===================================================== */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.25rem;
}
.dash-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.dash-card h4 {
  font-size: 0.88rem;
  color: var(--text-light);
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.dash-card .big-num {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}
.progress-bar-wrap {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin: 0.6rem 0;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* =====================================================
   قسم CTA
   ===================================================== */
.cta-section {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--primary-light));
  border-radius: var(--radius-xl);
  padding: 4rem 3rem;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 250px; height: 250px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}
.cta-section h2 { color: white; margin-bottom: 0.75rem; position: relative; z-index: 1; }
.cta-section p { opacity: 0.85; position: relative; z-index: 1; margin-bottom: 2rem; }
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; position: relative; z-index: 1; }

/* =====================================================
   بطاقة الممارسات (8 ممارسات)
   ===================================================== */
.practice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.practice-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
  border-top: 4px solid var(--p-color, var(--primary));
}
.practice-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.practice-num {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--p-color, var(--primary));
  margin-bottom: 0.75rem;
  opacity: 0.8;
}
.practice-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}
.practice-card h4 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}
.practice-card p {
  font-size: 0.82rem;
  line-height: 1.65;
  margin: 0;
}

/* =====================================================
   أنماط الطباعة
   ===================================================== */
@media print {
  .navbar, .footer, .hamburger, .nav-actions, .back-to-top { display: none !important; }
  body { padding-top: 0 !important; }
  .page-header { background: white !important; color: var(--text-dark) !important; padding: 1rem 0 !important; }
  .page-header h1, .page-header p { color: var(--text-dark) !important; }
  .page-header::after { display: none; }
  .section { padding: 1.5rem 0 !important; }
  .card, .tool-card { box-shadow: none !important; border: 1px solid var(--border) !important; }
}

/* =====================================================
   زر العودة للأعلى
   ===================================================== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 44px; height: 44px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 900;
}
.back-to-top.visible { display: flex; }
.back-to-top:hover { transform: translateY(-3px); }

/* =====================================================
   الاستجابة للهواتف
   ===================================================== */
@media (max-width: 1024px) {
  .spaces-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-container { gap: 2.5rem; }
  .footer-container { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: fixed;
    top: 68px; left: 0; right: 0;
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    box-shadow: var(--shadow-lg);
    z-index: 999;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a {
    padding: 0.65rem 1rem;
    border-radius: 8px;
    text-align: right;
    font-size: 0.9rem;
  }
  .hamburger { display: flex; }
  .nav-actions .nav-cta { display: none !important; }
  .nav-actions { gap: 0.4rem; flex-shrink: 0; overflow: visible; }
  .lang-switcher { display: none; }

  .hero-container { grid-template-columns: 1fr; gap: 2rem; padding: 3rem 1.5rem; }
  .hero-visual { display: none; }
  .spaces-grid { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: 1fr; }
  .footer-container { grid-template-columns: 1fr; gap: 1.5rem; }
  .dash-grid { grid-template-columns: 1fr; }
  .section { padding: 3rem 0; }
  .container { padding: 0 1.25rem; }
  .cta-section { padding: 2.5rem 1.5rem; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.6rem; }
  .hero-actions { flex-direction: column; }
  .hero-stats { gap: 1.25rem; flex-wrap: wrap; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-actions { flex-direction: column; }
  .spaces-grid { grid-template-columns: 1fr; }
  .practice-grid { grid-template-columns: 1fr; }
  .filter-tabs { gap: 0.3rem; }
  .filter-tab { font-size: 0.73rem; padding: 0.28rem 0.7rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* =====================================================
   التحريك
   ===================================================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.animate-fadeInUp { animation: fadeInUp 0.5s ease forwards; }

/* =====================================================
   متفرقات
   ===================================================== */
.text-primary { color: var(--primary) !important; }
.text-accent { color: var(--accent) !important; }
.text-muted { color: var(--text-light) !important; }
.bg-primary-ultra { background: var(--primary-ultra) !important; }
.border-primary { border-color: var(--primary) !important; }
.fw-bold { font-weight: 700 !important; }
.fw-black { font-weight: 900 !important; }
.text-center { text-align: center !important; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.flex { display: flex; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
.divider {
  height: 1px;
  background: var(--border);
  margin: 2rem 0;
}
.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--bg-light);
  color: var(--text-medium);
  border: 1px solid var(--border);
}
