/* ================================================
   SIBHOST WHMCS THEME — Animations
   animations.css
   ================================================ */

/* ─── Keyframes ─── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0)    scale(1); }
  50%       { transform: translateY(-28px) scale(1.04); }
}

@keyframes pulse {
  0%, 100% { opacity: 1;   transform: scale(1);   }
  50%       { opacity: 0.4; transform: scale(1.45); }
}

@keyframes statusBreathe {
  0%, 100% { opacity: 0.45; }
  50%       { opacity: 1; }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 8px  rgba(6,182,212,0.3); }
  50%       { box-shadow: 0 0 22px rgba(6,182,212,0.7); }
}

@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes iconDrawPop {
  50% { transform: scale(1.12); }
}

/* بدون transform: تا <main> برای فرزندان position:fixed (مثل مودال‌ها) containing-block نشود */
@keyframes pageEnter {
  from { opacity: 0; margin-top: 20px; }
  to   { opacity: 1; margin-top: 0; }
}

/* ─── Utility Classes ─── */

/* ورود صفحه */
.anim-fade-up   { animation: fadeInUp    0.45s ease both; }
.anim-fade-down { animation: fadeInDown  0.45s ease both; }
.anim-fade-right{ animation: fadeInRight 0.45s ease both; }
.anim-fade-in   { animation: fadeIn      0.35s ease both; }
.anim-scale-in  { animation: scaleIn     0.35s ease both; }

/* تأخیر برای stagger کردن کارت‌ها */
.anim-delay-1 { animation-delay: 0.05s; }
.anim-delay-2 { animation-delay: 0.10s; }
.anim-delay-3 { animation-delay: 0.15s; }
.anim-delay-4 { animation-delay: 0.20s; }
.anim-delay-5 { animation-delay: 0.25s; }
.anim-delay-6 { animation-delay: 0.30s; }
.anim-delay-7 { animation-delay: 0.35s; }
.anim-delay-8 { animation-delay: 0.40s; }

/* ورود پلکانی گرید/لیست — والد با JS کلاس .in می‌گیرد، هر آیتم --i خودش را دارد */
.stagger-item { opacity: 0; }
.stagger-grid.in .stagger-item,
.stagger-list.in .stagger-item {
  animation: fadeInUp 0.5s cubic-bezier(.16,1,.3,1) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}

/* همیشه فعال */
.anim-float { animation: float  7s ease-in-out infinite; }
.anim-pulse { animation: pulse  2s ease-in-out infinite; }
.anim-glow  { animation: glow   2.5s ease-in-out infinite; }
.anim-spin  { animation: spin   1s linear infinite; }

/* ─── Background Orbs ─── */
.bg-orbs {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  overflow: hidden;
  transition: transform .6s cubic-bezier(.2,.8,.2,1);
}
.orb { position: absolute; border-radius: 50%; display: none; }

@keyframes orbDrift1 {
  0%, 100% { transform: translate(0,0) scale(1) rotate(0deg); }
  50%      { transform: translate(-30px,30px) scale(1.08) rotate(8deg); }
}
@keyframes orbDrift2 {
  0%, 100% { transform: translate(0,0) scale(1) rotate(0deg); }
  50%      { transform: translate(25px,-25px) scale(1.06) rotate(-6deg); }
}
@keyframes orbAurora {
  0%, 100% { transform: translate(0,0) scale(1); }
  33%      { transform: translate(50px,-40px) scale(1.12); }
  66%      { transform: translate(-40px,30px) scale(.94); }
}
@keyframes orbSlow {
  0%, 100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(-25px,25px) scale(1.06); }
}

/* ── کلاسیک — نسخه قبلی ── */
.bg-classic .orb-1, .bg-classic .orb-2, .bg-classic .orb-3 { display: block; }
.bg-classic .orb-1 { width:600px; height:600px; background:var(--brand-blue); top:-150px; right:-100px; filter:blur(80px); opacity:.15; animation: float 8s ease-in-out infinite; }
.bg-classic .orb-2 { width:430px; height:430px; background:var(--brand-cyan); bottom:-100px; left:-80px; filter:blur(80px); opacity:.15; animation: float 8s ease-in-out infinite 3s; }
.bg-classic .orb-3 { width:280px; height:280px; background:#1D4ED8; top:40%; left:28%; filter:blur(80px); opacity:.15; animation: float 8s ease-in-out infinite 6s; }

/* ── میکس رنگ گرم — پیش‌فرض ── */
.bg-warm .orb-1, .bg-warm .orb-2, .bg-warm .orb-3, .bg-warm .orb-4, .bg-warm .orb-5 { display: block; }
.bg-warm .orb-1 { width:600px; height:600px; background:var(--brand-blue); top:-150px; right:-100px; filter:blur(80px); opacity:.12; animation: float 9s ease-in-out infinite; }
.bg-warm .orb-2 { width:430px; height:430px; background:var(--brand-cyan); bottom:-100px; left:-80px; filter:blur(80px); opacity:.12; animation: float 9s ease-in-out infinite 3s; }
.bg-warm .orb-3 { width:280px; height:280px; background:#1D4ED8; top:40%; left:28%; filter:blur(80px); opacity:.10; animation: float 9s ease-in-out infinite 6s; }
.bg-warm .orb-4 {
  width:430px; height:430px;
  background: radial-gradient(circle at 40% 40%, #F472B6 0%, var(--brand-pink) 55%, transparent 75%);
  top:-100px; left:-60px; filter:blur(70px); opacity:.13;
  animation: orbDrift2 12s ease-in-out infinite 1.5s;
}
.bg-warm .orb-5 {
  width:360px; height:360px;
  background: radial-gradient(circle at 45% 45%, #A78BFA 0%, var(--brand-purple) 55%, transparent 75%);
  bottom:40px; right:6%; filter:blur(70px); opacity:.20;
  animation: orbDrift1 14s ease-in-out infinite 4s;
}

/* ── اورورا مدرن ── */
.bg-aurora .orb-1, .bg-aurora .orb-2, .bg-aurora .orb-3, .bg-aurora .orb-4 { display: block; mix-blend-mode: screen; }
.bg-aurora .orb-1 { width:750px; height:750px; background: radial-gradient(circle, var(--brand-blue) 0%, transparent 70%); top:-220px; right:-180px; filter:blur(55px); opacity:.55; animation: orbAurora 24s ease-in-out infinite; }
.bg-aurora .orb-2 { width:600px; height:600px; background: radial-gradient(circle, var(--brand-cyan) 0%, transparent 70%); bottom:-160px; left:-140px; filter:blur(55px); opacity:.45; animation: orbAurora 28s ease-in-out infinite 4s; }
.bg-aurora .orb-3 { width:520px; height:520px; background: radial-gradient(circle, #D946EF 0%, transparent 70%); top:18%; left:32%; filter:blur(65px); opacity:.30; animation: orbAurora 21s ease-in-out infinite 8s; }
.bg-aurora .orb-4 { width:430px; height:430px; background: radial-gradient(circle, var(--brand-purple) 0%, transparent 70%); bottom:8%; right:10%; filter:blur(60px); opacity:.35; animation: orbAurora 25s ease-in-out infinite 2s; }

/* ── مینیمال پرمیوم — + parallax از bg-effects.js ── */
.bg-minimal .orb-1, .bg-minimal .orb-2 { display: block; }
.bg-minimal .orb-1 { width:820px; height:820px; background: radial-gradient(circle, var(--brand-blue) 0%, transparent 65%); top:-250px; right:-220px; filter:blur(110px); opacity:.20; animation: orbSlow 32s ease-in-out infinite; }
.bg-minimal .orb-2 { width:680px; height:680px; background: radial-gradient(circle, #F472B6 0%, var(--brand-pink) 60%, transparent 70%); bottom:-220px; left:-180px; filter:blur(110px); opacity:.16; animation: orbSlow 36s ease-in-out infinite 6s; }

/* ─── Fireworks overlay (bg_fireworks) ─── */
#fwCanvas {
  position: fixed; inset: 0; z-index: 5;
  pointer-events: none;
}

/* ─── Skeleton Loading ─── */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-card) 25%,
    var(--bg-card-hover) 50%,
    var(--bg-card) 75%
  );
  background-size: 400px 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-md);
}
.skeleton-text  { height: 14px; margin-bottom: var(--space-2); }
.skeleton-title { height: 20px; width: 60%; margin-bottom: var(--space-3); }
.skeleton-card  { height: 120px; }

/* ─── Page Transition ─── */
.page-enter {
  animation: pageEnter 0.4s ease both;
}

/* ─── Hover Lift ─── */
.hover-lift {
  transition: transform var(--transition-normal),
              box-shadow var(--transition-normal);
}
.hover-lift:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

/* ─── دسترس‌پذیری: کاهش حرکت ───
   اگر کاربر در سیستم‌عامل «کاهش حرکت» را فعال کرده باشد،
   همه‌ی انیمیشن‌ها و ترنزیشن‌های قالب عملاً آنی می‌شوند. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
