/**
 * SNIJadwalin - Animations CSS
 * Modern, Futuristic, and Professional Animations
 */

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

/* Fade In Up Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade In Down Animation */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade In Left Animation */
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Fade In Right Animation */
@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Fade In Scale Animation */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Bounce Animation */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-20px);
  }
  60% {
    transform: translateY(-10px);
  }
}

/* Pulse Animation */
@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(var(--primary-rgb), 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0);
  }
}

/* Shake Animation */
@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(5px);
  }
}

/* Rotate Animation */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Float Animation */
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

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

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

/* Shimmer Animation */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Glow Animation */
@keyframes glow {
  0% {
    box-shadow: 0 0 5px rgba(var(--primary-rgb), 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.8);
  }
  100% {
    box-shadow: 0 0 5px rgba(var(--primary-rgb), 0.5);
  }
}

/* Particle Float Animation */
@keyframes particleFloat {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
  }
  33% {
    transform: translateY(-10px) translateX(10px) rotate(120deg);
  }
  66% {
    transform: translateY(10px) translateX(-10px) rotate(240deg);
  }
  100% {
    transform: translateY(0) translateX(0) rotate(360deg);
  }
}

/* Progress Bar Animation */
@keyframes progressBar {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}

/* Slide In Animation */
@keyframes slideIn {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* Slide Out Animation */
@keyframes slideOut {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(100%);
  }
}

/* Flip Animation */
@keyframes flip {
  0% {
    transform: perspective(400px) rotateY(0);
  }
  100% {
    transform: perspective(400px) rotateY(180deg);
  }
}

/* Ripple Animation */
@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

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

/* Utility Classes for Animations */
.animate-fadeIn {
  animation: fadeIn 0.5s ease-in-out forwards;
}

.animate-fadeInUp {
  animation: fadeInUp 0.5s ease-in-out forwards;
}

.animate-fadeInDown {
  animation: fadeInDown 0.5s ease-in-out forwards;
}

.animate-fadeInLeft {
  animation: fadeInLeft 0.5s ease-in-out forwards;
}

.animate-fadeInRight {
  animation: fadeInRight 0.5s ease-in-out forwards;
}

.animate-fadeInScale {
  animation: fadeInScale 0.5s ease-in-out forwards;
}

.animate-bounce {
  animation: bounce 2s infinite;
}

.animate-pulse {
  animation: pulse 2s infinite;
}

.animate-shake {
  animation: shake 0.5s ease-in-out;
}

.animate-rotate {
  animation: rotate 2s linear infinite;
}

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

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

.animate-shimmer {
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0) 0%, 
    rgba(255, 255, 255, 0.2) 50%, 
    rgba(255, 255, 255, 0) 100%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

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

.animate-particleFloat {
  animation: particleFloat 15s ease-in-out infinite;
}

.animate-progressBar {
  animation: progressBar 2s ease-out forwards;
}

.animate-slideIn {
  animation: slideIn 0.5s ease-in-out forwards;
}

.animate-slideOut {
  animation: slideOut 0.5s ease-in-out forwards;
}

.animate-flip {
  animation: flip 1s ease-in-out;
}

.animate-ripple {
  animation: ripple 1s linear;
}

.animate-loader {
  animation: loader 1.5s linear infinite;
}

/* Delay Utilities */
.delay-100 {
  animation-delay: 0.1s;
}

.delay-200 {
  animation-delay: 0.2s;
}

.delay-300 {
  animation-delay: 0.3s;
}

.delay-400 {
  animation-delay: 0.4s;
}

.delay-500 {
  animation-delay: 0.5s;
}

.delay-600 {
  animation-delay: 0.6s;
}

.delay-700 {
  animation-delay: 0.7s;
}

.delay-800 {
  animation-delay: 0.8s;
}

.delay-900 {
  animation-delay: 0.9s;
}

.delay-1000 {
  animation-delay: 1s;
}

/* Duration Utilities */
.duration-300 {
  animation-duration: 0.3s;
}

.duration-500 {
  animation-duration: 0.5s;
}

.duration-700 {
  animation-duration: 0.7s;
}

.duration-1000 {
  animation-duration: 1s;
}

.duration-1500 {
  animation-duration: 1.5s;
}

.duration-2000 {
  animation-duration: 2s;
}

.duration-2500 {
  animation-duration: 2.5s;
}

.duration-3000 {
  animation-duration: 3s;
}

/* Fade-in Section Animation */
.fade-in-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  transition-delay: var(--delay, 0s);
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Particle Animation */
.particle {
  position: absolute;
  background-color: rgba(var(--primary-rgb), 0.2);
  border-radius: 50%;
  pointer-events: none;
  animation: particleFloat 15s ease-in-out infinite;
}

/* Scroll Progress Bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  z-index: 9999;
  width: 0%;
  transition: width 0.2s ease-out;
}

/* Reveal Animations */
.reveal {
  opacity: 0;
  transition: all 0.8s ease;
}

/* Testimonial Slider Animation */
.testimonial {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transform: translateX(100px) scale(0.8);
  transition: all 0.5s ease;
  pointer-events: none;
}

.testimonial.prev {
  transform: translateX(-100px) scale(0.8);
  opacity: 0.3;
  z-index: 1;
}

.testimonial.active {
  transform: translateX(0) scale(1);
  opacity: 1;
  z-index: 2;
  pointer-events: auto;
}

.testimonial.next {
  transform: translateX(100px) scale(0.8);
  opacity: 0.3;
  z-index: 1;
}

/* Calendar Animation */
.calendar-day {
  transition: all 0.3s ease;
}

.calendar-day.available:hover {
  transform: scale(1.1);
  background-color: rgba(var(--primary-rgb), 0.1);
  cursor: pointer;
}

.calendar-day.selected {
  background-color: var(--primary-color);
  color: white;
  transform: scale(1.1);
}

/* Button Hover Animation */
.btn-hover-effect {
  position: relative;
  overflow: hidden;
}

.btn-hover-effect::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn-hover-effect:hover::after {
  width: 300%;
  height: 300%;
}

/* Card Hover Animation */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Input Focus Animation */
.input-focus-effect {
  position: relative;
}

.input-focus-effect::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.input-focus-effect:focus-within::after {
  width: 100%;
}

/* Navbar Scroll Animation */
.navbar {
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

/* Mobile Menu Animation */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.mobile-menu.is-open {
  transform: translateX(0);
}

/* FAQ Accordion Animation */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer.is-open {
  max-height: 1000px; /* Arbitrary large value */
}

/* Payment Modal Animation */
.payment-modal {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.payment-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.payment-modal-content {
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.payment-modal.is-open .payment-modal-content {
  transform: scale(1);
}