/*---------------------------------------------------------------------
    Sustainability Theme Animations
---------------------------------------------------------------------*/

/* Loading Animation */
.loader_bg {
    position: fixed;
    z-index: 9999999;
    background: #000;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader {
    width: 80px;
    height: 80px;
    border: 8px solid #333;
    border-top: 8px solid #b60213;
    border-right: 8px solid #fff;
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

.loader::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 4px solid transparent;
    border-top: 4px solid #28a745;
    border-radius: 50%;
    animation: spin 1s linear infinite reverse;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Fade In Animations */
.fade-in {
    opacity: 0;
    animation: fadeIn 1s ease-in forwards;
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-50px);
    animation: fadeInLeft 0.8s ease-out forwards;
}

.fade-in-right {
    opacity: 0;
    transform: translateX(50px);
    animation: fadeInRight 0.8s ease-out forwards;
}

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

@keyframes fadeInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

/* Scale In Animation */
.scale-in {
    opacity: 0;
    transform: scale(0.8);
    animation: scaleIn 0.6s ease-out forwards;
}

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

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(182, 2, 19, 0.3);
}

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

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

.hover-glow {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 25px rgba(182, 2, 19, 0.6);
    transform: scale(1.02);
}

/* Sustainability Icon Pulse */
.pulse-eco {
    animation: pulseEco 2s ease-in-out infinite;
}

@keyframes pulseEco {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Image Hover Effects */
.image-zoom {
    overflow: hidden;
    border-radius: 10px;
}

.image-zoom img {
    transition: transform 0.5s ease;
}

.image-zoom:hover img {
    transform: scale(1.1);
}

/* Text Reveal Animation */
.text-reveal {
    overflow: hidden;
    display: inline-block;
}

.text-reveal span {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: textReveal 0.5s ease forwards;
}

@keyframes textReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button Hover Effects */
.btn-eco {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-eco::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
    z-index: -1;
}

.btn-eco:hover::before {
    width: 300px;
    height: 300px;
}

/* Sustainability Badge Animation */
.eco-badge {
    position: relative;
    display: inline-block;
}

.eco-badge::after {
    content: '';
    position: absolute;
    top: -5px;
    right: -5px;
    width: 15px;
    height: 15px;
    background: #28a745;
    border-radius: 50%;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
}

/* Counter Animation */
.counter {
    font-size: 60px;
    font-weight: bold;
    color: #28a745;
}

/* Loading Bar Animation */
.progress-bar-eco {
    height: 4px;
    background: linear-gradient(90deg, #28a745, #b60213, #fff);
    background-size: 200% 100%;
    animation: progressSlide 2s linear infinite;
}

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

/* Card Hover Animation */
.eco-card {
    position: relative;
    transition: all 0.3s ease;
}

.eco-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(182, 2, 19, 0.1), rgba(40, 167, 69, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.eco-card:hover::before {
    opacity: 1;
}

/* Typewriter Cursor */
.typewriter-cursor {
    display: inline-block;
    width: 3px;
    background-color: #b60213;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

/* Leaf Animation (Sustainability Theme) */
.leaf-icon {
    display: inline-block;
    animation: leafFloat 3s ease-in-out infinite;
}

@keyframes leafFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(5deg);
    }
    75% {
        transform: translateY(-5px) rotate(-5deg);
    }
}

/* Recycle Icon Animation */
.recycle-icon {
    display: inline-block;
    animation: recycleRotate 4s linear infinite;
}

@keyframes recycleRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Energy Wave Animation */
.energy-wave {
    position: relative;
}

.energy-wave::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(182, 2, 19, 0.3), transparent);
    animation: energyWave 2s ease-in-out infinite;
}

@keyframes energyWave {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Slide In From Bottom */
.slide-up {
    opacity: 0;
    transform: translateY(50px);
    animation: slideUp 0.8s ease-out forwards;
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Bouncing Arrow */
.bounce-arrow {
    animation: bounce 2s ease-in-out infinite;
}

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

/* Glowing Border Effect */
.glow-border {
    position: relative;
    border: 2px solid transparent;
}

.glow-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(45deg, #b60213, #28a745, #fff, #b60213);
    background-size: 300% 300%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: glowRotate 3s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.glow-border:hover::before {
    opacity: 1;
}

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

/* Shimmer Effect */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Visible class for scroll animations */
.visible {
    opacity: 1 !important;
    transform: translate(0) !important;
}

