/* ═══════════════════════════════════════════════════════════
   WCFW - Enhanced Animations & Effects
   مركز وندرمايند — تأثيرات متحركة متقدمة
   ═══════════════════════════════════════════════════════════ */

/* ── Fade & Slide Animations ── */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

.slide-right {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.slide-right.visible { opacity: 1; transform: translateX(0); }

.slide-left {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.slide-left.visible { opacity: 1; transform: translateX(0); }

.zoom-in {
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.zoom-in.visible { opacity: 1; transform: scale(1); }

/* Delay utilities */
.delay-100 { transition-delay: 0.1s !important; }
.delay-200 { transition-delay: 0.2s !important; }
.delay-300 { transition-delay: 0.3s !important; }
.delay-400 { transition-delay: 0.4s !important; }
.delay-500 { transition-delay: 0.5s !important; }

/* ── Floating Background Container ── */
.floating-bg-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

/* ── Particle Canvas ── */
#heroParticles {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ── Glow Text Effects ── */
.glow-text-green {
  text-shadow: 0 0 30px rgba(106,142,78,0.5), 0 0 60px rgba(106,142,78,0.2);
}
.glow-text-gold {
  text-shadow: 0 0 30px rgba(212,175,55,0.5), 0 0 60px rgba(212,175,55,0.2);
}
.gold-text-gradient {
  background: linear-gradient(135deg, #d4af37, #f2994a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.green-text-gradient {
  background: linear-gradient(135deg, #6a8e4e, #4ee8a8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Shimmer Loading Effect ── */
@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}
.shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite linear;
}

/* ── Custom Cursor (Desktop) ── */
.custom-cursor {
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  mix-blend-mode: difference;
  transition: transform 0.15s ease, width 0.2s ease, height 0.2s ease;
  top: 0;
  left: 0;
}
.custom-cursor::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease;
}
.custom-cursor::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 40px;
  height: 40px;
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}
.custom-cursor.hovering::before { transform: translate(-50%, -50%) scale(2.5); }
.custom-cursor.hovering::after { transform: translate(-50%, -50%) scale(0.6); opacity: 0; }

/* ── Scroll Progress Bar ── */
#scrollProgress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #6a8e4e, #d4af37, #f2994a);
  z-index: 9999;
  width: 0%;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px rgba(212,175,55,0.5);
}

/* ── Typewriter Effect ── */
.typewriter-cursor::after {
  content: '|';
  animation: blink-cursor 0.7s infinite;
  color: #d4af37;
}
@keyframes blink-cursor { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ── Counter Animation ── */
.stat-number {
  display: inline-block;
  transition: all 0.3s;
}

/* ── Ripple Click Effect ── */
.ripple {
  position: relative;
  overflow: hidden;
}
.ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease, opacity 0.6s ease;
  opacity: 0;
}
.ripple.animate::after {
  width: 300px;
  height: 300px;
  opacity: 0;
}

/* ── Parallax Elements ── */
.parallax-slow { will-change: transform; }
.parallax-fast { will-change: transform; }

/* ── Preloader Upgraded ── */
.preloader {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #0a1b3f 0%, #0d2a1e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.preloader.hidden { opacity: 0; visibility: hidden; }
.preloader-content { text-align: center; }
.preloader-logo h1 {
  font-size: 2.5rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #4ee8a8, #d4af37);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.preloader-logo p { color: rgba(255,255,255,0.6); font-size: 1rem; margin-bottom: 30px; }
.preloader-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255,255,255,0.1);
  border-top-color: #6a8e4e;
  border-right-color: #d4af37;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* ── Hero Scroll Indicator ── */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 5;
  cursor: pointer;
  text-decoration: none;
}
.scroll-indicator-dot {
  width: 6px;
  height: 6px;
  background: rgba(255,255,255,0.8);
  border-radius: 50%;
  animation: scroll-dots 1.5s infinite;
}
.scroll-indicator-dot:nth-child(2) { animation-delay: 0.2s; }
.scroll-indicator-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes scroll-dots {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(4px); }
}
.scroll-indicator-text {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
}

/* ── AOS Custom Overrides ── */
[data-aos="fade-up"] { opacity: 1 !important; transform: none !important; }
[data-aos].aos-animate { opacity: 1 !important; transform: none !important; }

/* ── Gradient Borders ── */
.gradient-border {
  position: relative;
  background: #fff;
  border-radius: 20px;
}
.gradient-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 22px;
  background: linear-gradient(135deg, #6a8e4e, #d4af37, #f2994a);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s;
}
.gradient-border:hover::before { opacity: 1; }

/* ── Section Reveal ── */
.section-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease, transform 1s ease;
}
.section-reveal.revealed { opacity: 1; transform: translateY(0); }

/* ── Floating Particles (CSS only fallback) ── */
.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: particle-float linear infinite;
}
@keyframes particle-float {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-100px) rotate(720deg); opacity: 0; }
}

/* ── Image Hover Effects ── */
.img-hover-zoom {
  overflow: hidden;
  border-radius: 20px;
}
.img-hover-zoom img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}
.img-hover-zoom:hover img { transform: scale(1.08); }

/* ── Loading Skeleton ── */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 8px;
}
@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Back to Top Enhanced ── */
.back-to-top {
  position: fixed;
  left: 30px;
  bottom: 30px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-navy), #0d2a5c);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  border: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: 0.3s;
  z-index: 998;
  box-shadow: 0 8px 25px rgba(10,27,63,0.3);
  border: 2px solid rgba(255,255,255,0.1);
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: linear-gradient(135deg, var(--c-green), #3da874);
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(106,142,78,0.4);
}

/* ── Glassmorphism Cards ── */
.glass-card-dark {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  transition: 0.4s;
}
.glass-card-dark:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(106,142,78,0.3);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

/* ── News Ticker Animation Fix ── */
@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.news-ticker-content {
  white-space: nowrap;
  animation: ticker 60s linear infinite;
  display: inline-block;
}
.news-ticker-content:hover { animation-play-state: paused; }

/* ── Mobile: Reduce animations ── */
@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: 768px) {
  .custom-cursor { display: none; }
  .particle { display: none; }
}
