/* Advanced Animations */

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

@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);
  }
}

/* Slide animations */
@keyframes slideInUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes slideInDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

/* Scale animations */
@keyframes scaleIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes scaleBounce {
  0% {
    transform: scale(0.95);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Pulse animation */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Bounce animation */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

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

/* Glow animation */
@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(30, 118, 172, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(30, 118, 172, 0.8);
  }
}

/* Swing animation */
@keyframes swing {
  20% {
    transform: rotate(15deg);
  }
  40% {
    transform: rotate(-10deg);
  }
  60% {
    transform: rotate(5deg);
  }
  80% {
    transform: rotate(-5deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

/* Apply animations to elements */
.hero-text h1 {
  animation: fadeInLeft 0.8s ease-out;
}

.hero-text p {
  animation: fadeInLeft 0.8s ease-out 0.2s backwards;
}

.hero-buttons {
  animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.service-card {
  animation: fadeInUp 0.6s ease-out;
}

.service-card:nth-child(2) {
  animation-delay: 0.1s;
}

.service-card:nth-child(3) {
  animation-delay: 0.2s;
}

.service-card:nth-child(4) {
  animation-delay: 0.3s;
}

.service-card:nth-child(5) {
  animation-delay: 0.4s;
}

.service-card:nth-child(6) {
  animation-delay: 0.5s;
}

.review-card {
  animation: fadeInUp 0.6s ease-out;
}

.review-card:nth-child(2) {
  animation-delay: 0.1s;
}

.review-card:nth-child(3) {
  animation-delay: 0.2s;
}

.review-card:nth-child(4) {
  animation-delay: 0.3s;
}

.team-member {
  animation: scaleIn 0.6s ease-out;
}

.team-member:nth-child(2) {
  animation-delay: 0.2s;
}

.faq-item {
  animation: fadeInUp 0.5s ease-out;
}

.faq-item:nth-child(2) { animation-delay: 0.1s; }
.faq-item:nth-child(3) { animation-delay: 0.2s; }
.faq-item:nth-child(4) { animation-delay: 0.3s; }
.faq-item:nth-child(5) { animation-delay: 0.4s; }
.faq-item:nth-child(6) { animation-delay: 0.5s; }

/* Button hover animations */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

/* Card hover lift effect */
.card:hover,
.service-card:hover,
.review-card:hover {
  animation: none;
  transform: translateY(-8px) !important;
}

/* Slider handle animation */
.slider-handle::before {
  animation: pulse 1.5s ease-in-out infinite;
}

/* FAQ toggle animation */
.faq-toggle {
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Page transition */
.page-transition {
  animation: fadeIn 0.3s ease-in-out;
}

/* Scroll reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(50px);
}

.reveal.active {
  animation: fadeInUp 0.8s ease-out forwards;
}

/* Loading animation */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.loading {
  animation: spin 1s linear infinite;
}

/* Floating animation */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

.float {
  animation: float 3s ease-in-out infinite;
}
