/* الخطوط - نستخدم خطوط جوجل للغة العربية Cairo وللإنجليزية Inter يتم استدعاؤها من الـ HTML مباشرة لسرعة التحميل */

:root {
  --primary: #0284c7;        /* أزرق اللوجو السماوي */
  --primary-glow: rgba(2, 132, 199, 0.1);
  --secondary: #0f172a;      /* كحلي داكن فخم للوضع النهاري */
  --accent: #38bdf8;         /* أزرق فاتح مكمل */
  --transition-speed: 0.3s;
  --radius-premium: 1.75rem; /* زوايا منحنية فخمة 28px */
}

/* تكييف الخطوط بناءً على اتجاه ولغة الصفحة */
html[lang="ar"] {
  font-family: 'Cairo', sans-serif;
}
html[lang="en"] {
  font-family: 'Inter', sans-serif;
}

html, body {
  width: 100%;
  overflow-x: hidden; /* لمنع أي سكرول عرضي نهائياً */
}

body {
  background-color: #f3f8fc; /* خلفية ناعمة جداً بلون السماء تظهر البطاقات وتطابق اللوجو */
  transition: background-color var(--transition-speed) ease, 
              color var(--transition-speed) ease;
}

/* الخلفيات المضيئة الهلامية (Glowing Ambient Blobs) */
.glowing-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  opacity: 0.3;
  pointer-events: none;
  animation: floatBlob 16s infinite alternate ease-in-out;
}

@keyframes floatBlob {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(40px, -40px) scale(1.15);
  }
  100% {
    transform: translate(-30px, 30px) scale(0.9);
  }
}

/* تأثير Glassmorphism الفخم للهيدر والبطاقات */
.glass-header {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(2, 132, 199, 0.08);
  transition: all var(--transition-speed) ease;
}

.dark .glass-header {
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.glass-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(2, 132, 199, 0.12);
  box-shadow: 0 20px 40px -15px rgba(2, 132, 199, 0.12),
              0 1px 3px rgba(2, 132, 199, 0.04);
  transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
}

.dark .glass-card {
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 0 20px 45px -15px rgba(0, 0, 0, 0.4);
}

/* بطاقات الموديولات التفاعلية */
.module-card {
  border-radius: var(--radius-premium);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.module-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.04), transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-speed) ease;
  pointer-events: none;
}

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

.module-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -10px rgba(2, 132, 199, 0.1),
              0 0 0 1px rgba(2, 132, 199, 0.08);
}

.dark .module-card:hover {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
              0 0 0 1px rgba(56, 189, 248, 0.12);
}

/* أيقونة الشمس الذهبية وأيقونة القمر الفضية مع التوهج */
#themeIcon.fa-sun {
  color: #fbbf24; /* لون ذهبي دافئ للشمس */
  filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.6));
}

#themeIcon.fa-moon {
  color: #38bdf8; /* لون أزرق فضي للقمر */
  filter: drop-shadow(0 0 4px rgba(56, 189, 248, 0.6));
}

/* أزرار الاتصال العائمة والواتساب مع الحركة التناوبية */
.floating-actions {
  position: fixed;
  bottom: 25px;
  right: 25px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1000;
}

html[dir="rtl"] .floating-actions {
  right: auto;
  left: 25px;
}

.float-btn {
  color: white;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.15);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.float-btn::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid transparent;
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.3s ease;
}

.float-btn:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}

.float-btn:hover::before {
  opacity: 1;
  transform: scale(1);
}

.whatsapp-btn {
  background: linear-gradient(135deg, #25d366, #128c7e);
}
.whatsapp-btn::before {
  border-color: #25d366;
}

.phone-btn {
  background: linear-gradient(135deg, #0284c7, #0369a1);
}
.phone-btn::before {
  border-color: #0284c7;
}

/* حركة نبض مركزي متزامن للأيقونات الداخلية بدون حركة رأسية */
.whatsapp-btn i {
  display: inline-block;
  animation: pulse-icon-center 2s infinite ease-in-out;
}

.phone-btn i {
  display: inline-block;
  animation: pulse-icon-center 2s infinite ease-in-out;
}

@keyframes pulse-icon-center {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.18);
  }
}

/* تأثير التمرير السلس والتجاوب */
.hover-lift {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
              box-shadow 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.hover-lift:hover {
  transform: translateY(-5px);
}

/* مخصص لتصميم الانحناءات الفخمة */
.rounded-premium {
  border-radius: var(--radius-premium);
}

/* تنسيق شريط التمرير */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #ffffff;
}
.dark ::-webkit-scrollbar-track {
  background: #0f172a;
}
::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 4px;
}
.dark ::-webkit-scrollbar-thumb {
  background: #334155;
}
::-webkit-scrollbar-thumb:hover {
  background: #cbd5e1;
}
.dark ::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* الهامبرغر للهواتف */
.menu-btn-bar {
  display: block;
  width: 22px;
  height: 2px;
  background-color: currentColor;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-open .menu-btn-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.menu-open .menu-btn-bar:nth-child(2) {
  opacity: 0;
}
.menu-open .menu-btn-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* تأثيرات ظهور الموديولات تدريجياً مع تضخيم نابض (Scroll Reveal Pop & Grow) */
.scroll-reveal {
  opacity: 0;
  transform: scale(0.92) translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.34, 1.56, 0.64, 1),
              transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform, opacity;
}

.scroll-reveal.active {
  opacity: 1;
  transform: scale(1) translateY(0);
}
