/* codemintz - Animations CSS */

/* Keyframe Animations */

/* Floating Leaf Animation */
@keyframes float-leaf {
    0% {
        transform: translateY(-100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(100vh) translateX(100px) rotate(360deg);
        opacity: 0;
    }
}

/* Gentle Sway Animation */
@keyframes gentle-sway {
    0%, 100% {
        transform: rotate(0deg) translateX(0);
    }
    25% {
        transform: rotate(2deg) translateX(5px);
    }
    75% {
        transform: rotate(-2deg) translateX(-5px);
    }
}

/* Pulse Eco Animation */
@keyframes pulse-eco {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

/* Fade In Up Animation */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gentle Bounce Animation */
@keyframes gentle-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Pulse Glow Animation */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(127, 176, 105, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(127, 176, 105, 0.8);
    }
}

/* Fly Around Animation */
@keyframes fly-around {
    0% {
        transform: translateX(0) translateY(0);
    }
    25% {
        transform: translateX(50px) translateY(-20px);
    }
    50% {
        transform: translateX(100px) translateY(10px);
    }
    75% {
        transform: translateX(30px) translateY(-15px);
    }
    100% {
        transform: translateX(0) translateY(0);
    }
}

/* Sun Glow Animation */
@keyframes sun-glow {
    0%, 100% {
        filter: brightness(1) drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
        transform: scale(1);
    }
    50% {
        filter: brightness(1.2) drop-shadow(0 0 20px rgba(255, 215, 0, 0.8));
        transform: scale(1.05);
    }
}

/* Cloud Drift Animation */
@keyframes cloud-drift {
    0% {
        transform: translateX(-10%);
    }
    100% {
        transform: translateX(110%);
    }
}

/* Gentle Pulse Animation */
@keyframes gentle-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Leaf Fall Animation */
@keyframes leaf-fall {
    0% {
        transform: translateY(-20px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(180deg);
        opacity: 0;
    }
}

/* Water Ripple Animation */
@keyframes water-ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* Growing Plant Animation */
@keyframes grow-plant {
    0% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
    100% {
        transform: scaleY(1);
        transform-origin: bottom;
    }
}

/* Butterfly Flutter Animation */
@keyframes butterfly-flutter {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-15px) rotate(5deg);
    }
    75% {
        transform: translateY(-5px) rotate(-5deg);
    }
}

/* Wind Blow Animation */
@keyframes wind-blow {
    0%, 100% {
        transform: translateX(0) rotate(0deg);
    }
    50% {
        transform: translateX(20px) rotate(3deg);
    }
}

/* Sparkle Animation */
@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Breathing Animation */
@keyframes breathing {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Floating Animation */
@keyframes floating {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Shimmer Animation */
@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* Utility Animation Classes */

/* Hover Effects */
.hover-grow {
    transition: var(--transition-normal);
}

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

.hover-lift {
    transition: var(--transition-normal);
}

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

.hover-glow {
    transition: var(--transition-normal);
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(127, 176, 105, 0.4);
}

/* Loading Animations */
.loading-leaf {
    position: relative;
    overflow: hidden;
}

.loading-leaf::after {
    content: '🍃';
    position: absolute;
    top: 50%;
    left: -50px;
    transform: translateY(-50%);
    animation: leaf-slide 2s ease-in-out infinite;
}

@keyframes leaf-slide {
    0% {
        left: -50px;
    }
    50% {
        left: 50%;
        transform: translateX(-50%) translateY(-50%);
    }
    100% {
        left: calc(100% + 50px);
    }
}

/* Scroll Animations */
.scroll-fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

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

.scroll-slide-left.visible {
    opacity: 1;
    transform: translateX(0);
}

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

.scroll-slide-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Interactive Elements */
.ripple-effect {
    position: relative;
    overflow: hidden;
}

.ripple-effect::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(127, 176, 105, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

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

/* Nature-Specific Animations */
.leaf-entrance {
    animation: leaf-fall 3s ease-in-out;
}

.tree-growth {
    animation: grow-plant 2s ease-out;
}

.butterfly-dance {
    animation: butterfly-flutter 4s ease-in-out infinite;
}

.wind-sway {
    animation: wind-blow 6s ease-in-out infinite;
}

.sparkle-effect {
    animation: sparkle 2s ease-in-out infinite;
}

.nature-breathing {
    animation: breathing 4s ease-in-out infinite;
}

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

/* Seasonal Animations */
.spring-bloom {
    animation: grow-plant 1.5s ease-out, sparkle 2s ease-in-out 1.5s infinite;
}

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

.autumn-fall {
    animation: leaf-fall 4s ease-in-out infinite;
}

.winter-drift {
    animation: cloud-drift 8s linear infinite;
}

/* Performance Optimizations */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .floating-leaves::before,
    .floating-leaves::after {
        animation: none;
    }
    
    .gentle-sway,
    .butterfly-flutter,
    .wind-blow {
        animation: none;
    }
}

/* Dark Mode Animations */
@media (prefers-color-scheme: dark) {
    .sun-glow {
        animation: none;
        filter: brightness(0.8);
    }
    
    .sparkle-effect {
        animation-duration: 3s;
    }
}

/* Bounce Animation for Blog Page */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}
