@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #2563eb;
  --primary-glow: rgba(37, 99, 235, 0.4);
  --primary-light: #60a5fa;
  --accent: #10b981;
  --accent-glow: rgba(16, 185, 129, 0.35);
  --purple: #8b5cf6;
  
  --bg-dark: #090d16;
  --bg-card: rgba(18, 25, 41, 0.7);
  --bg-card-hover: rgba(28, 38, 62, 0.85);
  --border-color: rgba(255, 255, 255, 0.1);
  --border-glow: rgba(96, 165, 250, 0.3);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-ar: 'Cairo', system-ui, -apple-system, sans-serif;
  --font-en: 'Outfit', sans-serif;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

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

body {
  font-family: var(--font-ar);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  direction: rtl;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(37, 99, 235, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 85% 65%, rgba(139, 92, 246, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(16, 185, 129, 0.08) 0%, transparent 40%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* Background Animated Grid */
.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  pointer-events: none;
  z-index: 0;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* Header & Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--text-main);
}

.brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 16px var(--primary-glow);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.brand-text h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.brand-text span {
  font-size: 0.75rem;
  color: var(--primary-light);
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-main);
}

.nav-btn {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  padding: 0.5rem 1.2rem;
  border-radius: 99px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 700;
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 4px 14px var(--primary-glow);
  transform: translateY(-1px);
}

/* Hero Section */
.hero {
  padding: 5rem 0 3.5rem;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3.5rem;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(96, 165, 250, 0.35);
  color: var(--primary-light);
  padding: 0.35rem 1rem;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(8px);
}

.badge-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1.22;
  margin-bottom: 1.25rem;
  letter-spacing: -0.5px;
}

.gradient-text {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 2.25rem;
  max-width: 580px;
}

/* Download CTA Area */
.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.75rem;
}

.btn-primary-download {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  padding: 0.95rem 2rem;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.15rem;
  box-shadow: 0 8px 24px var(--primary-glow);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all var(--transition-smooth);
}

.btn-primary-download:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.55);
}

.btn-primary-download svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.download-info {
  display: flex;
  flex-direction: column;
  text-align: right;
}

.download-main-text {
  font-size: 1.1rem;
  font-weight: 800;
}

.download-sub-text {
  font-size: 0.78rem;
  opacity: 0.85;
  font-weight: 500;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  color: var(--text-main);
  padding: 0.95rem 1.5rem;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-2px);
}

/* Security Trust Badges */
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
}

.trust-item svg {
  color: var(--accent);
  width: 18px;
  height: 18px;
}

/* Hero Phone Mockup */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.visual-glow {
  position: absolute;
  width: 340px;
  height: 480px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.35) 0%, rgba(139, 92, 246, 0.2) 60%, transparent 80%);
  filter: blur(50px);
  z-index: 0;
}

.phone-mockup {
  position: relative;
  width: 290px;
  height: 580px;
  background: #0f172a;
  border-radius: 44px;
  border: 4px solid #334155;
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 0 15px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

.phone-notch {
  width: 100px;
  height: 20px;
  background: #1e293b;
  margin: 0 auto;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
}

.phone-screen {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: #0b1120;
}

.app-bar-mock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
}

.app-title-mock {
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
}

.search-bar-mock {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 0.6rem 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #cbd5e1;
}

.search-badge-mock {
  background: var(--primary);
  color: white;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
}

.photo-grid-mock {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  flex: 1;
}

.photo-card-mock {
  background: #1e293b;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.photo-img-sim {
  height: 90px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.photo-1 { background: linear-gradient(135deg, #1e40af, #3b82f6); }
.photo-2 { background: linear-gradient(135deg, #065f46, #10b981); }
.photo-3 { background: linear-gradient(135deg, #701a75, #c026d3); }
.photo-4 { background: linear-gradient(135deg, #9a3412, #f97316); }

.ai-tag-chip {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  color: #38bdf8;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
}

.photo-details-sim {
  padding: 0.4rem;
  font-size: 0.68rem;
  color: #94a3b8;
}

/* Floating Badges on Phone */
.floating-chip {
  position: absolute;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(16px);
  padding: 0.6rem 1rem;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  z-index: 2;
  font-size: 0.82rem;
  font-weight: 700;
}

.chip-1 {
  top: 15%;
  right: -25px;
  animation: float 4s ease-in-out infinite;
}

.chip-2 {
  bottom: 18%;
  left: -35px;
  animation: float 4s ease-in-out infinite 2s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Stats Ribbon */
.stats-ribbon {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding: 2rem 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  backdrop-filter: blur(16px);
  margin: 3rem 0 5rem;
}

.stat-box {
  text-align: center;
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 0.2rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Features Grid */
.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-tag {
  color: var(--primary-light);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2.4rem;
  font-weight: 900;
  margin-bottom: 0.75rem;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 5rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2rem;
  transition: all var(--transition-smooth);
  backdrop-filter: blur(12px);
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
}

.feature-icon-box {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(96, 165, 250, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--primary-light);
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.6rem;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Install Guide Section */
.guide-section {
  background: linear-gradient(180deg, rgba(18, 25, 41, 0.8) 0%, rgba(9, 13, 22, 0.95) 100%);
  border: 1px solid var(--border-color);
  border-radius: 28px;
  padding: 3.5rem 3rem;
  margin-bottom: 5rem;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2.5rem;
}

.step-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 1.75rem;
  position: relative;
}

.step-num {
  position: absolute;
  top: -16px;
  right: 20px;
  background: var(--primary);
  color: white;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.step-card h4 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-top: 0.5rem;
  margin-bottom: 0.6rem;
}

.step-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* QR Code & Direct Link Modal/Card */
.qr-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 3rem;
  margin-bottom: 5rem;
}

.qr-box {
  background: #ffffff;
  padding: 1.5rem;
  border-radius: 20px;
  display: inline-block;
  text-align: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.qr-box canvas, .qr-box img, .qr-box svg {
  display: block;
  margin: 0 auto;
}

.qr-caption {
  color: #0f172a;
  font-weight: 700;
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

.link-copy-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
}

.link-text {
  font-family: var(--font-en);
  font-size: 0.85rem;
  color: var(--primary-light);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  direction: ltr;
}

.copy-btn {
  background: var(--primary);
  border: none;
  color: white;
  padding: 0.45rem 1rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.copy-btn:hover {
  background: #1d4ed8;
}

/* FAQ Accordion */
.faq-list {
  max-width: 800px;
  margin: 0 auto 5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  transition: all var(--transition-fast);
}

.faq-question {
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.05rem;
  user-select: none;
}

.faq-answer {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

.faq-item.active {
  border-color: var(--border-glow);
  background: var(--bg-card-hover);
}

.faq-icon {
  transition: transform var(--transition-fast);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

/* Footer */
footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3rem 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.sha-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.35rem 0.85rem;
  border-radius: 8px;
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  direction: ltr;
}

/* Responsive Styles & Mobile Optimization */
@media (max-width: 992px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 3.5rem 0 2.5rem;
    gap: 3rem;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .cta-group {
    justify-content: center;
  }

  .trust-badges {
    justify-content: center;
  }

  .features-grid, .steps-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .qr-container {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 2rem;
  }

  .link-copy-box {
    justify-content: center;
  }
}

/* Mobile Screens (Phones < 768px) */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  /* Navbar Mobile Optimization */
  .navbar {
    padding: 1rem 0;
  }

  .brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .brand-text h1 {
    font-size: 1.05rem;
  }

  .brand-text span {
    display: none; /* إخفاء النص الإنجليزي لتوفير المساحة */
  }

  /* إخفاء روابط القائمة على شاشات الجوال لمنع التزاحم */
  .nav-actions .nav-link {
    display: none;
  }

  .nav-btn {
    padding: 0.45rem 0.9rem;
    font-size: 0.8rem;
    border-radius: 12px;
  }

  /* Hero Typography & Spacing */
  .hero {
    padding: 2rem 0 1.5rem;
    gap: 2.25rem;
  }

  .badge-tag {
    font-size: 0.78rem;
    padding: 0.3rem 0.85rem;
    margin-bottom: 1rem;
  }

  .hero-title {
    font-size: 1.95rem;
    line-height: 1.28;
    margin-bottom: 1rem;
  }

  .hero-description {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.75rem;
  }

  .cta-group {
    flex-direction: column;
    width: 100%;
    gap: 0.85rem;
  }

  .btn-primary-download {
    width: 100%;
    padding: 0.85rem 1.25rem;
    font-size: 1.02rem;
    justify-content: center;
    border-radius: 14px;
  }

  .btn-secondary {
    width: 100%;
    padding: 0.8rem 1.25rem;
    justify-content: center;
    font-size: 0.92rem;
    border-radius: 14px;
  }

  .trust-badges {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.82rem;
  }

  /* Phone Mockup on Mobile */
  .visual-glow {
    width: 260px;
    height: 380px;
  }

  .phone-mockup {
    width: 260px;
    height: 520px;
    border-radius: 36px;
    border-width: 3px;
  }

  .floating-chip {
    padding: 0.45rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 12px;
  }

  .chip-1 {
    right: -10px;
    top: 8%;
  }

  .chip-2 {
    left: -10px;
    bottom: 10%;
  }

  /* Stats Ribbon */
  .stats-ribbon {
    grid-template-columns: 1fr 1fr;
    padding: 1.25rem 0.85rem;
    gap: 1rem;
    margin: 2rem 0 3.5rem;
    border-radius: 18px;
  }

  .stat-number {
    font-size: 1.75rem;
  }

  .stat-label {
    font-size: 0.78rem;
  }

  /* Sections Header */
  .section-title {
    font-size: 1.85rem;
  }

  .section-desc {
    font-size: 0.95rem;
  }

  /* Features & Guides */
  .features-grid, .steps-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: 3.5rem;
  }

  .feature-card {
    padding: 1.5rem 1.25rem;
    border-radius: 16px;
  }

  .guide-section {
    padding: 2.25rem 1.25rem;
    border-radius: 20px;
    margin-bottom: 3.5rem;
  }

  .step-card {
    padding: 1.5rem 1.1rem;
  }

  /* QR Section on Mobile */
  .qr-container {
    padding: 1.75rem 1.25rem;
    border-radius: 20px;
    margin-bottom: 3.5rem;
  }

  .link-copy-box {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .link-text {
    text-align: center;
    font-size: 0.8rem;
  }

  .copy-btn {
    width: 100%;
    padding: 0.6rem;
  }

  .faq-question {
    padding: 1rem 1.2rem;
    font-size: 0.95rem;
  }

  .faq-answer {
    padding: 0 1.2rem 1rem;
    font-size: 0.88rem;
  }
}

/* Small Phones (< 380px) */
@media (max-width: 380px) {
  .hero-title {
    font-size: 1.7rem;
  }

  .download-main-text {
    font-size: 0.95rem;
  }

  .download-sub-text {
    font-size: 0.72rem;
  }

  .phone-mockup {
    width: 230px;
    height: 460px;
  }

  .floating-chip {
    display: none; /* إخفاء الشارات العائمة على الشاشات الصغيرة جداً لمنع أي إزاحة */
  }
}

