/* ============================================
   Advanced Animations Enhancement
   Smooth & Professional Animations
============================================ */

/* Fade In Animation for Page Load */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Scale In Animation */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Slide In From Left */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Slide In From Right */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Pulse Animation */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Bounce Animation */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Rotate Animation */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Shimmer Effect */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* Glow Pulse */
@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(79, 70, 229, 0.6);
  }
}

/* Apply Animations to Elements */

/* Banner Content */
.banner_content h3 {
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.banner_content h1 {
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.banner_content h5 {
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.banner_content .primary_btn {
  animation: fadeInUp 0.8s ease-out 0.8s both;
}

/* Profile Image Container */
.profile-image-container {
  animation: fadeIn 1s ease-out 0.3s both;
}

/* Section Titles */
.main_title h2 {
  animation: fadeInUp 0.6s ease-out both;
}

.main_title p {
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

/* Feature Items */
.feature_item {
  animation: scaleIn 0.5s ease-out both;
}

.feature_item:nth-child(1) { animation-delay: 0.1s; }
.feature_item:nth-child(2) { animation-delay: 0.2s; }
.feature_item:nth-child(3) { animation-delay: 0.3s; }
.feature_item:nth-child(4) { animation-delay: 0.4s; }

/* Cards Hover Effects */
.feature_item:hover {
  animation: pulse 0.6s ease-in-out;
}

/* Smooth Scroll Behavior */
html {
  scroll-behavior: smooth;
}

/* Loading State */
.loading {
  animation: shimmer 2s infinite linear;
  background: linear-gradient(
    90deg,
    #f0f0f0 0%,
    #e0e0e0 50%,
    #f0f0f0 100%
  );
  background-size: 1000px 100%;
}

/* Hover Lift Effect */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Button Ripple Effect */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
  width: 300px;
  height: 300px;
}

/* Fade In on Scroll */
.fade-in-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Parallax Layers */
.parallax-layer {
  transition: transform 0.3s ease-out;
}

/* Icon Spin on Hover */
.icon-spin:hover i {
  animation: rotate 0.6s ease-in-out;
}

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

.text-gradient-animated {
  background: linear-gradient(
    90deg,
    #4f46e5,
    #6366f1,
    #818cf8,
    #4f46e5
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 3s ease infinite;
}

/* Stagger Animation for Lists */
.stagger-item {
  opacity: 0;
  animation: fadeInUp 0.5s ease-out forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }
.stagger-item:nth-child(6) { animation-delay: 0.6s; }

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

/* Performance Optimization */
.will-animate {
  will-change: transform, opacity;
}

.gpu-accelerated {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}
