/* ========================================
   MODERN ANIMATIONS & EFFECTS CSS
   ======================================== */

/* ========== SMOOTH TRANSITIONS ========== */
* {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  scroll-behavior: smooth;
}

/* ========== 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 & ZOOM 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);
  }
}

@keyframes scaleUpBig {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.1);
  }
}

/* ========== FLOATING & BOUNCE ========== */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* ========== PULSE & GLOW EFFECTS ========== */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes pulseShadow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(220, 52, 43, 0.7);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(220, 52, 43, 0);
  }
}

@keyframes glow {
  0% {
    text-shadow: 0 0 5px rgba(255, 200, 100, 0.5);
  }
  50% {
    text-shadow: 0 0 20px rgba(255, 200, 100, 1);
  }
  100% {
    text-shadow: 0 0 5px rgba(255, 200, 100, 0.5);
  }
}

@keyframes glowBox {
  0%, 100% {
    box-shadow: 0 0 10px rgba(30, 144, 255, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(30, 144, 255, 0.8);
  }
}

/* ========== SLIDE ANIMATIONS ========== */
@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes slideInUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes slideInDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

/* ========== ROTATE ANIMATIONS ========== */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes rotateReverse {
  from {
    transform: rotate(360deg);
  }
  to {
    transform: rotate(0deg);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ========== SHIMMER EFFECT ========== */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

@keyframes shimmerText {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 200% center;
  }
}

/* ========== FLIP & TURN ========== */
@keyframes flip {
  from {
    transform: perspective(400px) rotateY(0);
  }
  to {
    transform: perspective(400px) rotateY(360deg);
  }
}

@keyframes flipX {
  from {
    transform: perspective(400px) rotateX(0);
  }
  to {
    transform: perspective(400px) rotateX(360deg);
  }
}

/* ========== COLOR ANIMATIONS ========== */
@keyframes colorShift {
  0% {
    color: #ff5722;
  }
  50% {
    color: #1e90ff;
  }
  100% {
    color: #ff5722;
  }
}

@keyframes bgGradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* ========== WAVE ANIMATION ========== */
@keyframes wave {
  0%, 100% {
    transform: translateY(0);
  }
  25% {
    transform: translateY(-10px);
  }
  75% {
    transform: translateY(10px);
  }
}

/* ========== UTILITY CLASSES ========== */

/* Apply animations with different durations */
.animate-fade-in {
  animation: fadeIn 0.6s ease-in-out;
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out;
}

.animate-fade-in-down {
  animation: fadeInDown 0.8s ease-out;
}

.animate-fade-in-left {
  animation: fadeInLeft 0.8s ease-out;
}

.animate-fade-in-right {
  animation: fadeInRight 0.8s ease-out;
}

.animate-scale-in {
  animation: scaleIn 0.6s ease-out;
}

.animate-bounce-in {
  animation: bounceIn 0.8s ease-out;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-float-slow {
  animation: floatSlow 4s ease-in-out infinite;
}

.animate-bounce {
  animation: bounce 2s ease-in-out infinite;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

.animate-pulse-shadow {
  animation: pulseShadow 2s ease-out infinite;
}

.animate-spin {
  animation: spin 1s linear infinite;
}

.animate-rotate {
  animation: rotate 3s linear infinite;
}

.animate-glow {
  animation: glow 2s ease-in-out infinite;
}

.animate-glow-box {
  animation: glowBox 2s ease-in-out infinite;
}

/* ========== HOVER EFFECTS ========== */
.hover-scale {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-scale:hover {
  transform: scale(1.05);
}

.hover-scale-lg:hover {
  transform: scale(1.1);
}

.hover-lift {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.hover-lift-lg:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.hover-shadow {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.hover-shadow:hover {
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

.hover-color-shift {
  transition: color 0.3s ease;
}

.hover-color-shift:hover {
  color: #1e90ff;
}

.hover-glow {
  transition: all 0.3s ease;
}

.hover-glow:hover {
  box-shadow: 0 0 20px rgba(30, 144, 255, 0.6);
}

/* ========== BUTTON ENHANCEMENTS ========== */
.btn-modern {
  position: relative;
  overflow: hidden;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-modern:before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: left 0.4s ease;
  z-index: -1;
}

.btn-modern:hover:before {
  left: 100%;
}

.btn-modern:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-pulse {
  animation: pulseShadow 2s ease-out infinite;
}

/* ========== CARD EFFECTS ========== */
.card-hover {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card-overlay {
  position: relative;
  overflow: hidden;
}

.card-overlay:before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
  transform: rotate(45deg);
  animation: shimmer 3s infinite;
}

/* ========== TEXT & LINK EFFECTS ========== */
.link-underline {
  position: relative;
  text-decoration: none;
  transition: color 0.3s ease;
}

.link-underline:after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background: currentColor;
  transition: width 0.3s ease;
}

.link-underline:hover {
  color: #1e90ff;
}

.link-underline:hover:after {
  width: 100%;
}

.text-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: bgGradientShift 3s ease infinite;
  background-size: 200% 200%;
}

/* ========== BADGE ANIMATIONS ========== */
.badge-pulse {
  animation: pulse 2s ease-in-out infinite;
}

.badge-glow {
  animation: glowBox 2s ease-in-out infinite;
}

.badge-bounce {
  animation: bounceIn 0.8s ease-out;
}

/* ========== LOADER ANIMATIONS ========== */
.loader {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-top: 4px solid #1e90ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loader-pulse {
  width: 50px;
  height: 50px;
  background: radial-gradient(circle, #1e90ff 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}

/* ========== SCROLL INDICATOR ========== */
.scroll-indicator {
  animation: float 2s ease-in-out infinite;
}

/* ========== GRADIENT BACKGROUNDS ========== */
.gradient-bg-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-bg-warm {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.gradient-bg-cool {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.gradient-bg-sunset {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.gradient-bg-vibrant {
  background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
}

/* ========== STAGGER ANIMATIONS ========== */
.stagger-child:nth-child(1) {
  animation-delay: 0.1s;
}

.stagger-child:nth-child(2) {
  animation-delay: 0.2s;
}

.stagger-child:nth-child(3) {
  animation-delay: 0.3s;
}

.stagger-child:nth-child(4) {
  animation-delay: 0.4s;
}

.stagger-child:nth-child(5) {
  animation-delay: 0.5s;
}

.stagger-child:nth-child(n+6) {
  animation-delay: 0.6s;
}

/* ========== RESPONSIVE ANIMATIONS ========== */
@media (max-width: 768px) {
  .hover-lift:hover {
    transform: translateY(-3px);
  }
  
  .card-hover:hover {
    transform: translateY(-5px);
  }
  
  .animate-float {
    animation: none;
  }
  
  .animate-bounce {
    animation: none;
  }
}

/* ========== ATTENTION SEEKERS ========== */
@keyframes attention-heartbeat {
  0%, 10%, 20%, 50%, 80%, 100% {
    transform: scale(1);
  }
  25%, 75% {
    transform: scale(1.3);
  }
}

.attention-heartbeat {
  animation: attention-heartbeat 1.3s ease-in-out infinite;
}

@keyframes attention-jello {
  0%, 11.1%, 100% {
    transform: none;
  }
  22.2% {
    transform: skewX(-12.5deg) skewY(-12.5deg);
  }
  33.3% {
    transform: skewX(6.25deg) skewY(6.25deg);
  }
  44.4% {
    transform: skewX(-3.125deg) skewY(-3.125deg);
  }
  55.5% {
    transform: skewX(1.5625deg) skewY(1.5625deg);
  }
  66.6% {
    transform: skewX(-0.78125deg) skewY(-0.78125deg);
  }
  77.7% {
    transform: skewX(0.390625deg) skewY(0.390625deg);
  }
  88.8% {
    transform: skewX(-0.1953125deg) skewY(-0.1953125deg);
  }
}

.attention-jello {
  animation: attention-jello 0.9s ease-in-out;
}
