/* ============================================
   ZADEV Landing Page - Animations
   ============================================ */

/* ============================================
   Keyframe Animations
   ============================================ */

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

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

/* Slide In Animation */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Fade In Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade In Up Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade In Down Animation */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

/* Rotate In Animation */
@keyframes rotateIn {
  from {
    opacity: 0;
    transform: rotate(-180deg) scale(0.8);
  }
  to {
    opacity: 1;
    transform: rotate(0deg) scale(1);
  }
}

/* Glow Animation */
@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(25, 167, 206, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(25, 167, 206, 0.6);
  }
}

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

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

@keyframes tooltipFade {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  25% {
    opacity: 1;           /* pop in quickly */
    transform: translateY(0);
  }
  38% {
    opacity: 0;           /* disappear quickly */
    transform: translateY(-10px);
  }
  100% {
    opacity: 0;           /* stay invisible for the rest */
    transform: translateY(-10px);
  }
}


/* Progress Bar Fill */
@keyframes progressFill {
  from {
    width: 0%;
  }
  to {
    width: var(--progress-width, 100%);
  }
}

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

/* Particle Float */
@keyframes particleFloat {
  0%, 100% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(30px, -30px);
  }
  66% {
    transform: translate(-20px, 20px);
  }
}

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

/* Blink Animation */
@keyframes blink {
  0%, 50%, 100% {
    opacity: 1;
  }
  25%, 75% {
    opacity: 0.3;
  }
}

/* ============================================
   Scroll-Triggered Animation Classes
   ============================================ */

/* Elements to be animated on scroll */
.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate.active {
  opacity: 1;
  transform: translateY(0);
}

/* Fade animations */
.fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in-down {
  animation: fadeInDown 0.8s ease-out forwards;
}

/* Slide animations */
.slide-in-left {
  animation: slideInLeft 0.8s ease-out forwards;
}

.slide-in-right {
  animation: slideInRight 0.8s ease-out forwards;
}

/* Scale animation */
.scale-in {
  animation: scaleIn 0.6s ease-out forwards;
}

/* Rotate animation */
.rotate-in {
  animation: rotateIn 0.8s ease-out forwards;
}

/* Stagger delays for sequential animations */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }

/* ============================================
   Background Animations
   ============================================ */

/* Animated Gradient Background */
.gradient-bg-animated {
  background: linear-gradient(-45deg, #19A7CE, #146C94, #000000, #19A7CE);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

/* Particle Background */
.particle-bg {
  position: relative;
  overflow: hidden;
}

.particle-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(25, 167, 206, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(20, 108, 148, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(25, 167, 206, 0.08) 0%, transparent 50%);
  animation: particleFloat 20s ease-in-out infinite;
}

/* Grid Background */
.grid-bg {
  background-image:
    linear-gradient(rgba(25, 167, 206, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25, 167, 206, 0.05) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* ============================================
   Interactive Hover Effects
   ============================================ */

/* Button Hover Effects */
.btn-hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(25, 167, 206, 0.3);
}

/* Card Hover Glow */
.card-hover-glow {
  transition: all 0.4s ease;
  position: relative;
}

.card-hover-glow::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.4s ease;
  box-shadow: 0 0 40px rgba(25, 167, 206, 0.4);
  pointer-events: none;
}

.card-hover-glow:hover::after {
  opacity: 1;
}

/* Text Shimmer Effect */
.text-shimmer {
  background: linear-gradient(90deg,
    #F6F1F1 0%,
    #19A7CE 50%,
    #F6F1F1 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

/* Icon Bounce on Hover */
.icon-bounce:hover {
  animation: bounce 0.6s ease;
}

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

/* ============================================
   Loading Animations
   ============================================ */

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(20, 108, 148, 0.1) 25%,
    rgba(25, 167, 206, 0.15) 50%,
    rgba(20, 108, 148, 0.1) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

/* Spinner Loading */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(25, 167, 206, 0.2);
  border-top-color: #19A7CE;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Dots Loading */
.dots-loading {
  display: flex;
  gap: 8px;
}

.dots-loading span {
  width: 10px;
  height: 10px;
  background: #19A7CE;
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out;
}

.dots-loading span:nth-child(1) {
  animation-delay: -0.32s;
}

.dots-loading span:nth-child(2) {
  animation-delay: -0.16s;
}

/* ============================================
   Progress Indicators
   ============================================ */

/* Progress Bar */
.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(25, 167, 206, 0.1);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #19A7CE, #146C94);
  border-radius: 999px;
  animation: progressFill 2s ease-out forwards;
  box-shadow: 0 0 10px rgba(25, 167, 206, 0.5);
}

/* Infinite Progress Bar */
.progress-infinite {
  position: relative;
  width: 100%;
  height: 4px;
  background: rgba(25, 167, 206, 0.1);
  overflow: hidden;
  border-radius: 999px;
}

.progress-infinite::after {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #19A7CE, transparent);
  animation: shimmer 1.5s infinite;
}

/* ============================================
   Notification Animations
   ============================================ */

/* Toast Slide In */
@keyframes toastSlideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Modal Fade In */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ============================================
   Parallax Effects (controlled via JS)
   ============================================ */

.parallax-slow {
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.parallax-medium {
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.parallax-fast {
  transition: transform 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ============================================
   Accessibility - Reduced Motion
   ============================================ */

@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;
  }

  .scroll-animate {
    opacity: 1;
    transform: none;
  }

  .particle-bg::before {
    animation: none;
  }

  .gradient-bg-animated {
    animation: none;
  }
}

/* ============================================
   Custom Cursor Effects (Optional)
   ============================================ */

.cursor-pointer {
  cursor: pointer;
}

.cursor-grab {
  cursor: grab;
}

.cursor-grab:active {
  cursor: grabbing;
}

/* ============================================
   Print Styles (Disable Animations)
   ============================================ */

@media print {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
