/* ====================================
   ANIMATIONS AND TRANSITIONS
   ==================================== */

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

.fade-in {
  animation: fadeIn 0.5s ease-in-out forwards;
}

.fade-in-slow {
  animation: fadeIn 1s ease-in-out forwards;
}

.fade-in-delay-1 {
  animation: fadeIn 0.5s ease-in-out 0.2s forwards;
  opacity: 0;
}

.fade-in-delay-2 {
  animation: fadeIn 0.5s ease-in-out 0.4s forwards;
  opacity: 0;
}

.fade-in-delay-3 {
  animation: fadeIn 0.5s ease-in-out 0.6s forwards;
  opacity: 0;
}

/* Slide in */
@keyframes slideInLeft {
  from { transform: translateX(-30px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

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

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

.slide-in-left {
  animation: slideInLeft 0.5s ease-out forwards;
}

.slide-in-right {
  animation: slideInRight 0.5s ease-out forwards;
}

.slide-in-up {
  animation: slideInUp 0.5s ease-out forwards;
}

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

.pulse {
  animation: pulse 2s infinite;
}

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

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

/* Loading bar */
@keyframes loadingProgress {
  from { width: 0%; }
  to { width: 100%; }
}

.loading-animation {
  animation: loadingProgress 3s ease-in-out forwards;
}

/* Hover transitions */
.hover-grow {
  transition: transform 0.3s ease;
}

.hover-grow:hover {
  transform: scale(1.05);
}

.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Page transitions */
.page-transition {
  transition: opacity 0.4s ease-in-out;
}

/* Element transitions */
.element-transition {
  transition: all 0.3s ease;
}

/* Automatic animation classes based on viewport visibility */
.animate-on-scroll {
  opacity: 0;
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
}

.from-bottom.animate-on-scroll {
  transform: translateY(40px);
}

.from-bottom.animate-on-scroll.visible {
  transform: translateY(0);
}

.from-left.animate-on-scroll {
  transform: translateX(-40px);
}

.from-left.animate-on-scroll.visible {
  transform: translateX(0);
}

.from-right.animate-on-scroll {
  transform: translateX(40px);
}

.from-right.animate-on-scroll.visible {
  transform: translateX(0);
}

/* Staggered animation delays for lists/grids */
.stagger-delay > *:nth-child(1) { transition-delay: 0s; }
.stagger-delay > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-delay > *:nth-child(3) { transition-delay: 0.2s; }
.stagger-delay > *:nth-child(4) { transition-delay: 0.3s; }
.stagger-delay > *:nth-child(5) { transition-delay: 0.4s; }
.stagger-delay > *:nth-child(6) { transition-delay: 0.5s; }
.stagger-delay > *:nth-child(7) { transition-delay: 0.6s; }
.stagger-delay > *:nth-child(8) { transition-delay: 0.7s; }

/* ANIMATIONS
---------------------------------------------------- */
/* Contains reusable animations and transitions */

/* Keyframes
---------------------------------------------------- */
@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes slideInDown {
  from {
    transform: translateY(-1.5rem);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-0.5rem); }
  60% { transform: translateY(-0.25rem); }
}

@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

/* Animation Classes
---------------------------------------------------- */
.animate-fade-out {
  animation: fadeOut 0.5s ease forwards;
}

.animate-slide-down {
  animation: slideInDown 0.5s ease forwards;
}

.animate-slide-right {
  animation: slideInRight 0.5s ease forwards;
}

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

.animate-spin {
  animation: spin 1s linear infinite;
}

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

/* Animation Delays
---------------------------------------------------- */
.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-750 { animation-delay: 0.75s; }
.delay-1000 { animation-delay: 1s; }

/* Animation Duration
---------------------------------------------------- */
.duration-100 { animation-duration: 0.1s; }
.duration-200 { animation-duration: 0.2s; }
.duration-300 { animation-duration: 0.3s; }
.duration-400 { animation-duration: 0.4s; }
.duration-500 { animation-duration: 0.5s; }
.duration-750 { animation-duration: 0.75s; }
.duration-1000 { animation-duration: 1s; }
.duration-1500 { animation-duration: 1.5s; }
.duration-2000 { animation-duration: 2s; }

/* Transitions
---------------------------------------------------- */
.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 300ms;
}

.transition-colors {
  transition-property: color, background-color, border-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 300ms;
}

.transition-opacity {
  transition-property: opacity;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 300ms;
}

.transition-shadow {
  transition-property: box-shadow;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 300ms;
}

.transition-transform {
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 300ms;
}

/* Transition Duration
---------------------------------------------------- */
.duration-75 { transition-duration: 75ms; }
.duration-100 { transition-duration: 100ms; }
.duration-150 { transition-duration: 150ms; }
.duration-200 { transition-duration: 200ms; }
.duration-300 { transition-duration: 300ms; }
.duration-500 { transition-duration: 500ms; }
.duration-700 { transition-duration: 700ms; }
.duration-1000 { transition-duration: 1000ms; }

/* Timing Functions
---------------------------------------------------- */
.ease-linear { transition-timing-function: linear; }
.ease-in { transition-timing-function: cubic-bezier(0.4, 0, 1, 1); }
.ease-out { transition-timing-function: cubic-bezier(0, 0, 0.2, 1); }
.ease-in-out { transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }

/* Animation Control
---------------------------------------------------- */
.paused { animation-play-state: paused; }
.running { animation-play-state: running; }

/* Interactive States
---------------------------------------------------- */
.hover-bright {
  transition: filter 0.3s ease;
}
.hover-bright:hover {
  filter: brightness(1.1);
}

/* Animation Duration
---------------------------------------------------- */
.duration-75 { transition-duration: 75ms; }
.duration-100 { transition-duration: 100ms; }
.duration-150 { transition-duration: 150ms; }
.duration-200 { transition-duration: 200ms; }
.duration-300 { transition-duration: 300ms; }
.duration-500 { transition-duration: 500ms; }
.duration-700 { transition-duration: 700ms; }
.duration-1000 { transition-duration: 1000ms; }

/* Timing Functions
---------------------------------------------------- */
.ease-linear { transition-timing-function: linear; }
.ease-in { transition-timing-function: cubic-bezier(0.4, 0, 1, 1); }
.ease-out { transition-timing-function: cubic-bezier(0, 0, 0.2, 1); }
.ease-in-out { transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }

/* Animation Control
---------------------------------------------------- */
.paused { animation-play-state: paused; }
.running { animation-play-state: running; }

/* Interactive States
---------------------------------------------------- */
.hover-grow {
  transition: transform 0.3s ease;
}
.hover-grow:hover {
  transform: scale(1.05);
}

.hover-bright {
  transition: filter 0.3s ease;
}
.hover-bright:hover {
  filter: brightness(1.1);
}

.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
} 