/* ==============================================
   File: animations.css
   Project: Zaza Rush Subaru
   Developer: bguvava
   Last Updated: January 30, 2026
   Description: Keyframes and animation classes
   ============================================== */

/* ---------------------------------------------
   FADE 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);
  }
}

/* ---------------------------------------------
   SCALE ANIMATIONS
   --------------------------------------------- */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes scaleUp {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.05);
  }
}

/* ---------------------------------------------
   SLIDE ANIMATIONS
   --------------------------------------------- */
@keyframes slideInUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

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

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

/* ---------------------------------------------
   PULSE ANIMATIONS
   --------------------------------------------- */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(0, 51, 160, 0.4);
  }
  50% {
    box-shadow: 0 0 0 15px rgba(0, 51, 160, 0);
  }
}

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

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}

/* ---------------------------------------------
   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 ANIMATIONS
   --------------------------------------------- */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes rotateIn {
  from {
    opacity: 0;
    transform: rotate(-200deg);
  }
  to {
    opacity: 1;
    transform: rotate(0);
  }
}

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

/* ---------------------------------------------
   SHIMMER ANIMATION (Loading Placeholder)
   --------------------------------------------- */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* ---------------------------------------------
   ANIMATION UTILITY CLASSES
   --------------------------------------------- */
.animate-fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fade-in-down {
  animation: fadeInDown 0.6s ease-out forwards;
}

.animate-fade-in-left {
  animation: fadeInLeft 0.6s ease-out forwards;
}

.animate-fade-in-right {
  animation: fadeInRight 0.6s ease-out forwards;
}

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

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

.animate-bounce-in {
  animation: bounceIn 0.8s ease-out forwards;
}

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

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

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

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

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

/* Shimmer Loading Effect */
.animate-shimmer {
  background: linear-gradient(
    90deg,
    var(--color-light-gray) 25%,
    #e8e8e8 50%,
    var(--color-light-gray) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* ---------------------------------------------
   ANIMATION DELAYS
   --------------------------------------------- */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }
.delay-600 { animation-delay: 600ms; }
.delay-700 { animation-delay: 700ms; }
.delay-800 { animation-delay: 800ms; }
.delay-900 { animation-delay: 900ms; }
.delay-1000 { animation-delay: 1000ms; }

/* ---------------------------------------------
   ANIMATION DURATIONS
   --------------------------------------------- */
.duration-fast { animation-duration: 200ms; }
.duration-normal { animation-duration: 500ms; }
.duration-slow { animation-duration: 800ms; }
.duration-slower { animation-duration: 1200ms; }

/* ---------------------------------------------
   HOVER ANIMATIONS - CORE-009
   Interactive elements with transforms and transitions
   --------------------------------------------- */
.hover-lift {
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.hover-scale {
  transition: transform var(--transition-normal);
}

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

.hover-scale-sm {
  transition: transform var(--transition-normal);
}

.hover-scale-sm:hover {
  transform: scale(1.02);
}

.hover-glow {
  transition: box-shadow var(--transition-normal);
}

.hover-glow:hover {
  box-shadow: 0 0 20px rgba(0, 51, 160, 0.3);
}

/* Card hover - CORE-009 */
.card-hover {
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.card-hover:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--shadow-xl);
}

/* Button hover color shift to Secondary Blue */
.btn-hover-shift {
  transition: all var(--transition-normal);
}

.btn-hover-shift:hover {
  background-color: var(--color-secondary);
  border-color: var(--color-secondary);
}

/* Link hover with underline animation */
.link-hover-underline {
  position: relative;
  transition: color var(--transition-fast);
}

.link-hover-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-secondary);
  transition: width var(--transition-normal);
}

.link-hover-underline:hover {
  color: var(--color-secondary);
}

.link-hover-underline:hover::after {
  width: 100%;
}

/* ---------------------------------------------
   TRANSITION UTILITY CLASSES - CORE-010
   --------------------------------------------- */
.transition-all {
  transition: all 0.3s ease-in-out;
}

.transition-opacity {
  transition: opacity 0.3s ease-in-out;
}

.transition-transform {
  transition: transform 0.3s ease-in-out;
}

.transition-color {
  transition: color 0.3s ease-in-out;
}

.transition-background {
  transition: background-color 0.3s ease-in-out;
}

.transition-shadow {
  transition: box-shadow 0.3s ease-in-out;
}

.transition-border {
  transition: border-color 0.3s ease-in-out;
}

/* Combined transitions */
.transition-colors {
  transition: color 0.3s ease-in-out, background-color 0.3s ease-in-out, border-color 0.3s ease-in-out;
}

/* Transition speed variants */
.transition-fast {
  transition-duration: 150ms;
}

.transition-slow {
  transition-duration: 500ms;
}

/* ---------------------------------------------
   INITIAL STATES FOR JS ANIMATIONS
   --------------------------------------------- */
.js-animate {
  opacity: 0;
}

.js-animate.animated {
  opacity: 1;
}
