/* ---------- ROOT & BASE ---------- */
:root {
  --primary: #0066ff;
  --accent: #ff9f00;
  --bg-dark: #0a0f1b;
  --bg-alt: #0f1623;
  --text-dark: #f3f4f6;
  --text-muted: #9ca3af;
  --glass-dark: rgba(10, 15, 27, 0.85);
  --card-bg-dark: #151b2b;
  --card-border-dark: #2d3748;
  --card-shadow-dark: 0 10px 30px rgba(0, 0, 0, 0.2);
  --radius: 16px;
  --transition: 0.4s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-dark);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

html[lang="ar"] body {
  font-family: 'Cairo', sans-serif;
}

/* ---------- CANVAS ---------- */
#solutions-particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.6;
}

/* ---------- HEADER ---------- */
.glass-header-global {
  position: fixed;
  top: 0;
  width: 100%;
  height: 90px;
  z-index: 1000;
  background: var(--glass-dark);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.container {
  width: 90%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
}

.main-logo {
  height: 70px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  transition: var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* ---------- LANGUAGE SWITCHER ---------- */
.lang-dropdown {
  position: relative;
}

.lang-btn-globe {
  background: transparent;
  border: 1px solid var(--text-muted);
  color: var(--text-dark);
  padding: 8px 16px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.lang-btn-globe:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.lang-menu {
  position: absolute;
  top: 110%;
  right: 0;
  background: var(--card-bg-dark);
  border: 1px solid var(--card-border-dark);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow-dark);
  list-style: none;
  padding: 8px 0;
  min-width: 160px;
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
}

.lang-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-menu li {
  padding: 10px 18px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-dark);
}

.lang-menu li:hover {
  background: rgba(0, 102, 255, 0.08);
  color: var(--primary);
}

/* ---------- HERO ---------- */
.hero-solutions-global {
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-cgi-overlay {
  position: absolute;
  inset: 0;
  background: url('../images/solutions-hero.jpg') center/cover no-repeat;
  filter: brightness(0.4) contrast(1.2);
  z-index: 1;
}

.hero-content-global {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 0 20px;
}

.hero-content-global h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  margin-bottom: 15px;
}

.hero-content-global p {
  font-size: 1.3rem;
  color: #e5e7eb;
}

/* ---------- SECTIONS ---------- */
.section-padding-global {
  padding: 100px 0;
}

.bg-alt-global {
  background: var(--bg-alt);
}

.section-header-global {
  text-align: center;
  margin-bottom: 70px;
}

.section-header-global h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--text-dark);
}

.section-header-global p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto;
}

/* ---------- SOLUTION DETAIL ROWS ---------- */
.solution-detail-global {
  background: var(--bg-dark);
}

.solution-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.solution-row.row-reverse {
  direction: rtl;
}
.solution-row.row-reverse .solution-content {
  direction: ltr;
}

.solution-image img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow-dark);
}

.solution-content h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-dark);
}

.solution-content p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.solution-content ul {
  list-style: disc inside;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ---------- CLIENTS SCROLLER ---------- */
/* ---------- CLIENTS SCROLLER ---------- */
.clients-scroller-global {
  background: var(--bg-alt);
  overflow: hidden;
  white-space: nowrap;
}

.scroller-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden; /* يخفي الزيادات يمين ويسار الشاشة */
}

.scroller-track {
  display: flex;
  width: max-content; /* ✅ أهم سطر: يجبر الشريط يتفرد */
  gap: 60px;
  align-items: center;
  animation: scrollLeft 60s linear infinite; /* جرب 60 ثانية */
}

/* إضافة حماية في حال الماوس وقف فوقهم (اختياري) */
.scroller-track:hover {
  animation-play-state: paused; /* يوقف الشريط لما الماوس ييجي عليه */
}

.scroller-item {
  flex: 0 0 auto; /* ✅ يمنع انكماش الصور */
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroller-item img {
  max-height: 50px;
  max-width: 120px;
  filter: grayscale(100%) opacity(0.7);
  transition: var(--transition);
}

.scroller-item img:hover {
  filter: grayscale(0%) opacity(1);
  transform: scale(1.05);
}

@keyframes scrollLeft {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%); /* يحرك الشريط لنصف المسافة (بما أننا كررناهم) */
  }
}
/* ---------- FINAL CTA ---------- */
.final-cta-global {
  text-align: center;
  background: var(--bg-dark);
  padding: 100px 0;
}

.final-cta-global h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--text-dark);
}

.final-cta-global p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 30px;
}

.btn-primary-global {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 16px 40px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(0, 102, 255, 0.4);
  display: inline-block;
  text-decoration: none;
}

.btn-primary-global:hover {
  transform: translateY(-3px);
  background: #004cc9;
  box-shadow: 0 6px 25px rgba(0, 102, 255, 0.6);
}

/* ---------- FOOTER ---------- */
.mega-footer-global {
  background: #0a0f1b;
  color: #cbd5e1;
  padding: 80px 0 0;
  border-top: 1px solid #222;
}

.footer-top-global {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  padding-bottom: 60px;
}

.footer-logo-global {
  height: 35px;
  margin-bottom: 20px;
  filter: brightness(0) invert(1);
}

.footer-links-col-global a {
  color: #cbd5e1;
  text-decoration: none;
  transition: 0.3s;
}

.footer-links-col-global a:hover {
  color: var(--primary);
  padding-left: 5px;
}

.footer-bottom-global {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 25px 0;
  text-align: center;
  font-size: 0.9rem;
  color: #666;
}

/* ---------- WHATSAPP FLOAT ---------- */
.wa-float-global {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 40px;
  right: 40px;
  background-color: #25D366;
  color: #fff;
  border-radius: 50%;
  font-size: 30px;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  z-index: 1001;
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.wa-float-global.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.wa-float-global:hover {
  background-color: #128C7E;
  transform: scale(1.1) translateY(-5px);
  box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
}

/* ---------- ANIMATIONS ---------- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 992px) {
  .solution-row {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .footer-top-global {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .hero-content-global h1 {
    font-size: 2.5rem;
  }
  .footer-top-global {
    grid-template-columns: 1fr;
  }
  .wa-float-global {
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
    font-size: 24px;
  }
}
/* =========================================
   MOBILE NAVIGATION (World-Class Standard)
   ========================================= */

/* 1. إخفاء زر القائمة في الشاشات الكبيرة */
.menu-toggle {
  display: none;
  font-size: 1.8rem;
  color: var(--text-dark);
  cursor: pointer;
  z-index: 1002; /* أعلى من القائمة نفسها */
  margin-right: 20px;
  transition: var(--transition);
}

.menu-toggle:hover {
  color: var(--primary);
}

/* 2. تنسيقات الموبايل (أقل من 768px) */
@media (max-width: 768px) {
  /* إظهار الزر */
  .menu-toggle {
    display: block;
    order: 2; /* ترتيبه يمين اللوجو وقبل اللغة */
  }

  /* ترتيب الحاوية العلوية */
  .nav-wrapper {
    position: relative;
    justify-content: space-between;
  }

  /* زر اللغة يذهب لليمين */
  .lang-dropdown {
    order: 3;
  }

  /* تصميم القائمة المنسدلة (Full Screen Overlay) */
  .nav-links {
    position: fixed;
    top: 0;
    left: -100%; /* مخفية خارج الشاشة */
    width: 100%;
    height: 100vh; /* ارتفاع الشاشة بالكامل */
    background: rgba(10, 15, 27, 0.98); /* خلفية داكنة جداً */
    backdrop-filter: blur(15px); /* تأثير الزجاج الضبابي الاحترافي */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    transition: 0.5s cubic-bezier(0.77, 0, 0.175, 1); /* حركة ناعمة جداً */
    z-index: 1001; /* فوق كل شيء */
    padding: 0;
    margin: 0;
  }

  /* حالة الفتح (Active) */
  .nav-links.active {
    left: 0;
  }

  /* تنسيق الروابط داخل القائمة */
  .nav-links a {
    font-size: 1.5rem; /* خط كبير وواضح للمس */
    font-weight: 700;
    opacity: 0;
    transform: translateY(20px); /* تأثير ظهور تدريجي */
    transition: 0.5s ease 0.2s; /* تأخير بسيط للجمالية */
  }

  /* أنيميشن ظهور الروابط عند الفتح */
  .nav-links.active a {
    opacity: 1;
    transform: translateY(0);
  }
}