/* Animations CSS - Advanced animations and transitions */

/* Hero Background Animations */
.hero-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.water-particles {
  position: absolute;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.3)"/><circle cx="80" cy="40" r="1.5" fill="rgba(255,255,255,0.2)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.4)"/><circle cx="90" cy="90" r="2.5" fill="rgba(255,255,255,0.2)"/><circle cx="10" cy="60" r="1.5" fill="rgba(255,255,255,0.3)"/><circle cx="60" cy="10" r="1" fill="rgba(255,255,255,0.5)"/></svg>') repeat;
  animation: floatParticles 20s linear infinite;
  opacity: 0.6;
}

@keyframes floatParticles {
  0% {
    transform: translateY(100vh) translateX(0);
  }
  100% {
    transform: translateY(-100px) translateX(100px);
  }
}

.floating-bubbles {
  position: absolute;
  width: 100%;
  height: 100%;
}

.floating-bubbles::before,
.floating-bubbles::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  animation: bubbleFloat 15s infinite ease-in-out;
}

.floating-bubbles::before {
  width: 120px;
  height: 120px;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.floating-bubbles::after {
  width: 80px;
  height: 80px;
  top: 60%;
  right: 15%;
  animation-delay: 7s;
}

@keyframes bubbleFloat {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.1;
  }
  50% {
    transform: translateY(-50px) rotate(180deg);
    opacity: 0.3;
  }
}

/* Simple Scroll Animations */
.fade-in-element {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease-out;
}

.fade-in-element.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Counter Animation */
.counter-element {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease-out;
}

.counter-element.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Button Hover Effects */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

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

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

/* Card Hover Effects */
.card-lift {
  transition: all var(--transition-normal);
}

.card-lift:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.card-glow {
  position: relative;
  transition: all var(--transition-normal);
}

.card-glow::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: var(--gradient-primary);
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

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

/* Loading Animations */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Pulse Animation */
.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Spin Animation */
.spin {
  animation: spin 1s linear infinite;
}

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

/* Slide Animations */
.slide-in-bottom {
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-bottom.visible {
  transform: translateY(0);
  opacity: 1;
}

.slide-in-top {
  transform: translateY(-100px);
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-top.visible {
  transform: translateY(0);
  opacity: 1;
}

/* Typewriter Effect */
.typewriter {
  overflow: hidden;
  border-right: 3px solid var(--success-green);
  white-space: nowrap;
  animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink-caret {
  from, to {
    border-color: transparent;
  }
  50% {
    border-color: var(--success-green);
  }
}

/* Progress Bar Animation */
.progress-bar {
  position: relative;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-success);
  border-radius: var(--radius-full);
  transition: width 1s ease-out;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Modal Animations */
.modal-fade-in {
  animation: modalFadeIn 0.3s ease-out;
}

.modal-fade-out {
  animation: modalFadeOut 0.3s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes modalFadeOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.9);
  }
}

/* Notification Animations */
.notification-slide-in {
  animation: notificationSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-slide-out {
  animation: notificationSlideOut 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes notificationSlideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes notificationSlideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Form Field Animations */
.form-field-focus {
  position: relative;
}

.form-field-focus input,
.form-field-focus textarea,
.form-field-focus select {
  transition: all var(--transition-fast);
}

.form-field-focus label {
  position: absolute;
  top: 50%;
  left: var(--space-4);
  transform: translateY(-50%);
  background: var(--white);
  padding: 0 var(--space-2);
  color: var(--text-gray);
  transition: all var(--transition-fast);
  pointer-events: none;
}

.form-field-focus input:focus + label,
.form-field-focus textarea:focus + label,
.form-field-focus select:focus + label,
.form-field-focus input:not(:placeholder-shown) + label,
.form-field-focus textarea:not(:placeholder-shown) + label,
.form-field-focus select:not([value=""]) + label {
  top: 0;
  font-size: var(--text-sm);
  color: var(--light-blue);
  font-weight: var(--font-medium);
}

/* Parallax Effect */
.parallax {
  transform: translateZ(0);
  transition: transform 0.1s ease-out;
}

/* Hover Glow Effect */
.glow-on-hover {
  position: relative;
  transition: all var(--transition-normal);
}

.glow-on-hover::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, var(--light-blue), var(--success-green), var(--light-blue));
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition-normal);
  filter: blur(10px);
}

.glow-on-hover:hover::before {
  opacity: 0.7;
}

/* Text Reveal Animation */
.text-reveal {
  position: relative;
  overflow: hidden;
}

.text-reveal::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--white);
  transform: translateX(-100%);
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.text-reveal.animate::after {
  transform: translateX(100%);
}

/* Icon Bounce */
.icon-bounce {
  transition: transform var(--transition-fast);
}

.icon-bounce:hover {
  animation: iconBounce 0.6s ease-in-out;
}

@keyframes iconBounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* 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;
  }
  
  .parallax {
    transform: none !important;
  }
  
  .typewriter {
    animation: none;
    border-right: none;
    white-space: normal;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .hero-animation {
    display: none;
  }
  
  .water-particles,
  .floating-bubbles {
    display: none;
  }
}

/* Custom Easing Functions */
:root {
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-circ: cubic-bezier(0.075, 0.82, 0.165, 1);
  --ease-out-back: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease-in-out-quart: cubic-bezier(0.77, 0, 0.175, 1);
}
