/* ===================================================
   Green School / Adiwiyata - Plant Ornaments & Animations
   =================================================== */

/* --- Floating Leaves Container --- */
.floating-leaves {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.floating-leaves .leaf {
    position: absolute;
    top: -80px;
    opacity: 0;
    animation: leafFall linear infinite;
}

.floating-leaves .leaf svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

/* Leaf 1 */
.floating-leaves .leaf:nth-child(1) {
    left: 5%;
    animation-duration: 14s;
    animation-delay: 0s;
}

.floating-leaves .leaf:nth-child(2) {
    left: 15%;
    animation-duration: 16s;
    animation-delay: 3s;
}

.floating-leaves .leaf:nth-child(3) {
    left: 30%;
    animation-duration: 12s;
    animation-delay: 6s;
}

.floating-leaves .leaf:nth-child(4) {
    left: 50%;
    animation-duration: 18s;
    animation-delay: 2s;
}

.floating-leaves .leaf:nth-child(5) {
    left: 65%;
    animation-duration: 15s;
    animation-delay: 5s;
}

.floating-leaves .leaf:nth-child(6) {
    left: 80%;
    animation-duration: 13s;
    animation-delay: 8s;
}

.floating-leaves .leaf:nth-child(7) {
    left: 92%;
    animation-duration: 17s;
    animation-delay: 1s;
}

.floating-leaves .leaf:nth-child(8) {
    left: 40%;
    animation-duration: 20s;
    animation-delay: 10s;
}

@keyframes leafFall {
    0% {
        top: -80px;
        opacity: 0;
        transform: rotate(0deg) translateX(0px);
    }

    10% {
        opacity: 0.7;
    }

    25% {
        transform: rotate(90deg) translateX(30px);
    }

    50% {
        transform: rotate(180deg) translateX(-20px);
    }

    75% {
        transform: rotate(270deg) translateX(25px);
    }

    90% {
        opacity: 0.5;
    }

    100% {
        top: 105vh;
        opacity: 0;
        transform: rotate(360deg) translateX(-10px);
    }
}


/* --- Corner Vine Decorations --- */
.vine-decoration {
    position: absolute;
    pointer-events: none;
    z-index: 2;
    opacity: 0.15;
}

.vine-top-left {
    top: 0;
    left: 0;
    width: 200px;
    height: 200px;
}

.vine-top-right {
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    transform: scaleX(-1);
}

.vine-bottom-left {
    bottom: 0;
    left: 0;
    width: 180px;
    height: 180px;
    transform: scaleY(-1);
}

.vine-bottom-right {
    bottom: 0;
    right: 0;
    width: 180px;
    height: 180px;
    transform: scale(-1, -1);
}


/* --- Green Divider with Leaf Icon --- */
.green-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
}

.green-divider::before,
.green-divider::after {
    content: '';
    flex: 1;
    max-width: 120px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #1B7A2B, transparent);
}

.green-divider .leaf-icon {
    color: #1B7A2B;
    font-size: 24px;
    animation: gentleSway 3s ease-in-out infinite;
}


/* --- Gentle Sway Animation (for small icons and accents) --- */
@keyframes gentleSway {

    0%,
    100% {
        transform: rotate(-5deg);
    }

    50% {
        transform: rotate(5deg);
    }
}


/* --- Section leaf accent (decorative leaves on section headers) --- */
.site-title-tagline i {
    animation: gentleSway 3s ease-in-out infinite;
    display: inline-block;
}


/* --- Eco Badge / Adiwiyata Badge --- */
.eco-badge {
    position: fixed;
    bottom: 80px;
    left: 20px;
    background: linear-gradient(135deg, #1B7A2B, #4CAF50);
    color: #fff;
    padding: 10px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(27, 122, 43, 0.4);
    z-index: 999;
    animation: badgePulse 3s ease-in-out infinite;
    text-decoration: none;
}

.eco-badge:hover {
    transform: scale(1.05);
    color: #fff;
    text-decoration: none;
}

.eco-badge i {
    font-size: 16px;
}

@keyframes badgePulse {

    0%,
    100% {
        box-shadow: 0 4px 15px rgba(27, 122, 43, 0.4);
    }

    50% {
        box-shadow: 0 4px 25px rgba(27, 122, 43, 0.7);
    }
}


/* --- Green gradient overlay for hero section --- */
.hero-section::after {
    background: linear-gradient(135deg, rgba(27, 122, 43, 0.3), rgba(13, 59, 26, 0.5)) !important;
}


/* --- Scroll-top green override --- */
#scroll-top {
    background: linear-gradient(135deg, #1B7A2B, #4CAF50) !important;
}

#scroll-top:hover {
    background: linear-gradient(135deg, #4CAF50, #1B7A2B) !important;
}


/* --- Responsive: hide floating leaves on small screens --- */
@media (max-width: 768px) {
    .floating-leaves {
        display: none;
    }

    .eco-badge {
        bottom: 70px;
        left: 10px;
        font-size: 11px;
        padding: 8px 12px;
    }

    .vine-decoration {
        display: none;
    }

    .scrolling-tree-container {
        display: none;
    }
}

/* --- Scrolling Tree Animation (Lottie) --- */
.scrolling-tree-container {
    position: fixed;
    bottom: 35px;
    left: 0px;
    width: 250px;
    height: 300px;
    pointer-events: none;
    z-index: 998;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    opacity: 0.9;
}