/* Modern 2025 Animations */

/* Smooth Scroll Behavior */
html {
  scroll-behavior: smooth;
}

/* Loading Animation */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInFromBottom {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes rotateIn {
  from {
    opacity: 0;
    transform: rotate(-180deg) scale(0.3);
  }
  to {
    opacity: 1;
    transform: rotate(0) scale(1);
  }
}

/* Hover Animations */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(245, 158, 11, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.8), 0 0 30px rgba(245, 158, 11, 0.6);
  }
}

/* Button Animations */
.cta-button {
  position: relative;
  overflow: hidden;
}

.cta-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.cta-button:hover::before {
  left: 100%;
}

/* Service Card Animations */
.service-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
  transform: translateY(-12px) scale(1.02);
}

.service-image {
  position: relative;
  overflow: hidden;
}

.service-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.service-card:hover .service-image::after {
  transform: translateX(100%);
}

/* Trust Indicators Animation */
.trust-item {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.trust-item:hover {
  transform: translateY(-8px) scale(1.05);
}

.trust-item i {
  transition: all 0.3s ease;
}

.trust-item:hover i {
  transform: rotate(360deg) scale(1.2);
  color: var(--secondary);
}

/* Navigation Animations */
.main-nav a {
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-nav a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--secondary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-50%);
}

.main-nav a:hover::before,
.main-nav a.active::before {
  width: 100%;
}

/* Logo Animation */
.logo img {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo:hover img {
  transform: scale(1.1) rotate(5deg);
}

/* Social Links Animation */
.social-links a {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-links a:hover {
  transform: translateY(-4px) scale(1.1);
  animation: glow 1s ease-in-out infinite alternate;
}

/* Testimonial Animations */
.testimonial-slide {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial-slide:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.rating i {
  transition: all 0.3s ease;
}

.testimonial-slide:hover .rating i {
  animation: pulse 1s ease-in-out;
}

/* Scroll-triggered Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger Animation for Grid Items */
.services-grid .service-card:nth-child(1) { transition-delay: 0.1s; }
.services-grid .service-card:nth-child(2) { transition-delay: 0.2s; }
.services-grid .service-card:nth-child(3) { transition-delay: 0.3s; }
.services-grid .service-card:nth-child(4) { transition-delay: 0.4s; }

.trust-indicators .trust-item:nth-child(1) { transition-delay: 0.1s; }
.trust-indicators .trust-item:nth-child(2) { transition-delay: 0.2s; }
.trust-indicators .trust-item:nth-child(3) { transition-delay: 0.3s; }
.trust-indicators .trust-item:nth-child(4) { transition-delay: 0.4s; }

/* Hero Text Animations */
.hero h1 {
  animation: slideInFromBottom 1s ease-out 0.2s both;
}

.hero p {
  animation: slideInFromBottom 1s ease-out 0.4s both;
}

.hero-buttons {
  animation: slideInFromBottom 1s ease-out 0.6s both;
}

/* Loading States */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--gray-300);
  border-top: 2px solid var(--secondary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Parallax Effect */
.parallax {
  transform: translateZ(0);
  will-change: transform;
}

/* Smooth Transitions for All Interactive Elements */
a, button, .service-card, .trust-item, .testimonial-slide {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus States for Accessibility */
.cta-button:focus,
.main-nav a:focus,
.social-links a:focus {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

/* Reduced Motion Support */
@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;
  }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .service-card:hover {
    transform: translateY(-4px) scale(1.01);
  }
  
  .trust-item:hover {
    transform: translateY(-4px) scale(1.02);
  }
  
  .testimonial-slide:hover {
    transform: translateY(-4px);
  }
}
