/* فایل بهینه‌سازی عملکرد - Performance Optimization */

/* بهینه‌سازی برای موبایل - حذف انیمیشن‌های سنگین */
@media (max-width: 768px) {
  /* حذف انیمیشن‌های سنگین */
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  /* حذف فیلترهای سنگین */
  .bg {
    filter: none !important;
    backdrop-filter: none !important;
  }
  
  /* حذف blur effects */
  .welcome-box,
  .special-offer,
  .top-contact,
  .flags {
    backdrop-filter: none !important;
  }
  
  /* حذف انیمیشن ذرات */
  .particles {
    display: none !important;
  }
  
  /* حذف انیمیشن‌های glow */
  h1 {
    animation: none !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5) !important;
  }
  
  /* حذف انیمیشن‌های sparkle و bounce */
  .special-offer {
    animation: none !important;
  }
  
  .special-offer::before {
    animation: none !important;
  }
  
  /* حذف انیمیشن pulse */
  .click-hint {
    animation: none !important;
    opacity: 0.8 !important;
  }
  
  /* بهینه‌سازی gradient ها */
  .welcome-box {
    background: rgba(0, 0, 0, 0.8) !important;
  }
  
  .special-offer {
    background: #ff6b6b !important;
  }
  
  /* حذف shadow های سنگین */
  .welcome-box {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
  }
}

/* بهینه‌سازی عمومی */
.performance-mode {
  /* کاهش کیفیت رندرینگ برای عملکرد بهتر */
  transform: translateZ(0);
  will-change: auto;
}

/* Lazy loading برای تصاویر */
img[data-src] {
  opacity: 0;
  transition: opacity 0.3s;
}

img[data-src].loaded {
  opacity: 1;
}

/* بهینه‌سازی فونت‌ها */
@media (max-width: 768px) {
  * {
    font-family: system-ui, -apple-system, sans-serif !important;
  }
}

/* حذف انیمیشن‌های اضافی در حالت کم مصرف */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* بهینه‌سازی برای دستگاه‌های ضعیف */
@media (max-width: 480px) {
  /* حذف کامل gradient ها */
  .welcome-box,
  .special-offer,
  .top-contact {
    background: solid colors !important;
  }
  
  /* کاهش padding و margin */
  .welcome-box {
    padding: 15px !important;
  }
  
  /* حذف border-radius های پیچیده */
  .welcome-box,
  .special-offer {
    border-radius: 10px !important;
  }
}