/* IMUN '25 Website Animations */
/* Consolidated animations for consistent experience across all pages */

/* ===== FADE IN 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.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes scaleUp {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.05);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* ===== 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);
  }
}

/* ===== ROTATION ANIMATIONS ===== */
@keyframes rotateIn {
  from {
    opacity: 0;
    transform: rotate(-180deg);
  }
  to {
    opacity: 1;
    transform: rotate(0deg);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ===== BOUNCE ANIMATIONS ===== */
@keyframes bounce {
  0%, 20%, 53%, 80%, 100% {
    transform: translateY(0);
  }
  40%, 43% {
    transform: translateY(-30px);
  }
  70% {
    transform: translateY(-15px);
  }
  90% {
    transform: translateY(-4px);
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===== ZOOM ANIMATIONS ===== */
@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes zoomOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 0;
    transform: scale(0.3);
  }
}

/* ===== FLOATING ANIMATIONS ===== */
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes floatSlow {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-5px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* ===== GLOW ANIMATIONS ===== */
@keyframes glow {
  0% {
    box-shadow: 0 0 5px rgba(39, 98, 179, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(39, 98, 179, 0.8);
  }
  100% {
    box-shadow: 0 0 5px rgba(39, 98, 179, 0.5);
  }
}

@keyframes glowPulse {
  0% {
    box-shadow: 0 0 5px rgba(39, 98, 179, 0.5);
  }
  50% {
    box-shadow: 0 0 25px rgba(39, 98, 179, 1);
  }
  100% {
    box-shadow: 0 0 5px rgba(39, 98, 179, 0.5);
  }
}

/* ===== WIGGLE ANIMATIONS ===== */
@keyframes wiggle {
  0%, 7% {
    transform: rotateZ(0);
  }
  15% {
    transform: rotateZ(-15deg);
  }
  20% {
    transform: rotateZ(10deg);
  }
  25% {
    transform: rotateZ(-10deg);
  }
  30% {
    transform: rotateZ(6deg);
  }
  35% {
    transform: rotateZ(-4deg);
  }
  40%, 100% {
    transform: rotateZ(0);
  }
}

/* ===== SHIMMER ANIMATIONS ===== */
@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

/* ===== ANIMATION UTILITY CLASSES ===== */

/* fade animations */
.animate-fade-in {
  animation: fadeIn 2s ease-in-out forwards;
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in-down {
  animation: fadeInDown 0.8s ease-out forwards;
}

.animate-fade-in-left {
  animation: fadeInLeft 0.8s ease-out forwards;
}

.animate-fade-in-right {
  animation: fadeInRight 0.8s ease-out forwards;
}

/* scale animations */
.animate-scale-in {
  animation: scaleIn 0.6s ease-out forwards;
}

.animate-scale-up {
  animation: scaleUp 0.3s ease-out forwards;
}

.animate-pulse {
  animation: pulse 2s infinite;
}

/* slide animations */
.animate-slide-in-up {
  animation: slideInUp 0.8s ease-out forwards;
}

.animate-slide-in-down {
  animation: slideInDown 0.8s ease-out forwards;
}

.animate-slide-in-left {
  animation: slideInLeft 0.8s ease-out forwards;
}

.animate-slide-in-right {
  animation: slideInRight 0.8s ease-out forwards;
}

/* rotation animations */
.animate-rotate-in {
  animation: rotateIn 0.8s ease-out forwards;
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* bounce animations */
.animate-bounce {
  animation: bounce 1s infinite;
}

.animate-bounce-in {
  animation: bounceIn 0.8s ease-out forwards;
}

/* zoom animations */
.animate-zoom-in {
  animation: zoomIn 0.6s ease-out forwards;
}

.animate-zoom-out {
  animation: zoomOut 0.6s ease-out forwards;
}

/* floating animations */
.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-float-slow {
  animation: floatSlow 4s ease-in-out infinite;
}

/* glow animations */
.animate-glow {
  animation: glow 2s ease-in-out infinite;
}

.animate-glow-pulse {
  animation: glowPulse 1.5s ease-in-out infinite;
}

/* wiggle animations */
.animate-wiggle {
  animation: wiggle 1s ease-in-out;
}

/* shimmer animations */
.animate-shimmer {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
}

/* ===== DELAY UTILITIES ===== */
.delay-100 {
  animation-delay: 0.1s;
}

.delay-200 {
  animation-delay: 0.2s;
}

.delay-300 {
  animation-delay: 0.3s;
}

.delay-500 {
  animation-delay: 0.5s;
}

.delay-700 {
  animation-delay: 0.7s;
}

.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;
}

/* ===== EASING UTILITIES ===== */
.ease-in {
  animation-timing-function: ease-in;
}

.ease-out {
  animation-timing-function: ease-out;
}

.ease-in-out {
  animation-timing-function: ease-in-out;
}

.ease-linear {
  animation-timing-function: linear;
}

/* ===== HOVER ANIMATIONS ===== */
.hover-scale:hover {
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

.hover-float:hover {
  animation: float 1s ease-in-out infinite;
}

.hover-glow:hover {
  animation: glow 1s ease-in-out infinite;
}

.hover-wiggle:hover {
  animation: wiggle 0.5s ease-in-out;
}

/* ===== INITIAL STATES FOR ANIMATIONS ===== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ANIMATIONS ===== */
@media (max-width: 768px) {
  .animate-fade-in-up,
  .animate-fade-in-down,
  .animate-fade-in-left,
  .animate-fade-in-right {
    animation: fadeIn 0.6s ease-out forwards;
  }
  
  .animate-slide-in-up,
  .animate-slide-in-down,
  .animate-slide-in-left,
  .animate-slide-in-right {
    animation: fadeIn 0.6s ease-out forwards;
  }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.animate-fade-in,
.animate-fade-in-up,
.animate-fade-in-down,
.animate-fade-in-left,
.animate-fade-in-right,
.animate-scale-in,
.animate-zoom-in,
.animate-bounce-in {
  will-change: opacity, transform;
}

.animate-float,
.animate-float-slow,
.animate-pulse,
.animate-glow,
.animate-glow-pulse {
  will-change: transform, box-shadow;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}




