/* ===== CSS Variables ===== */
:root {
  /* Colors */
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary-color: #f59e0b;
  --accent-color: #10b981;
  --danger-color: #ef4444;
  
  /* Background Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-dark: #0f172a;
  --bg-card: #ffffff;
  
  /* Text Colors */
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-tertiary: #94a3b8;
  --text-inverse: #ffffff;
  
  /* Border & Shadow */
  --border-color: #e2e8f0;
  --border-radius: 12px;
  --border-radius-lg: 16px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  /* Spacing */
  --container-max-width: 1200px;
  --section-padding: 80px 0;
  --navbar-height: 70px;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Z-index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal: 1040;
  --z-popover: 1050;
  --z-tooltip: 1060;
}

/* Dark Theme */
[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-card: #1e293b;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-tertiary: #94a3b8;
  --border-color: #334155;
}

/* ===== Reset & Base Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* ===== Loading Screen ===== */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-content {
  text-align: center;
  color: white;
}

.loading-logo img {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  animation: pulse 2s infinite;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid white;
  border-radius: 50%;
  margin: 20px auto;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* ===== Geo Block Styles ===== */
.geo-block {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.geo-block-content {
  text-align: center;
  color: white;
  padding: 40px;
  max-width: 600px;
}

.geo-block-content i {
  font-size: 4rem;
  color: #ff4444;
  margin-bottom: 20px;
}

.geo-block-content h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: #ff4444;
}

.geo-block-content p {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 20px;
}

.free-palestine {
  display: block;
  font-size: 1.4rem;
  font-weight: bold;
  color: #00ff88;
  margin-top: 20px;
}

/* ===== Navigation ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: var(--z-fixed);
  transition: all var(--transition-normal);
}

[data-theme="dark"] .navbar {
  background: rgba(15, 23, 42, 0.95);
}

.nav-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
}

.logo-img {
  width: 32px;
  height: 32px;
  margin-right: 12px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary-color);
  border-radius: 1px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  background: var(--bg-secondary);
  color: var(--primary-color);
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  gap: 4px;
}

.mobile-menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-fast);
}

/* ===== Container ===== */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--primary-color);
  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: var(--bg-card);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
}

.btn-large {
  padding: 16px 32px;
  font-size: 1.1rem;
}

.btn small {
  font-size: 0.8rem;
  opacity: 0.8;
  font-weight: 400;
}

/* ===== Hero Section - التوسيط المثالي ===== */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
  z-index: 1;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

.particles-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.6;
}

.hero-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(99, 102, 241, 0.1) 0%, 
    rgba(245, 158, 11, 0.05) 50%, 
    rgba(16, 185, 129, 0.1) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: var(--navbar-height) 20px 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-color);
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 32px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  backdrop-filter: blur(10px);
}

.hero-title {
  margin-bottom: 32px;
}

.title-main {
  display: block;
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
  line-height: 1.1;
}

.title-sub {
  display: block;
  font-size: clamp(1.3rem, 2.5vw, 2rem);
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.3;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 48px;
  line-height: 1.7;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

.hero-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 48px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  min-width: 80px;
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary-color);
  display: block;
  line-height: 1;
}

.stat-label {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-top: 8px;
  font-weight: 500;
}

.hero-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.download-btn {
  flex-direction: column;
  gap: 6px;
  min-width: 220px;
  padding: 18px 32px;
}

.hero-info {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
}

.info-item i {
  color: var(--accent-color);
  font-size: 1.1rem;
}

/* ===== Ad Container ===== */
.ad-container {
  max-width: 728px;
  margin: 40px auto;
  padding: 0 20px;
  text-align: center;
}

/* ===== Section Styles ===== */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== Features Section ===== */
.features-section {
  padding: var(--section-padding);
  background: var(--bg-secondary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 32px;
}

.feature-card {
  background: var(--bg-card);
  padding: 32px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.feature-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: white;
  font-size: 1.5rem;
}

.feature-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.feature-highlight {
  display: inline-block;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-color);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ===== FAQ Section ===== */
.faq-section {
  padding: var(--section-padding);
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition-fast);
}

.faq-item:hover {
  box-shadow: var(--shadow-md);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 24px;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.faq-question:hover {
  background: var(--bg-secondary);
}

.faq-question i {
  transition: transform var(--transition-fast);
  color: var(--primary-color);
}

.faq-question[aria-expanded="true"] i {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal);
}

.faq-answer.active {
  max-height: 200px;
}

.faq-answer p {
  padding: 0 24px 24px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===== Legal Notice ===== */
.legal-notice {
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  padding: 32px;
  margin-top: 60px;
  border-left: 4px solid var(--primary-color);
}

.legal-notice h3 {
  color: var(--text-primary);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.legal-notice h3 i {
  color: var(--primary-color);
}

.legal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.legal-item h4 {
  color: var(--text-primary);
  margin-bottom: 8px;
  font-weight: 600;
}

.legal-item p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ===== Download Section ===== */
.download-section {
  padding: var(--section-padding);
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  text-align: center;
}

.download-content h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.download-content p {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.download-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius-lg);
  padding: 32px;
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.download-info h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.download-details {
  display: flex;
  gap: 16px;
  font-size: 0.9rem;
  opacity: 0.8;
}

.download-details span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-dark);
  color: var(--text-inverse);
  padding: 60px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  margin-bottom: 40px;
}

.footer-brand {
  max-width: 350px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 1.3rem;
  font-weight: 700;
}

.footer-logo img {
  width: 32px;
  height: 32px;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin-bottom: 24px;
}

.social-links {
  display: flex;
  gap: 16px;
}

.social-links a {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.social-links a:hover {
  background: var(--primary-color);
  transform: translateY(-2px);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.footer-column h4 {
  font-weight: 600;
  margin-bottom: 16px;
  color: white;
}

.footer-column a {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  margin-bottom: 8px;
  transition: color var(--transition-fast);
}

.footer-column a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

.footer-bottom p {
  margin-bottom: 4px;
}

/* ===== Back to Top ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  z-index: var(--z-fixed);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.fade-in {
  animation: fadeInUp 0.6s ease forwards;
}

.slide-left {
  animation: fadeInLeft 0.6s ease forwards;
}

.slide-right {
  animation: fadeInRight 0.6s ease forwards;
}

/* ===== Particles Effect ===== */
.particle {
  position: absolute;
  background: var(--primary-color);
  border-radius: 50%;
  opacity: 0.1;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
  }
}

/* ===== Scrollbar Styling ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* ===== Selection Styling ===== */
::selection {
  background: var(--primary-color);
  color: white;
}

/* ===== Focus Styles ===== */
button:focus,
a:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  :root {
    --navbar-height: 60px;
  }
  
  .nav-menu {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .hero {
    height: 100vh;
  }
  
  .hero-content {
    padding: calc(var(--navbar-height) + 20px) 16px 0;
  }
  
  .hero-stats {
    gap: 32px;
  }
  
  .stat-number {
    font-size: 1.8rem;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }
  
  .hero-info {
    flex-direction: column;
    gap: 20px;
  }
  
  .download-btn {
    min-width: 280px;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .download-card {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .footer-links {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .legal-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  
  .nav-container {
    padding: 0 16px;
  }
  
  .hero-content {
    padding: calc(var(--navbar-height)
    padding: calc(var(--navbar-height) + 10px) 12px 0;
  }
  
  .hero-badge {
    padding: 8px 16px;
    font-size: 0.85rem;
  }
  
  .hero-description {
    font-size: 1.1rem;
    margin-bottom: 40px;
  }
  
  .hero-stats {
    gap: 24px;
  }
  
  .hero-info {
    gap: 16px;
  }
  
  .section-padding {
    padding: 60px 0;
  }
  
  .feature-card,
  .legal-notice {
    padding: 24px;
  }
  
  .faq-question {
    padding: 20px;
    font-size: 1rem;
  }
  
  .download-card {
    padding: 24px;
  }
  
  .download-btn {
    min-width: 100%;
    max-width: 300px;
  }
}

/* ===== تحسينات إضافية للتوسيط المثالي ===== */
@media (max-height: 700px) {
  .hero-content {
    transform: scale(0.9);
  }
  
  .hero-stats {
    margin-bottom: 32px;
  }
  
  .hero-actions {
    margin-bottom: 32px;
  }
}

@media (max-height: 600px) {
  .hero {
    min-height: 100vh;
    height: auto;
    padding: calc(var(--navbar-height) + 20px) 0 40px;
  }
  
  .hero-content {
    transform: scale(0.85);
    padding-top: 0;
  }
}

/* ===== تحسينات للشاشات الكبيرة ===== */
@media (min-width: 1400px) {
  .hero-content {
    max-width: 900px;
  }
  
  .title-main {
    font-size: 5rem;
  }
  
  .title-sub {
    font-size: 2.2rem;
  }
  
  .hero-description {
    font-size: 1.4rem;
    max-width: 700px;
  }
}

/* ===== تحسينات للشاشات العريضة جداً ===== */
@media (min-width: 1920px) {
  .hero-content {
    max-width: 1000px;
  }
  
  .container {
    max-width: 1400px;
  }
}

/* ===== تأثيرات إضافية للـ Hero ===== */
.hero-content::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.03) 0%, transparent 50%);
  animation: rotate 20s linear infinite;
  z-index: -1;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ===== تحسين الأداء ===== */
.hero,
.hero-bg,
.particles-container,
.hero-gradient {
  will-change: transform;
}

.feature-card,
.btn,
.nav-link {
  will-change: transform;
}

/* ===== تحسينات الطباعة ===== */
@media print {
  .navbar,
  .back-to-top,
  .ad-container,
  .loading-screen,
  .particles-container {
    display: none !important;
  }
  
  .hero {
    height: auto;
    min-height: auto;
    page-break-after: always;
  }
  
  .hero-content {
    padding: 20px 0;
    transform: none;
  }
  
  .section-padding {
    padding: 40px 0;
  }
}

/* ===== تحسينات إمكانية الوصول ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .hero-content::before {
    animation: none;
  }
  
  .particle {
    animation: none;
  }
}

/* ===== تحسينات للوضع عالي التباين ===== */
@media (prefers-contrast: high) {
  :root {
    --shadow-sm: 0 2px 4px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 8px 0 rgb(0 0 0 / 0.3);
    --shadow-lg: 0 8px 16px 0 rgb(0 0 0 / 0.3);
    --shadow-xl: 0 16px 32px 0 rgb(0 0 0 / 0.3);
  }
  
  .btn-primary {
    border: 2px solid var(--primary-dark);
  }
  
  .btn-secondary {
    border-width: 3px;
  }
  
  .nav-link.active::after {
    height: 3px;
  }
}

/* ===== إصلاحات للمتصفحات القديمة ===== */
@supports not (backdrop-filter: blur(10px)) {
  .navbar {
    background: var(--bg-primary);
  }
  
  [data-theme="dark"] .navbar {
    background: var(--bg-dark);
  }
  
  .hero-badge,
  .download-card {
    background: rgba(99, 102, 241, 0.2);
  }
}

/* ===== تحسينات للشاشات اللمسية ===== */
@media (hover: none) and (pointer: coarse) {
  .btn,
  .nav-link,
  .feature-card,
  .faq-question {
    transition: none;
  }
  
  .btn:hover,
  .nav-link:hover,
  .feature-card:hover,
  .faq-question:hover {
    transform: none;
  }
  
  .btn:active {
    transform: scale(0.98);
  }
}

/* ===== تحسينات للشاشات الصغيرة جداً ===== */
@media (max-width: 320px) {
  .hero-content {
    padding: calc(var(--navbar-height) + 10px) 8px 0;
  }
  
  .title-main {
    font-size: 2rem;
  }
  
  .title-sub {
    font-size: 1.1rem;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 16px;
  }
  
  .stat-number {
    font-size: 1.5rem;
  }
  
  .download-btn {
    min-width: 100%;
    padding: 16px 20px;
  }
}

/* ===== تحسينات للوضع الأفقي على الموبايل ===== */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    height: auto;
    min-height: 100vh;
    padding: calc(var(--navbar-height) + 10px) 0 20px;
  }
  
  .hero-content {
    padding-top: 0;
    transform: scale(0.8);
  }
  
  .hero-stats {
    margin-bottom: 24px;
  }
  
  .hero-actions {
    margin-bottom: 24px;
  }
  
  .hero-badge {
    margin-bottom: 16px;
  }
  
  .hero-title {
    margin-bottom: 16px;
  }
  
  .hero-description {
    margin-bottom: 24px;
  }
}

/* ===== تحسينات للشاشات فائقة العرض ===== */
@media (min-aspect-ratio: 21/9) {
  .hero-content {
    max-width: 1200px;
  }
  
  .hero-stats {
    gap: 80px;
  }
  
  .hero-actions {
    gap: 32px;
  }
}

/* ===== تحسينات نهائية للتوسيط ===== */
.hero-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
}

/* ===== إضافات للتوافق مع جميع المتصفحات ===== */
.hero-content {
  -webkit-box-align: center;
  -ms-flex-align: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
}

.hero-stats {
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
}

.hero-actions {
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
}

.hero-info {
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
}

/* ===== تحسينات الأمان والخصوصية ===== */
img {
  max-width: 100%;
  height: auto;
}

iframe {
  border: none;
  max-width: 100%;
}

/* ===== تحسينات SEO ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: inherit;
  line-height: 1.2;
}

/* ===== النهاية ===== */