/* Animations and Transitions */

/* Fade In Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Scale Animation */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Pulse Animation */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Bounce Animation */
@keyframes bounce {
  0%, 20%, 53%, 80%, 100% {
    transform: translateY(0);
  }
  40%, 43% {
    transform: translateY(-10px);
  }
  70% {
    transform: translateY(-5px);
  }
  90% {
    transform: translateY(-2px);
  }
}

/* Slide In Animation */
@keyframes slideInFromTop {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes slideInFromBottom {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* Hero Background Animation */
@keyframes heroBackground {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Loading Animation */
@keyframes loading {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Shake Animation */
@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(5px);
  }
}

/* Apply Animations to Elements */

/* Hero Section Animations */
.hero-content {
  animation: fadeInUp 1s ease-out;
}

.hero-title {
  animation: fadeInDown 1s ease-out 0.2s both;
}

.hero-subtitle {
  animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-description {
  animation: fadeInUp 1s ease-out 0.6s both;
}

.hero-buttons {
  animation: fadeInUp 1s ease-out 0.8s both;
}

/* Section Headers */
.section-header {
  animation: fadeInUp 0.8s ease-out;
}

/* Service Cards */
.service-card {
  /* No animations - static design */
}

/* Testimonial Cards */
.testimonial-card {
  animation: fadeInUp 0.8s ease-out;
  transition: all 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* Contact Form */
.contact-form {
  animation: scaleIn 0.8s ease-out;
}

/* Buttons */
.btn {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn::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;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary:hover {
  animation: pulse 0.6s ease-in-out;
}

/* Navigation Links */
.nav-link {
  transition: all 0.3s ease;
  position: relative;
}

.nav-link::after {
  transition: width 0.3s ease;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle span {
  transition: all 0.3s ease;
}

/* Form Inputs */
.form-group input,
.form-group select,
.form-group textarea {
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  animation: pulse 0.3s ease-in-out;
}

/* Service Icons */
.service-icon {
  /* No animations - static design */
}

/* Rating Stars */
.stars {
  animation: fadeInUp 0.8s ease-out 0.5s both;
}

/* Footer Links */
.footer-section a {
  transition: all 0.3s ease;
}

.footer-section a:hover {
  animation: pulse 0.3s ease-in-out;
}

/* Map Container */
.map-container {
  animation: fadeInUp 0.8s ease-out;
  transition: all 0.3s ease;
}

.map-container:hover {
  transform: scale(1.02);
}

/* Scroll Animations */
.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.scroll-animate.animate {
  opacity: 1;
  transform: translateY(0);
}

/* Loading States */
.loading {
  animation: loading 1s linear infinite;
}

/* Error States */
.error {
  animation: shake 0.5s ease-in-out;
}

/* Success States */
.success {
  animation: scaleIn 0.5s ease-out;
}

/* Phone Number Emphasis */
.phone-link {
  transition: all 0.3s ease;
  position: relative;
}

.phone-link:hover {
  animation: pulse 0.6s ease-in-out;
}

/* Emergency Call Button */
.btn-primary.btn-large {
  animation: pulse 2s infinite;
}

.btn-primary.btn-large:hover {
  animation: none;
}

/* Service Grid - No Stagger Animation */
.services-grid .service-card:nth-child(1) { /* No animation */ }
.services-grid .service-card:nth-child(2) { /* No animation */ }
.services-grid .service-card:nth-child(3) { /* No animation */ }
.services-grid .service-card:nth-child(4) { /* No animation */ }
.services-grid .service-card:nth-child(5) { /* No animation */ }
.services-grid .service-card:nth-child(6) { /* No animation */ }

/* Testimonials Stagger Animation */
.testimonials-grid .testimonial-card:nth-child(1) { animation-delay: 0.1s; }
.testimonials-grid .testimonial-card:nth-child(2) { animation-delay: 0.2s; }
.testimonials-grid .testimonial-card:nth-child(3) { animation-delay: 0.3s; }

/* Header Scroll Effect */
.header.scrolled {
  animation: slideInFromTop 0.3s ease-out;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

/* Smooth Page Transitions */
.page-transition {
  transition: opacity 0.3s ease;
}

.page-transition.fade-out {
  opacity: 0;
}

.page-transition.fade-in {
  opacity: 1;
}

/* Accessibility Considerations */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .btn::before {
    display: none;
  }
  
  .hero-background {
    animation: none;
  }
}

/* Performance Optimizations */
.animate-on-scroll {
  will-change: transform, opacity;
}

/* Hover Effects for Touch Devices */
@media (hover: none) and (pointer: coarse) {
  .btn::before {
    display: none;
  }
  
  .testimonial-card:hover {
    animation: none;
    transform: none;
  }
  
  .nav-link::after {
    display: none;
  }
}

/* Print Styles */
@media print {
  * {
    animation: none !important;
    transition: none !important;
  }
} 