/* ==============================================================================
   جعبه ساز (boxmaker.ir) - استایل‌های اختصاصی و واکنش‌گرا
   صنایع کارتن‌سازی، چاپ، لمینت و دایکات در رباط کریم
   تلفن: ۰۲۱۹۱۰۱۱۸۵۱ | همراه: ۰۹۳۵۶۳۲۳۲۳۲
   ============================================================================== */

:root {
  --primary: #f59e0b;
  --primary-hover: #d97706;
  --primary-dark: #b45309;
  --dark-bg: #111827;
  --card-bg: #ffffff;
  --font-persian: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', Tahoma, Arial, sans-serif;
}

* {
  font-family: var(--font-persian);
  box-sizing: border-box;
}

/* بهینه‌سازی سرعت: بارگذاری بخش‌های بر حسب تقاضا */
.on-demand-section {
  content-visibility: auto;
  contain-intrinsic-size: 1px 500px;
  transition: opacity 0.3s ease;
}
.on-demand-section.section-active {
  opacity: 1;
}

html {
  scroll-behavior: smooth;
  direction: rtl;
}

body {
  background-color: #f8fafc;
  color: #1e293b;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

/* اعداد فارسی در متن‌ها */
.persian-num {
  font-feature-settings: "ss01";
}

/* افکت موج و انیمیشن‌های نرم */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

/* استایل اسکرول بار زیبا */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* شیشه‌ای / Glassmorphism */
.glass-nav {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.glass-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

/* گرادینت‌های صنعتی کارتن و بسته‌بندی */
.bg-carton-pattern {
  background-color: #1e293b;
  background-image: radial-gradient(rgba(245, 158, 11, 0.15) 1px, transparent 1px);
  background-size: 24px 24px;
}

.badge-pulse {
  position: relative;
}
.badge-pulse::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: inherit;
  border: 2px solid rgba(245, 158, 11, 0.6);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* فرم‌ها و اینپوت‌ها */
input, select, textarea {
  transition: all 0.2s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15) !important;
}

/* دکمه‌های پررنگ */
.btn-primary {
  background-color: #f59e0b;
  color: #ffffff;
  font-weight: 700;
  transition: all 0.2s ease;
}
.btn-primary:hover {
  background-color: #d97706;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.25);
}

/* کارت‌های خدمات */
.service-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.08);
  border-color: #f59e0b;
}

/* توست و پیام‌ها */
#toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
  animation: toastIn 0.3s ease-out;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.toast-success {
  background: #10b981;
  color: #ffffff;
}

.toast-error {
  background: #ef4444;
  color: #ffffff;
}

.toast-info {
  background: #0ea5e9;
  color: #ffffff;
}
