/* ==========================================================================
   ANİMASYONLAR — Sayfa geçişleri, fade-in, loading overlay
   ========================================================================== */

/* ---- Sayfa girişinde kademeli belirme ---- */
.fade-in {
  animation: w2gFadeIn 0.5s ease both;
}
.fade-in-up {
  animation: w2gFadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.stagger > * {
  animation: w2gFadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.stagger > *:nth-child(1) { animation-delay: 0.04s; }
.stagger > *:nth-child(2) { animation-delay: 0.09s; }
.stagger > *:nth-child(3) { animation-delay: 0.14s; }
.stagger > *:nth-child(4) { animation-delay: 0.19s; }
.stagger > *:nth-child(5) { animation-delay: 0.24s; }
.stagger > *:nth-child(6) { animation-delay: 0.29s; }
.stagger > *:nth-child(7) { animation-delay: 0.34s; }
.stagger > *:nth-child(8) { animation-delay: 0.39s; }

@keyframes w2gFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes w2gFadeInUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Genel Hover Kaldırma Efekti ---- */
.hover-lift {
  transition: var(--w2g-transition);
}
.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--w2g-shadow-md);
}

/* ---- Global Sayfa Yükleme Ekranı (Splash) ---- */
.w2g-page-loader {
  position: fixed;
  inset: 0;
  background: var(--w2g-bg);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.1rem;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.w2g-page-loader.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.w2g-loader-logo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: #fff;
  padding: 10px;
  object-fit: contain;
  box-shadow: var(--w2g-shadow-md);
  animation: w2gLoaderPulse 1.4s ease-in-out infinite;
}
.w2g-loader-bar {
  width: 160px;
  height: 5px;
  border-radius: 5px;
  background: var(--w2g-border);
  overflow: hidden;
}
.w2g-loader-bar::after {
  content: '';
  display: block;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, var(--w2g-secondary), var(--w2g-accent));
  border-radius: 5px;
  animation: w2gLoaderSlide 1.1s ease-in-out infinite;
}
@keyframes w2gLoaderPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
@keyframes w2gLoaderSlide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(280%); }
}

/* ---- Toast Bildirim Animasyonu ---- */
.w2g-toast-enter {
  animation: w2gToastIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes w2gToastIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ---- Sayaç / Sayı Artış Efekti İçin Yardımcı ---- */
.count-up { transition: all 0.3s ease; }

/* ---- Erişilebilirlik: Kullanıcı animasyon istemiyorsa ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
