/* =============================================
   CSS Design System - Advanced Version
   ============================================= */

/* =============================================
   Import Modern Arabic Fonts
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&family=Tajawal:wght@300;400;500;700;800&family=Almarai:wght@300;400;700;800&display=swap');

/* =============================================
   متغيرات CSS متطورة
   ============================================= */
:root {
  /* نظام الألوان المحسن - نفس الألوان الأصلية لكن مع تحسينات */
  --primary: #1e3a5f;
  --primary-dark: #152a45;
  --primary-light: #2d5a8a;
  --primary-gradient: linear-gradient(135deg, #1e3a5f 0%, #2d5a8a 100%);
  --primary-gradient-hover: linear-gradient(135deg, #2d5a8a 0%, #3a6ea5 100%);
  
  --secondary: #c41e3a;
  --secondary-dark: #a01830;
  --secondary-gradient: linear-gradient(135deg, #c41e3a 0%, #d63050 100%);
  
  --accent: #d4af37;
  --accent-light: #e8c860;
  --accent-gradient: linear-gradient(135deg, #d4af37 0%, #e8c860 100%);
  
  /* نظام رمادي محسن */
  --white: #ffffff;
  --gray-50: #fafcff;
  --gray-100: #f2f7ff;
  --gray-200: #e8effd;
  --gray-300: #d4e0f7;
  --gray-400: #a0b4d6;
  --gray-500: #6c7c9c;
  --gray-600: #4a5568;
  --gray-700: #2d3748;
  --gray-800: #1a202c;
  --gray-900: #0f141e;
  
  /* ألوان الحالة مع تدرجات */
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --error: #ef4444;
  --error-light: #fee2e2;
  --info: #3b82f6;
  --info-light: #dbeafe;
  
  /* الظلال المتقدمة */
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.12);
  --shadow-hard: 0 20px 40px rgba(0, 0, 0, 0.16);
  --shadow-elegant: 0 10px 40px rgba(30, 58, 95, 0.15);
  --shadow-accent: 0 10px 30px rgba(212, 175, 55, 0.2);
  
  /* الظلال الداخلية */
  --inner-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
  --inner-shadow-light: inset 0 1px 4px rgba(255, 255, 255, 0.1);
  
  /* حدود متدرجة */
  --border-gradient: linear-gradient(135deg, var(--primary), var(--accent));
  
  /* نظام الزوايا المحسن */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-2xl: 40px;
  --radius-full: 9999px;
  
  /* نظام الانتقالات المتقدم */
  --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --transition-fast: all 0.2s ease;
  --transition-slow: all 0.6s ease;
  
  /* نظام الخطوط المتطور */
  --font-heading: 'Almarai', 'Tajawal', sans-serif;
  --font-body: 'IBM Plex Sans Arabic', 'Tajawal', sans-serif;
  --font-accent: 'Tajawal', sans-serif;
  
  /* التباعد المحسن */
  --spacing-unit: 0.25rem;
  --space-2: calc(2 * var(--spacing-unit));
  --space-4: calc(4 * var(--spacing-unit));
  --space-6: calc(6 * var(--spacing-unit));
  --space-8: calc(8 * var(--spacing-unit));
  --space-12: calc(12 * var(--spacing-unit));
  --space-16: calc(16 * var(--spacing-unit));
  --space-20: calc(20 * var(--spacing-unit));
  --space-24: calc(24 * var(--spacing-unit));
  
  /* تأثيرات الزجاج (Glassmorphism) */
  --glass-bg: rgba(255, 255, 255, 0.9);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  --glass-backdrop: blur(12px) saturate(180%);
  
  /* تأثيرات النيون */
  --neon-primary: 0 0 15px rgba(30, 58, 95, 0.4);
  --neon-accent: 0 0 20px rgba(212, 175, 55, 0.3);
}

/* =============================================
   إعادة التعيين المتقدم
   ============================================= */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
  color: var(--gray-800);
  line-height: 1.7;
  direction: rtl;
  overflow-x: hidden;
  min-height: 100vh;
}

::selection {
  background: rgba(30, 58, 95, 0.2);
  color: var(--primary);
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--primary), var(--primary-light));
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(var(--primary-light), var(--primary));
}

/* =============================================
   نظام التايبوغرافي المتقدم
   ============================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: var(--space-6);
  color: var(--gray-900);
  letter-spacing: -0.02em;
}

h1 {
  font-size: 3.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 40%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: 2.5rem;
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  right: 0;
  width: 60%;
  height: 4px;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
}

h3 {
  font-size: 1.875rem;
}

h4 {
  font-size: 1.5rem;
}

p {
  font-size: 1.125rem;
  margin-bottom: var(--space-6);
  color: var(--gray-600);
}

.lead {
  font-size: 1.25rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--gray-700);
}

/* =============================================
   النظام اللوحي المتقدم
   ============================================= */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  width: 100%;
}

.container-fluid {
  max-width: 100%;
  padding: 0 var(--space-8);
}

/* =============================================
   نظام الأزرار المتطور
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-8);
  font-family: var(--font-accent);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  letter-spacing: 0.02em;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: var(--transition-smooth);
  z-index: 1;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--primary-gradient);
  color: var(--white);
  box-shadow: var(--shadow-elegant);
  border: 2px solid transparent;
}

.btn-primary:hover {
  background: var(--primary-gradient-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hard);
}

.btn-secondary {
  background: var(--secondary-gradient);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(196, 30, 58, 0.2);
}

.btn-secondary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(196, 30, 58, 0.3);
}

.btn-accent {
  background: var(--accent-gradient);
  color: var(--gray-900);
  font-weight: 700;
  box-shadow: var(--shadow-accent);
}

.btn-accent:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 15px 35px rgba(212, 175, 55, 0.3);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  position: relative;
  overflow: hidden;
}

.btn-outline::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 100%;
  background: var(--primary-gradient);
  transition: var(--transition-smooth);
  z-index: -1;
}

.btn-outline:hover {
  color: var(--white);
  border-color: transparent;
}

.btn-outline:hover::before {
  width: 100%;
}

.btn-glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
  color: var(--primary);
  box-shadow: var(--glass-shadow);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-2px);
}

.btn-icon {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-lg {
  padding: var(--space-6) var(--space-12);
  font-size: 1.125rem;
  border-radius: var(--radius-xl);
}

.btn-group {
  display: inline-flex;
  gap: var(--space-4);
  align-items: center;
}

/* =============================================
   الهيدر المتطور مع Glassmorphism
   ============================================= */
.header {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-soft);
  transition: var(--transition-smooth);
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-medium);
  padding: 0.5rem 0;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) 0;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.logo:hover {
  transform: translateY(-2px);
}

.logo-icon {
  width: 64px;
  height: 64px;
  background: var(--primary-gradient);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 28px;
  box-shadow: var(--shadow-elegant);
  position: relative;
  overflow: hidden;
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.logo-icon::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
  transform: rotate(45deg);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-name {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.logo-desc {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 400;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  list-style: none;
}

.nav-links > li > a {
  font-family: var(--font-accent);
  font-weight: 600;
  color: var(--goold700);
  padding: var(--space-2) var(--space-4);
  position: relative;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  border-radius: var(--radius-md);
}

.nav-links > li > a:hover {
  color: var(--primary);
  background: var(--gray-100);
}

.nav-links > li > a.active {
  color: var(--primary);
  background: var(--gray-100);
}

.nav-links > li > a::before {
  content: '';
  position: absolute;
  bottom: -4px;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  transition: var(--transition-smooth);
}

.nav-links > li > a:hover::before,
.nav-links > li > a.active::before {
  width: 100%;
}

/* القائمة المنسدلة المتطورة */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 240px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hard);
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: var(--transition-smooth);
  padding: var(--space-4) 0;
  z-index: 1001;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -8px;
  right: 20px;
  width: 16px;
  height: 16px;
  background: var(--glass-bg);
  border-top: 1px solid var(--glass-border);
  border-left: 1px solid var(--glass-border);
  transform: rotate(45deg);
}

.dropdown-menu li a {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6);
  color: var(--gray-700);
  transition: var(--transition-fast);
  margin: 0 var(--space-2);
  border-radius: var(--radius-md);
}

.dropdown-menu li a:hover {
  background: var(--gray-100);
  color: var(--primary);
  transform: translateX(-5px);
}

.dropdown-menu li a i {
  width: 20px;
  color: var(--primary);
  transition: var(--transition-fast);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--gray-100);
  color: var(--gray-700);
  cursor: pointer;
  transition: var(--transition-smooth);
  align-items: center;
  justify-content: center;
}

.mobile-menu-btn:hover {
  background: var(--gray-200);
  transform: rotate(90deg);
}

.mobile-menu-btn i {
  font-size: 24px;
}

/* =============================================
   قسم البطل المتطور
   ============================================= */
.hero {
  position: relative;
  padding: 120px 0 100px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(212, 175, 55, 0.1) 0%, transparent 50%);
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(45deg, transparent 48%, rgba(255,255,255,0.05) 50%, transparent 52%),
    linear-gradient(-45deg, transparent 48%, rgba(255,255,255,0.05) 50%, transparent 52%);
  background-size: 60px 60px;
  animation: patternMove 20s linear infinite;
}

@keyframes patternMove {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 60px 60px;
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--white);
  max-width: 900px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-size: 14px;
  margin-bottom: var(--space-8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.hero h1 {
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: var(--space-6);
  line-height: 1.1;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero h1 .highlight {
  color: var(--accent);
  position: relative;
  display: inline-block;
}

.hero h1 .highlight::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 100%;
  height: 8px;
  background: rgba(212, 175, 55, 0.3);
  z-index: -1;
  border-radius: var(--radius-full);
}

.hero p {
  font-size: 1.25rem;
  opacity: 0.95;
  margin-bottom: var(--space-8);
  line-height: 1.8;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  margin-bottom: var(--space-12);
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-12);
  padding-top: var(--space-8);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  position: relative;
  padding: 0 var(--space-6);
}

.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: var(--space-2);
  font-family: var(--font-heading);
  text-shadow: var(--neon-accent);
}

.stat-label {
  font-size: 14px;
  opacity: 0.9;
  letter-spacing: 0.05em;
}

/* =============================================
   قسم الخدمات المتطور
   ============================================= */
.services-section {
  padding: 100px 0;
  background: var(--white);
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-header h2 {
  font-size: 3rem;
  margin-bottom: var(--space-4);
}

.section-header p {
  font-size: 1.125rem;
  color: var(--gray-500);
  max-width: 600px;
  margin: 0 auto;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
}

.service-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, transparent 30%, rgba(30, 58, 95, 0.03) 100%);
  z-index: 0;
}

.service-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 4px;
  background: var(--primary);
  transform: translateX(100%);
  transition: var(--transition-smooth);
}

.service-card:hover::after {
  transform: translateX(0);
}

.service-card.passports::after {
  background: var(--primary-gradient);
}
.service-card.civil-affairs::after {
  background: var(--secondary-gradient);
}
.service-card.traffic::after {
  background: linear-gradient(135deg, var(--success), #34d399);
}
.service-card.courts::after {
  background: var(--accent-gradient);
}

.service-card h3 {
  font-size: 1.9rem; /* larger title for better readability */
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: var(--space-4);
  position: relative;
  z-index: 1;
  line-height: 1.05;
}
.service-card > p {
  font-size: 1.125rem; /* ~18px */
  color: var(--gray-700);
  margin-bottom: var(--space-6);
  line-height: 1.6;
  position: relative;
  z-index: 1;
  flex-grow: 1;
}

.service-card:hover .service-icon {
  transform: scale(1.1) rotate(5deg);
}

.service-card.passports .service-icon {
  background: rgba(30, 58, 95, 0.1);
  color: var(--primary);
  box-shadow: 0 8px 20px rgba(30, 58, 95, 0.15);
}

.service-card.civil-affairs .service-icon {
  background: rgba(196, 30, 58, 0.1);
  color: var(--secondary);
  box-shadow: 0 8px 20px rgba(196, 30, 58, 0.15);
}

.service-card.traffic .service-icon {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.15);
}

.service-card.courts .service-icon {
  background: rgba(212, 175, 55, 0.1);
  color: var(--accent);
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.15);
}

/* older duplicated heading/paragraph rules removed in favor of larger sizes above */

.service-list {
  margin-bottom: var(--space-6);
  position: relative;
  z-index: 1;
}

.service-list li {
  font-size: 1.125rem; /* ~18px for list items */
  color: var(--gray-700);
  padding: var(--space-2) 0;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  transition: var(--transition-fast);
}

.service-list li:hover {
  color: var(--primary);
  transform: translateX(5px);
}

.service-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
  display: inline-block;
}

.service-arrow {
  position: absolute;
  bottom: var(--space-8);
  left: var(--space-8);
  width: 44px;
  height: 44px;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  transition: var(--transition-smooth);
  z-index: 1;
}

.service-card:hover .service-arrow {
  background: var(--primary);
  color: var(--white);
  transform: rotate(-45deg);
}

/* =============================================
   قسم التتبع المتطور
   ============================================= */
.track-section {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
  position: relative;
  overflow: hidden;
}

.track-section::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(30, 58, 95, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.track-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.track-card {
  background: var(--primary-gradient);
  border-radius: var(--radius-2xl);
  padding: var(--space-12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12);
  color: var(--white);
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-hard);
  overflow: hidden;
}

.track-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,0 L100,0 L100,100 Z' fill='rgba(255,255,255,0.05)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

.track-content {
  flex: 1;
  position: relative;
  z-index: 1;
}

.track-content h2 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  color: var(--white);
}

.track-content h2::after {
  background: var(--accent-gradient);
}

.track-content p {
  opacity: 0.95;
  margin-bottom: var(--space-8);
  font-size: 1.125rem;
  line-height: 1.8;
}

.track-form {
  display: flex;
  gap: var(--space-4);
  max-width: 500px;
  position: relative;
}

.track-form input {
  flex: 1;
  padding: var(--space-5) var(--space-6);
  border: none;
  border-radius: var(--radius-lg);
  font-size: 1rem;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.95);
  color: var(--gray-900);
  box-shadow: var(--inner-shadow);
  transition: var(--transition-smooth);
}

.track-form input:focus {
  outline: none;
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.5);
  transform: translateY(-2px);
}

.track-form input::placeholder {
  color: var(--gray-500);
}

.track-illustration {
  font-size: 140px;
  opacity: 0.2;
  animation: pulse 2s ease-in-out infinite;
}

/* =============================================
   قسم المميزات المتطور
   ============================================= */
.features-section {
  padding: 100px 0;
  background: var(--white);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  text-align: center;
  transition: var(--transition-smooth);
  border: 1px solid var(--gray-200);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, transparent 40%, rgba(30, 58, 95, 0.02) 100%);
}

.feature-card:hover {
  background: var(--white);
  box-shadow: var(--shadow-hard);
  transform: translateY(-8px);
  border-color: transparent;
}

.feature-icon {
  width: 80px;
  height: 80px;
  background: var(--primary-gradient);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--white);
  margin: 0 auto var(--space-6);
  position: relative;
  z-index: 1;
  transition: var(--transition-bounce);
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotateY(180deg);
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: var(--space-4);
  position: relative;
  z-index: 1;
}

.feature-card p {
  font-size: 15px;
  color: var(--gray-600);
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

/* =============================================
   قسم الإحصائيات المتطور
   ============================================= */
.stats-section {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  text-align: center;
  box-shadow: var(--shadow-medium);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, transparent 30%, rgba(30, 58, 95, 0.05) 100%);
}

.stat-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-hard);
  border-color: var(--primary);
}

.stat-card i {
  font-size: 48px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-6);
  position: relative;
  z-index: 1;
  transition: var(--transition-smooth);
}

.stat-card:hover i {
  transform: scale(1.2);
}

.stat-card .stat-number {
  display: block;
  font-size: 3rem;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-2);
  font-family: var(--font-heading);
  position: relative;
  z-index: 1;
}

.stat-card .stat-label {
  font-size: 15px;
  color: var(--gray-600);
  position: relative;
  z-index: 1;
}

/* =============================================
   الفوتر المتطور
   ============================================= */
.footer {
  background: linear-gradient(135deg, var(--gray-900) 0%, #0a0e17 100%);
  color: var(--gray-300);
  padding: 80px 0 0;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--space-12);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.footer-logo i {
  font-size: 40px;
  color: var(--accent);
  filter: drop-shadow(var(--neon-accent));
}

.footer-logo span {
  font-size: 2rem;
  font-weight: 800;
  color: var(--white);
  font-family: var(--font-heading);
}

.footer-section p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--gray-400);
}

.footer-section h4 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: var(--space-6);
  position: relative;
  padding-bottom: var(--space-3);
}

.footer-section h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 40px;
  height: 3px;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
}

.footer-section ul li {
  margin-bottom: var(--space-4);
}

.footer-section ul li a {
  color: var(--gray-400);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.footer-section ul li a:hover {
  color: var(--accent);
  transform: translateX(-5px);
}

.contact-info li {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.contact-info li i {
  color: var(--accent);
  font-size: 18px;
  width: 24px;
}

.social-links {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.social-links a {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  transition: var(--transition-smooth);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
  background: var(--accent);
  color: var(--gray-900);
  transform: translateY(-3px);
  border-color: transparent;
  box-shadow: var(--shadow-accent);
}

.footer-bottom {
  padding: var(--space-8) 0;
  text-align: center;
  font-size: 14px;
  color: var(--gray-500);
  position: relative;
  z-index: 1;
}

.footer-bottom a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-bottom a:hover {
  color: var(--accent-light);
  text-decoration: underline;
}

/* =============================================
   شات بوت متطور
   ============================================= */
.chatbot-container {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 9999;
}

.chatbot-container {
  /* make it obvious the widget can be dragged */
  cursor: grab;
}

.chatbot-container.dragging {
  cursor: grabbing;
}

.chatbot-toggle {
  width: 64px;
  height: 64px;
  background: var(--primary-gradient);
  border: none;
  border-radius: var(--radius-full);
  color: var(--white);
  font-size: 26px;
  cursor: pointer;
  box-shadow: var(--shadow-hard);
  transition: var(--transition-bounce);
  position: relative;
  overflow: hidden;
}

.chatbot-toggle::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: translateX(-100%);
  transition: var(--transition-smooth);
}

.chatbot-toggle:hover {
  transform: scale(1.15) rotate(15deg);
  box-shadow: var(--shadow-elegant);
}

.chatbot-toggle:hover::before {
  transform: translateX(100%);
}

.chatbot-window {
  position: absolute;
  bottom: 90px;
  left: 0;
  width: 400px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-hard);
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.chatbot-window.active {
  display: flex;
}

.chatbot-header {
  background: var(--primary-gradient);
  color: var(--white);
  padding: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  position: relative;
  overflow: hidden;
}

.chatbot-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
}

.chatbot-avatar {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  position: relative;
  z-index: 1;
}

.chatbot-info {
  flex: 1;
  position: relative;
  z-index: 1;
}

.chatbot-info h4 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: var(--space-1);
}

.online-status {
  font-size: 13px;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.online-status::before {
  content: '';
  width: 10px;
  height: 10px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 10px #10b981;
}

.chatbot-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  color: var(--white);
  font-size: 18px;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
  z-index: 1;
}

.chatbot-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.chatbot-messages {
  flex: 1;
  padding: var(--space-6);
  max-height: 350px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  background: rgba(255, 255, 255, 0.5);
}

.message {
  max-width: 85%;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bot-message {
  align-self: flex-start;
}

.user-message {
  align-self: flex-end;
}

.message-content {
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-lg);
  font-size: 15px;
  line-height: 1.6;
  position: relative;
  box-shadow: var(--shadow-soft);
}

.bot-message .message-content {
  background: var(--white);
  color: var(--gray-800);
  border-bottom-right-radius: 4px;
  border: 1px solid var(--gray-200);
}

.user-message .message-content {
  background: var(--primary-gradient);
  color: var(--white);
  border-bottom-left-radius: 4px;
}

.chatbot-suggestions {
  padding: var(--space-4) var(--space-6);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  border-top: 1px solid var(--gray-200);
  background: var(--white);
}

.suggestion-btn {
  padding: var(--space-2) var(--space-4);
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-full);
  font-size: 13px;
  color: var(--gray-600);
  cursor: pointer;
  transition: var(--transition-fast);
  font-family: inherit;
}

.suggestion-btn:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.chatbot-input {
  display: flex;
  padding: var(--space-4);
  border-top: 1px solid var(--gray-200);
  gap: var(--space-4);
  background: var(--white);
}

.chatbot-input input {
  flex: 1;
  padding: var(--space-4) var(--space-6);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-full);
  font-size: 15px;
  font-family: inherit;
  transition: var(--transition-smooth);
}

.chatbot-input input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.chatbot-input button {
  width: 48px;
  height: 48px;
  background: var(--primary-gradient);
  border: none;
  border-radius: var(--radius-full);
  color: var(--white);
  cursor: pointer;
  transition: var(--transition-smooth);
  font-size: 20px;
}

.chatbot-input button:hover {
  background: var(--primary-gradient-hover);
  transform: scale(1.1);
}

/* =============================================
   التنبيهات المتطورة
   ============================================= */
.alerts-container {
  position: fixed;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  width: 100%;
  max-width: 500px;
  padding: 0 var(--space-6);
}

.alert {
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  box-shadow: var(--shadow-hard);
  animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  backdrop-filter: blur(10px);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.alert-success {
  background: linear-gradient(135deg, var(--success-light) 0%, #e6fcf5 100%);
  color: #065f46;
  border-color: #6ee7b7;
}

.alert-error {
  background: linear-gradient(135deg, var(--error-light) 0%, #fee2e2 100%);
  color: #991b1b;
  border-color: #fca5a5;
}

.alert-info {
  background: linear-gradient(135deg, var(--info-light) 0%, #dbeafe 100%);
  color: #1e40af;
  border-color: #93c5fd;
}

.alert-close {
  margin-right: auto;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.7;
  transition: var(--transition-fast);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.alert-close:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.1);
}

/* =============================================
   النماذج المتطورة
   ============================================= */
.form-group {
  margin-bottom: var(--space-6);
}

.form-group label {
  display: block;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: var(--space-2);
  font-size: 15px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: var(--space-4) var(--space-6);
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-lg);
  font-size: 16px;
  font-family: inherit;
  transition: var(--transition-smooth);
  background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(30, 58, 95, 0.15);
  transform: translateY(-2px);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

/* =============================================
   استجابة الشاشات المتقدمة
   ============================================= */
@media (max-width: 1200px) {
  .hero h1 {
    font-size: 3.5rem;
  }
  
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .features-grid,
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
  }
}

@media (max-width: 992px) {
  h1 {
    font-size: 3rem;
  }
  
  h2 {
    font-size: 2.25rem;
  }
  
  .hero {
    padding: 80px 0 60px;
  }
  
  .hero h1 {
    font-size: 3rem;
  }
  
  .hero-stats {
    gap: var(--space-8);
  }
  
  .track-card {
    flex-direction: column;
    text-align: center;
    gap: var(--space-8);
  }
  
  .track-illustration {
    font-size: 100px;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  /* Prevent horizontal layout breakage on phones */
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  main {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  main img,
  main video,
  main canvas,
  main svg,
  main iframe {
    max-width: 100%;
    height: auto;
  }

  .nav-links,
  .nav-actions .btn:not(.mobile-menu-btn) {
    display: none;
  }
  
  .mobile-menu-btn {
    display: flex;
  }

  .nav-links.active {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    background: #ffffff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-medium);
    padding: var(--space-4);
    z-index: 1100;
  }

  .nav-actions.active {
    position: absolute;
    top: calc(100% + 220px);
    right: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    background: #ffffff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-medium);
    padding: var(--space-4);
    z-index: 1100;
  }

  .nav-actions.active .btn {
    display: inline-flex !important;
    width: 100%;
    justify-content: center;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-4);
  }
  
  .hero-stats {
    gap: var(--space-6);
  }
  
  .stat-item:not(:last-child)::after {
    display: none;
  }
  
  .services-grid,
  .features-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .track-form {
    flex-direction: column;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .chatbot-window {
    width: calc(100vw - 60px);
    left: auto;
    right: 0;
    max-height: 72vh;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
  
  .container {
    padding: 0 var(--space-4);
  }
  
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  .hero {
    padding: 60px 0 40px;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .section-header h2 {
    font-size: 2rem;
  }
  
  .track-card {
    padding: var(--space-8);
  }
  
  .service-card,
  .feature-card,
  .stat-card {
    padding: var(--space-6);
  }
}

/* =============================================
   تأثيرات إضافية
   ============================================= */
.particle {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  pointer-events: none;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.progress-bar {
  height: 6px;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.tooltip {
  position: absolute;
  background: var(--gray-900);
  color: var(--white);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: 13px;
  white-space: nowrap;
  z-index: 1000;
  opacity: 0;
  transform: translateY(10px);
  transition: var(--transition-smooth);
  pointer-events: none;
}

.tooltip::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 6px 6px 6px;
  border-style: solid;
  border-color: transparent transparent var(--gray-900) transparent;
}

.has-tooltip:hover .tooltip {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================
   وضع الظلام (Dark Mode)
   ============================================= */
/* @media (prefers-color-scheme: dark) {
  :root {
    --white: #0f141e;
    --gray-50: #1a202c;
    --gray-100: #2d3748;
    --gray-200: #4a5568;
    --gray-300: #718096;
    --gray-400: #a0aec0;
    --gray-500: #cbd5e0;
    --gray-600: #e2e8f0;
    --gray-700: #edf2f7;
    --gray-800: #f7fafc;
    --gray-900: #ffffff;
    
    --glass-bg: rgba(26, 32, 44, 0.9);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.4);
    --shadow-hard: 0 20px 40px rgba(0, 0, 0, 0.5);
    --shadow-elegant: 0 10px 40px rgba(0, 0, 0, 0.6);
  }
  
  body {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
  }
  
  .service-card,
  .feature-card,
  .stat-card {
    background: var(--gray-100);
    border-color: var(--gray-200);
  }
  
  .btn-glass {
    background: rgba(255, 255, 255, 0.1);
    color: var(--gray-300);
  }
  
  .btn-glass:hover {
    background: rgba(255, 255, 255, 0.15);
  }
  
  .form-group input,
  .form-group select,
  .form-group textarea {
    background: var(--gray-100);
    border-color: var(--gray-300);
    color: var(--gray-700);
  }
  
  .form-group input:focus,
  .form-group select:focus,
  .form-group textarea:focus {
    background: var(--gray-50);
  }
} */
