/* ===================================
   PREMIUM ANIMATIONS & MICRO-INTERACTIONS
   =================================== */

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

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

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

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

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

/* Staggered animations for cards */
.animate-on-scroll {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }
.animate-delay-6 { animation-delay: 0.6s; }
.animate-delay-7 { animation-delay: 0.7s; }
.animate-delay-8 { animation-delay: 0.8s; }

/* ===================================
   TYPING EFFECT ANIMATION
   =================================== */

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

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

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

/* ===================================
   BUTTON RIPPLE EFFECT
   =================================== */

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

.btn-ripple::before {
    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%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::before {
    width: 300px;
    height: 300px;
}

/* ===================================
   GRADIENT MOVEMENT ANIMATION
   =================================== */

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

.gradient-animate {
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

/* ===================================
   FLOATING ANIMATION
   =================================== */

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

/* ===================================
   PULSE GLOW ANIMATION
   =================================== */

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(102, 126, 234, 0.8);
    }
}

.pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

/* ===================================
   SHIMMER EFFECT
   =================================== */

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* ===================================
   BOUNCE ANIMATION
   =================================== */

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -30px, 0);
    }
    70% {
        transform: translate3d(0, -15px, 0);
    }
    90% {
        transform: translate3d(0, -4px, 0);
    }
}

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

/* ===================================
   ROTATE ANIMATION
   =================================== */

@keyframes rotate360 {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.rotate-animation {
    animation: rotate360 20s linear infinite;
}

/* ===================================
   SLIDE IN ANIMATIONS
   =================================== */

@keyframes slideInFromLeft {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in-left {
    animation: slideInFromLeft 0.8s ease-out;
}

.slide-in-right {
    animation: slideInFromRight 0.8s ease-out;
}

/* ===================================
   UNDERLINE ANIMATION
   =================================== */

.underline-animate {
    position: relative;
    display: inline-block;
}

.underline-animate::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.underline-animate:hover::after {
    width: 100%;
}

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

.card-hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ===================================
   BLUR BACKGROUND ANIMATION
   =================================== */

@keyframes blurPulse {
    0%, 100% {
        backdrop-filter: blur(10px);
    }
    50% {
        backdrop-filter: blur(20px);
    }
}

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

/* ===================================
   SCALE ON HOVER
   =================================== */

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

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

/* ===================================
   GLOW ON HOVER
   =================================== */

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

.glow-hover:hover {
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.6);
}

/* ===================================
   FADE IN ANIMATION
   =================================== */

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

.fade-in {
    animation: fadeIn 1s ease-in;
}

/* ===================================
   STAGGER CHILDREN ANIMATION
   =================================== */

.stagger-container > * {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.stagger-container > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-container > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-container > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-container > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-container > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-container > *:nth-child(6) { animation-delay: 0.6s; }
.stagger-container > *:nth-child(7) { animation-delay: 0.7s; }
.stagger-container > *:nth-child(8) { animation-delay: 0.8s; }
