/**
 * Custom Animations for Econstru
 * Complex animations and effects that cannot be easily replicated with Tailwind utilities
 *
 * Categories:
 * 1. Fade Animations
 * 2. Slide Animations
 * 3. Scale Animations
 * 4. Special Effects
 * 5. Loading Animations
 * 6. Interactive Effects
 */

/* ===================================
   1. FADE ANIMATIONS
   =================================== */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

/* ===================================
   2. SLIDE ANIMATIONS
   =================================== */

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

/* ===================================
   3. SCALE ANIMATIONS
   =================================== */

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ===================================
   4. SPECIAL EFFECTS
   =================================== */

/* Floating animation for hero shapes */
@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  33% {
    transform: translateY(-20px) rotate(5deg);
  }
  66% {
    transform: translateY(10px) rotate(-5deg);
  }
}

/* Morphing animation for hero shapes */
@keyframes morphing {
  0%, 100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
  50% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
  }
}

/* Gradient shifting animation */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Text reveal animation with blur */
@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    filter: blur(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* Mesh background movement */
@keyframes meshMove {
  0% {
    transform: translateX(-50%) skewX(-45deg);
  }
  100% {
    transform: translateX(0%) skewX(-45deg);
  }
}

/* ===================================
   5. LOADING ANIMATIONS
   =================================== */

/* Simple spin for loading indicators */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Enhanced spin with scale for advanced spinners */
@keyframes spinEnhanced {
  0% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(0.9);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}

/* ===================================
   6. INTERACTIVE EFFECTS
   =================================== */

/* Ripple effect for click interactions */
@keyframes rippleEffect {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ===================================
   UTILITY CLASSES
   =================================== */

/* Apply 3D transform styles to cards */
.card-3d {
  transform-style: preserve-3d;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Ripple span element */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(42, 36, 54, 0.2);
  transform: scale(0);
  animation: rippleEffect 0.6s ease-out;
  pointer-events: none;
}

/* ===================================
   TAILWIND OVERRIDES
   =================================== */

/* Remove color from text-gray-100 class */
.text-gray-100 {
  color: unset !important;
}

/* ===================================
   7. RAINBOW BORDER ANIMATION
   =================================== */

@keyframes rainbowBorder {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.rainbow-border-btn {
  position: relative;
  background: linear-gradient(90deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3, #54a0ff, #5f27cd, #ff6b6b);
  background-size: 300% 300%;
  animation: rainbowBorder 4s ease infinite;
  padding: 3px;
  border-radius: 9999px;
  transition: all 0.3s ease;
}

.rainbow-border-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.rainbow-border-btn-inner {
  background: white !important;
  border-radius: 9999px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  color: #374151 !important;
}

.rainbow-border-btn-inner span,
.rainbow-border-btn-inner svg {
  color: #374151 !important;
  stroke: #374151 !important;
}

/* v1768449764 */
