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

:root {
  --font-ar: 'Vazirmatn', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-en: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Clean Dark Theme Colors */
  --bg-main:       #090d16;
  --bg-subtle:     #0e1422;
  --bg-card:       #121a2c;
  --bg-card-hover: #18233c;

  --primary:       #4f46e5;
  --primary-light: #6366f1;
  --primary-hover: #4338ca;
  --accent:        #818cf8;
  --success:       #10b981;

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

  --border:        rgba(255, 255, 255, 0.08);
  --border-light:  rgba(255, 255, 255, 0.16);

  --radius-sm:     8px;
  --radius-md:     12px;
  --radius-lg:     20px;
  --radius-xl:     28px;
  --radius-full:   9999px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-ar);
  background-color: var(--bg-main);
  color: var(--text-main);
  direction: rtl;
}

html[dir="ltr"] {
  direction: ltr;
  font-family: var(--font-en), var(--font-ar);
}

body {
  min-height: 100vh;
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
  background-color: var(--bg-main);
}

/* Background Subtle Gradient */
.glow-bg {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 500px;
  background: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.12), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* ─── Navbar ─── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 74px;
}

.brand {
  display: flex;
  align-items: center;
}

.brand-logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
  display: block;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Language Dropdown */
.lang-dropdown-wrapper {
  position: relative;
}

.lang-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  font-family: inherit;
}

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

.arrow-fa {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.4rem;
  display: none;
  flex-direction: column;
  min-width: 150px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
  z-index: 120;
}

.lang-menu.active {
  display: flex;
}

.lang-item {
  padding: 0.55rem 0.85rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: right;
  font-size: 0.88rem;
  font-weight: 500;
  font-family: inherit;
  transition: all 0.15s ease;
}

html[dir="ltr"] .lang-item {
  text-align: left;
}

.lang-item:hover, .lang-item.active {
  background: rgba(99, 102, 241, 0.18);
  color: #fff;
  font-weight: 600;
}

.btn-download-nav {
  padding: 0.55rem 1.35rem;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-download-nav:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
}

/* ─── Hero Section ─── */
.hero-section {
  padding: 4.5rem 0 3.5rem;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-light);
  width: fit-content;
}

.dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
}

.hero-heading {
  font-size: 3.1rem;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.5px;
}

.highlight {
  color: var(--primary-light);
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 540px;
}

/* Stats Cards */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 0.5rem 0;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  text-align: center;
}

.stat-num {
  font-size: 1.6rem;
  font-weight: 900;
  color: #fff;
  font-family: var(--font-en), var(--font-ar);
  line-height: 1.2;
}

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

/* ─── Font Awesome Store Badges ─── */
.download-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  padding-top: 0.5rem;
}

.official-store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 1.4rem;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-md);
  color: #fff;
  min-width: 175px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.official-store-badge:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.store-fa-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.store-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: left;
}

html[dir="rtl"] .store-text {
  text-align: right;
}

.store-sub {
  font-size: 0.62rem;
  color: #cbd5e1;
  letter-spacing: 0.4px;
  font-family: var(--font-en);
  text-transform: uppercase;
  font-weight: 500;
}

.store-name {
  font-size: 1.12rem;
  font-weight: 700;
  font-family: var(--font-en);
  letter-spacing: -0.2px;
  color: #fff;
}

/* Light badge variation for banners */
.official-store-badge.badge-light {
  background: #fff;
  border-color: transparent;
  color: #000;
}

.official-store-badge.badge-light .store-sub {
  color: #475569;
}

.official-store-badge.badge-light .store-name {
  color: #000;
}

.official-store-badge.badge-light:hover {
  background: #f8fafc;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

/* ─── Hero Phone Mockup (Clean Border Only - Full Screen) ─── */
.hero-phone-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-frame-border {
  width: 100%;
  max-width: 290px;
  height: auto;
  border: 3px solid rgba(255, 255, 255, 0.22);
  border-radius: 36px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(99, 102, 241, 0.15);
  background: #000;
  display: block;
  line-height: 0;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.phone-frame-border:hover {
  transform: translateY(-4px);
  border-color: var(--primary-light);
}

.phone-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* ─── Features Section ─── */
.features-section {
  padding: 5rem 0 4rem;
  border-top: 1px solid var(--border);
}

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

.section-title {
  font-size: 2.1rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.feature-card:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
}

.feature-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.feature-num {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--primary-light);
  font-family: var(--font-en);
  background: rgba(99, 102, 241, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 800;
}

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

/* ─── Download Banner ─── */
.download-banner {
  padding: 2.5rem 0 4.5rem;
}

.banner-box {
  background: linear-gradient(135deg, #312e81 0%, #4338ca 100%);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.banner-box h2 {
  font-size: 2.1rem;
  font-weight: 900;
}

.banner-box p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.05rem;
  max-width: 500px;
}

.banner-actions {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ─── Footer ─── */
.footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-logo {
  height: 32px;
  width: auto;
}

.footer-copy {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.footer-links a {
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--text-main);
}

.footer-divider {
  color: var(--text-dim);
}

/* ─── Shared Utilities ─── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.8rem;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: var(--primary-light);
  color: #fff;
}

.gradient-text {
  color: #fff;
}

/* ─── Responsive Styles ─── */
@media (max-width: 960px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
  }
  
  .hero-text {
    align-items: center;
  }
  
  .hero-sub {
    max-width: 100%;
  }

  .hero-stats {
    width: 100%;
    max-width: 480px;
  }
  
  .download-group {
    justify-content: center;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .phone-frame-border {
    max-width: 260px;
    height: auto;
  }
}

@media (max-width: 600px) {
  .hero-heading {
    font-size: 2.2rem;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .banner-box {
    padding: 2.5rem 1.25rem;
  }

  .banner-box h2 {
    font-size: 1.7rem;
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
  }

  .footer-left {
    flex-direction: column;
  }
}

/* ─── Legal Document Pages (Privacy Policy & Terms) ─── */
.legal-page-body {
  background-color: var(--bg-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.legal-main {
  flex: 1;
  padding: 3.5rem 0 5rem;
}

.legal-doc-card {
  max-width: 860px;
  margin: 0 auto;
  background: rgba(18, 26, 44, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 3.5rem 3rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
  position: relative;
  overflow: hidden;
}

.legal-doc-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #4f46e5, #818cf8, #a855f7);
}

.legal-top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.btn-back-home {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.btn-back-home:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary-light);
  transform: translateY(-1px);
}

.legal-header {
  margin-bottom: 2.5rem;
}

.legal-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: var(--accent);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-bottom: 1rem;
}

.legal-title {
  font-size: 2.3rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 1rem;
}

.legal-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding: 0.85rem 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.86rem;
  color: var(--text-muted);
}

.legal-meta-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.legal-meta-item i {
  color: var(--accent);
  font-size: 0.9rem;
}

.legal-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.legal-section {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  transition: border-color 0.2s ease;
}

.legal-section:hover {
  border-color: rgba(99, 102, 241, 0.25);
}

.legal-section-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.legal-num-badge {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent);
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.legal-section-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
}

.legal-section-text {
  color: #cbd5e1;
  font-size: 0.98rem;
  line-height: 1.9;
}

.legal-list {
  list-style: none;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.legal-list-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: #cbd5e1;
  font-size: 0.96rem;
  line-height: 1.7;
}

.legal-list-item i {
  color: var(--success);
  margin-top: 0.35rem;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.legal-callout {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(16, 185, 129, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
}

.legal-callout i {
  font-size: 1.6rem;
  color: var(--accent);
  flex-shrink: 0;
}

.legal-callout p {
  color: var(--text-main);
  font-size: 0.94rem;
  line-height: 1.7;
  margin: 0;
}

.legal-contact-card {
  background: rgba(79, 70, 229, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  margin-top: 1rem;
}

.legal-contact-card h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.legal-contact-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.legal-email-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--primary);
  color: #ffffff;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.98rem;
  transition: all 0.2s ease;
}

.legal-email-btn:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.35);
}

@media (max-width: 768px) {
  .legal-doc-card {
    padding: 2.25rem 1.5rem;
    border-radius: var(--radius-lg);
  }

  .legal-title {
    font-size: 1.8rem;
  }

  .legal-section {
    padding: 1.25rem 1.25rem;
  }
}
