/* ========== متغيرات التصميم الحديث ========== */
:root {
  /* الألوان الرئيسية */
  --primary: #2563eb;
  --primary-light: #60a5fa;
  --primary-dark: #1d4ed8;
  --secondary: #10b981;
  --accent: #f59e0b;
  /* ألوان إضافية للاستخدام المستقبلي */
  --accent-1: #f093fb;
  --accent-2: #f5576c;
  --accent-3: #4facfe;
  --accent-4: #00f2fe;
  --accent-5: #43e97b;
  --accent-6: #38f9d7;
  --danger: #ef4444;
  --success: #10b981;

  /* الألوان المحايدة */
  --dark: #0f172a;
  --dark-light: #1e293b;
  --gray-900: #334155;
  --gray-700: #475569;
  --gray-500: #64748b;
  --gray: #a0aec0;
  --gray-300: #cbd5e1;
  --gray-100: #f1f5f9;
  --light: #ffffff;

  /* الخلفيات */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-dark: #0f172a;
  --bg-gradient: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);

  /* الظلال */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

  /* الزوايا */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* التباين */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== الأساسيات ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Cairo', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.lang-en {
  direction: ltr;
  text-align: left;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-pad {
  padding: 5rem 0;
}

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

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--primary);
  border-radius: var(--radius-full);
}

.section-title p {
  font-size: 1.125rem;
  color: var(--gray-700);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}

@media (max-width: 768px) {
  .section-title h2 {
    font-size: 2rem;
  }

  .section-title p {
    font-size: 1rem;
  }
}

/* ========== Animations ========== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
  will-change: opacity, transform;
}

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

/* ========== الهيدر ========== */
header {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  transition: var(--transition);
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

header.scrolled {
  box-shadow: var(--shadow-md);
  background: rgba(255, 255, 255, 0.99);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
}

.logo i {
  font-size: 2rem;
  color: var(--primary);
  /* Optional: maintain gradient if desired, or go solid for enterprise. 
     User said "don't touch color", but logo usually needs to pop. 
     The original inline style had a gradient. I'll keep it professional. */
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-main {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--dark);
}

.logo-sub {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--gray);
  margin-top: 2px;
}

/* هامبورجر مينو للجوال */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--dark);
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* التنقل */
.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--dark);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  position: relative;
  transition: var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

/* الأزرار */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary-light);
  color: white;
}

.btn-outline {
  background: transparent;
  color: var(--dark);
  border: 2px solid var(--gray-300);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline-light {
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-outline-light:hover {
  border-color: white;
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

/* إجراءات التنقل */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* تبديل اللغة */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--gray-100);
  padding: 0.25rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--gray-300);
}

.lang-btn {
  padding: 0.25rem 0.75rem;
  border: none;
  background: transparent;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  min-width: 60px;
}

.lang-btn.active {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* ========== قسم البطل (Hero) ========== */
.hero {
  background: var(--bg-gradient);
  padding: 8rem 0 5rem;
  margin-top: 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 Z" fill="rgba(255,255,255,0.05)"/></svg>');
  background-size: cover;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  color: white;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero p {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 4rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .hero {
    padding: 6rem 0 3rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1.125rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero-buttons .btn {
    width: 100%;
    max-width: 300px;
  }
}

/* إحصائيات البطل */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.stat-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  text-align: center;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  color: white;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
}

/* ========== الميزات ========== */
.features {
  background: var(--bg-secondary);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: white;
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: 1px solid var(--gray-100);
  text-align: center;
}

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

.feature-card i {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  display: inline-block;
}

.feature-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--dark);
}

.feature-card p {
  color: var(--gray-700);
  line-height: 1.6;
}

/* ========== المشكلات والمنافع (Enterprise) ========== */
.problems-benefits {
  background: white;
}

.problem-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.problem-card {
  background: white;
  /* Changed to White */
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid #e2e8f0;
  /* Replacing Red (Danger) with Professional Slate Blue */
  border-left: 4px solid var(--primary-dark);
  transition: var(--transition);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  /* Increased shadow for viability */
}

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

.problem-card i {
  /* Harmonious Color */
  color: var(--primary-dark);
  font-size: 2rem;
  margin-bottom: 1.5rem;
  display: block;
}

.problem-card h3 {
  color: var(--dark);
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.problem-solution {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--primary-dark);
  /* Ensure text is slate blue */
  font-weight: 600;
  font-size: 0.95rem;
}

.problem-solution i {
  color: var(--secondary);
  /* Green for 'Solution' checkmark is good, or make it primary-dark if requested 'change red only' */
  /* User said "Red icons exist -> want to change color". 
     If checkmarks are green, that's fine. 
     If main icons were red, they are changed. 
     Let's make sure solution icons are not red. */
  font-size: 1.2rem;
  margin-bottom: 0;
}

.benefit-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.benefit-card {
  background: white;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid #e2e8f0;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

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

.benefit-card::before {
  /* Cleaner accent line, not full gradient */
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary);
  opacity: 0.8;
}

.benefit-card i {
  color: var(--primary);
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  display: block;
}

.benefit-card h3 {
  color: var(--dark);
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 700;
}

/* ========== إمكانيات المنصة (White/Clean Re-design) ========== */
.platform-capabilities {
  background: white;
  /* Changed from dark to white per feedback */
  color: var(--dark);
  /* Text to dark */
  padding: 5rem 0;
  border-top: 1px solid #e2e8f0;
}

.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.capability-card {
  background: #f8fafc;
  /* Very light gray to stand out on white */
  padding: 0;
  border-radius: var(--radius-lg);
  border: 1px solid #e2e8f0;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.capability-card:hover {
  background: white;
  border-color: var(--primary);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.capability-header {
  padding: 2rem 2rem 1rem 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.capability-header i {
  font-size: 2rem;
  color: var(--primary);
  /* Strong Primary Color */
  margin-bottom: 0;
}

.capability-header h3 {
  font-size: 1.25rem;
  margin: 0;
  font-weight: 700;
  color: var(--dark);
  /* Dark text */
}

.capability-card ul {
  list-style: none;
  padding: 1rem 2rem 2rem 2rem;
  margin: 0;
  flex-grow: 1;
}

.capability-card ul li {
  margin-bottom: 0.75rem;
  padding-right: 0;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--gray-700);
  /* Darker gray for readability */
  font-size: 0.95rem;
}

.capability-card ul li i {
  color: var(--success);
  /* Keep checkmarks green as they are positive status */
  font-size: 1rem;
  margin-top: 4px;
}

/* ========== حالة الاستخدام ========== */
.use-case {
  background: var(--bg-secondary);
}

.use-case-steps {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.step {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  background: white;
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.step-number {
  background: var(--primary);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.step-content h3 {
  margin-bottom: 0.5rem;
  color: var(--dark);
}

.step-content p {
  color: var(--gray-700);
}

@media (max-width: 768px) {
  .step {
    flex-direction: column;
    gap: 1rem;
  }
}

/* ========== التسعير ========== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.pricing-card {
  background: white;
  padding: 2.5rem 2rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--gray-100);
  transition: var(--transition);
  position: relative;
  text-align: center;
}

.pricing-card.featured {
  border-color: var(--primary);
  transform: scale(1.05);
  box-shadow: var(--shadow-xl);
}

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

.pricing-card.featured:hover {
  transform: translateY(-10px) scale(1.05);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
}

.pricing-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--dark);
}

.price {
  font-size: 3rem;
  font-weight: 800;
  color: var(--dark);
  margin: 1.5rem 0;
}

.price span {
  font-size: 1rem;
  color: var(--gray-700);
}

.pricing-features {
  list-style: none;
  margin: 2rem 0;
  text-align: right;
}

.pricing-features li {
  margin-bottom: 0.75rem;
  padding-right: 1.5rem;
  position: relative;
}

.pricing-features li::before {
  content: '✓';
  position: absolute;
  right: 0;
  color: var(--success);
  font-weight: bold;
}

.pricing-features li.disabled {
  color: var(--gray-500);
}

.pricing-features li.disabled::before {
  content: '✗';
  color: var(--gray-500);
  /* Changed from danger/red to gray for professional look */
}

@media (max-width: 768px) {
  .pricing-card.featured {
    transform: none;
  }

  .pricing-card.featured:hover {
    transform: translateY(-10px);
  }
}

/* ========== نموذج الاتصال (White Mode) ========== */
.contact-form-section {
  background: white;
  /* Switched to White per request "Not Visible" */
  color: var(--dark);
  border-top: 1px solid #e2e8f0;
}

.contact-form-section .section-title h2 {
  color: var(--dark) !important;
}

.contact-form-section .section-title p {
  color: var(--gray-700) !important;
}

.contact-form {
  max-width: 800px;
  margin: 0 auto;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--dark);
  /* Dark Text */
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid #cbd5e1;
  /* Lighter border for light bg */
  border-radius: var(--radius-md);
  background: #f8fafc;
  /* Light input bg */
  color: var(--dark);
  font-family: 'Cairo', sans-serif;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--gray-500);
}

@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== الفوتر ========== */
.site-footer {
  background: var(--dark);
  color: white;
  padding: 4rem 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-section h3 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: white;
  position: relative;
  padding-bottom: 0.75rem;
}

.footer-section h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 40px;
  height: 3px;
  background: var(--primary);
  border-radius: var(--radius-full);
}

.footer-section p {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-links a:hover {
  color: white;
  transform: translateX(-5px);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  text-decoration: none;
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
}

/* ========== واتساب العائم ========== */
.floating-whatsapp {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 60px;
  height: 60px;
  background: #25d366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: var(--shadow-xl);
  z-index: 999;
  transition: var(--transition);
  animation: pulse 2s infinite;
}

.floating-whatsapp:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.7);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }

  70% {
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* ========== استجابة الجوال ========== */
@media (max-width: 1024px) {
  .container {
    padding: 0 1rem;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: white;
    flex-direction: column;
    padding: 2rem;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
  }

  .main-nav.active {
    right: 0;
  }

  .nav-links {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
  }

  .nav-links a {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-100);
    width: 100%;
  }

  .nav-actions {
    flex-direction: column;
    width: 100%;
    gap: 1rem;
  }

  .nav-actions .btn {
    width: 100%;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-grid,
  .problem-list,
  .benefit-list,
  .capabilities-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-stats {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .section-title h2 {
    font-size: 1.75rem;
  }

  .floating-whatsapp {
    bottom: 1rem;
    left: 1rem;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
}

/* ========== وظائف إضافية ========== */
.back-to-top {
  position: fixed;
  bottom: 5rem;
  left: 2rem;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

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

/* الرسائل */
.message {
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.message.success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--success);
}

.message.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger);
}

.message.info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--primary);
}

/* إصلاحات اللغة الإنجليزية */
body.lang-en .nav-links a::after {
  left: 0;
  right: auto;
}

body.lang-en .footer-section h3::after {
  left: 0;
  right: auto;
}

body.lang-en .section-title h2::after {
  left: 0;
  transform: none;
}

body.lang-en .hero-content,
body.lang-en .section-title {
  text-align: left;
}

body.lang-en .section-title p {
  margin-left: 0;
}

body.lang-en .lang-toggle {
  direction: ltr;
}

body.lang-en .pricing-features li {
  text-align: left;
  padding-left: 1.5rem;
  padding-right: 0;
}

body.lang-en .pricing-features li::before {
  left: 0;
  right: auto;
}

body.lang-en .capability-card ul li {
  padding-left: 1.5rem;
  padding-right: 0;
}

body.lang-en .capability-card ul li::before {
  left: 0;
  right: auto;
}

body.lang-en .footer-links a:hover {
  transform: translateX(5px);
}

body.lang-en .floating-whatsapp {
  left: auto;
  right: 2rem;
}

body.lang-en .back-to-top {
  left: auto;
  right: 2rem;
}

/* إصلاح زر العرض التوضيحي */
.btn-outline-light {
  color: white !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
}

.btn-outline-light:hover {
  color: white !important;
  border-color: white !important;
  background: rgba(255, 255, 255, 0.1) !important;
}

/* ========== AI Chat Widget Styles ========== */
.ai-chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  font-family: 'Cairo', sans-serif;
}

body.lang-en .ai-chat-widget {
  right: 20px;
  left: auto;
  font-family: system-ui, -apple-system, sans-serif;
}

body:not(.lang-en) .ai-chat-widget {
  right: auto;
  left: 20px;
}

/* Toggle Button */
.chat-toggle-btn {
  background: white;
  color: var(--dark);
  padding: 10px 20px;
  border-radius: 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.chat-toggle-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.agent-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  position: relative;
}

.agent-avatar .status-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  background: #10b981;
  border: 2px solid white;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }

  70% {
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.toggle-text {
  font-weight: 700;
  font-size: 1rem;
}

.toggle-icon {
  font-size: 0.9rem;
  color: var(--gray-500);
  transition: transform 0.3s;
}

/* Chat Window */
.chat-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 350px;
  height: 500px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 1;
  transform: scale(1) translateY(0);
  transform-origin: bottom right;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

body:not(.lang-en) .chat-window {
  right: auto;
  left: 0;
  transform-origin: bottom left;
}

.ai-chat-widget.collapsed .chat-window {
  opacity: 0;
  transform: scale(0.9) translateY(20px);
  pointer-events: none;
}

.ai-chat-widget.collapsed .toggle-icon {
  transform: rotate(0deg);
}

.ai-chat-widget:not(.collapsed) .toggle-icon {
  transform: rotate(180deg);
}

/* Chat Header */
.chat-header {
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
}

.agent-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.agent-avatar.smaller {
  width: 35px;
  height: 35px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 1rem;
}

.agent-details {
  display: flex;
  flex-direction: column;
}

.agent-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.agent-status {
  font-size: 0.75rem;
  opacity: 0.9;
}

.minimize-btn {
  background: none;
  border: none;
  color: white;
  opacity: 0.7;
  cursor: pointer;
  padding: 5px;
  transition: opacity 0.2s;
}

.minimize-btn:hover {
  opacity: 1;
}

/* Chat Body */
.chat-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.message {
  max-width: 85%;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.ai {
  align-self: flex-start;
}

.message.user {
  align-self: flex-end;
}

.message-content {
  padding: 12px 16px;
  border-radius: 15px;
  font-size: 0.95rem;
  line-height: 1.5;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.message.ai .message-content {
  background: white;
  color: var(--dark);
  border-top-left-radius: 4px;
}

.message.user .message-content {
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 4px;
}

.message-time {
  font-size: 0.7rem;
  color: var(--gray-500);
  margin-top: 5px;
  padding: 0 5px;
}

.message.user .message-time {
  text-align: right;
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: white;
  border-radius: 15px;
  border-top-left-radius: 4px;
  width: fit-content;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background: var(--gray-500);
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typing {

  0%,
  80%,
  100% {
    transform: scale(0);
  }

  40% {
    transform: scale(1);
  }
}

/* Chat Actions */
.chat-actions {
  padding: 10px 20px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  background: white;
  border-top: 1px solid var(--gray-100);
}

.action-chip {
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--primary-light);
  background: #eff6ff;
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.action-chip:hover {
  background: var(--primary);
  color: white;
}

/* Input Area */
.chat-input-area {
  padding: 15px;
  background: white;
  border-top: 1px solid var(--gray-100);
  display: flex;
  gap: 10px;
}

.chat-input-area input {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid var(--gray-300);
  border-radius: 20px;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}

.chat-input-area input:focus {
  border-color: var(--primary);
}

.chat-input-area button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.chat-input-area button:hover {
  background: var(--primary-dark);
}

@media (max-width: 480px) {
  .chat-window {
    width: calc(100vw - 40px);
    right: 0;
    bottom: 70px;
  }

  body:not(.lang-en) .chat-window {
    right: auto;
    left: 0;
  }
}

/* Industry Selector Styles */
.industry-selector {
  flex: 1;
  padding: 20px;
  display: flex;
  /* Flex by default */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  animation: fadeIn 0.3s ease;
}

.selector-header {
  text-align: center;
  margin-bottom: 25px;
}

.selector-header h3 {
  color: var(--dark);
  margin-bottom: 5px;
  font-size: 1.1rem;
}

.selector-header p {
  color: var(--gray-700);
  font-size: 0.85rem;
}

.industry-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  width: 100%;
}

.industry-btn {
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: 12px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.industry-btn:last-child {
  grid-column: span 2;
  /* Make General full width */
}

.industry-btn i {
  font-size: 1.5rem;
  color: var(--primary);
}

.industry-btn span {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark);
}

.industry-btn:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(37, 99, 235, 0.15);
}

.industry-btn:hover i {
  transform: scale(1.1);
}

/* Instant Demo Button */
.instant-demo-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: white !important;
  border: none !important;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
  animation: pulse-orange 2s infinite;
}

.instant-demo-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

@keyframes pulse-orange {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
  }

  70% {
    box-shadow: 0 0 0 6px rgba(245, 158, 11, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Utility to hide elements */
.d-none {
  display: none !important;
}

/* Live Insights Panel */
.live-insights-panel {
  position: fixed;
  bottom: 80px;
  right: 380px;
  /* To the left of chat widget */
  width: 280px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  padding: 20px;
  z-index: 9990;
  border: 1px solid rgba(0, 0, 0, 0.05);
  transform: translateX(50px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

body:not(.lang-en) .live-insights-panel {
  right: auto;
  left: 380px;
  /* To the right of chat widget in RTL */
  transform: translateX(-50px);
}

.live-insights-panel.active {
  opacity: 1;
  transform: translateX(0);
}

.insights-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 1rem;
  border-bottom: 1px solid var(--gray-100);
  padding-bottom: 10px;
}

.insight-group {
  margin-bottom: 20px;
}

.insight-group label {
  display: block;
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.sentiment-meter {
  height: 8px;
  background: var(--gray-100);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 5px;
}

.meter-fill {
  height: 100%;
  background: linear-gradient(90deg, #ef4444, #f59e0b, #10b981);
  border-radius: 4px;
  transition: width 0.5s ease-out;
}

.sentiment-label {
  font-size: 0.85rem;
  color: var(--dark);
  font-weight: 600;
  text-align: right;
}

.intent-badge {
  display: inline-block;
  background: #eff6ff;
  color: var(--primary);
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--primary-light);
}

.action-log {
  list-style: none;
  max-height: 120px;
  overflow-y: auto;
  font-size: 0.8rem;
}

.action-log li {
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideInLeft 0.3s ease;
}

.action-log li i {
  color: var(--secondary);
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Smart Report Modal */
.smart-report-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  backdrop-filter: blur(5px);
}

.smart-report-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.report-card {
  background: white;
  width: 90%;
  max-width: 450px;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  transform: translateY(20px);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.smart-report-modal.active .report-card {
  transform: translateY(0);
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 25px;
}

.report-title h3 {
  margin: 0;
  color: var(--dark);
  font-size: 1.25rem;
}

.report-title i {
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: 5px;
}

.close-report {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--gray-500);
  cursor: pointer;
}

.report-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 30px;
  text-align: center;
}

.metric-val {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 5px;
}

.metric-lbl {
  font-size: 0.75rem;
  color: var(--gray-500);
  text-transform: uppercase;
}

.report-chart {
  background: #f8fafc;
  padding: 20px;
  border-radius: 15px;
  margin-bottom: 25px;
  text-align: center;
}

.chart-bars {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 100px;
  gap: 15px;
  margin-bottom: 10px;
}

.bar {
  width: 20px;
  border-radius: 4px;
}

.chart-label {
  font-size: 0.8rem;
  color: var(--gray-700);
  font-weight: 600;
}

@media (max-width: 900px) {
  .live-insights-panel {
    display: none !important;
    /* Hide analysis panel on mobile to avoid clutter */
  }
}