/* Additional Animations and Micro-interactions */

/* Loading Animation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

/* Button Hover Effects */
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: translateY(0);
  transition: transform 0.1s ease;
}

/* Card Hover Enhancements */
.card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.card-image {
  transition: all 0.4s ease;
}

.card:hover .card-image {
  transform: scale(1.1) rotate(2deg);
  filter: brightness(1.1) saturate(1.1);
}

/* Service Card Animations */
.service-card-large {
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.service-card-large::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.service-card-large:hover::before {
  left: 100%;
}

.service-card-large:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Video Thumbnail Hover */
.video-thumbnail {
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.video-thumbnail::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.video-thumbnail:hover::before {
  opacity: 1;
}

.video-thumbnail:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.video-thumbnail .fa-play-circle {
  transition: all 0.3s ease;
  z-index: 2;
}

.video-thumbnail:hover .fa-play-circle {
  transform: scale(1.2);
  color: var(--primary-yellow);
}

/* Navigation Link Effects */
.nav-link {
  position: relative;
  overflow: hidden;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-yellow);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Social Link Hover */
.social-link {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-link:hover {
  transform: translateY(-3px) rotate(5deg);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Footer Link Hover */
.footer-links a {
  position: relative;
  transition: all 0.3s ease;
}

.footer-links a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--primary-yellow);
  transition: width 0.3s ease;
}

.footer-links a:hover::before {
  width: 100%;
}

.footer-links a:hover {
  transform: translateX(5px);
  color: var(--primary-yellow);
}

/* Image Loading Animation */
@keyframes imageFadeIn {
  from {
    opacity: 0;
    transform: scale(1.1);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

img {
  transition: opacity 0.3s ease;
}

img.loaded {
  animation: imageFadeIn 0.5s ease-out;
}

/* Scroll-triggered Animations */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-slide-left {
  animation: slideInLeft 0.6s ease-out;
}

.animate-slide-right {
  animation: slideInRight 0.6s ease-out;
}

.animate-slide-up {
  animation: slideInUp 0.6s ease-out;
}

/* Staggered Animation Delays */
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }

/* Pulse Animation for Call-to-Action */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(74, 144, 226, 0.4);
  }
  50% {
    box-shadow: 0 0 30px rgba(74, 144, 226, 0.8);
  }
}

.cta-pulse {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* Typing Animation for Hero Text */
@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink {
  50% { border-color: transparent; }
}

.typing-effect {
  overflow: hidden;
  border-right: 3px solid var(--primary-yellow);
  white-space: nowrap;
  animation: typing 3.5s steps(40, end), blink 0.75s step-end infinite;
}

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

@keyframes float-medium {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
}

@keyframes float-fast {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

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

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

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

/* Gradient Animation */
@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.gradient-animate {
  background: linear-gradient(-45deg, var(--primary-blue), var(--primary-purple), var(--primary-pink), var(--primary-green));
  background-size: 400% 400%;
  animation: gradient-shift 8s ease infinite;
}

/* Success/Error Message Animations */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message {
  animation: slideDown 0.3s ease-out;
  padding: var(--spacing-md);
  border-radius: var(--border-radius-md);
  margin-bottom: var(--spacing-md);
}

.message.success {
  background: rgba(125, 209, 49, 0.1);
  border: 1px solid var(--primary-green);
  color: var(--primary-green);
}

.message.error {
  background: rgba(208, 2, 27, 0.1);
  border: 1px solid var(--primary-pink);
  color: var(--primary-pink);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .card:hover {
    transform: translateY(-4px) scale(1.01);
  }

  .service-card-large:hover {
    transform: translateY(-2px);
  }

  .video-thumbnail:hover {
    transform: translateY(-2px);
  }
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}