/* ========================================
   FASTAP - Animation Classes
   Scroll animations, hover effects, transitions
   ======================================== */

/* ============= SCROLL REVEAL ANIMATIONS ============= */

/* Base state - hidden */
.fade-up,
.fade-in,
.fade-left,
.fade-right,
.scale-in,
.slide-up {
  opacity: 0;
  transition: all var(--transition-slow);
}

/* Fade Up */
.fade-up {
  transform: translateY(30px);
}

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

/* Fade In */
.fade-in {
  opacity: 0;
}

.fade-in.is-visible {
  opacity: 1;
}

/* Fade Left */
.fade-left {
  transform: translateX(-30px);
}

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

/* Fade Right */
.fade-right {
  transform: translateX(30px);
}

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

/* Scale In */
.scale-in {
  transform: scale(0.9);
}

.scale-in.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* Slide Up */
.slide-up {
  transform: translateY(40px);
}

.slide-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============= HOVER EFFECTS ============= */

/* Lift on hover */
.hover-lift {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
  transform: translateY(-4px);
}

/* Scale on hover */
.hover-scale {
  transition: transform var(--transition-base);
}

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

/* Glow on hover */
.hover-glow {
  transition: box-shadow var(--transition-base);
}

.hover-glow:hover {
  box-shadow: 0 8px 30px rgba(124, 58, 237, 0.3);
}

/* Rotate on hover */
.hover-rotate {
  transition: transform var(--transition-base);
}

.hover-rotate:hover {
  transform: rotate(5deg);
}

/* ============= GRADIENT ANIMATIONS ============= */
@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.gradient-animated {
  background-size: 200% 200%;
  animation: gradient-shift 8s ease infinite;
}

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

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

.float-animation-slow {
  animation: float 8s ease-in-out infinite;
}

/* ============= PULSE ANIMATION ============= */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

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

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

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

/* ============= FADE SLIDE ANIMATION ============= */
@keyframes fadeSlideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-slide-down {
  animation: fadeSlideDown 0.5s ease-out;
}

/* ============= SHIMMER EFFECT ============= */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.shimmer {
  background: linear-gradient(
    90deg,
    var(--bg-primary) 0%,
    var(--bg-secondary) 50%,
    var(--bg-primary) 100%
  );
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}

/* ============= SPIN ANIMATION ============= */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

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

.spin-slow {
  animation: spin 3s linear infinite;
}

/* ============= PROGRESS BAR ANIMATION ============= */
@keyframes progress-fill {
  from {
    width: 0%;
  }
}

.progress-bar.animated {
  animation: progress-fill 1.5s ease-out;
}

/* ============= BORDER GLOW ANIMATION ============= */
@keyframes border-glow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(124, 58, 237, 0.5),
                0 0 10px rgba(124, 58, 237, 0.3);
  }
  50% {
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.8),
                0 0 20px rgba(124, 58, 237, 0.5),
                0 0 30px rgba(124, 58, 237, 0.3);
  }
}

.glow-border {
  animation: border-glow 3s ease-in-out infinite;
}

/* ============= TYPING ANIMATION ============= */
@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

.typing-effect {
  overflow: hidden;
  border-right: 2px solid var(--purple-500);
  white-space: nowrap;
  animation: typing 3.5s steps(40, end), blink 0.75s step-end infinite;
}

/* ============= RIPPLE EFFECT ============= */
@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  animation: ripple 0.6s ease-out;
}

/* ============= SKELETON LOADING ============= */
@keyframes skeleton-loading {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-tertiary) 0%,
    var(--bg-accent) 50%,
    var(--bg-tertiary) 100%
  );
  background-size: 200px 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}

/* ============= STAGGER DELAYS ============= */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* ============= HEADER EFFECTS ============= */
header {
  transition: transform var(--transition-base),
              box-shadow var(--transition-base),
              background-color var(--transition-base);
}

header.scrolled {
  box-shadow: var(--header-shadow);
  backdrop-filter: blur(10px);
}

header.header-hidden {
  transform: translateY(-100%);
}

/* ============= SCROLL INDICATOR ============= */
@keyframes scroll-indicator {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  50% {
    transform: translateY(10px);
    opacity: 1;
  }
}

.scroll-indicator {
  animation: scroll-indicator 2s ease-in-out infinite;
}

/* ============= PROFESSION CARD ANIMATIONS ============= */

/* Card hover effect with overlay */
.profession-card {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.profession-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Card overlay animation */
.profession-card-overlay {
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.profession-card:hover .profession-card-overlay {
  opacity: 1;
  transform: translateY(0);
}

/* Card shimmer effect on load */
@keyframes card-shimmer {
  0% {
    background-position: -100% 0;
  }
  100% {
    background-position: 100% 0;
  }
}

.profession-card-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: card-shimmer 3s ease-in-out infinite;
  pointer-events: none;
}

/* Stagger animation for profession cards grid */
.profession-card:nth-child(1) { animation-delay: 0.05s; }
.profession-card:nth-child(2) { animation-delay: 0.1s; }
.profession-card:nth-child(3) { animation-delay: 0.15s; }
.profession-card:nth-child(4) { animation-delay: 0.2s; }
.profession-card:nth-child(5) { animation-delay: 0.25s; }
.profession-card:nth-child(6) { animation-delay: 0.3s; }
.profession-card:nth-child(7) { animation-delay: 0.35s; }
.profession-card:nth-child(8) { animation-delay: 0.4s; }
.profession-card:nth-child(9) { animation-delay: 0.45s; }
.profession-card:nth-child(10) { animation-delay: 0.5s; }
.profession-card:nth-child(11) { animation-delay: 0.55s; }
.profession-card:nth-child(12) { animation-delay: 0.6s; }

/* Card reveal on scroll */
@keyframes card-reveal {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.profession-card.is-visible {
  animation: card-reveal 0.6s ease-out forwards;
}

/* Profession badge pulse */
@keyframes badge-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.5);
  }
}

.profession-card:hover .profession-badge {
  animation: badge-pulse 2s ease-in-out infinite;
}

/* ============= REDUCE MOTION ============= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
