/* 
 * MedOvs Auto - Animations Stylesheet 
 * Vaporwave futuristic animations for auto selection services in Romania
 */

/* Keyframes Definitions */

/* Neon Pulse - For highlighted elements like buttons and titles */
@keyframes neonPulse {
  0% {
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.7), 0 0 20px rgba(255, 0, 255, 0.5);
  }
  50% {
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.9), 0 0 30px rgba(255, 0, 255, 0.7);
  }
  100% {
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.7), 0 0 20px rgba(255, 0, 255, 0.5);
  }
}

/* Text Glow - For glowing text effect */
@keyframes textGlow {
  0% {
    text-shadow: 0 0 5px rgba(255, 0, 255, 0.7), 0 0 10px rgba(255, 0, 255, 0.7), 0 0 20px rgba(255, 0, 255, 0.5), 0 0 40px rgba(255, 0, 255, 0.3);
  }
  50% {
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.9), 0 0 20px rgba(255, 0, 255, 0.9), 0 0 30px rgba(255, 0, 255, 0.7), 0 0 50px rgba(255, 0, 255, 0.5);
  }
  100% {
    text-shadow: 0 0 5px rgba(255, 0, 255, 0.7), 0 0 10px rgba(255, 0, 255, 0.7), 0 0 20px rgba(255, 0, 255, 0.5), 0 0 40px rgba(255, 0, 255, 0.3);
  }
}

/* Cyan Glow - Alternative color for variety */
@keyframes cyanGlow {
  0% {
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.7), 0 0 10px rgba(0, 255, 255, 0.7), 0 0 20px rgba(0, 255, 255, 0.5), 0 0 40px rgba(0, 255, 255, 0.3);
  }
  50% {
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.9), 0 0 20px rgba(0, 255, 255, 0.9), 0 0 30px rgba(0, 255, 255, 0.7), 0 0 50px rgba(0, 255, 255, 0.5);
  }
  100% {
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.7), 0 0 10px rgba(0, 255, 255, 0.7), 0 0 20px rgba(0, 255, 255, 0.5), 0 0 40px rgba(0, 255, 255, 0.3);
  }
}

/* Float Animation - Subtle floating effect for sections */
@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0);
  }
}

/* Fade In - For elements appearing on page load or scroll */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scale In - For elements that grow into view */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Slide In Right - For elements entering from the right */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

/* Rotate - For spinning elements like loading indicators */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Background Pulse - For subtle background effects */
@keyframes backgroundPulse {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Border Glow - For elements with glowing borders */
@keyframes borderGlow {
  0% {
    box-shadow: 0 0 0 2px rgba(255, 0, 255, 0.3);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(255, 0, 255, 0.6);
  }
  100% {
    box-shadow: 0 0 0 2px rgba(255, 0, 255, 0.3);
  }
}

/* Number Counter - For stat counters */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Applied Animations */

/* Glow Text Animation */
.glow-text {
  animation: textGlow 3s infinite;
}

/* Alternative glow for secondary elements */
.glow-cyan {
  animation: cyanGlow 3s infinite;
}

/* Service Cards Float */
.service-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  animation: float 3s ease infinite;
}

/* Button Hover Animation */
.btn-primary:hover, .btn-secondary:hover {
  animation: neonPulse 2s infinite;
}

/* Hero Section Elements Animation */
.hero-content h1, .hero-content p, .hero-content .cta-buttons {
  opacity: 0;
  animation: fadeIn 0.8s forwards;
}

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

.hero-content p {
  animation-delay: 0.4s;
}

.hero-content .cta-buttons {
  animation-delay: 0.6s;
}

.hero-image {
  opacity: 0;
  animation: scaleIn 1s 0.8s forwards;
}

/* About Section Animation */
.about-text, .about-image, .stats-container {
  opacity: 0;
}

.animate-in .about-text {
  animation: slideInLeft 0.8s forwards;
}

.animate-in .about-image {
  animation: slideInRight 0.8s forwards;
}

.animate-in .stats-container {
  animation: fadeIn 0.8s 0.4s forwards;
}

/* Services Animation */
.services-grid .service-card {
  opacity: 0;
}

.animate-in .service-card:nth-child(1) {
  animation: fadeIn 0.6s 0.1s forwards;
}

.animate-in .service-card:nth-child(2) {
  animation: fadeIn 0.6s 0.2s forwards;
}

.animate-in .service-card:nth-child(3) {
  animation: fadeIn 0.6s 0.3s forwards;
}

.animate-in .service-card:nth-child(4) {
  animation: fadeIn 0.6s 0.4s forwards;
}

.animate-in .service-card:nth-child(5) {
  animation: fadeIn 0.6s 0.5s forwards;
}

.animate-in .service-card:nth-child(6) {
  animation: fadeIn 0.6s 0.6s forwards;
}

/* Process Timeline Animation */
.timeline-item {
  opacity: 0;
}

.animate-in .timeline-item:nth-child(1) {
  animation: slideInLeft 0.8s 0.1s forwards;
}

.animate-in .timeline-item:nth-child(2) {
  animation: slideInLeft 0.8s 0.3s forwards;
}

.animate-in .timeline-item:nth-child(3) {
  animation: slideInLeft 0.8s 0.5s forwards;
}

.animate-in .timeline-item:nth-child(4) {
  animation: slideInLeft 0.8s 0.7s forwards;
}

/* Testimonial Animation */
.testimonial-card {
  opacity: 0;
  animation: scaleIn 0.8s forwards;
}

/* Blog Cards Animation */
.blog-card {
  opacity: 0;
}

.animate-in .blog-card:nth-child(1) {
  animation: fadeIn 0.8s 0.1s forwards;
}

.animate-in .blog-card:nth-child(2) {
  animation: fadeIn 0.8s 0.2s forwards;
}

.animate-in .blog-card:nth-child(3) {
  animation: fadeIn 0.8s 0.3s forwards;
}

.animate-in .blog-card:nth-child(4) {
  animation: fadeIn 0.8s 0.4s forwards;
}

/* Form Animation */
.form-group {
  opacity: 0;
}

.animate-in .form-group:nth-child(1) {
  animation: fadeIn 0.6s 0.1s forwards;
}

.animate-in .form-group:nth-child(2) {
  animation: fadeIn 0.6s 0.2s forwards;
}

.animate-in .form-group:nth-child(3) {
  animation: fadeIn 0.6s 0.3s forwards;
}

.animate-in .form-group:nth-child(4) {
  animation: fadeIn 0.6s 0.4s forwards;
}

/* Contact Info Animation */
.contact-item {
  opacity: 0;
}

.animate-in .contact-item:nth-child(1) {
  animation: fadeIn 0.6s 0.1s forwards;
}

.animate-in .contact-item:nth-child(2) {
  animation: fadeIn 0.6s 0.2s forwards;
}

.animate-in .contact-item:nth-child(3) {
  animation: fadeIn 0.6s 0.3s forwards;
}

.animate-in .contact-item:nth-child(4) {
  animation: fadeIn 0.6s 0.4s forwards;
}

/* Social Icons Animation */
.social-icon {
  opacity: 0;
}

.animate-in .social-icon:nth-child(1) {
  animation: fadeIn 0.4s 0.1s forwards;
}

.animate-in .social-icon:nth-child(2) {
  animation: fadeIn 0.4s 0.2s forwards;
}

.animate-in .social-icon:nth-child(3) {
  animation: fadeIn 0.4s 0.3s forwards;
}

.animate-in .social-icon:nth-child(4) {
  animation: fadeIn 0.4s 0.4s forwards;
}

/* Stats Counter Animation */
.counter {
  display: inline-block;
  opacity: 0;
  animation: countUp 1s forwards;
}

/* Section Divider Animation */
.section-divider {
  position: relative;
  overflow: hidden;
}

.section-divider::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 0, 255, 0), rgba(255, 0, 255, 0.8), rgba(255, 0, 255, 0));
  animation: shimmer 2s infinite;
}

/* Cookie Banner Animation */
.cookie-banner {
  animation: fadeIn 0.8s;
}

.cookie-settings-panel {
  animation: fadeIn 0.5s;
}

/* Back to Top Button Animation */
.back-to-top.visible {
  animation: fadeIn 0.3s;
}

/* Article Images Hover Animation */
.article-featured-image img:hover,
.blog-image img:hover {
  transition: transform 0.5s ease;
  transform: scale(1.05);
}

/* Thank You Icon Animation */
.thank-you-icon svg {
  animation: scaleIn 0.8s;
}

/* Nav Menu Mobile Animation */
.nav-menu.active {
  animation: fadeIn 0.3s;
}

/* Loading Animation (for async operations) */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 0, 255, 0.3);
  border-radius: 50%;
  border-top-color: rgba(255, 0, 255, 1);
  animation: rotate 1s linear infinite;
}

/* Cursor Animation */
.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background-color: var(--primary-color);
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  from, to {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* Background Grid Animation */
.grid-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: 50px 50px;
  background-image: 
    linear-gradient(to right, rgba(255, 0, 255, 0.1) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 255, 255, 0.1) 1px, transparent 1px);
  z-index: -1;
  animation: backgroundPulse 15s ease infinite;
  background-size: 200% 200%;
}

/* Articles Animation */
.article-callout {
  animation: borderGlow 3s infinite;
}

/* Timeline Animation */
.timeline-number {
  animation: neonPulse 3s infinite;
}

/* Media Queries for Animations */
@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;
  }
}
