/* Nature Animation System */
.nature-container {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.nature-leaf {
    position: absolute;
    width: 40px;
    height: 40px;
    opacity: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.3s ease;
}

/* Position and animate each leaf */
.nature-leaf-1 {
    top: 15%;
    left: 10%;
    background-image: url('../img/lief1.png');
    animation: appearDisappear1 6s infinite;
}

.nature-leaf-2 {
    top: 45%;
    right: 15%;
    background-image: url('../img/lief2.png');
    animation: appearDisappear2 6s infinite;
    animation-delay: 1.5s;
}

.nature-leaf-3 {
    bottom: 35%;
    left: 20%;
    background-image: url('../img/lief1.png');
    animation: appearDisappear3 6s infinite;
    animation-delay: 3s;
}

.nature-leaf-4 {
    bottom: 25%;
    right: 25%;
    background-image: url('../img/lief2.png');
    animation: appearDisappear4 6s infinite;
    animation-delay: 4.5s;
}

/* Unique animations for each leaf */
@keyframes appearDisappear1 {
    0%, 100% { 
        opacity: 0; 
        transform: rotate(-15deg) scale(0.8);
    }
    25% { 
        opacity: 0.15; 
        transform: rotate(15deg) scale(1.1);
    }
    50% { 
        opacity: 0; 
        transform: rotate(45deg) scale(0.8);
    }
}

@keyframes appearDisappear2 {
    0%, 100% { 
        opacity: 0; 
        transform: rotate(15deg) scale(0.8);
    }
    25% { 
        opacity: 0.15; 
        transform: rotate(-15deg) scale(1.1);
    }
    50% { 
        opacity: 0; 
        transform: rotate(-45deg) scale(0.8);
    }
}

@keyframes appearDisappear3 {
    0%, 100% { 
        opacity: 0; 
        transform: rotate(-30deg) scale(0.8);
    }
    25% { 
        opacity: 0.15; 
        transform: rotate(0deg) scale(1.1);
    }
    50% { 
        opacity: 0; 
        transform: rotate(30deg) scale(0.8);
    }
}

@keyframes appearDisappear4 {
    0%, 100% { 
        opacity: 0; 
        transform: rotate(30deg) scale(0.8);
    }
    25% { 
        opacity: 0.15; 
        transform: rotate(0deg) scale(1.1);
    }
    50% { 
        opacity: 0; 
        transform: rotate(-30deg) scale(0.8);
    }
}

/* Additional effects for active state */
.nature-leaf.active {
    opacity: 0.15;
    transform: scale(1.2);
}

/* Light/Dark theme adaptations */
[data-theme="light"] .nature-leaf {
    filter: brightness(90%) contrast(120%);
    mix-blend-mode: multiply;
}

[data-theme="dark"] .nature-leaf {
    filter: brightness(150%) contrast(90%);
    mix-blend-mode: soft-light;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .nature-leaf {
        width: 30px;
        height: 30px;
    }
}

/* Animation pause/play states */
.offcanvas:not(.show) .nature-leaf {
    animation-play-state: paused;
}

.offcanvas.show .nature-leaf {
    animation-play-state: running;
}