/* ============================================
   Animations - Keyframes & Animation Classes
   I.T.S College of Pharmacy
   ============================================ */

/* -------------------- Keyframe Animations -------------------- */

/* Fade In Up - For scroll reveals */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
 
/* Fade In - Simple opacity fade */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Fade Out */
@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Scale In - For modals and popups */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Scale Out */
@keyframes scaleOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.95);
  }
}

/* Slide Down - For mega menu */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Slide Up */
@keyframes slideUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* Mega Menu Slide */
@keyframes megaMenuSlide {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Ticker - For announcement bar */
@keyframes ticker {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Pulse - For attention-grabbing elements */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Bounce - For buttons and CTAs */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

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

/* Spin - For loading states */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* WhatsApp Popup */
@keyframes whatsappPopup {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Hero Slide Transition */
@keyframes heroSlideIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Stagger Delay Variables for JavaScript */
:root {
  --stagger-delay: 0.08s;
}

/* -------------------- Animation Utility Classes -------------------- */

/* Base animation setup for scroll-triggered elements */
[data-animate] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Animation with stagger delay */
[data-animate-stagger] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate-stagger].animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Scale animation variant */
[data-animate="scale"] {
  opacity: 0;
  transform: scale(0.95);
}

[data-animate="scale"].animate-in {
  opacity: 1;
  transform: scale(1);
}

/* Fade only variant */
[data-animate="fade"] {
  opacity: 0;
  transform: none;
}

[data-animate="fade"].animate-in {
  opacity: 1;
}

/* Slide from left */
[data-animate="slide-left"] {
  opacity: 0;
  transform: translateX(-20px);
}

[data-animate="slide-left"].animate-in {
  opacity: 1;
  transform: translateX(0);
}

/* Slide from right */
[data-animate="slide-right"] {
  opacity: 0;
  transform: translateX(20px);
}

[data-animate="slide-right"].animate-in {
  opacity: 1;
  transform: translateX(0);
}

/* -------------------- Applied Animation Classes -------------------- */

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

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

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

.animate-slide-down {
  animation: slideDown 0.3s ease-out forwards;
}

.animate-ticker {
  animation: ticker 30s linear infinite;
}

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

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

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


/* Slide Left on Scroll */
.animate-slide-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-slide-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Slide Right on Scroll */
.animate-slide-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-slide-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Reduced Motion */
@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;
  }
  
  .animate-on-scroll,
  .animate-scale-on-scroll,
  .animate-slide-left,
  .animate-slide-right {
    opacity: 1;
    transform: none;
  }
}
/* -------------------- Transition Utilities -------------------- */

.transition-all {
  transition: all 0.3s ease;
}

.transition-colors {
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

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

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

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

/* Duration modifiers */
.duration-150 {
  transition-duration: 150ms;
}

.duration-200 {
  transition-duration: 200ms;
}

.duration-300 {
  transition-duration: 300ms;
}

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

.duration-1000 {
  transition-duration: 1000ms;
}

/* -------------------- Hover Effects -------------------- */

.hover-scale {
  transition: transform 0.2s ease;
}

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

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

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

.hover-glow {
  transition: box-shadow 0.3s ease;
}

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

/* -------------------- Image Hover Effects -------------------- */

.img-zoom {
  overflow: hidden;
}

.img-zoom img {
  transition: transform 0.5s ease;
}

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

/* Ping Animation (for WhatsApp button) */
@keyframes ping {
  0% {
    transform: scale(1);
    opacity: 0.75;
  }
  75%, 100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* Pulse Animation */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

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

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

/* Bounce Animation */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  }
  50% {
    transform: translateY(-25%);
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
}

/* Slide Logos for Recruiters */
@keyframes slideLogos {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}


/* -------------------- Button Hover Effects -------------------- */

.btn-hover-slide {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-hover-slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
  z-index: -1;
}

.btn-hover-slide:hover::before {
  left: 100%;
}

/* -------------------- Loading States -------------------- */

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

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

/* -------------------- Reduced Motion -------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  [data-animate],
  [data-animate-stagger] {
    opacity: 1;
    transform: none;
  }
  
  .animate-ticker {
    animation: none;
  }
}