/* ============================================================
   شبكة الأنوار الخمسة — Components
   ============================================================ */

/* ══════════════════════════════════════
   NAVBAR
══════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 1000;
  height: 4.5rem;
  background: oklch(from var(--color-bg) l c h / 0.92);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid oklch(from var(--color-border) l c h / 0.60);
  transition: background var(--transition-smooth), box-shadow var(--transition-smooth);
}

.navbar--scrolled {
  background: oklch(from var(--color-surface) l c h / 0.97);
  box-shadow: var(--shadow-md);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--space-3);
}

/* Logo */
.navbar__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  flex-shrink: 0;
  text-decoration: none;
}

.navbar__logo-icon {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
}

.navbar__logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

/* السماح لحاوية النصوص بالتكيف بدلاً من دفع الأزرار */
.navbar__logo,
.navbar__logo-text {
  min-width: 0;
}

.navbar__logo-main {
  font-family: var(--font-display);
  /* font-size: var(--text-sm); */
  font-size: 1.04rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.8;
  /* letter-spacing: 0.06em; */
  position: relative;
  display: inline-block;
  transition: color 0.3s ease, filter 0.3s ease;
}

.navbar__logo-main::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-gold);
  transition: width 0.3s ease-in-out;
}

.navbar__logo:hover .navbar__logo-main::after {
  width: 100%;
}

.navbar__logo-sub {
  /* font-size: var(--text-xs); */
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-weight: 400;
  line-height: 1.6;
  /* letter-spacing: -0.1em; */
}

/* Nav Links */
.navbar__nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
}

.navbar__nav a {
  display: flex;
  position: relative;
  align-items: center;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px transparent;
  transition: color var(--transition-fast), 
              background var(--transition-fast), 
              border-color var(--transition-fast), 
              transform var(--transition-fast);
}

.navbar__nav a:hover {
  transform: translateY(-1px);
}

.navbar__nav a:hover,
.navbar__nav a.active {
  color: var(--color-primary);
  background: var(--color-primary-light);
  box-shadow: inset 0 0 0 1px oklch(from var(--color-primary) l c h / 0.03);
}

/* Actions */
.navbar__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

/* Theme Toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  transition: all var(--transition-fast);
}
.theme-toggle:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

/* =========================================
   Mobile Menu & Hamburger (Premium Drawer)
   ========================================= */

/* زر الهامبرغر */
.navbar__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.4rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent; /* إزالة الحد القاسي */
  background: transparent;
  cursor: pointer;
  z-index: 1001; /* يجب أن يكون فوق الخلفية المظلمة */
  transition: background var(--transition-fast);
}

.navbar__hamburger:hover {
  background: var(--color-surface-offset);
}

.navbar__hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: var(--radius-full);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.navbar__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); background: var(--color-primary); }
.navbar__hamburger.open span:nth-child(2) { opacity: 0; }
.navbar__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: var(--color-primary); }

/* حماية الأزرار وأيقونة الشعار من الانضغاط أو الاختفاء نهائياً */
.navbar__actions,
.navbar__hamburger,
.theme-toggle,
.navbar__logo-icon {
  flex-shrink: 0 !important;
}

/* الخلفية المظلمة (Backdrop) */
.navbar__backdrop {
  position: fixed;
  inset: 0;
  /* background: rgba(0, 0, 0, 0.5); */
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.navbar__backdrop.open {
  opacity: 1;
  visibility: visible;
}

/* القائمة الجانبية المنزلقة (Side Drawer) */
.navbar__mobile {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0; /* تنزلق من اليمين (RTL) */
  width: 85%;
  max-width: 320px;
  background: var(--color-surface);
  z-index: 999;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); /* حركة انزلاق فائقة النعومة */
  box-shadow: -5px 0 25px rgba(0,0,0,0.1);
  overflow-y: auto;
}

.navbar__mobile.open {
  transform: translateX(0);
}

/* رأس القائمة (Header) */
.navbar__mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--color-border);
}

.navbar__mobile-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-text);
}

.navbar__mobile-close {
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.navbar__mobile-close:hover {
  color: var(--color-primary);
}

/* جسم القائمة والروابط */
.navbar__mobile-body {
  /* تم حذف flex-grow: 1; لكي لا يتمدد القسم ويدفع الزر لأسفل الشاشة */
  padding: var(--space-4) 0 var(--space-6) 0; /* مسافة مريحة من الأعلى، ومسافة تفصل الروابط عن خط الزر من الأسفل */
}

.navbar__mobile-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.navbar__mobile-nav a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-6);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  border-right: 3px solid transparent;
  transition: all 0.2s ease;
}

.navbar__mobile-nav a:hover,
.navbar__mobile-nav a:active,
.navbar__mobile-nav a.active {
  background: color-mix(in srgb, var(--color-primary) 5%, transparent);
  color: var(--color-primary);
  border-right-color: var(--color-primary);
}

/* ذيل القائمة (Footer) */
.navbar__mobile-footer {
  padding: var(--space-6);
  border-top: 1px solid var(--color-border);
  /* margin-top: auto; */
}

/* تنسيق فاصل الأنوار الخمسة أسفل القائمة الجانبية */
.navbar__mobile-khamsa {
  margin-top: auto; /* يدفع الفاصل لأسفل الشاشة دائماً */
  padding-bottom: var(--space-8); /* مسافة مريحة تفصله عن حافة الهاتف السفلية */
  display: flex;
  justify-content: center;
  transform: scale(0.85); /* تصغير الفاصل قليلاً ليتناسب مع عرض القائمة */
  opacity: 1; /* تخفيف السطوع ليكون لمسة فنية هادئة لا تشتت الانتباه عن الزر */
}

@media (max-width: 900px) {
  .navbar__nav,
  .navbar__actions .btn { display: none; }
  .navbar__hamburger { display: flex; }
}

/* =========================================
   تعديلات الشاشات الصغيرة جداً (360px وما دون)
   تقليل الفراغات وتصغير الخطوط بدلاً من إخفاء المحتوى
   ========================================= */
@media (max-width: 360px) {
  /* 1. تقليل الفراغات الأفقية (يمين ويسار) للحاوية الأساسية للهيدر */
  .navbar .container {
    padding-inline: 0.75rem !important; /* تقليل المساحة المهدورة على الأطراف */
  }

  /* 2. تقليل الفراغات بين أقسام الهيدر */
  .navbar__inner {
    gap: 0.4rem; /* المسافة بين منطقة الشعار ومنطقة الأزرار */
  }
  
  .navbar__logo {
    gap: 0.35rem; /* تقليل الفراغ الكبير بجانب أيقونة الشعار (اليمين) */
  }

  .navbar__actions {
    gap: 0.35rem; /* تقليل الفراغ بين زر الهامبرغر وزر الوضع الليلي */
  }

  /* 3. تصغير أحجام الخطوط والشعار قليلاً لتتسع براحة */
  .navbar__logo-main {
    font-size: 0.9rem; /* تصغير الخط الأول قليلاً */
  }
  
  .navbar__logo-sub {
    font-size: 0.75rem; /* تصغير الخط الثاني قليلاً */
  }

  .navbar__logo-icon {
    width: 2.1rem; /* تصغير الشعار (كان 2.5rem) */
    height: 2.1rem;
  }
  
  /* تصغير أزرار الهيدر بنسبة بسيطة جداً */
  .navbar__hamburger,
  .theme-toggle {
    width: 2rem;
    height: 2rem;
    padding: 0.3rem;
  }
}

/* ══════════════════════════════════════
   BUTTONS
══════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  border: 1.5px solid transparent;
  text-decoration: none;
  transition: all var(--transition-interactive);
  position: relative;
  overflow: hidden;
}

.btn:active { transform: scale(0.97); }

/* Primary */
.btn--primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-primary);
}
.btn--primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  box-shadow: 0 6px 24px oklch(0.35 0.10 220 / 0.35);
  transform: translateY(-1px);
  color: #fff;
}

/* Gold */
.btn--gold {
  background: var(--color-gold);
  color: #fff;
  border-color: var(--color-gold);
  box-shadow: var(--shadow-gold);
}
.btn--gold:hover {
  background: var(--color-gold-hover);
  border-color: var(--color-gold-hover);
  transform: translateY(-1px);
  color: #fff;
}

/* Outline */
.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn--outline:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

/* Ghost */
.btn--ghost {
  background: transparent;
  color: var(--color-text-muted);
  border-color: var(--color-border);
}
.btn--ghost:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
  border-color: var(--color-primary);
}

/* White (for dark sections) */
.btn--white {
  background: #fff;
  color: var(--color-primary);
  border-color: #fff;
}
.btn--white:hover {
  background: var(--color-primary-light);
  transform: translateY(-1px);
}

/* Sizes */
.btn--sm { padding: 0.6rem var(--space-4); font-size: var(--text-xs); }
.btn--lg { padding: var(--space-4) var(--space-8); font-size: var(--text-base); border-radius: var(--radius-lg); }
.btn--xl { padding: var(--space-5) var(--space-10); font-size: var(--text-lg); border-radius: var(--radius-xl); }

/* Icon only */
.btn--icon {
  padding: var(--space-2);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
}

/* تخصيص زر المزيد */
.btn--more {
  overflow: hidden;
}

.btn--more svg {
  transition: transform 0.3s ease;
}

/* عند مرور الماوس: يتغير لون الخلفية (موجود مسبقاً في كودك) ويتحرك السهم لليسار قليلاً */
.btn--more:hover svg {
  transform: translateX(-5px); /* تحريك السهم باتجاه اليسار */
}

/* ══════════════════════════════════════
   CARDS
══════════════════════════════════════ */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-interactive), transform var(--transition-interactive), border-color var(--transition-interactive);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--color-primary-highlight);
}

/* Service Card */
.service-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-smooth);
  border-bottom: 3px solid var(--color-border);
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(-135deg in oklab, var(--color-primary-light) 0%, transparent 70%);
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

/* إعداد البطاقة لاحتواء اللمعة */
/* الحالة الأساسية: اللمعة مخفية في اليمين وبدون حركة (Instant Reset) */
.service-card::after {
  content: '';
  position: absolute;
  top: 0; 
  right: -150%; /* تبدأ من اليمين */
  width: 50%; 
  height: 100%;
  background: linear-gradient(to left, transparent, rgba(255, 255, 255, 0.3), transparent); /* تدرج لليسار */
  transform: skewX(35deg);
  z-index: 0;
  pointer-events: none;
  /* لا نضع transition هنا لمنع الحركة العكسية */
}

/* حالة التمرير: تتحرك نحو اليسار مع تفعيل الحركة */
.service-card:hover::after {
  right: 150%; /* تتجه لليسار */
  transition: right 1.1s ease; /* الحركة تعمل فقط عند الدخول */
}

.service-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--color-primary-highlight);
  transform: translateY(-4px);
}

.service-card:hover::before { opacity: 1; }

.service-card--highlight {
  /* شريط ذهبي أنيق في أعلى البطاقة فقط */
  border-bottom: 3px solid var(--color-gold, #d97706);
  /* توهج ذهبي داخلي خفيف جداً ينسدل من الأعلى */
  background: linear-gradient(to bottom, rgba(217, 119, 6, 0.03) 0%, transparent 40%), var(--color-surface);
}

/* 1. عكس ألوان الأيقونة لتصبح ذهبية بخلفية بيضاء (أو العكس حسب رغبتك، هنا جعلنا الخلفية ذهبية والأيقونة بيضاء) */
.service-card--highlight:hover .service-card__icon {
  background: var(--color-gold, #d97706) !important;
  color: #ffffff !important;
}

/* 2. تحويل لون العنوان إلى الذهبي */
.service-card--highlight:hover .service-card__title {
  color: var(--color-gold, #d97706) !important;
}

/* 3. تحويل إطار البطاقة بالكامل إلى الذهبي مع ظل ذهبي متناسق */
.service-card--highlight:hover {
  border-color: var(--color-gold, #d97706) !important;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(217, 119, 6, 0.3) !important;
}

.service-card--highlight::before {
  /* تدرج ذهبي فاتح جداً من اليمين لليسار، يندمج بنعومة مع الخلفية */
  background: linear-gradient(-135deg, rgba(217, 119, 6, 0.08) 0%, transparent 60%);
}

.service-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-xl);
  background: var(--color-primary-light);
  color: var(--color-primary);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  /* transition: background var(--transition-interactive), color var(--transition-interactive); */
  transition: background 0.4s ease, color 0.4s ease; /* جعل تغيير اللون أبطأ */
}

.service-card:hover .service-card__icon {
  background: var(--color-primary);
  color: #fff;
}

.service-card__title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  position: relative;
  z-index: 1;
}

/* تلوين العنوان عند مرور الماوس على البطاقة */
.service-card:hover .service-card__title {
  color: var(--color-primary);
  transition: color var(--transition-smooth);
}

.service-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  flex: 1;
  position: relative;
  z-index: 1;
}

.service-card__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  position: relative;
  z-index: 1;
  text-decoration: none;
  margin-inline-start: auto; /* نقله لأقصى اليسار */
  transition: color var(--transition-smooth);
}

.service-card__link:hover {
	color: var(--color-primary-hover);
	/* gap: var(--space-3); */
}

/* تجهيز السهم للحركة */
.service-card__link .arrow-icon {
  display: inline-block;
  transition: transform 0.3s ease;
  font-size: 1.3rem; /* تكبير السهم */
  line-height: 1; /* لمنع السهم من إحداث خلل في ارتفاع السطر */
  position: relative;
  top: 1px; /* تعديل بسيط جداً لضمان محاذاته مع منتصف النص تماماً */
}

/* 
  تغيير لون النص وتحريك السهم عند مرور الماوس على "أي مكان في البطاقة" 
  وليس فقط عند لمس النص
*/
.service-card:hover .service-card__link {
  color: var(--color-primary-hover);
}

.service-card:hover .service-card__link .arrow-icon {
  transform: translateX(-5px); /* تحريك السهم لليسار (باتجاه القراءة) */
}

/* Portfolio Card */
.portfolio-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.portfolio-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-5px);
  border-color: var(--color-primary-highlight);
}

.portfolio-card__img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--color-surface-offset);
  transition: transform var(--transition-slow);
  overflow: hidden;
}

.portfolio-card:hover .portfolio-card__img img {
  transform: scale(1.04);
}

.portfolio-card__body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
}

.portfolio-card__cat {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-gold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.portfolio-card__name {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
}

/* 
.portfolio-card__url {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  font-family: var(--font-mono);
  direction: ltr;
  text-align: right;
}
*/

/* تنسيق الرابط (محاذاة لليسار، قابل للنقر، بلون واضح) */
.portfolio-card__url {
  display: inline-block;
  align-self: flex-start; 
  text-align: right;
  font-size: var(--text-xs);
  /* font-weight: 600; 
  color: var(--color-primary, #3b82f6); لون أزرق/رئيسي ليكون مقروءاً في الدارك ثيم */
  color: var(--color-text-faint);
  font-family: var(--font-mono);
  direction: ltr;
  text-decoration: none;
  margin-top: 0.25rem;
  transition: color 0.3s ease;
}

.portfolio-card__url:hover {
  text-decoration: underline;
  color: var(--color-gold);
}

/* Pricing Card */
.pricing-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  position: relative;
  transition: all var(--transition-smooth);
}

.pricing-card--popular {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-primary), var(--shadow-lg);
}

.pricing-card--popular::before {
  content: 'الأكثر طلباً';
  position: absolute;
  top: -0.875rem;
  right: 50%;
  transform: translateX(50%);
  background: var(--color-primary);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.pricing-card__name {
  font-size: var(--text-lg);
  font-weight: 700;
}

.pricing-card__price {
  display: flex;
  align-items: baseline;
  gap: var(--space-1);
}

.pricing-card__amount {
  font-size: var(--text-2xl);
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}

.pricing-card__currency {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.pricing-card__period {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  font-weight: normal;
}

.pricing-card__features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1;
}

.pricing-card__features li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: none;
}

.pricing-card__features li svg {
  flex-shrink: 0;
  color: var(--color-primary);
}

/* Stat Card */
.stat-card {
  text-align: center;
  padding: var(--space-6) var(--space-4);
}

.stat-card__number {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin-bottom: var(--space-2);
}

.stat-card__label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: 500;
}

/* 1. الإعداد الافتراضي (للهواتف في وضع الطول Portrait): عمودان */
.stats__index {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* عمودين للموبايل */
    gap: 2.5rem 1rem;
    margin-top: var(--space-4, 2.5rem);
}

/* 2. عندما يتم تدوير الهاتف أو التابلت إلى الوضع الأفقي (Landscape)، أو على الشاشات الأكبر: 4 أعمدة */
@media (orientation: landscape) and (max-width: 1024px), (min-width: 768px) {
/* @media (min-width: 768px) { */
    .stats__index {
        grid-template-columns: repeat(4, 1fr); /* 4 أعمدة للشاشات الأكبر */
		gap: var(--space-6, 1.5rem);
    }
}

@media (min-width: 768px) {
    /* شبكة الإحصاءات تمتد على عرض الشاشة بالكامل في الأسفل */
    .stats__index {
        grid-column: 1 / -1; 
    }
}

/* ══════════════════════════════════════
   SECTION HEADER
══════════════════════════════════════ */
.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
  max-width: 640px;
  margin-inline: auto;
}

.section-header--right {
  text-align: right;
  margin-inline: 0;
}

.section-header__title {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: var(--space-4);
  line-height: 1.35;
}

@media (max-width: 768px) {
  .section-header__title {
    line-height: 1.6;
	margin-bottom: var(--space-2);
  }
}

.section-header__desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 52ch;
  margin-inline: auto;
}

.section-header--right .section-header__desc {
  margin-inline: 0;
}

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
.footer {
  background: var(--color-dark-bg);
  color: var(--color-dark-text);
  padding-block: var(--space-12) var(--space-6);
  border-top: 1px solid oklch(from var(--color-border) l c h / 0.15);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2.0fr repeat(4, 1fr);
  gap: var(--space-12);
  padding-bottom: var(--space-4);
  /* border-bottom: 1px solid var(--color-dark-border); */
  margin-bottom: var(--space-1);
}

.footer__brand-desc {
  font-size: var(--text-sm);
  color: var(--color-dark-muted);
  line-height: 1.8;
  margin-top: var(--space-4);
  max-width: 30ch;
  margin-bottom: var(--space-4);
  text-align: justify;
}

.footer__brand-svg {
  float: right;
  margin-left: var(--space-3); 
  margin-top: var(--space-2); 
  shape-outside: circle(50%); 
}

.footer__brand-box {
  display: block;
  text-decoration: none;
}

.footer__brand-box strong {
  display: inline-block;
  font-size: 1.11rem;
  font-weight: 710;
  color: var(--color-dark-title);
  position: relative;
  transition: color 0.3s ease, filter 0.3s ease;
}

.footer__brand-box strong::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-gold);
  transition: width 0.3s ease-in-out;
}

.footer__brand-box small {
  display: inline-block;
  font-size: 0.84rem;
  font-weight: 400;
  color: var(--color-dark-title);
  transition: color 0.3s ease, filter 0.3s ease;
}

.footer__brand-box:hover strong {
  filter: brightness(1.5);
}

.footer__brand-box:hover strong::after {
  width: 100%;
}

.footer__brand-box:hover small {
  filter: brightness(1.4);
}

.footer__col-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-dark-text);
  margin-bottom: var(--space-4);
  letter-spacing: 0.02em;
  position: relative;
  padding-right: 10px;
}

.footer__col-title::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 13px;
  background-color: var(--color-gold);
  border-radius: 2px;
}

.footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer__links a {
  font-size: var(--text-sm);
  color: var(--color-dark-muted);
  text-decoration: none;
  display: inline-block;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.footer__links a:hover { 
  color: var(--color-gold); 
  transform: translateX(-3px);
}

/*
.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}
*/

.footer__bottom {
  flex-direction: column;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  padding-top: var(--space-6);
}
  
.footer__copy {
  font-size: var(--text-xs);
  color: var(--color-dark-muted);
}

.footer__copy a {
  color: var(--color-dark-title);
  transition: color 0.2s ease;
}

.footer__copy a:hover {
  color: var(--color-gold-hover);
}

.footer__socials {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-dark-border);
  color: var(--color-dark-muted);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.footer__social-link:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
  background: oklch(from var(--color-gold) l c h / 0.10);
}

@media (max-width: 900px) {
  .footer {
    padding-block: var(--space-8) var(--space-6) !important;
  }

  .footer__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
  
  .footer__grid > div {
    width: 100%;
    min-width: 0; 
    box-sizing: border-box;
  }
  
  .footer__brand-desc {
    max-width: 100% !important; 
    /* text-align: right; */
  }
  
  /* إعطاء قسم "التعريف بالشبكة" العرض الكامل، وسيقوم المتصفح تلقائياً بوضع البقية كل اثنين في صف */
  .footer__grid > div:nth-child(1) {
    grid-column: 1 / -1;
	margin-bottom: -1.25rem !important; 
  }
}

@media (max-width: 600px) {
  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  
  .footer__bottom { flex-direction: column; text-align: center; }
  
  .footer__grid > div:nth-child(1) {
    grid-column: 1 / -1;
  }
}

/* ══════════════════════════════════════
   BREADCRUMB
══════════════════════════════════════ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  flex-wrap: wrap;
}

.breadcrumb a { color: var(--color-text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb li:not(:last-child)::after {
  content: '/';
  margin-inline-start: var(--space-2);
  color: var(--color-text-faint);
}

/* ══════════════════════════════════════
   PAGE HERO (inner pages)
══════════════════════════════════════ */
.page-hero {
  background: linear-gradient(
    160deg in oklab,
    var(--color-primary-light) 0%,
    var(--color-bg) 60%
  );
  border-bottom: 1px solid var(--color-divider);
  padding-block: var(--space-16) var(--space-8);
  padding-top: calc(4.5rem + var(--space-8));
}

.page-hero__title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text);
  margin-top: var(--space-4);
  margin-bottom: var(--space-4);
}

.page-hero__desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 58ch;
  line-height: 1.7;
  text-align: justify;
}

.hero__desc {
  margin-top: 0.75rem;    /* فراغ قليل من الأعلى (قبل الوصف) */
  margin-bottom: 1.25rem; /* فراغ أكبر من الأسفل (ليأتي بعده الأزرار بمسافة مريحة) */
  line-height: 1.8;
}

/* على الهواتف والأجهزة الصغيرة (أقل من 768 بكسل) */
@media (max-width: 768px) {
  .hero__desc {
    margin-top: 0.25rem;   /* تقليل الفراغ العلوي ليصبح أقرب للعنوان على الهاتف */
  }
}
/* ══════════════════════════════════════
   TOAST / ALERT
══════════════════════════════════════ */
.alert {
  display: flex;
  align-items: flex-start;
  /*align-items: center;  هذه الخاصية تجبر الأيقونة والنص على التوسط معاً */
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  border: 1px solid;
  line-height: 1.5;
  margin-bottom: 1rem;
}

/* منع الأيقونة من الانضغاط إذا كان النص طويلاً */
.alert svg {
  flex-shrink: 0; 
  margin-top: 0.1rem;
}

.alert--success {
  background: oklch(0.95 0.05 140);
  border-color: oklch(0.80 0.10 140);
  color: var(--color-success);
}

.alert--error {
  background: oklch(0.96 0.04 15);
  border-color: oklch(0.82 0.10 15);
  color: var(--color-error);
}

/* ══════════════════════════════════════
   FILTER TABS
══════════════════════════════════════ */
.filter-tabs {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.filter-tab {
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  transition: all var(--transition-fast);
}

.filter-tab:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.filter-tab.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}

/* ══════════════════════════════════════
   DIVIDER WITH LABEL
══════════════════════════════════════ */
.divider-label {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  color: var(--color-text-faint);
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.divider-label::before,
.divider-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-divider);
}

/* ══════════════════════════════════════
   FLOATING WHATSAPP
══════════════════════════════════════ */
.whatsapp-float {
  position: fixed;
  bottom: var(--space-6);
  left: var(--space-6);
  z-index: 900;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-full);
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px oklch(0.50 0.20 150 / 0.40);
  text-decoration: none;
  transition: transform var(--transition-interactive), box-shadow var(--transition-interactive);
}

.whatsapp-float:hover {
  transform: scale(1.10);
  box-shadow: 0 6px 28px oklch(0.50 0.20 150 / 0.55);
  color: #fff;
}

/* ══════════════════════════════════════
   BACK TO TOP
══════════════════════════════════════ */
.back-to-top {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 900;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.5rem);
  transition: all var(--transition-interactive);
  cursor: pointer;
  border: none;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover { background: var(--color-primary-hover); transform: translateY(-2px); }

/* =============================================================
   FIXES — يُضاف في نهاية components.css
   مشكلة 1: Hero Visual يزيح المحتوى على الهاتف
   مشكلة 2: الكود البرمجي يظهر كنص عادي
   مشكلة 3: stats-grid لا يطبّق CSS Grid
============================================================= */

/* --- Hero Layout Fix --- */
.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12, 3rem);
  align-items: center;
  padding-block: calc(4.5rem + var(--space-16, 4rem)) var(--space-16, 4rem);
}
@media (min-width: 1024px) {
  .hero__inner {
    grid-template-columns: 1fr 1fr;
  }
}


/* إخفاء الجانب البصري على الهاتف — يمنع إزاحة النص 
.hero__visual {
  display: none;
  position: relative;
}
@media (min-width: 1024px) {
  .hero__visual {
    display: block;
  }
}
*/


/* تظهر دائماً */
.hero__visual {
  display: block;
  position: relative;
  margin-top: var(--space-8);
}

/* على الهاتف — حجم أصغر ومتمركز */
@media (max-width: 1023px) {
  .hero__visual {
    max-width: 480px;
    margin-inline: auto;
  }
}

/* على الكمبيوتر — بالحجم الكامل جنباً للنص */
@media (min-width: 1024px) {
  .hero__visual {
    margin-top: 0;
    max-width: none;
  }
}


/* بطاقة الكود */
.hero__visual-card {
  background: var(--color-surface, #f9f8f5);
  border: 1px solid var(--color-border, #d4d1ca);
  border-radius: var(--radius-lg, 0.75rem);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero__visual-header {
  display: flex;
  align-items: center;
  gap: var(--space-2, 0.5rem);
  padding: var(--space-3, 0.75rem) var(--space-4, 1rem);
  background: var(--color-surface-offset, #f3f0ec);
  border-bottom: 1px solid var(--color-border, #d4d1ca);
}
.hero__visual-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.hero__visual-filename {
  font-size: var(--text-xs, 0.75rem);
  color: var(--color-text-muted, #7a7974);
  margin-right: auto;
  direction: ltr;
  font-family: 'Courier New', monospace;
}

/* الكود البرمجي — pre لإلغاء تأثير النص العادي */
.hero__visual-code {
  display: block;
  padding: var(--space-4, 1rem) var(--space-5, 1.25rem);
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.8rem;
  line-height: 1.7;
  direction: ltr;
  text-align: left;
  color: var(--color-text, #28251d);
  white-space: pre;
  overflow-x: auto;
  margin: 0;
  background: transparent;
  border: none;
}
.hero__visual-code .kw  { color: var(--color-primary, #01696f); font-weight: 600; }
.hero__visual-code .cl  { color: var(--color-gold, #C8951A); }
.hero__visual-code .fn  { color: var(--color-blue, #006494); }
.hero__visual-code .vr  { color: var(--color-error, #a12c7b); }
.hero__visual-code .st  { color: var(--color-success, #437a22); }

/* بادجات الـ Hero */
.hero__visual-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: var(--space-2, 0.5rem);
  padding: var(--space-2, 0.5rem) var(--space-3, 0.75rem);
  background: var(--color-surface, #f9f8f5);
  border: 1px solid var(--color-border, #d4d1ca);
  border-radius: var(--radius-full, 9999px);
  font-size: var(--text-xs, 0.75rem);
  font-weight: 600;
  box-shadow: var(--shadow-md);
  white-space: nowrap;
}
.hero__visual-badge--uptime {
  bottom: -1rem;
  right: -1rem;
  color: var(--color-success, #437a22);
}
.hero__visual-badge--secure {
  top: -1rem;
  left: -1rem;
  color: var(--color-primary, #01696f);
}

/* حركة النقطة الخضراء (Uptime 99.9%) - تكبر، تصغر، وتضيء */
@keyframes pulseDot {
    0% { transform: scale(0.8); opacity: 0.4; }
    50% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 8px 2px rgba(76, 175, 80, 0.6); }
    100% { transform: scale(0.8); opacity: 0.4; }
}

.green-dot {
    display: inline-block;
    background-color: #28a745; /* لون أخضر */
    border-radius: 50%;
    margin-right: 5px;
    animation: pulseDot 1.2s infinite ease-in-out;
}

/* حركة رمز الحماية (Protected) - يكبر ويتغير لونه */
@keyframes shieldPulse {
    0% { 
        transform: scale(1); 
        color: var(--color-primary, #01696f); /* اللون الأساسي للدرع */
        fill: transparent; 
        filter: drop-shadow(0 0 0px rgba(14, 165, 233, 0.1));
    }
    50% { 
        transform: scale(1.45); /* تكبيره بنسبة 25% ليكون أوضح */
        color: #0ea5e9; /* تحول الإطار للون أزرق سماوي ساطع */
        fill: rgba(14, 165, 233, 0.5); /* تعبئة قلب الدرع بضوء أزرق خفيف */
        filter: drop-shadow(0 0 6px rgba(14, 165, 233, 0.3)); /* إشعاع التوهج حول الدرع */
    }
    100% { 
        transform: scale(1); 
        color: var(--color-primary, #01696f); 
        fill: transparent; 
        filter: drop-shadow(0 0 0px transparent);
    }
}

.shield-icon {
    display: inline-block;
    animation: shieldPulse 2s infinite ease-in-out;
}

/* --- Stats Grid Fix --- */
.stats-section {
  padding-block: var(--space-10, 2.5rem);
  background: var(--color-surface, #f9f8f5);
  border-top: 1px solid var(--color-border, #d4d1ca);
  border-bottom: 1px solid var(--color-border, #d4d1ca);
}
.stats-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6, 1.5rem);
}
@media (min-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.stat-card {
  text-align: center;
  padding: var(--space-4, 1rem);
}
.stat-card__number {
  font-size: var(--text-2xl, 2rem);
  font-weight: 700;
  color: var(--color-primary, #01696f);
  line-height: 1;
  margin-bottom: var(--space-2, 0.5rem);
  font-variant-numeric: tabular-nums;
}
.stat-card__label {
  font-size: var(--text-sm, 0.875rem);
  color: var(--color-text-muted, #7a7974);
}

/* --- Hero Trust items --- */
.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4, 1rem);
  margin-top: var(--space-6, 1.5rem);
}

.hero__trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-2, 0.5rem);
  font-size: var(--text-sm, 0.875rem);
  color: var(--color-text-muted, #7a7974);
}

/* الحالة الابتدائية للميزة (مخفية ومزاحة لليسار) */
.feature-item {
    opacity: 0;
    transform: translateX(-30px); /* تبدأ من اليسار */
    transition: all 0.9s ease-out; /* حركة بطيئة وسلسة (0.9 ثانية) */
}

/* الحالة النهائية عند ظهور الميزة في الشاشة */
.feature-item.visible {
    opacity: 1;
    transform: translateX(0); /* تستقر في مكانها الطبيعي */
}

/* (اختياري) تأخير ظهور الميزات بالتتابع لتعطي شكلاً جمالياً */
.feature-item:nth-child(1) { transition-delay: 0.1s; }
.feature-item:nth-child(2) { transition-delay: 0.3s; }
.feature-item:nth-child(3) { transition-delay: 0.5s; }
.feature-item:nth-child(4) { transition-delay: 0.7s; }

/* --- Empty State --- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-16, 4rem) var(--space-8, 2rem);
  color: var(--color-text-muted, #7a7974);
}
.empty-state__icon {
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-surface-offset, #f3f0ec);
  border-radius: 50%;
  color: var(--color-text-faint, #bab9b4);
  margin-bottom: var(--space-4, 1rem);
}
.empty-state h3 { color: var(--color-text, #28251d); margin-bottom: var(--space-2, 0.5rem); }
.empty-state p  { max-width: 36ch; margin-bottom: var(--space-6, 1.5rem); }


/* شبكة الخدمات — 2 في السطر على الكمبيوتر */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* افتراضياً عمودين للكمبيوتر والشاشات العريضة */
  gap: var(--space-6);
}

/* إذا كان الهاتف أو الجهاز ممسوكاً بالطول وعرضه أقل من 768px، اجعله عموداً واحداً */
@media (max-width: 768px) and (orientation: portrait) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}


/* لقسم الباقات -> شبكة الباقات — 2 في السطر على الكمبيوتر */
/* 1. الإعداد الافتراضي (للهواتف في وضع الطول Portrait): بطاقة واحدة في السطر */
.plans-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

/* 2. عندما يتم حمل الهاتف أو التابلت "بالعرض" (Landscape)، حتى لو كان عرضه أقل من الشاشات الكبيرة */
@media (orientation: landscape) and (max-width: 991px) {
  .plans-grid {
    grid-template-columns: repeat(2, 1fr); /* بطاقتان في السطر */
  }
}

/* 3. جميع أجهزة الكمبيوتر واللابتوب (من 992px فما فوق): 3 بطاقات بمسافات كاملة */
@media (min-width: 992px) {
  .plans-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* للرئيسية -> شبكة الباقات — 2 في السطر على الكمبيوتر */
/* 1. الإعداد الافتراضي (للهواتف في وضع الطول Portrait): بطاقة واحدة في السطر */
.plans-grid_index {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

/* 2. عندما يتم حمل الهاتف أو التابلت "بالعرض" (Landscape)، حتى لو كان عرضه أقل من الشاشات الكبيرة */
@media (orientation: landscape) and (max-width: 991px) {
  .plans-grid_index {
    grid-template-columns: repeat(3, 1fr); /* 3 بطاقات في السطر */
	gap: var(--space-3);
  }
  
  .pricing-card_index {
	padding: var(--space-3);
  }
}

/* 3. جميع أجهزة الكمبيوتر واللابتوب (من 992px فما فوق): 3 بطاقات بمسافات كاملة */
@media (min-width: 992px) {
  .plans-grid_index {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* صندوق أعمالنا المميزة — 2 في السطر على الكمبيوتر */
/* -- تم في الأسفل إضافة كود جديد للمقاسات والمفترض يتم العرض منه وليس من هنا -- */
.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;        /* هاتف: واحد في السطر */
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);  /* كمبيوتر: اثنان جنباً */
  }
}



/* ══ Hero Image Card ══ */
.hero__img-card {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: visible;  /* ← يسمح للبادجات بالخروج */
  box-shadow: var(--shadow-lg),
              0 0 60px oklch(0.35 0.10 220 / 0.15);
}

.hero__img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-xl);
  transition: transform 8s ease;
  overflow: hidden;

}

.hero__img-card:hover .hero__img {
  transform: scale(1.03);
}

/* طبقة الجزيئات فوق الصورة */
.hero__particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  border-radius: var(--radius-xl);
}

/* توهج ذهبي في الأطراف */
.hero__img-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  border: 1px solid oklch(0.75 0.15 80 / 0.35);
  pointer-events: none;
  background: linear-gradient(
    135deg in oklab,
    oklch(0.75 0.15 80 / 0.06) 0%,
    transparent 50%,
    oklch(0.50 0.12 220 / 0.06) 100%
  );
}



/* ══ 1. GRADIENT TEXT ══ */
.gradient-text {
  background: linear-gradient(
    135deg in oklab,
    var(--color-primary) 0%,
    var(--color-gold) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ══ 4. PORTFOLIO HOVER OVERLAY ══ */
.portfolio-card {
  position: relative;
}

.portfolio-card__overlay {
  position: absolute;
  inset: 0;
  background: oklch(0.15 0.05 220 / 0.75);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  opacity: 0;
  transition: opacity var(--transition-smooth);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(2px);
}

.portfolio-card:hover .portfolio-card__overlay {
  opacity: 1;
}

.portfolio-card__overlay-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  background: var(--color-gold);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 700;
  text-decoration: none;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.portfolio-card__overlay-btn:hover {
  background: var(--color-gold-hover);
  transform: scale(1.05);
  color: #fff;
}

.portfolio-card__overlay-icon {
  color: oklch(1 0 0 / 0.6);
}

/* ══ 3. SKELETON LOADING ══ */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-surface-offset) 25%,
    var(--color-surface-dynamic) 50%,
    var(--color-surface-offset) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

.portfolio-card--skeleton .portfolio-card__img {
  aspect-ratio: 16 / 10;
  width: 100%;
}

.portfolio-card--skeleton .skeleton-title {
  height: 1rem;
  width: 70%;
  margin-bottom: var(--space-2);
}

.portfolio-card--skeleton .skeleton-sub {
  height: 0.75rem;
  width: 45%;
}

@media (prefers-reduced-motion: reduce) {
  .skeleton { animation: none; background: var(--color-surface-offset); }
}

@media (min-width: 1024px) {
  /* 1. إجبار الهيرو على جعل عناصرها في سطر كامل (تحت بعضها) بدلاً من عمودين بجانب بعضهما */
  .hero__inner {
    grid-template-columns: 1fr;
  }

  /* 2. التحكم بعرض النص ليبقى مريحاً للعين وتوسيطه (اختياري) */
  .hero__content {
    max-width: 850px;
    margin-inline: auto;
    text-align: center;
  }

  /* 3. توسيط الأزرار وعناصر الثقة تحت النص */
  .hero__actions,
  .hero__trust {
    justify-content: center;
  }

  /* 4. إعطاء الصورة الكبيرة العرض الكامل المناسب لها على الكمبيوتر */
  .hero__visual {
    width: 100%;
    max-width: 1100px; /* يمكنك زيادة أو تقليل هذا الرقم حسب درجة عرض الصورة المطلوبة */
    margin-inline: auto;
    margin-top: var(--space-2);
  }
}

/* فخامة خط العنوان الرئيسي */
.hero__title {
  font-family: 'Alexandria', var(--font-display);
  font-weight: 800; /* سماكة عالية تعطي ثقلاً وهيبة للنص */
  letter-spacing: -0.02em; /* تقريب الحروف قليلاً لمظهر مدروس */
  line-height: 1.35;
}

/* زيادة الجاذبية للجزئية الملونة */
.hero__title .gradient-text {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-gold) 60%, #E5B23A 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* كلاس عام لزيادة الفراغ بين الأسطر (الهواتف كإعداد افتراضي) */
.more_space {
  line-height: 1.5 !important; 
}

/* تكبير الفراغ بشكل أكبر على شاشات الكمبيوتر */
@media (min-width: 1024px) {
  .more_space {
    line-height: 1.6 !important; 
  }
}

/* تصغير حجم الشطر الثاني على الهواتف فقط لتقليل فرصة انكساره */
@media (max-width: 768px) and (orientation: portrait) { /* الشرط الثاني لأن يكون الهاتف بالطول فلا نريد أن يتأثر إذا كان بالعرض */
  .hero__subtitle {
    font-size: 0.65em; /* يجعل هذا السطر أصغر بنسبة 25% من السطر الرئيسي */
    display: inline-block;
	transform: translateY(-7px); /* رفعه للأعلى */
    /* white-space: nowrap; إذا أردت المخاطرة وإجباره فعلياً لسطر واحد رغم التحذير، قم بتفعيل السطر التالي */
  }
}

.more_gap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem; /* هذه هي المسافة الأفقية (والعمودية عند الالتفاف) بين الأزرار، يمكنك زيادتها أو تقليلها مثل 0.5rem أو 1rem */
  margin-top: 0;   /* لا مسافة من الأعلى */
  margin-bottom: 0;/* لا مسافة من الأسفل */
}

/* تخصيص شكل الالتفاف على شاشات الجوال */
@media (max-width: 768px) and (orientation: portrait) { /* الشرط الثاني لأن يكون الهاتف بالطول فلا نريد أن يتأثر إذا كان بالعرض */
  .more_gap .btn {
    /* جعل أول زرين يتوزعان بالتساوي في السطر الأول */
    flex: 1 1 calc(50% - 0.4rem); 
    text-align: center;
    justify-content: center;
  }
  
  /* الزر الثالث (اطلب الآن) يأخذ عرض الشاشة بالكامل في السطر الثاني ويلتصق بما قبله */
  .more_gap .btn:nth-child(3) {
    flex: 1 1 100%;
  }
}

/* ══════════════════════════════════════
   أزرار فاخرة - LUXURY BUTTONS
══════════════════════════════════════ */

/* 1. التنسيق الأساسي للأزرار */
.hero__actions .btn {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-full); /* شكل بيضاوي انسيابي أكثر فخامة */
  font-family: 'Alexandria', var(--font-body);
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 0.85rem 2.25rem;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(8px);
}

/* 2. إضافة بريق ولمعان متحرك عند مرور الماوس (Shimmer Effect) */
.hero__actions .btn::before {
  content: '';
  position: absolute;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.35),
    transparent
  );
  transition: right 0.65s ease;
}

.hero__actions .btn:hover::before {
  right: 100%;
}

/* 3. زر "استكشف خدماتنا" (الرئيسي - الكحلي/النفطي) */
.hero__actions .btn--primary {
  background: linear-gradient(135deg, #0A4D6B 0%, #062E42 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px -4px rgba(10, 77, 107, 0.4);
}

.hero__actions .btn--primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 30px -4px rgba(10, 77, 107, 0.55);
}

/* 4. زر "اطلب الآن" (الذهبي الملكي) */
.hero__actions .btn--gold {
  background: linear-gradient(135deg, #D4A017 0%, #A87A14 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  box-shadow: 0 8px 24px -4px rgba(200, 149, 26, 0.45);
}

.hero__actions .btn--gold:hover {
  background: linear-gradient(135deg, #E5B23A 0%, #C8951A 100%);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 32px -2px rgba(200, 149, 26, 0.6);
  color: #ffffff;
}

/* 5. زر "أعمالنا" (المُحدد شفاف) */
.hero__actions .btn--outline {
  border: 1.5px solid var(--color-primary);
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-primary);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.hero__actions .btn--outline:hover {
  background: var(--color-primary);
  color: #ffffff;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 25px -4px rgba(10, 77, 107, 0.35);
}

/* =============================================================
   تعديلات إضافية: توسيط محتوى الهيرو، تقليص المسافات، وتنسيق الـ CTA
============================================================= */

/* 1. توسيط محتوى الهيرو على الهاتف والشاشات (من الـ بادج وحتى عناصر الثقة) */
.hero__content {
  text-align: center;
}

.hero__badge {
  display: inline-flex;
  margin-inline: auto; /* لضمان توسط البادج تماماً */
}

.hero__actions,
.hero__trust {
  justify-content: center;
}

/* 2. تقليص المسافة الكبيرة بين محتوى النص والصورة أدناه (على الكمبيوتر والهاتف) */
.hero__inner {
  gap: var(--space-6); /* تقليص المسافة الفاصلة العامة في شبكة الهيرو */
}

.hero__visual {
  margin-top: var(--space-2); /* تقليل الهامش العلوي للصورة */
}


/* ══════════════════════════════════════════════════════
   3. تنسيق وتحسين قسم الـ CTA (توسيط كامل + أزرار فاخرة)
══════════════════════════════════════════════════════ */

.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 850px;
  margin-inline: auto;
}

.cta-title {
  font-family: 'Alexandria', var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-dark-text, #E6EDF3);
  margin-bottom: var(--space-2);
  line-height: 1.6;
}

.cta-desc {
  font-size: var(--text-base);
  color: var(--color-dark-muted, #8B949E);
  max-width: 58ch;
  margin-bottom: var(--space-8);
  line-height: 1.8;
  margin-inline: auto;
}

.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-2);
}

/* فخامة أزرار قسم الـ CTA بمؤثرات اللمعان والظلال */
.cta-actions .btn {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-full);
  font-family: 'Alexandria', var(--font-body);
  font-weight: 700;
  padding: 1rem 2.5rem;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(8px);
}

/* تأثير اللمعان المتحرك عند مرور الماوس */
.cta-actions .btn::before {
  content: '';
  position: absolute;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transition: right 0.65s ease;
}

.cta-actions .btn:hover::before {
  right: 100%;
}

/* زر "اطلب خدمة الآن" (الذهبي الفاخر) */
.cta-actions .btn--gold {
  background: linear-gradient(135deg, #D4A017 0%, #A87A14 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  box-shadow: 0 8px 24px -4px rgba(200, 149, 26, 0.45);
}

.cta-actions .btn--gold:hover {
  background: linear-gradient(135deg, #E5B23A 0%, #C8951A 100%);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 32px -2px rgba(200, 149, 26, 0.6);
  color: #ffffff;
}

/* زر "استعرض الباقات" (الأبيض البارز على الخلفية الداكنة) */
.cta-actions .btn--white {
  background: #ffffff;
  color: var(--color-primary);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.3);
}

.cta-actions .btn--white:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 32px -4px rgba(255, 255, 255, 0.35);
}

/* توسيط كافة العناصر داخل بطاقة الخدمة */
.service-card {
  align-items: center; 
  text-align: center;  
}

/* -------------------------------------------------
            لتحسين الفراغات بين الأقسام
   ------------------------------------------------- */
.section {
  padding: 2.5rem 0; 
}

@media (max-width: 768px) {
  .section {
    padding: 1.5rem 0; 
  }
}

/* ==========================================================================
   Service Modifier Theme Colors (تنسيقات ألوان أيقونات الخدمات فقط)
   ========================================================================== */
.section--services {
    padding: 1.5rem 0 0.75rem 0;
    margin: 0rem;
}

.section--last-service {
  padding-bottom: 2.5rem; 
}

.service-detail__icon-wrap--primary {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.service-detail__icon-wrap--gold {
  background: var(--color-gold-light);
  color: var(--color-gold);
}

.service-detail__icon-wrap--success {
  background: var(--color-surface-offset, rgba(45, 106, 79, 0.1));
  color: var(--color-success);
}

.service-detail__icon-wrap--info {
  background: var(--color-info-light, var(--color-primary-light));
  color: var(--color-primary);
}

/* ==========================================================================
   1. Quick Navigation Bar (محسنة ومتوافقة مع نظام التصميم والأيقونات)
   ========================================================================== */

/* حصر تأثير التمرير للوضع الطولي وشاشات الكمبيوتر */
html:has(.services-nav-bar) {
  scroll-padding-top: 140px;
}

.services-nav-bar {
  position: sticky;
  top: 70px;
  z-index: 90;
  padding: 0.5rem 0;
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0.85rem; 
  padding-bottom: 0.5rem;
  background: var(--color-surface); 
  background: color-mix(in srgb, var(--color-surface) 96%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-divider);
}

.services-nav-bar .container {
  display: flex;
  justify-content: center;
}

.services-nav-scroll {
  display: inline-flex;
  gap: 0.25rem;
  
  background: var(--color-bg-split);
  border: 1px solid var(--color-border-split);
  
  border-radius: 12px; 
  padding: 0.35rem; 
  
  max-width: 100%;
  overflow-x: auto; 
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch; 
  scrollbar-width: none;
}

.services-nav-scroll::-webkit-scrollbar {
  display: none;
}

.services-nav-link {
  flex-shrink: 0; 
  display: flex;         
  align-items: center;   
  gap: 0.5rem;           
  padding: 0.5rem 1.1rem; 
  border-radius: 8px; 
  font-size: 0.9rem;
  font-weight: 600;
  
  color: var(--color-text-muted); 
  text-decoration: none;
  
  /* تحديث سطر الـ transition ليطابق نعومة النافبار الأساسي لديك */
  transition: color var(--transition-fast, 0.2s), 
              background var(--transition-fast, 0.2s), 
              transform var(--transition-fast, 0.2s);
}

.services-nav-link svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--transition-fast, 0.2s);
}

/* تأثير مرور الماوس (Hover) */
.services-nav-link:hover {
  color: var(--color-primary);
  transform: translateY(-2px); /* رفع الزر للأعلى قليلاً بنعومة */
}

/* الزر النشط (Active) */
.services-nav-link.active {
  background: var(--color-primary-light); 
  color: var(--color-primary);
  box-shadow: var(--shadow-xs);
  transform: translateY(0); /* تثبيت الزر النشط في مكانه */
}

/* حل مشكلة مساحة الهاتف وقص الأقسام (Landscape) */
@media (max-height: 500px) and (orientation: landscape) {
  html:has(.services-nav-bar) {
    /* نلغي مسافة الـ 140 لأن الشريط لم يعد ثابتاً، ونكتفي بمسافة الهيدر الأساسي */
    scroll-padding-top: 70px; 
  }
  .services-nav-bar {
    position: relative; 
    top: auto;
  }
}

/* ==========================================================================
   2. Enhanced Service Cards Frame - الهيكل الأساسي
   ========================================================================== */
.service-detail {
  display: flex;
  flex-direction: column; 
  gap: 0rem; 
  padding: 0.75rem; 
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-xl, 20px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
  transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.service-detail:hover {
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
  transform: translateY(-3px);
}

/* ================== تنسيق عمود الأيقونة ================== */
.service-detail__icon-col {
  display: flex;
  flex-direction: row; 
  justify-content: space-between; 
  align-items: center; 
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: var(--color-bg-split);
  border: 1px solid var(--color-border-split);
  border-radius: 14px;
}

.service-detail__icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;  
  height: 50px;
  border-radius: 14px;
}

.service-detail__icon-wrap svg {
  width: 24px;  
  height: 24px;
}

.service-detail__tag {
  font-size: 1.15rem;
  font-weight: 800;
  font-family: monospace;
  color: var(--color-text-muted, #64748b); 
  margin: 0; 
}

/* تخطيط الشاشات الكبيرة لعمود الأيقونة والبطاقة */
@media (min-width: 768px) {
  .service-detail {
    flex-direction: row; 
    align-items: stretch; 
    padding: 0.75rem; 
    gap: 0rem;
  }
  
  .service-detail--reverse {
    flex-direction: row-reverse; 
  }

  .service-detail__icon-col {
    flex-direction: column; 
    width: 110px;
    flex-shrink: 0;
    padding: 1rem 1rem;
    border-radius: 16px;
  }

  .service-detail__icon-wrap {
    width: 72px;  
    height: 72px;
    border-radius: 16px;
  }

  .service-detail__icon-wrap svg {
    width: 45px;  
    height: 45px;
  }

  .service-detail__tag {
    font-size: 1.3rem;
    margin-top: auto; 
  }
}

/* ================== تنسيق عمود المحتوى ================== */
.service-detail__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: flex-start;
  border-radius: 50px;
  width: 100%;
  margin: 0;
  padding: 1rem 0.25rem 0.25rem 0.25rem; 
}

.service-section-label {
  margin-right: -0.5rem; 
}

@media (min-width: 768px) {
  .service-detail__body {
    margin: 1rem;
    padding: 0.5rem 2.75rem 0.1rem 2.75rem; 
  }

  .service-section-label {
    margin-right: -2rem;
  }
}

.service-detail__title {
  margin-bottom: var(--space-4, 1rem);
  color: var(--color-text);
  line-height: 1.6;
}

.service-detail__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.85rem;
  font-size: var(--text-xs);
  font-weight: 500;
  background: linear-gradient(135deg, var(--color-gold), #eab308); 
  color: #ffffff;
  border-radius: 50px; 
  box-shadow: 0 4px 10px rgba(200, 149, 26, 0.25); 
  white-space: nowrap; 
  transform: translateY(-4px); 
  vertical-align: middle; 
  margin-right: 0.6rem; 
}

.service-detail__body > p {
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-4, 1.5rem);
  text-align: justify;
}

/* ================== 3. Feature Checklist (القوائم النقطية) ================== */
.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem 1.5rem;
  margin: 0.25rem 0 2rem;
  padding: 0; 
  list-style: none;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--color-text-muted);
  transition: all var(--transition-interactive, 0.3s ease);
}

.feature-list li svg {
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.03);
  color: var(--color-gold);
  padding: 3px;
  margin-top: 2px;
  transition: all var(--transition-interactive, 0.3s ease);
}

.feature-list li:hover {
  color: var(--color-text);
  transform: translateX(-5px);
}

.feature-list li:hover svg {
  background: var(--color-gold-light);
  transform: scale(1.15) rotate(5deg);
  box-shadow: var(--shadow-xs);
}

/* ================== 4. CMS Cards (الشبكات الداخلية) ================== */
.features-grid-with-icons {
  display: grid;
  grid-template-columns: 1fr; 
  gap: 0.85rem;
  margin: 1rem 0 2rem;
  padding: 0; 
  width: 100%;
}

.feature-with-icon {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  background: transparent;
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text);
  transition: all 0.3s ease;
}

.feature-with-icon:hover {
  background: var(--color-surface, #ffffff);
  border-color: var(--color-gold);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.03);
}

@media (min-width: 768px) {
  .feature-list {
    padding: 0 2rem 0 0;
  }
  .features-grid-with-icons {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 2rem 0 1rem;
  }
}

/* ==========================================================================
   5. منطقة السعر والزر 
   ========================================================================== */
.service-action-wrap {
  width: 100%;
  margin-top: 0; 
  padding-top: 1.25rem;
  border-top: 1px dashed var(--color-border); 
  display: flex;
  flex-direction: column; 
  align-items: center;
  gap: 1.25rem;
  padding-bottom: 0rem;
}

.service-price-block {
  display: flex;
  flex-direction: column;
  align-items: center; 
}

.service-price-block .price-value {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-primary);
  line-height: 1.2;
}

.service-price-block .price-note {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: 600;
  margin-top: 0.25rem;
}

.service-price-block.is-free .price-value {
  color: var(--color-success, #2D6A4F);
  font-size: 1.5rem;
}

.service-price-block.is-free .price-note {
  color: var(--color-gold);
}

/* تنسيق الزر - النسخة المعتمدة والمصححة */
.services-btn {
  width: 100%; 
  padding: 0.75rem 0; 
  border-radius: var(--radius-md, 8px); /* تم التعديل لمنع الشكل الدائري الكامل */
  font-weight: 700;
  text-decoration: none; 
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-interactive);
}

@media (min-width: 768px) {
  .service-action-wrap {
    flex-direction: row; 
    justify-content: space-between; 
  }
  
  .service-price-block {
    align-items: flex-start; 
  }

  .services-btn {
    width: 30%; 
    align-self: center; 
  }
}


/* ==========================================================================
   Portfolio Grid & Cards (تنسيقات معرض الأعمال)
   ========================================================================== */

/* 1. شريط الفلترة القابل للتمرير */
.filter-bar-wrapper {
  margin-bottom: 2.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.filter-bar-wrapper::-webkit-scrollbar {
  display: none;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  padding: 0.25rem;
}

.filter-btn {
  padding: 0.6rem 1.4rem;
  border-radius: 99px;
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--color-border-light, #e2e8f0);
  color: var(--color-text-muted, #64748b);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--color-primary, #2563eb);
  color: #ffffff;
  border-color: var(--color-primary, #2563eb);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

/* كلاس مساعد لإلغاء التثبيت في الصفحات التي لا تحتاجه (مثل صفحة أعمالنا) */
.static-nav-bar {
  position: relative !important;
  top: auto !important;
}

/* 2. شبكة الكروت */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.75rem;
}

/* الكلاس المُساعد لتوسيط العنصر الثالث في الصفحة الرئيسية فقط */
/* يتدخل فقط عندما يكون عرض الشاشة يتسع لعمودين (من 588px إلى 895px) */
@media (min-width: 588px) and (max-width: 895px) {
  .portfolio-grid_index > *:nth-child(3) {
    grid-column: 1 / -1;          
    justify-self: center;         
    width: calc(50% - 0.875rem);  
  }
}

/* 3. كرت المشروع والتأثير البصري (Hover Effect) */
.portfolio-card {
  background: var(--color-surface, #ffffff);
  border-radius: 16px;
  border: 1px solid var(--color-border-light, #f1f5f9);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.35s ease;
}

.portfolio-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.08);
  border-color: rgba(37, 99, 235, 0.3);
}

/* 4. الحاوية الخاصة بالصورة والأراكشن */
.portfolio-card__media {
  position: relative;
  width: 100%;
  /* aspect-ratio: 16 / 10; */
  aspect-ratio: 4 / 3; /* ارتفاع أكبر يناسب صور المواقع الكاملة */
  overflow: hidden;
  background: var(--color-surface-offset, transparent); /* تم التعديل لدعم الدارك ثيم */
}

.portfolio-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top; /* التركيز على أعلى الموقع دائماً */
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
}

/* تأثير اللمعة الزجاجية (Shine Effect) */
/* حصر اللمعة بقسم الأرشيف وإلغاء رجوعها عند خروج الماوس */
/* دمج لمعة الأرشيف مع لمعة التطبيقات */
.portfolio-grid--archive .portfolio-card__media::before,
.portfolio-grid--app .portfolio-card__media::before {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-25deg);
  z-index: 4;
  pointer-events: none;
  /* (السر هنا) لا نضع transition في الحالة العادية لكي تعود فوراً وتختفي عند خروج الماوس */
  transition: none; 
}

/* الحركة تعمل فقط أثناء وجود الماوس (أبطأ وأكثر نعومة) */
.portfolio-grid--archive .portfolio-card:hover .portfolio-card__media::before,
.portfolio-grid--app .portfolio-card:hover .portfolio-card__media::before {
  left: 150%;
  transition: left 1s cubic-bezier(0.19, 1, 0.22, 1); /* بطأناها لـ 1 ثانية */
}

.portfolio-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted); /* تم التعديل */
  background: var(--color-surface-offset); /* تم التعديل */
}

/* 6. التظليل العائم وزر الزيارة عند اقتراب الماوس */
.portfolio-card__overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  /* background: linear-gradient(to top, rgba(15, 23, 42, 0.8) 0%, rgba(15, 23, 42, 0.2) 60%, transparent 100%); */
  /* تدرج قوي من الأسفل يختفي تماماً عند الوصول للثلث العلوي من الصورة */
  background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.4) 40%, transparent 70%);
  display: flex;
  /* align-items: flex-end; */
  align-items: center; /* ← تم التغيير للتوسيط العمودي */
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  transition: opacity 0.4s ease;
  backdrop-filter: none !important; /*  إلغاء التغبيش (Blur) الذي يبهت الصورة */
}

.portfolio-card:hover .portfolio-card__overlay {
  opacity: 1; /* ظهور التظليل عند تحريك الماوس */
}

/* 2. الرابط الخفي الذي يجعل كل الصورة قابلة للنقر */
.portfolio-card__hitbox {
  position: absolute;
  inset: 0;
  z-index: 1; /* يكون أسفل الزر */
}

/* إزالة الدوران السفلي من حاوية الصورة، الصورة نفسها، وطبقة التظليل */
.portfolio-card__media,
.portfolio-card__img,
.portfolio-card__overlay,
.portfolio-card__placeholder,
.skeleton {
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

/* خفض سطوع صور المواقع في الوضع الداكن بنسبة 15% لتقليل التوهج */
[data-theme="dark"] .portfolio-card__img {
  filter: brightness(0.85);
  transition: filter 0.4s ease; /* الحفاظ على انتقال ناعم للون فقط */
}

/* إعادة الصورة لسطوعها الكامل (100%) عند تمرير الماوس */
[data-theme="dark"] .portfolio-card:hover .portfolio-card__img {
  filter: brightness(1); /* تمت إزالة الـ scale نهائياً */
}

.portfolio-card__action-btn {
  position: relative; /* ضروري لعمل الحيلة في الكود التالي */
  z-index: 2; /* يكون أعلى من الرابط الخفي */
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #ffffff;
  color: #0f172a;
  border-radius: 99px;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  /* transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, color 0.2s ease; */
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  /* transform: translateY(0); ألغِ قيمة translateY(12px) القديمة ليبقى متوسطاً */
  /* الزر يكون مخفياً ومنخفضاً للأسفل قليلاً في الحالة العادية */
  opacity: 0;
  transform: translateY(-18px);
  /* transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); */
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease-in-out;
}

/* لتكبير الأيقونة التي بداخل الزر لتتناسب مع الخط الجديد */
.portfolio-card__action-btn svg {
  width: 20px;
  height: 20px;
}

.portfolio-card:hover .portfolio-card__action-btn {
  opacity: 1;
  transform: translateY(0); /* ارتفِاع ناعم للزر عند الـ Hover */
}

.portfolio-card__action-btn:hover {
  background: var(--color-primary, #2563eb);
  color: #ffffff;
  /* تكبير الزر سيكة عند وقوف الماوس عليه تحديداً */
  transform: scale(1.05);
}

/* 7. محتوى الكرت */
.portfolio-card__body {
  /* padding: 1.25rem; */
  padding: 0.8rem 0.7rem 0.7rem  0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0rem;
  flex-grow: 1;
}

.portfolio-card__title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.7;
  /* منع العنوان الطويل من تخريب التصميم (Truncation) 
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; */
  width: 100%; /* ضمان أخذ العرض الكامل */
  display: block;
  white-space: normal; /* إجبار النص على الالتفاف الطبيعي */
  text-wrap: unset; /* إلغاء التوزيع المتساوي (Balance) إن وُجد */
  word-break: normal;
}

.portfolio-card__title a {
  /* color: var(--color-heading, #0f172a); */
  color: var(--color-text); /* سيأخذ اللون الفاتح في الدارك ثيم والغامق في العادي */
  text-decoration: none;
  transition: color 0.2s ease;
}

.portfolio-card__title a:hover {
  color: var(--color-primary, #2563eb);
}

.portfolio-card__desc {
  font-size: 0.875rem;
  color: var(--color-text-muted, #64748b);
  margin: 0;
  line-height: 1.6;
}

/* 8. ترقيم الصفحات (Pagination) */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.pagination__numbers {
  display: flex;
  gap: 0.35rem;
}

.pagination__btn {
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--color-border-light, #e2e8f0);
  color: var(--color-text, #334155);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.pagination__btn:hover,
.pagination__btn.active {
  background: var(--color-primary, #2563eb);
  color: #ffffff;
  border-color: var(--color-primary, #2563eb);
}

/* حاوية الشارات الطافية - أسفل اليسار للجميع */
.portfolio-card__badges {
  position: absolute;
  top: auto !important;
  bottom: 12px !important; /* في الأسفل */
  right: auto !important;
  left: 12px !important; /* في اليسار */
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex-direction: row-reverse; /* ترتيب الشارات بشكل صحيح */
}

/* تصميم الشارة الزجاجي الفخم */
.portfolio-card__badge {
  position: static !important;
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.8rem;
  border-radius: 99px;
  /* التأثير الزجاجي (شبه شفاف مع ضبابية) */
  background: color-mix(in srgb, var(--color-surface) 70%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--color-text);
  border: 1px solid color-mix(in srgb, var(--color-border) 50%, transparent);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* شارة "جديد" للمشاريع الحديثة */
.portfolio-card__badge-new {
  position: absolute;
  top: 5px;
  right: 6px;
  z-index: 5;
  /* استخدام المتغير الذهبي المحفوظ */
  background: var(--color-gold);
  color: #ffffff; /* اللون الأبيض ممتاز مع الذهبي للوضوح */
  padding: 0.22rem 0.65rem;
  border-radius: 99px; /* شكل كبسولة (Pill) */
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  /* ظل خفيف يعطيها بروزاً لطيفاً */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* تأثير النبض الاختياري لشارة جديد */
.portfolio-card__badge-new {
  animation: pulse-new 2s infinite;
}

@keyframes pulse-new {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-gold) 80%, transparent); }
  70% { box-shadow: 0 0 0 6px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* --- Hero Layout Clean & Unified --- */
.hero__inner {
  display: grid;
  grid-template-columns: 1fr; /* إجبار العناصر على الظهور فوق بعضها في جميع الشاشات */
  gap: var(--space-6); /* تقليص المسافة الفاصلة بين محتوى النص والصورة */
  align-items: center;
  padding-block: calc(2.5rem + var(--space-16, 4rem)) var(--space-16, 4rem);
}


/* ==========================================================================
   Portfolio Next Navigation (النسخة الخالية من الدائرة - الموزونة للهواتف)
   ========================================================================== */
.portfolio-next-nav {
  position: relative; 
  display: flex;
  align-items: center;
  justify-content: space-between; 
  width: calc(100% - 2rem); /* يجبر المربع على ترك مساحة من الجوانب دائماً */
  max-width: 600px; /* تصغير العرض الأقصى لكي لا يبدو طويلاً وممطوطاً جداً */
  margin: 2rem auto 3.5rem auto;
  padding: 2.5rem 1.5rem; 
  
  background: transparent; 
  border-radius: 16px;
  text-decoration: none;
  transition: all 0.4s ease;
  cursor: pointer;
}

/* الزوايا المشطورة (باقية كما هي لجمالها) */
.portfolio-next-nav::before {
  content: ''; position: absolute; top: 4px; right: 4px;
  width: 50px; height: 50px;
  border-top: 2.5px solid var(--color-gold); border-right: 2.5px solid var(--color-gold);
  border-radius: 4px; border-top-right-radius: 16px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 85% 100%, 85% 15%, 0 15%);
  opacity: 0.6; transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1); pointer-events: none;
}

.portfolio-next-nav::after {
  content: ''; position: absolute; bottom: 4px; left: 4px;
  width: 50px; height: 50px;
  border-bottom: 2.5px solid var(--color-gold); border-left: 2.5px solid var(--color-gold);
  border-radius: 4px; border-bottom-left-radius: 16px;
  clip-path: polygon(0 0, 15% 0, 15% 85%, 100% 85%, 100% 100%, 0 100%);
  opacity: 0.6; transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1); pointer-events: none;
}

/* تنسيق النصوص  */
.next-nav-content {
  display: flex;
  flex-direction: column;
  align-items: center; 
  flex: 1; 
  /* موازنة وهمية لحجم السهم ليظل العنوان في المنتصف بالضبط */
  padding-right: 40px; 
}

/* الكلمة + الخط (إزاحة كبيرة لليمين) */
.next-label {
  align-self: flex-start; 
  margin-right: 5%; /* إزاحة أكبر نحو اليمين كما طلبت */
  margin-bottom: 0.5rem !important;
}

/* العنوان (تكبير الحجم) */
.next-title {
  font-size: 2.3rem; /* تم التكبير ليكون أبرز وأفخم */
  font-weight: 800;
  color: var(--color-text);
  margin: 0;
  transition: color 0.3s ease;
}

/* السهم (بدون دائرة)  */
.nav-arrow-only {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2.1rem;
  color: var(--color-primary); /* كحلي في الوضع الطبيعي */
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0; 
  z-index: 2; 
}

/* تكبير حجم السهم الافتراضي ليعوض غياب الدائرة */
.nav-arrow-only svg {
  width: 36px; 
  height: 36px;
  transition: transform 0.4s ease;
}

/* تأثيرات المرور (Hover Effects) */
.portfolio-next-nav:hover {
  background: var(--color-surface-2, #FAFAF8);
  transform: translateY(-3px); /* الرفع للأعلى بمقدار بسيط جداً ومريح */
  box-shadow: var(--shadow-sm); /* ظل ناعم يعطي إيحاء بأن البطاقة طفت فوق الصفحة */
}

.portfolio-next-nav:hover::before,
.portfolio-next-nav:hover::after {
  width: 65px;
  height: 65px;
  opacity: 0.95;
}

.portfolio-next-nav:hover .next-title {
  color: var(--color-primary);
}

/* السهم: يتحول للون الذهبي، يكبر، ويندفع لليسار */
.portfolio-next-nav:hover .nav-arrow-only {
  color: var(--color-gold);
  transform: scale(1.25) translateX(-4px); 
}

/* حاوية العنوان والأيقونة */
.next-title-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem; 
}

/* تنسيق الأيقونة المفرغة */
.next-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  transition: transform 0.4s ease; /* الانتقال مخصص للحركة فقط بدون الألوان */
}

/* ضمان أن تكون الأيقونة مفرغة تماماً ومتناسقة مع السهم */
.next-icon svg {
  width: 28px;
  height: 28px;
  fill: none !important; /* إلغاء أي تعبئة داخلية */
  stroke: currentColor !important; /* تأخذ لون الحاوية الحالي */
  stroke-width: 1.75; /* سماكة الخط المفرغ */
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* عند المرور بالماوس: تتلون الأيقونة بلون الكحلي مع العنوان وتتحرك بحفة */
.portfolio-next-nav:hover .next-icon {
  color: var(--color-primary); 
  transform: scale(1.15); 
}

/* تجاوب الموبايل (حواف وفراغات مثالية) */
@media (max-width: 768px) {
  .portfolio-next-nav {
    width: calc(100% - 2rem); /* فراغ آمن وممتاز من الجانبين في الهاتف */
    padding: 1.5rem 1rem;
  }
  
  .next-nav-content {
    padding-right: 32px; 
  }
  
  .next-label {
    margin-right: 10%; /* تقليل الإزاحة في شاشة الهاتف الضيقة */
  }
  
  .next-title {
    font-size: 1.45rem; /* تكبير نسبي في الهاتف أيضاً */
  }
  
  .nav-arrow-only svg {
    width: 28px;
    height: 28px;
  }
  
  .next-icon svg {
    width: 24px;
    height: 24px;
  }
}


/* ============================================================
   فاصل "الأنوار الخمسة" الحصري 
   ============================================================ */
.section-separator-khamsa {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1100px;
    margin: 1rem auto 0rem auto;
}

/* 1. الخطوط الرقيقة المتلاشية بالقرب من النقاط */
.section-separator-khamsa::before,
.section-separator-khamsa::after {
    content: '';
    flex: 1;
    height: 1px;
    opacity: 0.5;
}

/* الخط الأيمن/الأيسر: يبدأ بلون ظاهر من الخارج ويختفي عند الاقتراب من المنتصف */
.section-separator-khamsa::before {
    background: linear-gradient(90deg, var(--color-border) 0%, transparent 100%);
}

.section-separator-khamsa::after {
    background: linear-gradient(90deg, transparent 0%, var(--color-border) 100%);
}

/* 2. حاوية الأنوار الخمسة */
.khamsa-lights {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 1.5rem;
}

/* 3. تصميم النقاط (تم إزالة الوميض/box-shadow) */
.khamsa-lights span {
    width: 6px;
    height: 6px;
    background: var(--color-gold);
    border-radius: 50%;
}

/* 4. التدرج الهرمي للأحجام */
.khamsa-lights span:nth-child(1),
.khamsa-lights span:nth-child(5) {
    transform: scale(0.6);
    opacity: 0.4;
}

.khamsa-lights span:nth-child(2),
.khamsa-lights span:nth-child(4) {
    transform: scale(0.85);
    opacity: 0.7;
}

.khamsa-lights span:nth-child(3) {
    transform: scale(1.3);
    opacity: 1;
}

/* ============================================================
   قسم المزايا المشتركة - تعديل السماكة + لمسة اللون الذهبي
   ============================================================ */
.shared-features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8) var(--space-12);
    max-width: 1020px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .shared-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.shared-feature {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    padding: var(--space-2) 0 var(--space-2) 0;
    background: transparent;
    cursor: default;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

/* 1. الخط المنقط (1 بكسل، تنقيط دقيق، بدون مشاكل سماكة) */
.shared-feature::after {
    content: '';
    position: absolute;
    top: 100%;
    margin-top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%; 
    height: 0;
    border-bottom: 1px dashed var(--color-border, rgba(0, 0, 0, 0.15));
    z-index: 0;
}

/* 2. الخط المتحرك الممتد (هنا استخدمنا اللون الذهبي) */
.shared-feature::before {
    content: '';
    position: absolute;
    top: 100%;
    margin-top: 10px;
    right: 0; 
    width: 0%;
    height: 1.75px;
    background: var(--color-gold, #D4AF37); /* لون الخط ذهبي */
    transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 1;
}

/* إخفاء الخط المنقط عن العناصر الأخيرة */
@media (min-width: 768px) {
    .shared-features-grid .shared-feature:nth-last-child(-n+2)::after {
        display: none !important;
    }
}
@media (max-width: 767px) {
    .shared-features-grid .shared-feature:last-child::after {
        display: none !important;
    }
}

/* فترات الانتظار */
.shared-feature:nth-child(1) { transition-delay: 0.1s; }
.shared-feature:nth-child(2) { transition-delay: 0.4s; }
.shared-feature:nth-child(3) { transition-delay: 0.7s; }
.shared-feature:nth-child(4) { transition-delay: 1.0s; }
.shared-feature:nth-child(5) { transition-delay: 1.3s; }
.shared-feature:nth-child(6) { transition-delay: 1.6s; }
.shared-feature:nth-child(7) { transition-delay: 1.9s; }
.shared-feature:nth-child(8) { transition-delay: 2.2s; }
.shared-feature:nth-child(9) { transition-delay: 2.5s; }
.shared-feature:nth-child(10) { transition-delay: 2.8s; }

/* حالة الظهور */
.shared-features-grid.is-visible .shared-feature {
    opacity: 1;
    transform: translateY(0);
}

/* التفاعل (Hover) */
.shared-features-grid.is-visible .shared-feature:hover::before {
    width: 95%;
}

/* تنسيق الشعار (لون أساسي أزرق دائم) */
.shared-feature__icon {
    flex-shrink: 0;
    width: 2.1rem;
    height: 2.1rem;
    color: var(--color-primary); /* اللون الأساسي للموقع */
    margin-top: 0.15rem;
    transition: transform 0.4s ease;
}

.shared-feature:hover .shared-feature__icon {
    transform: scale(1.15); /* تكبير فقط */
}

/* حاوية النصوص والتفاعل (إزاحة لليمين) */
.shared-feature > div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.3s ease;
}

.shared-feature:hover > div {
    transform: translateX(6px);
}

/* تنسيق النصوص (تبقى بلون النص الطبيعي) */
.shared-feature__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.3rem;
    line-height: 1.2;
    transition: color 0.3s ease;
}

/* العنوان يتلون باللون الأساسي الأزرق عند التمرير وليس الذهبي */
.shared-feature:hover .shared-feature__title {
    color: var(--color-primary); 
}

.shared-feature__desc {
    font-size: 0.92rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin: 0;
}

/* ----------- ABOUT ------------ */
/* --- إعدادات قسم المقدمة (يمين ويسار) --- */
.about-phase-one {
    padding: var(--space-12, 4rem) 0;
}

.about-hero-split {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8, 2rem);
    align-items: center;
    margin-bottom: var(--space-12, 4rem);
}

@media (min-width: 992px) {
    .about-hero-split {
        grid-template-columns: 1.1fr 0.9fr; /* نسبة توزيع النص والصورة */
    }
}

.about-hero-text {
    text-align: right;
}

/* تنسيق كلمة "قصتنا" والخط الذهبي بجانبها */
.section-subtitle-wrapper {
    margin-bottom: var(--space-3, 0.75rem);
}

.section-subtitle {
    display: inline-flex;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-accent, #d4af37); /* اللون الذهبي */
}

/* الخط الذهبي بجانب الكلمة */
.section-subtitle::before {
    content: "";
    display: inline-block;
    width: 30px;
    height: 2px;
    background-color: var(--color-accent, #d4af37);
    margin-left: 10px;
}

.about-hero-text .section-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    color: var(--color-primary, #01696f);
    margin-bottom: var(--space-5, 1.25rem);
    font-weight: 800;
}

.about-hero-text .section-desc p {
    font-size: 1.05rem;
    color: var(--color-text-muted, #475569);
    line-height: 1.8;
    margin-bottom: var(--space-4, 1rem);
}

.about-hero-text .section-desc strong {
    color: var(--color-primary, #01696f);
}

.about-hero-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-xl, 16px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* --- إعدادات الإحصاءات المبسطة --- */
.about-simple-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6, 1.5rem);
}

@media (min-width: 768px) {
    .about-simple-stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

.simple-stat-card {
    background: #ffffff;
    padding: var(--space-6, 1.5rem);
    border-radius: var(--radius-lg, 12px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.simple-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    border-color: rgba(212, 175, 55, 0.3);
}

.stat-value-group {
    color: var(--color-primary, #01696f);
    margin-bottom: var(--space-2, 0.5rem);
}

.stat-num {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.stat-suffix {
    font-size: 1.75rem;
    font-weight: 700;
}

.stat-text-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-word {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--color-heading, #1a1a1a);
}

.stat-title {
    font-size: 0.95rem;
    color: var(--color-text-muted, #64748b);
    font-weight: 500;
}


/* ----------------- ABOUT ------------------ */
.about-intro {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
	align-items: end;
}

/* على الشاشات الأكبر (من 768px فصاعداً): النص في جانب والصورة في الجانب الآخر */
@media (min-width: 768px) {
    .about-intro {
        grid-template-columns: 1.2fr 1fr; 
        align-items: center;
        gap: 3rem;
    }

    /* شبكة الإحصاءات تمتد على عرض الشاشة بالكامل في الأسفل */
    .about-intro__stats {
        grid-column: 1 / -1; 
    }
}

.about-intro__image {
    width: 100%;
    position: relative;
    padding: 15px;
	align-self: end;
	margin-bottom: -2rem;
}

/* الخط الذهبي العلوي: زوايا دائرية مع أطراف منتهية بشكل مائل (مشطور) */
.about-intro__image::before {
    content: '';
    position: absolute;
    top: 4px;
    right: 3px;
    width: 50px;
    height: 50px;
    border-top: 2.5px solid var(--color-gold);
    border-right: 2.5px solid var(--color-gold);
    border-radius: 4px;
    border-top-right-radius: 16px;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 85% 100%, 85% 15%, 0 15%);
    opacity: 0.65;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* الخط الذهبي السفلي: زوايا دائرية مع أطراف منتهية بشكل مائل (مشطور) */
.about-intro__image::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 3px;
    width: 50px;
    height: 50px;
    border-bottom: 2.5px solid var(--color-gold);
    border-left: 2.5px solid var(--color-gold);
	border-radius: 4px;
    border-bottom-left-radius: 16px;
    clip-path: polygon(0 0, 15% 0, 15% 85%, 100% 85%, 100% 100%, 0 100%);
    opacity: 0.65;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* تنسيق الصورة مع التكبير الواضح الذي أفضيلته */
.about-intro__image img {
    width: 100%;
    border-radius: var(--radius-xl, 16px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
    display: block;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* التفاعل عند المرور */
.about-intro__image:hover::before {
    width: 65px;
    height: 65px;
    opacity: 0.95;
}

.about-intro__image:hover::after {
    width: 65px;
    height: 65px;
    opacity: 0.95;
}

.about-intro__image:hover img {
    transform: scale(1.025);
}

/* إخفاء الصورة الغامقة افتراضياً وإظهار الفاتحة */
.about-intro__image .img-dark {
    display: none;
}
.about-intro__image .img-light {
    display: block;
}

/* عند تفعيل الوضع الليلي في الموقع، يتم التبديل تلقائياً */
[data-theme="dark"] .about-intro__image .img-light {
    display: none;
}
[data-theme="dark"] .about-intro__image .img-dark {
    display: block;
}

/* شبكة الإحصاءات الفاخرة */
.about-intro__stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* عمودين للموبايل */
    gap: 2.5rem 1rem;
    margin-top: var(--space-10, 2.5rem);
}

/* 2. عندما يتم تدوير الهاتف أو التابلت إلى الوضع الأفقي (Landscape)، أو على الشاشات الأكبر: 4 أعمدة */
@media (orientation: landscape) and (max-width: 1024px), (min-width: 768px) {
/* @media (min-width: 768px) { */
    .about-intro__stats {
        grid-template-columns: repeat(4, 1fr); 
        gap: var(--space-6, 1.5rem);
    }
}

.about-intro__text {
    margin-bottom: -2rem;
}

.about-intro__text h2 {
    margin-bottom: var(--space-3);
	text-wrap: wrap; /* لجعل العنوان يتمدد ولا ينكسر للسطر الثاني بحسب التنسيق الأساسي */
}

.about-intro__text p {
    margin-bottom: var(--space-3);
    text-align: justify;
    text-align-last: right;
	/* max-width: 100%; لجعل النص يتمدد على كل الصفحة بخلاف التنسيق الأساسي*/
}

/* تصميم بطاقة الإحصاء */
.about-stat {
    background-color: var(--stat-card-bg);
    padding: 2rem 0.5rem 2.3rem 0.5rem;
    border-radius: var(--radius-xl, 16px);
    text-align: center;
    border: 1px solid var(--stat-card-border); /* الإطار الرصاصي */
    box-shadow: 0 10px 30px var(--stat-card-shadow), inset 0 -4px 0 transparent; /* الخط السفلي الشفاف */
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: visible;
}

.about-stat:hover {
    transform: translateY(-6px);
    border-color: var(--color-gold); /* عودة الإطار الذهبي */
	background-color: var(--color-surface);
    /* عودة الخط الذهبي السفلي الأنيق مع انحناء البطاقة */
    box-shadow: 0 15px 35px var(--stat-card-shadow-hover), inset 0 -4px 0 var(--color-gold);
}

.about-stat__category {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--color-primary);
    color: #ffffff;
    font-size: 0.925rem; 
    font-weight: 650;
    padding: 4px 16px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    z-index: 2;
}

.about-stat__num {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1.2;
    margin-bottom: var(--space-2, 0.5rem);
    font-variant-numeric: tabular-nums;
}

.about-stat__label {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    font-weight: 600;
}

/* تجربة عرض بمربعات تتحرك على اليمين واليسار عند التصفح من الهاتف
.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6, 1.5rem);
    margin-top: var(--space-8, 2rem);
}

.value-card {
    background: #ffffff;
    padding: var(--space-8, 2rem);
    border-radius: var(--radius-xl, 16px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02), inset 0 -4px 0 transparent;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.value-card:hover {
    transform: translateY(-6px);
    border-color: var(--color-gold);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.06), inset 0 -4px 0 var(--color-gold);
}

@media (max-width: 767px) {
    .values-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 1rem;
        padding-bottom: 1rem;
        scrollbar-width: none; 
    }
    .values-grid::-webkit-scrollbar {
        display: none;
    }
    .value-card {
        min-width: 280px;
        scroll-snap-align: center;
    }
}
*/

/* ============================================================
                   ما يميزنا - صفحة من نحن
   ============================================================ */
/* 1. الإعداد الافتراضي (للهواتف في وضع الطول Portrait): عمود واحد */
.advantages-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
    /* max-width: 1100px; */
    margin: 0 auto;
}

/* 2. عندما يُحمل الهاتف بالعرض (Landscape): يصبحان عمودين (2 أعمدة) */
@media (orientation: landscape) and (max-width: 1024px) {
    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-6) var(--space-4);
    }
}

/* 3. على التابلت والكمبيوتر والشاشات الأكبر: 3 أعمدة */
@media (min-width: 768px) {
    .advantages-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-10) var(--space-8);
    }
}

.advantage-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-4);
    padding: var(--space-8) var(--space-6);
    background-color: transparent; 
    border-radius: 16px;
    box-shadow: 8px 8px 15px color-mix(in srgb, var(--color-border) 20%, transparent);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* الخط العلوي (بسماكة 5) */
.advantage-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0%;
    height: 4px;
    background: var(--color-primary); 
    transition: width 0.5s cubic-bezier(0.25, 1, 0.5, 1);  /* حركة تمدد الخط */
}

/* تأخير متتالي لدخول المربعات */
.advantage-card:nth-child(1) { transition-delay: 0.1s; }
.advantage-card:nth-child(2) { transition-delay: 0.3s; }
.advantage-card:nth-child(3) { transition-delay: 0.5s; }
.advantage-card:nth-child(4) { transition-delay: 0.7s; }
.advantage-card:nth-child(5) { transition-delay: 0.9s; }
.advantage-card:nth-child(6) { transition-delay: 1.1s; }

/* حالة الظهور */
.advantages-grid.is-visible .advantage-card {
    opacity: 1;
    transform: translateY(0);
}

/* تفاعل الماوس (Hover) */
.advantages-grid.is-visible .advantage-card:hover {
    transform: translateY(-12px); 
    /* إعطاء لون خلفية خفيف جداً يعتمد على متغيرات قالبك (مثل لون الحدود) */
    background-color: color-mix(in srgb, var(--color-border) 20%, transparent);
    /* تعميق الظل قليلاً لليمين والأسفل فقط ليتناسب مع الارتفاع الجديد */
    box-shadow: 12px 12px 20px color-mix(in srgb, var(--color-border) 40%, transparent);
	/* سرعة استجابة الماوس السريعة تكون هنا فقط */
    transition: transform 0.4s ease-out, box-shadow 0.4s ease-out, background-color 0.4s ease-out;
}

/* تمدد الخط العلوي عند التمرير */
.advantages-grid.is-visible .advantage-card:hover::before {
    width: 100%;
}

/* تنسيق الرمز (الأيقونة) */
.advantage-card__icon {
    flex-shrink: 0;
    width: 3.2rem;
    height: 3.2rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    /* حركة الأيقونة أصبحت أبطأ لتتناسق مع حركة المربع */
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); 
}

/* تكبير الرمز ورفعه للأعلى برفق */
.advantage-card:hover .advantage-card__icon {
    transform: scale(1.15) translateY(-3px);
}

/* تنسيق النصوص */
.advantage-card__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.advantage-card__desc {
    font-size: 1rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin: 0;
	/* text-align: justify; */
}


/* ============================================================
   قسم اتصل بنا (Contact Section) - التخطيط الموحد
   ============================================================ */

/* 1. التخطيط الأساسي للحاوية */
.contact-layout {
    display: flex;
    flex-direction: column;
}

/* 2. الحاوية العلوية (النص الترحيبي) */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-6, 2rem);
    margin-bottom: var(--space-6, 2rem);
}

.contact-info__text {
    text-align: right;
}

.contact-info__text h2 {
    margin-bottom: var(--space-3);
	text-wrap: wrap; /* لجعل العنوان يتمدد ولا ينكسر للسطر الثاني بحسب التنسيق الأساسي */
}

.contact-info__text p {
    margin-bottom: var(--space-3);
    text-align: justify;
    text-align-last: right;
	/* max-width: 100%; لجعل النص يتمدد على كل الصفحة بخلاف التنسيق الأساسي*/
}

/* 3. حاوية بطاقات التواصل (واحدة يمين وواحدة يسار) */
.contact-info__items {
    display: grid;
    grid-template-columns: 1fr; /* عمود واحد على الجوال */
    gap: 0.6rem;
    width: 100%;
}

/* توحيد نقطة الكسر إلى 768px لجميع الشاشات من التابلت فما فوق */
@media (min-width: 768px) {
    .contact-info__items {
        /* قم بإلغاء أو حذف grid-template-columns: 1fr 1fr; */
        display: flex;
        flex-direction: column; /* لضمان نزول الواتساب تحت البريد */
		margin-top: 3.0rem;
    }
	
    .contact-info {
        display: grid;
        /* إعطاء مساحة أكبر للنص (مثلاً 1.5fr) ومساحة للبطاقات (1fr) */
        grid-template-columns: 2fr 1fr; 
		align-items: flex-start; /* غيّر center إلى flex-start لتبدأ من الأعلى */
    }
}

/* 4. تصميم بطاقة التواصل من الداخل */
.contact-info__item {
    display: flex;
    align-items: center;
    gap: var(--space-4, 1.25rem);
    padding: var(--space-3, 1.25rem) var(--space-5, 1.5rem);
    border: 1px solid var(--color-border); 
    border-radius: var(--radius-lg, 16px);
    background: transparent;
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
	justify-content: center;
}

.contact-info__item:hover {
    border-color: var(--color-gold);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.03);
}

.contact-info__icon {
    flex-shrink: 0;
    color: var(--color-primary);
    transition: color 0.3s ease, transform 0.3s ease;
}

.contact-info__item:hover .contact-info__icon {
    color: var(--color-gold);
    transform: scale(1.1);
}

/* ترتيب النصوص داخل البطاقة (الكلمة ثم القيمة تحتها مباشرة) */
.contact-info__item > div {
    display: flex;
    flex-direction: row; /* هذا سيجعل الكلمة والرابط في سطر واحد */
    align-items: center; /* لمحاذاتهم على نفس الخط الأفقي */
    flex-wrap: wrap; /* في حال ضاقت الشاشة قليلاً ينزل الرابط بسلاسة */
    gap: 0.5rem; /* مسافة بسيطة بين الكلمة والرابط */
}

.contact-info__label {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin: 0;
}

.contact-info__item a {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info__item a:hover {
    color: var(--color-gold);
}


/* ══════════════════════════════════════
   FORMS
══════════════════════════════════════ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-size: 0.95rem;
  font-weight: 700; /* جعل الخط أعرض */
  color: var(--color-primary, #0F4C75); /* تلوينها بلون الموقع الأساسي بدلاً من الرمادي */
  margin-bottom: 0.1rem;
}

/* 1. التنسيق الأساسي والمعدل لحقول الإدخال والقوائم المنسدلة */
.form-input,
.form-select,
.form-textarea {
  width: 100%; /* إجبار الحقل على أخذ المساحة كاملة */
  padding: 0.55rem 1rem; /* الفراغ الداخلي المعدل */
  border: 1px solid var(--color-border, #cbd5e1); /* إعادة لون الحدود الفاتح الأنيق */
  border-radius: var(--radius-sm, 6px); /* إعادة الحواف شبه الدائرية */
  background: var(--color-surface, #ffffff);
  color: var(--color-text, #333333);
  font-size: 0.95rem; /* حجم الخط المعدل */
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box; /* إجبار المتصفح على حساب الحدود داخل الارتفاع الكلي */
  height: 48px; /* توحيد الارتفاع الكلي لخانة النص والقائمة المنسدلة */
}

/* الإبقاء على مساحة مريحة لحقل الرسالة (Textarea) */
.form-textarea {
  padding: 0.75rem 1rem;
  resize: vertical; 
  min-height: 8rem;
  height: auto;
}

/* 2. إصلاح السهم وتنسيق القائمة المنسدلة للغة العربية (RTL) */
.form-select {
  appearance: none; /* إزالة السهم الافتراضي المشوه للمتصفح */
  -webkit-appearance: none;
  -moz-appearance: none;
  
  /* رسم سهم أنيق مخصص بلون موقعك الكحلي (#0F4C75) */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%230F4C75' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  
  /* ضبط مكان السهم: على اليسار، مع إبعاده عن الحافة بمقدار 1rem */
  background-position: left 1rem center; 
  background-size: 1.1rem;
  
  /* ترك مساحة إضافية من اليسار كي لا يتداخل النص المكتوب مع السهم */
  padding-left: 2.5rem !important; 
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-primary, #0F4C75);
  box-shadow: 0 0 0 3px rgba(15, 76, 117, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder { 
  color: var(--color-text-faint, #94a3b8); 
}

.form-textarea { resize: vertical; min-height: 8rem; }

.form-error {
  font-size: var(--text-xs);
  color: var(--color-error);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

/* ============================================================
   حاوية الفورم والشارة (Badge)
   ============================================================ */
.contact-form-wrap {
    position: relative; 
    max-width: 900px; 
    /* التعديل الجوهري هنا: إضافة margin-top: 3.5rem لدفع الفورم للأسفل وإبعاده عن فاصل النجوم */
    margin: 3.5rem auto 0 auto;
    width: 100%;
    background: transparent;
    padding: var(--space-8, 2.5rem);
    padding-top: var(--space-14, 3.5rem); 
    border-radius: var(--radius-xl, 16px);
    border: 1px solid var(--color-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02), inset 0 -4px 0 var(--color-gold);
}

/* تقليل الفراغات الجانبية لحاوية الفورم على شاشات الهواتف فقط */
@media (max-width: 767px) {
  .contact-form-wrap {
    padding: 2.5rem 1rem 1.5rem 1rem; /* تقليل الفراغ الجانبي إلى 1rem ليعطي مساحة للكتابة */
  }
}

.contact-form-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%); 
    background: var(--color-primary); 
    color: var(--color-bg); 
    padding: 0.5rem 1.75rem;
    border-radius: 50px; 
    font-weight: 700;
    font-size: 1.05rem;
    white-space: nowrap;
    z-index: 2;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-6, 1.5rem);
}

.form-row {
  display: flex;
  flex-direction: column; /* الافتراضي للجوال: الحقول تحت بعضها */
  gap: var(--space-4, 1.25rem); /* المسافة بين الحقول */
}

@media (min-width: 768px) {
  .form-row {
    flex-direction: row; /* على الكمبيوتر: الحقول بجانب بعضها */
  }
  
  .form-row > .form-group {
    flex: 1; /* إجبار الحقلين على أخذ مساحة متساوية 50% لكل منهما */
  }
}

/* ============================================================
   تنسيق خيارات الخدمات (أزرار الاختيار المتعدد)
   ============================================================ */
/* 1. تلوين النجمة الإلزامية باللون الأحمر */
.required {
  color: #ef4444; /* أحمر واضح */
  font-weight: bold;
}

.checkbox-group-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); /* أزرار متساوية العرض */
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.checkbox-item {
  cursor: pointer;
  display: inline-block;
  margin: 0; /* مسح أي هوامش افتراضية */
}

/* إخفاء مربع الاختيار الافتراضي مع الحفاظ عليه قابلاً للإرسال برمجياً */
.checkbox-item input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}

/* تنسيق شكل الزر الموحد */
.checkbox-item span {
  width: 100%; /* لكي يملأ الزر مساحته في الشبكة */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.5rem;
  border: 1.5px solid var(--color-border, #cbd5e1);
  border-radius: var(--radius-sm, 6px); /* تم تعديل الانحناء ليطابق حقول الإدخال */
  font-size: var(--text-sm, 0.95rem);
  font-weight: 600;
  color: var(--color-text-muted, #64748b);
  background: var(--color-surface, #ffffff);
  transition: all 0.25s ease;
  user-select: none;
}

/* تأثير المرور بالماوس (Hover) */
.checkbox-item:hover span {
  border-color: var(--color-gold, #eab308);
  color: var(--color-text, #333333);
}

/* تنسيق الزر عند النقر واختياره (Checked) */
.checkbox-item input[type="checkbox"]:checked + span {
  background: var(--color-primary, #0F4C75);
  border-color: var(--color-primary, #0F4C75);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(15, 76, 117, 0.25); /* ظل خفيف لإبراز الزر */
}

/* 2. تصغير الأزرار على شاشات الكمبيوتر لكي تتسع 6 في سطر واحد */
@media (min-width: 768px) {
  .checkbox-group-wrapper {
    /* نقسم المساحة لـ 6 أعمدة متساوية تماماً */
    grid-template-columns: repeat(6, 1fr); 
    gap: 0.5rem; /* تقليل الفراغ بين الأزرار قليلاً */
  }
  
.checkbox-item span {
    padding: 0.6rem 0.25rem; 
    font-size: 0.95rem; /* تكبير الخط ليكون أوضح وأقرب لحجم نصوص الحقول */
    font-weight: 700; /* جعل الخط أعرض (Bold) لتعزيز بروز الهوية */
  }
}

/* 3. سحر علامة الصح (✓) المخفية والتي تظهر بانسيابية عند التحديد */
.checkbox-item span::before {
  content: '✓';
  font-weight: 800;
  display: inline-block;
  max-width: 0; /* نخفيها بتصغير عرضها للصفر */
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: all 0.3s ease; /* حركة انسيابية ناعمة */
}

/* عند النقر واختيار الخدمة، تظهر العلامة */
.checkbox-item input[type="checkbox"]:checked + span::before {
  max-width: 15px; /* نفتح المساحة للعلامة */
  opacity: 1;
  margin-left: 5px; /* إزاحة خفيفة بين الصح والكلمة */
}

/* ============================================================
   فواصل الأقسام الأنيقة (العناوين المتوسطة)
   ============================================================ */
.form-section-title {
  display: flex;
  align-items: center;
  justify-content: center; /* توسيط المحتوى بالكامل */
  gap: 1rem; /* مسافة متساوية وأنيقة بين النص والخطوط من الجانبين */
  font-size: 0.85rem; 
  font-weight: 700;
  color: var(--color-text-faint, #94a3b8); 
  margin: 1.0rem 0 0.5rem 0; /* مساحة تنفس ممتازة حول الفاصل */
}

/* رسم خط متقطع يمين ويسار الكلمة */
.form-section-title::before,
.form-section-title::after {
  content: '';
  flex: 1; /* إجبار الخطوط على التمدد لملء الفراغ المتبقي بالتساوي */
  border-top: 1px dashed var(--color-border, #cbd5e1); 
  opacity: 0.6;
}

/* إزالة المسافة العلوية لأول عنوان لأنه في بداية الفورم */
.contact-form > .form-section-title:first-child {
  margin-top: 0;
}

/* ==========================================
   تنسيقات أرشيف الأعمال (النسخة النهائية المعتمدة)
   ========================================== */

/* 1. ضبط الشبكة (2 هاتف، 3 تابلت، 4 كمبيوتر) */
.portfolio-grid--archive {
  display: grid;
  gap: 1.25rem; 
  grid-template-columns: repeat(2, 1fr); 
}

@media (min-width: 576px) {
  .portfolio-grid--archive { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 992px) {
  .portfolio-grid--archive { grid-template-columns: repeat(4, 1fr); }
}

/* تقليل الفراغات بين صور الأرشيف في شاشات الموبايل الضيقة */
@media (max-width: 576px) {
  .portfolio-grid--archive {
    /* 1.25rem للتباعد العمودي (فوق وتحت)، و 0.6rem للتباعد الأفقي (يمين ويسار) */
    gap: 1.25rem 0.6rem; /* فراغ أنيق لا يهدر المساحة ولا يلصق الصور */
  }
}

/* 2. تصغير النصوص وإخفاء الوصف */
.portfolio-grid--archive .portfolio-card {
  border-radius: 12px;
}

.portfolio-grid--archive .portfolio-card__body {
  padding: 0.5rem 0.3rem 0.6rem 0.2rem; /* حشوة أقل للبطاقات الصغيرة */
  gap: 0.25rem;
}

.portfolio-grid--archive .portfolio-card__title {
  font-size: 0.85rem; /* خط أصغر وأكثر أناقة */
  margin: 0;
  text-align: center;
}

.portfolio-grid--archive .portfolio-card__url {
  font-size: 0.7rem; /* تصغير الرابط أيضاً */
}

/* إخفاء الوصف تماماً في الأرشيف لتقليل الزحمة */
.portfolio-grid--archive .portfolio-card__desc {
  display: none; 
}

/* 3. نقل الشارات (Badges) للأسفل وتصغيرها */
.portfolio-grid--archive .portfolio-card__badges {
  top: auto !important; /* إلغاء التموضع العلوي */
  bottom: 8px !important; /* نقلها لأسفل الصورة */
  right: 8px !important;
  gap: 4px;
}

/* 4. إخفاء التظليل الخاص بزر (زيارة الموقع) في الأرشيف */
.portfolio-grid--archive .portfolio-card__overlay {
  display: none !important;
}

/* تقليل الفراغات بين صور الأرشيف في شاشات الموبايل الضيقة */
@media (max-width: 576px) {
  .portfolio-grid--archive .portfolio-card__body {
	padding: 0.3rem 0.15rem 0.4rem 0.15rem;
  }
  
  /* تصغير الخطوط أكثر في الموبايل لتناسب الصورتين المتجاورتين */
  .portfolio-grid--archive .portfolio-card__title {
    font-size: 0.75rem;
  }
  .portfolio-grid--archive .portfolio-card__url {
    font-size: 0.55rem;
  }
  
  .portfolio-grid--archive .portfolio-card__badges {
    top: auto !important; /* إلغاء التموضع العلوي */
    bottom: 4px !important; /* نقلها لأسفل الصورة */
    right: auto !important; /* إلغاء التموضع اليميني تماماً */
    left: 4px !important;
    gap: 2px;
  }
  
  .portfolio-grid--archive .portfolio-card__badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
  }
}
/* 
ملاحظة: 
لم نضف أي أكواد Hover خاصة هنا، 
وبالتالي سيأخذ قسم الأرشيف نفس التفاعل الموحد والأنيق لباقي الموقع 
(رفع خفيف للأعلى مع ظل، بدون زووم مزعج للصورة).
*/


/* ==========================================
   تنسيقات قسم تطبيقات الهاتف (Mobile Apps)
   ========================================== */

/* 1. ضبط الشبكة: صورة واحدة للهاتف بالطول */
.portfolio-grid--app {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr; 
}

/* الشاشات المتوسطة والكبيرة (الهاتف بالعرض، التابلت، والكمبيوتر): صورتين */
@media (min-width: 576px) {
  .portfolio-grid--app {
    grid-template-columns: repeat(2, 1fr);
	gap: 1.75rem;
  }
}

/* 2. ضبط نسبة أبعاد الصورة (العرض ضعف الطول 2:1) */
.portfolio-grid--app .portfolio-card__media {
  aspect-ratio: 2 / 1;
}

/* 3. إخفاء شارة "تطبيق" كلياً لمنع التداخل البصري مع شعارات المتاجر 
.portfolio-grid--app .portfolio-card__badges {
  display: none !important;
} */

/* 4. تفعيل رابط الصورة: نخفي اللون والزر الأبيض، ونترك الرابط الخفي يعمل */
.portfolio-grid--app .portfolio-card__overlay {
  background: none !important; /* إخفاء اللون الكحلي/التدرج */
  backdrop-filter: none !important; /* إخفاء التغبيش */
  /* تمت إزالة display: none لكي يبقى الرابط الخفي بداخلها فعالاً */
}

/* إخفاء زر "زيارة الموقع" الأبيض من قسم التطبيقات */
.portfolio-grid--app .portfolio-card__action-btn {
  display: none !important;
}

/* الكلاس الذي ينقل الشارة إلى اليمين لتطبيقات الأندرويد */
.portfolio-card__badges.badges--right {
  left: auto !important; /* إلغاء التموضع اليساري */
  right: 12px !important; /* نقلها لليمين */
  flex-direction: row !important; /* ترتيب العناصر من اليمين لليسار */
}

/* ضبط التموضع في شاشات الموبايل لتطبيقات الأندرويد */
@media (max-width: 576px) {
  .portfolio-card__badges.badges--right {
    right: 4px !important;
    left: auto !important;
  }
}

/* ==========================================
   حركة وتنسيق قسم الشركاء (Seamless Marquee)
   ========================================== */

.section--partners {
  padding-top: var(--space-10, 2.5rem);
  padding-bottom: var(--space-10, 2.5rem);
  overflow: hidden;
  position: relative;
}

/* الحاوية الرئيسية للشريط */
.partners-marquee-wrapper {
  display: flex;
  overflow: hidden;
  user-select: none;
  gap: 1rem;
  width: 100%;
  position: relative;
  margin-top: 0.5rem;
  padding: 0.5rem 0 3rem 0;
  /* تلاشي الحواف أفقياً */
  -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
  mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

/* المسار المتحرك (Flex Track) */
.partners-marquee-track {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 1rem;
  min-width: 100%;
  animation: partnersScroll 45s linear infinite;
  /* التعديلات الجوهرية لحل مشكلة الدوران (Landscape): */
  min-width: 100%;
  width: max-content; /* هذا السطر يجبر المتصفح على حساب العرض بناءً على الشعارات وليس الشاشة */
  flex-wrap: nowrap;  /* يمنع الشعارات من السقوط لسطر جديد عند تدوير الشاشة */
  will-change: transform;
}

/* إيقاف الحركة عند تحريك الماوس فوق أي شعار */
.partners-marquee-wrapper:hover .partners-marquee-track {
  animation-play-state: paused;
}

/* عنصر الشعار */
.partner-logo-item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  height: 70px;
  position: relative; /* ضروري لضبط موقع الـ Tooltip */
  text-decoration: none;
  /* أزلنا الخلفية والإطار ليكون التصميم أنظف */
  background: transparent;
  border: none; 
}

.partner-tooltip {
  position: absolute;
  bottom: -37px; /* يظهر أسفل الشعار */
  background: var(--color-surface, #1e293b);
  color: var(--color-gold, #c5a059);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  white-space: nowrap;
  pointer-events: none; /* يمنع التلميح من إعاقة حركة الماوس */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(197, 160, 89, 0.2);
  z-index: 10;
}

.partner-logo-item:hover .partner-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* صورة الشعار */
.partner-logo-img {
  max-height: 55px; /* تم زيادة الحجم قليلاً لملء الفراغ بشكل أفضل */
  max-width: 140px;
  object-fit: contain;
  filter: grayscale(100%) opacity(0.5);
  transition: filter 0.4s ease, transform 0.4s ease;
}

.partner-logo-item:hover .partner-logo-img {
  filter: grayscale(0%) opacity(1);
  transform: scale(1.2);
}

.partner-logo-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary, #94a3b8);
  white-space: nowrap;
}

.partner-logo-item:hover .partner-logo-text {
  color: var(--color-gold, #c5a059);
}

/* حركة التحريك الدائرية المستمرة 100% دون قفز أو فراغات */
@keyframes partnersScroll {
  from {
    transform: translateX(calc(-100% - 2rem));
  }
  to {
    transform: translateX(0);
  }
}

/* التجاوب مع الهواتف الذكية */
@media (max-width: 768px) {
  .partners-marquee-wrapper {
    gap: 0.5rem;
    margin-top: 0rem;
    padding: 0rem 0 3rem 0;
  }

  .partners-marquee-track {
    gap: 0.75rem;
    animation-duration: 35s;
  }

  .partner-logo-item {
    height: 60px;
    padding: 0.4rem 0.8rem;
  }

  .partner-logo-img {
    max-height: 45px;
    max-width: 120px;
    filter: grayscale(0%) opacity(1); /* إظهار الألوان الطبيعية دائماً على الهواتف وإلغاء اللون الرمادي */
  }
  
/* 3: إظهار الألوان الطبيعية دائماً على الهواتف (في الوضعين الفاتح والداكن) */
  .partner-logo-img,
  [data-theme="dark"] .partner-logo-img,
  .dark-mode .partner-logo-img { /* أضفت محددات الدارك مود لضمان القوة */
    filter: grayscale(0%) brightness(100%) opacity(1) !important;
  }
}

/* 5: تخصيص الوضع الداكن (بافتراض استخدامك لكلاس مثل .dark-mode أو [data-theme="dark"]) */
[data-theme="dark"] .partner-logo-item {
  background: #ECEAE3; /* لون أبيض صلب */
  border-radius: 16px; /* أو 50px إذا أردتها دائرية تماماً كالكبسولة */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4); /* ظل خارجي داكن لفصلها عن الخلفية */
}

[data-theme="dark"] .partner-logo-item:hover .partner-logo-img {
  /* عودة الألوان الطبيعية عند التمرير في الوضع الداكن */
  filter: grayscale(0%) brightness(100%) opacity(1);
}

.grecaptcha-badge {
    bottom: 80px !important; /* اضبط الارتفاع حسب حجم وزر العودة للأعلى لديك */
    z-index: 999;
}