/* ======================================== */
/* INDEX.CSS - Landing Page Styles          */
/* Light & Dark Mode Support | RTL Support  */
/* ======================================== */

/* ======================================== */
/* CSS VARIABLES                            */
/* ======================================== */

:root {
  /* Light Mode Colors */
  --landing-bg: #f8fafc;
  --landing-text: #0f172a;
  --landing-text-muted: #64748b;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --card-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
  --card-hover-shadow: 0 24px 48px rgba(15, 23, 42, 0.12);
  --gradient-start: #667eea;
  --gradient-end: #764ba2;
  --orb-1-color: rgba(102, 126, 234, 0.3);
  --orb-2-color: rgba(118, 75, 162, 0.3);
  --orb-3-color: rgba(236, 72, 153, 0.2);
  --stat-bg: rgba(255, 255, 255, 0.8);
  --stat-border: rgba(0, 0, 0, 0.05);
  --cta-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

[data-theme="dark"] {
  /* Dark Mode Colors - Solid Colors */
  --landing-bg: #0a0a0a;
  --landing-text: #f1f5f9;
  --landing-text-muted: #a0a0a0;
  --card-bg: #141414;
  --card-border: #2a2a2a;
  --card-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
  --card-hover-shadow: 0 24px 50px rgba(0, 0, 0, 0.38);
  --gradient-start: #1a1a2e;
  --gradient-end: #16213e;
  --orb-1-color: rgba(255, 255, 255, 0.05);
  --orb-2-color: rgba(255, 255, 255, 0.03);
  --orb-3-color: rgba(255, 255, 255, 0.04);
  --stat-bg: rgba(20, 20, 20, 0.8);
  --stat-border: rgba(255, 255, 255, 0.05);
  --cta-bg: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

/* ======================================== */
/* BASE STYLES                              */
/* ======================================== */

.landing-page {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background: var(--landing-bg);
}

/* ======================================== */
/* ANIMATED BACKGROUND                      */
/* ======================================== */

.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  overflow: hidden;
}

.gradient-bg {
  position: absolute;
  inset: 0;
  background: var(--cta-bg);
  opacity: 0.05;
}

.grid-pattern {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--card-border) 1px, transparent 1px),
                    linear-gradient(90deg, var(--card-border) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.1;
}

.floating-orbs {
  position: absolute;
  inset: 0;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: float 20s ease-in-out infinite;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: var(--orb-1-color);
  top: 10%;
  left: -100px;
  animation-delay: 0s;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: var(--orb-2-color);
  bottom: 10%;
  right: -150px;
  animation-delay: -5s;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: var(--orb-3-color);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -10s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(30px, -30px) rotate(120deg);
  }
  66% {
    transform: translate(-20px, 20px) rotate(240deg);
  }
}

/* ======================================== */
/* HERO SECTION                             */
/* ======================================== */

.hero-section {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 90px 0 70px;
}

.hero-content {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

/* Logo */
.logo-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 2rem;
}

.hero-logo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary, #2563eb);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  background: var(--card-bg);
}

.hero-logo:hover {
  transform: scale(1.05);
}

.logo-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--primary, #2563eb);
  filter: blur(20px);
  opacity: 0.3;
  z-index: -1;
}

/* Title */
.hero-title {
  font-size: clamp(2.4rem, 4.2vw, 4rem);
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  color: var(--landing-text);
}

[data-theme="dark"] .hero-title {
  color: #ffffff;
}

.version-badge {
  font-size: 0.875rem;
  font-weight: 500;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary, #2563eb);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  margin-left: 0.5rem;
  vertical-align: middle;
}

[data-theme="dark"] .version-badge {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* Description */
.hero-description {
  font-size: 1.1rem;
  color: var(--landing-text-muted);
  max-width: 700px;
  margin: 0 auto 2.2rem;
  line-height: 1.8;
}

/* Buttons */
.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.4rem;
}

.btn {
  padding: 0.9rem 1.8rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 999px;
  transition: all 0.25s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--primary, #2563eb);
  border: none;
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

[data-theme="dark"] .btn-primary {
  background: #ffffff;
  color: #000000;
}

[data-theme="dark"] .btn-primary:hover {
  background: #e2e8f0;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary, #2563eb);
  color: var(--primary, #2563eb);
}

.btn-outline:hover {
  background: var(--primary, #2563eb);
  color: white;
  transform: translateY(-2px);
}

.btn-outline-light {
  background: transparent;
  border: 2px solid var(--card-border);
  color: var(--landing-text);
}

.btn-outline-light:hover {
  background: var(--card-border);
  transform: translateY(-2px);
}

/* Stats Container */
.stats-container {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.stat-card {
  background: var(--stat-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--stat-border);
  border-radius: 22px;
  padding: 1.35rem 1.7rem;
  text-align: center;
  min-width: 160px;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary, #2563eb);
}

.stat-icon {
  font-size: 2rem;
  color: var(--primary, #2563eb);
  margin-bottom: 0.5rem;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--landing-text);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--landing-text-muted);
  margin-top: 0.25rem;
}

/* ======================================== */
/* FEATURES SECTION                         */
/* ======================================== */

.features-section {
  position: relative;
  z-index: 1;
  padding: 86px 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.75), rgba(248,250,252,0.95));
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
}

[data-theme="dark"] .features-section {
  background: linear-gradient(180deg, rgba(20,20,20,0.92), rgba(10,10,10,0.98));
}

.section-header {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--landing-text);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--landing-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  background: var(--bg-surface, var(--card-bg));
  border: 1px solid var(--card-border);
  border-radius: 22px;
  padding: 2rem;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-hover-shadow);
  border-color: var(--primary, #2563eb);
}

.feature-icon {
  width: 70px;
  height: 70px;
  background: rgba(37, 99, 235, 0.1);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

[data-theme="dark"] .feature-icon {
  background: rgba(255, 255, 255, 0.1);
}

.feature-icon i {
  font-size: 2rem;
  color: var(--primary, #2563eb);
}

[data-theme="dark"] .feature-icon i {
  color: #ffffff;
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--landing-text);
  margin-bottom: 0.75rem;
}

.feature-description {
  color: var(--landing-text-muted);
  line-height: 1.6;
}

/* ======================================== */
/* CTA SECTION                              */
/* ======================================== */

.cta-section {
  position: relative;
  z-index: 1;
  padding: 82px 0;
  background: var(--cta-bg);
}

.cta-content {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.cta-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 1rem;
}

.cta-description {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-buttons .btn-primary {
  background: white;
  color: var(--primary, #2563eb);
}

.cta-buttons .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .cta-buttons .btn-primary {
  background: #ffffff;
  color: #000000;
}

/* ======================================== */
/* ANIMATIONS                               */
/* ======================================== */

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-down {
  animation: fadeInDown 0.6s ease forwards;
}

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.1s; opacity: 0; animation-fill-mode: forwards; }
.delay-2 { animation-delay: 0.2s; opacity: 0; animation-fill-mode: forwards; }
.delay-3 { animation-delay: 0.3s; opacity: 0; animation-fill-mode: forwards; }
.delay-4 { animation-delay: 0.4s; opacity: 0; animation-fill-mode: forwards; }
.delay-5 { animation-delay: 0.5s; opacity: 0; animation-fill-mode: forwards; }

/* ======================================== */
/* RTL SUPPORT (العربية)                   */
/* ======================================== */

[dir="rtl"] .hero-buttons .btn i {
  margin-left: 0.5rem;
  margin-right: 0;
}

[dir="rtl"] .stat-card {
  text-align: center;
}

[dir="rtl"] .feature-card {
  text-align: center;
}

[dir="rtl"] .cta-buttons .btn i {
  margin-left: 0.5rem;
  margin-right: 0;
}

[dir="rtl"] .section-header {
  text-align: center;
}

[dir="rtl"] .hero-title .version-badge {
  margin-left: 0;
  margin-right: 0.5rem;
}

[dir="rtl"] .feature-icon {
  margin: 0 auto 1.5rem;
}

/* ======================================== */
/* RESPONSIVE DESIGN                        */
/* ======================================== */

@media (max-width: 768px) {
  .hero-section {
    padding: 60px 0;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-description {
    font-size: 1rem;
    padding: 0 1rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0 1rem;
  }
  
  .stats-container {
    gap: 1rem;
  }
  
  .stat-card {
    padding: 1rem 1.5rem;
    min-width: 120px;
  }
  
  .stat-number {
    font-size: 1.5rem;
  }
  
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
  }
  
  .cta-title {
    font-size: 1.75rem;
    padding: 0 1rem;
  }
  
  .cta-description {
    font-size: 1rem;
    padding: 0 1rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
    padding: 0 1rem;
  }
  
  .hero-buttons .btn {
    width: 100%;
    max-width: 280px;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .cta-buttons .btn {
    width: 100%;
    max-width: 280px;
  }
}

@media (max-width: 480px) {
  .hero-logo {
    width: 80px;
    height: 80px;
  }
  
  .logo-glow {
    width: 100px;
    height: 100px;
  }
  
  .hero-title {
    font-size: 1.75rem;
  }
  
  .version-badge {
    font-size: 0.7rem;
  }
  
  .stats-container {
    flex-direction: column;
    align-items: center;
  }
  
  .stat-card {
    width: 100%;
    max-width: 200px;
  }
  
  .feature-card {
    padding: 1.5rem;
  }
  
  .feature-icon {
    width: 60px;
    height: 60px;
  }
  
  .feature-icon i {
    font-size: 1.5rem;
  }
  
  .section-title {
    font-size: 1.5rem;
    padding: 0 0.5rem;
  }
  
  .section-subtitle {
    font-size: 0.9rem;
    padding: 0 0.5rem;
  }
  
  .cta-title {
    font-size: 1.5rem;
  }
}

/* ======================================== */
/* UTILITY CLASSES                          */
/* ======================================== */

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.text-center {
  text-align: center;
}

.mt-4 {
  margin-top: 1rem;
}

.mb-4 {
  margin-bottom: 1rem;
}