/* ===========================
   Animations Stylesheet
   Medovaya Lepyoshka Auto Selection Services
   Theme: Futuristic Vaporwave
=========================== */

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

/* Float animation for hero image */
@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
  100% {
    transform: translateY(0);
  }
}

/* Pulse animation for glowing elements */
@keyframes pulse {
  0% {
    opacity: 0.6;
    transform: scale(0.98);
  }
  50% {
    opacity: 1;
    transform: scale(1.02);
  }
  100% {
    opacity: 0.6;
    transform: scale(0.98);
  }
}

/* Slow rotation for svg elements */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Background shimmer for gradient elements */
@keyframes shimmer {
  0% {
    background-position: -100% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Text glow animation */
@keyframes textGlow {
  0% {
    text-shadow: 0 0 5px var(--neon-blue), 0 0 10px var(--neon-blue);
  }
  50% {
    text-shadow: 0 0 10px var(--neon-blue), 0 0 20px var(--neon-blue), 0 0 30px var(--neon-blue);
  }
  100% {
    text-shadow: 0 0 5px var(--neon-blue), 0 0 10px var(--neon-blue);
  }
}

/* Border glow animation */
@keyframes borderGlow {
  0% {
    box-shadow: 0 0 5px var(--neon-blue), 0 0 10px var(--neon-blue);
  }
  50% {
    box-shadow: 0 0 10px var(--neon-blue), 0 0 20px var(--neon-blue), 0 0 30px var(--neon-blue);
  }
  100% {
    box-shadow: 0 0 5px var(--neon-blue), 0 0 10px var(--neon-blue);
  }
}

/* Grid-line background effect */
@keyframes gridMove {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 50px 50px;
  }
}

/* Checkmark animation for thank you page */
@keyframes checkmarkCircle {
  0% {
    stroke-dashoffset: 166;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes checkmarkCheck {
  0% {
    stroke-dashoffset: 36;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

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

/* Fancy gradient text animation */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* ===== Applied Animations ===== */

/* Hero section animations */
.hero-text h1, 
.hero-text h2, 
.hero-text p {
  animation: fadeIn 1s ease-out forwards;
}

.hero-text h1 {
  animation-delay: 0.2s;
}

.hero-text h2 {
  animation-delay: 0.4s;
}

.hero-text p {
  animation-delay: 0.6s;
}

.hero-buttons {
  animation: fadeIn 1s ease-out 0.8s forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}

.hero-image {
  animation: fadeIn 1s ease-out 0.5s forwards, float 6s ease-in-out infinite;
  opacity: 0;
  animation-fill-mode: forwards;
}

/* Glowing text animation */
.glow-text {
  animation: textGlow 3s ease-in-out infinite;
}

/* Applied to neon frame in about section */
.neon-frame {
  animation: borderGlow 4s ease-in-out infinite;
}

/* Service card hover animations */
.service-card:hover .service-icon img {
  animation: pulse 2s ease-in-out infinite;
}

/* Animated gradient backgrounds */
.btn-primary, .section-header h2::after {
  background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple), var(--neon-pink), var(--neon-blue));
  background-size: 300% 100%;
  animation: gradientShift 8s linear infinite;
}

/* Testimonial slider animation */
.testimonial-track {
  transition: transform 0.6s ease-in-out;
}

/* Animated checkmark for Thank You page */
.checkmark {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: block;
  stroke-width: 3;
  stroke: var(--neon-blue);
  stroke-miterlimit: 10;
  box-shadow: 0 0 15px var(--neon-blue);
  margin: 0 auto;
}

.checkmark__circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke: var(--neon-blue);
  stroke-width: 3;
  stroke-miterlimit: 10;
  fill: transparent;
  animation: checkmarkCircle 1s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark__check {
  transform-origin: 50% 50%;
  stroke-dasharray: 36;
  stroke-dashoffset: 36;
  animation: checkmarkCheck 0.5s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

/* Data AOS (Appear on Scroll) animations */
[data-aos] {
  opacity: 0;
  transition-property: transform, opacity;
  transition-duration: 0.8s;
  transition-timing-function: ease-out;
}

[data-aos="fade-up"] {
  transform: translateY(50px);
}

[data-aos="fade-down"] {
  transform: translateY(-50px);
}

[data-aos="fade-left"] {
  transform: translateX(50px);
}

[data-aos="fade-right"] {
  transform: translateX(-50px);
}

[data-aos="zoom-in"] {
  transform: scale(0.9);
}

[data-aos].aos-animate {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

/* Custom hover effects for cards */
.service-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 255, 255, 0.4) 0%, rgba(0, 255, 255, 0) 60%);
  opacity: 0;
  transform: scale(0.5);
  pointer-events: none;
  transition: all 0.8s ease;
  z-index: -1;
}

.service-card:hover::after {
  opacity: 0.2;
  transform: scale(1);
}

/* Hover effects for buttons */
.btn-primary::before,
.btn-secondary::before,
.btn-outline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 70%);
  opacity: 0;
  border-radius: var(--button-border-radius);
  transform: scale(0.5);
  transition: all 0.4s ease;
  z-index: -1;
}

.btn-primary:hover::before,
.btn-secondary:hover::before,
.btn-outline:hover::before {
  opacity: 1;
  transform: scale(2);
}

/* Menu toggle animation */
.menu-toggle span {
  transition: all 0.3s ease;
}

/* Applied Media Queries for Animations */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
