/* ================================================
   EDU SKILLS - Animations & Keyframes
   Pure CSS Animations - No external libraries
   ================================================ */

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

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

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

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

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

.animate-float-reverse {
    animation: float-reverse 7s ease-in-out infinite;
}

.animate-float-delayed-1 {
    animation: float 6s ease-in-out infinite;
    animation-delay: 0.5s;
}

.animate-float-delayed-2 {
    animation: float 6s ease-in-out infinite;
    animation-delay: 1s;
}

.animate-float-delayed-3 {
    animation: float 6s ease-in-out infinite;
    animation-delay: 1.5s;
}

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

@keyframes pulse-soft {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4);
    }
    50% {
        box-shadow: 0 0 20px 10px rgba(79, 70, 229, 0);
    }
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }
    50% {
        transform: scale(1);
        opacity: 0.4;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

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

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

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

/* ================================================
   FADE ANIMATIONS
   ================================================ */
@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in-down {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in-left {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fade-in-right {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fade-out {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

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

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

.animate-fade-in-down {
    animation: fade-in-down 0.6s ease-out forwards;
}

.animate-fade-in-left {
    animation: fade-in-left 0.6s ease-out forwards;
}

.animate-fade-in-right {
    animation: fade-in-right 0.6s ease-out forwards;
}

/* Animation Delays */
.animate-delay-100 { animation-delay: 0.1s; }
.animate-delay-200 { animation-delay: 0.2s; }
.animate-delay-300 { animation-delay: 0.3s; }
.animate-delay-400 { animation-delay: 0.4s; }
.animate-delay-500 { animation-delay: 0.5s; }
.animate-delay-600 { animation-delay: 0.6s; }
.animate-delay-700 { animation-delay: 0.7s; }
.animate-delay-800 { animation-delay: 0.8s; }

/* ================================================
   SLIDE ANIMATIONS
   ================================================ */
@keyframes slide-up {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slide-down {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slide-left {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slide-right {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

.animate-slide-up {
    animation: slide-up 0.5s ease-out forwards;
}

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

.animate-slide-left {
    animation: slide-left 0.5s ease-out forwards;
}

.animate-slide-right {
    animation: slide-right 0.5s ease-out forwards;
}

/* ================================================
   BOUNCE ANIMATION
   ================================================ */
@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
        transform: translateY(0);
    }
    40%, 43% {
        animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
        transform: translateY(-30px);
    }
    70% {
        animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
        transform: translateY(-15px);
    }
    90% {
        transform: translateY(-4px);
    }
}

@keyframes bounce-in {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes bounce-soft {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes bounce-scale {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

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

.animate-bounce-in {
    animation: bounce-in 0.75s ease-out forwards;
}

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

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

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

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

@keyframes wiggle {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-5deg);
    }
    75% {
        transform: rotate(5deg);
    }
}

.animate-rotate {
    animation: rotate 8s linear infinite;
}

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

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

/* ================================================
   SCALE ANIMATIONS
   ================================================ */
@keyframes scale-in {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scale-out {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.5);
    }
}

@keyframes scale-up {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

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

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

.animate-scale-up {
    animation: scale-up 3s ease-in-out infinite;
}

/* ================================================
   SHIMMER ANIMATION
   ================================================ */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.animate-shimmer {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* ================================================
   RIPPLE ANIMATION (Button Effect)
   ================================================ */
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

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

.btn-ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

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

.animate-shake {
    animation: shake 0.5s ease-in-out;
}

/* ================================================
   WAVE ANIMATION
   ================================================ */
@keyframes wave {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(20deg);
    }
    75% {
        transform: rotate(-20deg);
    }
}

.animate-wave {
    animation: wave 1s ease-in-out infinite;
    transform-origin: 70% 70%;
}

/* ================================================
   BACKGROUND SHAPE ANIMATIONS
   ================================================ */
@keyframes morph {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    25% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
    50% {
        border-radius: 50% 60% 30% 60% / 30% 40% 70% 50%;
    }
    75% {
        border-radius: 60% 40% 60% 30% / 70% 30% 40% 60%;
    }
}

@keyframes blob {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(20px, -30px) scale(1.1);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    75% {
        transform: translate(20px, 10px) scale(1.05);
    }
}

.animate-morph {
    animation: morph 8s ease-in-out infinite;
}

.animate-blob {
    animation: blob 10s ease-in-out infinite;
}

/* ================================================
   COUNTER ANIMATION (for Statistics)
   ================================================ */
@keyframes count-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-count-up {
    animation: count-up 0.8s ease-out forwards;
}

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

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

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

@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: var(--color-primary);
    }
}

.animate-typing {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--color-primary);
    animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

/* ================================================
   SCROLL-TRIGGERED ANIMATIONS
   (These classes are added via JS when elements enter viewport)
   ================================================ */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate.in-view {
    opacity: 1;
    transform: translateY(0);
}

.scroll-animate-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate-left.in-view {
    opacity: 1;
    transform: translateX(0);
}

.scroll-animate-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate-right.in-view {
    opacity: 1;
    transform: translateX(0);
}

.scroll-animate-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate-scale.in-view {
    opacity: 1;
    transform: scale(1);
}

/* Stagger children animations */
.stagger-container .scroll-animate:nth-child(1) { transition-delay: 0.1s; }
.stagger-container .scroll-animate:nth-child(2) { transition-delay: 0.2s; }
.stagger-container .scroll-animate:nth-child(3) { transition-delay: 0.3s; }
.stagger-container .scroll-animate:nth-child(4) { transition-delay: 0.4s; }
.stagger-container .scroll-animate:nth-child(5) { transition-delay: 0.5s; }
.stagger-container .scroll-animate:nth-child(6) { transition-delay: 0.6s; }
.stagger-container .scroll-animate:nth-child(7) { transition-delay: 0.7s; }
.stagger-container .scroll-animate:nth-child(8) { transition-delay: 0.8s; }

/* ================================================
   HOVER TRANSITIONS
   ================================================ */
.hover-lift {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.hover-grow {
    transition: transform var(--transition-base);
}

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

.hover-shrink {
    transition: transform var(--transition-base);
}

.hover-shrink:hover {
    transform: scale(0.95);
}

.hover-bright {
    transition: filter var(--transition-base);
}

.hover-bright:hover {
    filter: brightness(1.1);
}

.hover-glow {
    transition: box-shadow var(--transition-base);
}

.hover-glow:hover {
    box-shadow: var(--shadow-glow);
}

/* ================================================
   ICON ANIMATIONS
   ================================================ */
.icon-bounce {
    transition: transform var(--transition-fast);
}

.icon-bounce:hover {
    animation: bounce 0.5s ease;
}

.icon-spin:hover {
    animation: rotate 0.8s ease;
}

.icon-pulse:hover {
    animation: pulse 0.5s ease;
}

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

@keyframes dots-pulse {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-dots {
    display: flex;
    gap: 8px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
    animation: dots-pulse 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

/* ================================================
   EDUCATIONAL THEME ANIMATIONS
   ================================================ */
@keyframes star-twinkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

@keyframes book-flip {
    0%, 100% {
        transform: perspective(400px) rotateY(0deg);
    }
    50% {
        transform: perspective(400px) rotateY(-15deg);
    }
}

@keyframes pencil-write {
    0%, 100% {
        transform: translateX(0) rotate(45deg);
    }
    50% {
        transform: translateX(10px) rotate(45deg);
    }
}

@keyframes rocket-launch {
    0%, 100% {
        transform: translateY(0) rotate(-45deg);
    }
    50% {
        transform: translateY(-20px) rotate(-45deg);
    }
}

.animate-star-twinkle {
    animation: star-twinkle 2s ease-in-out infinite;
}

.animate-book-flip {
    animation: book-flip 3s ease-in-out infinite;
}

.animate-pencil-write {
    animation: pencil-write 1.5s ease-in-out infinite;
}

.animate-rocket-launch {
    animation: rocket-launch 2s ease-in-out infinite;
}

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

    .scroll-animate {
        opacity: 1;
        transform: none;
    }
}
