/* ============================================
   GLOBAL SUCCESS TEACHING - Animations
   ============================================ */

/* ---------- Fade Animations ---------- */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-down {
  opacity: 0;
  transform: translateY(-40px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-down.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in {
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
  opacity: 1;
}

.scale-in {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* ---------- Stagger Delays ---------- */
.delay-1 { transition-delay: 0.1s !important; }
.delay-2 { transition-delay: 0.2s !important; }
.delay-3 { transition-delay: 0.3s !important; }
.delay-4 { transition-delay: 0.4s !important; }
.delay-5 { transition-delay: 0.5s !important; }
.delay-6 { transition-delay: 0.6s !important; }
.delay-7 { transition-delay: 0.7s !important; }
.delay-8 { transition-delay: 0.8s !important; }

/* ---------- Floating Animation ---------- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

.float {
  animation: float 4s ease-in-out infinite;
}

.float-slow {
  animation: float 6s ease-in-out infinite;
}

.float-delay {
  animation: float 4s ease-in-out infinite 1s;
}

/* ---------- Pulse Glow ---------- */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 181, 71, 0.3); }
  50% { box-shadow: 0 0 25px 5px rgba(232, 181, 71, 0.15); }
}

.pulse-glow {
  animation: pulseGlow 3s ease-in-out infinite;
}

/* ---------- Shimmer ---------- */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.shimmer {
  background: linear-gradient(
    90deg,
    var(--secondary) 0%,
    var(--secondary-light) 25%,
    var(--white) 50%,
    var(--secondary-light) 75%,
    var(--secondary) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

/* ---------- Typing Cursor ---------- */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--secondary);
  margin-left: 4px;
  animation: blink 0.8s step-end infinite;
  vertical-align: text-bottom;
}

/* ---------- Gradient Text Flow ---------- */
@keyframes gradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.gradient-flow {
  background: linear-gradient(270deg, #E8B547, #FFE08A, #F2D77A, #E8B547);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientFlow 5s ease infinite;
}

/* ---------- Particle Dots ---------- */
@keyframes particleFloat {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0;
  }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% {
    transform: translate(var(--tx, 100px), var(--ty, -200px)) rotate(360deg);
    opacity: 0;
  }
}

/* ---------- Counter Animation ---------- */
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Ripple Effect ---------- */
@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 0.4;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple .ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  width: 50px;
  height: 50px;
  pointer-events: none;
  animation: ripple 0.6s linear;
}

/* ---------- Scroll Progress Bar ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gold-gradient);
  z-index: 10000;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

/* ---------- Parallax Shapes ---------- */
.parallax-shape {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.shape-circle {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 1px solid rgba(232, 181, 71, 0.06);
}

.shape-ring {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 2px solid rgba(232, 181, 71, 0.08);
}

.shape-dots {
  width: 150px;
  height: 150px;
  background-image: radial-gradient(circle, rgba(232, 181, 71, 0.15) 1px, transparent 1px);
  background-size: 15px 15px;
}

/* ---------- Magnetic Hover ---------- */
.magnetic {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Line Draw ---------- */
@keyframes drawLine {
  from { width: 0; }
  to { width: 100%; }
}

.line-draw {
  position: relative;
  display: inline-block;
}

.line-draw::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  height: 2px;
  background: var(--gold-gradient);
  width: 0;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.line-draw.visible::after {
  width: 100%;
}

/* ---------- Tilt Card Effect ---------- */
.tilt-card {
  transform-style: preserve-3d;
  perspective: 1000px;
}

.tilt-card-inner {
  transition: transform 0.3s ease;
  transform-style: preserve-3d;
}

/* ---------- Loading Skeleton ---------- */
@keyframes skeleton {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton 1.5s ease infinite;
  border-radius: var(--radius-sm);
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .fade-up,
  .fade-down,
  .fade-left,
  .fade-right,
  .fade-in,
  .scale-in {
    opacity: 1;
    transform: none;
  }
}
