/* Animations and transitions */

/* Fade in */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Slide up */
@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Pulse */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Apply animations */
.hero-content {
  animation: fadeIn 1s ease-out;
}

.hero h2 {
  animation: slideUp 0.8s ease-out forwards;
}

.hero p {
  animation: slideUp 0.8s ease-out 0.2s forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}

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

.service-card:hover .service-icon {
  animation: pulse 1s ease-in-out infinite;
}

.btn-primary:hover {
  animation: pulse 1s ease-in-out;
}

/* Staggered fade in for services */
.services-grid .service-card:nth-child(1) {
  animation: fadeIn 0.5s ease-out 0.1s forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}

.services-grid .service-card:nth-child(2) {
  animation: fadeIn 0.5s ease-out 0.2s forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}

.services-grid .service-card:nth-child(3) {
  animation: fadeIn 0.5s ease-out 0.3s forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}

.services-grid .service-card:nth-child(4) {
  animation: fadeIn 0.5s ease-out 0.4s forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}

/* Smooth transitions */
.service-card,
.advantage-item,
.btn,
nav a,
.form-group input,
.form-group textarea {
  transition: all 0.3s ease;
}

/* Hover effect for service cards */
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(33, 150, 243, 0.1) 0%, rgba(0, 188, 212, 0.1) 100%);
  border-radius: var(--radius-lg);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.service-card:hover::before {
  opacity: 1;
}

/* Focus visible styles */
:focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

/* Button loading state */
.btn.loading {
  position: relative;
  color: transparent !important;
}

.btn.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.2em;
  height: 1.2em;
  margin-top: -0.6em;
  margin-left: -0.6em;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Parallax effect for sections */
.hero,
.services,
.about,
.advantages,
.contact {
  position: relative;
  background-attachment: fixed;
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}