﻿.floating-pineapples {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 9999;
}

.pineapple {
    position: absolute;
    width: 70px;
    height: auto;
    opacity: 0.85;
    animation-name: pineappleFloat;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}
/* ------------------------- موقعیت و اندازه آناناس‌ها ------------------------- */

.p1 {
    left: 3%;
    top: 15%;
    width: 65px;
    animation-duration: 9s;
}

.p2 {
    left: 15%;
    top: 70%;
    width: 90px;
    animation-duration: 12s;
    animation-delay: -4s;
}

.p3 {
    left: 30%;
    top: 20%;
    width: 55px;
    animation-duration: 8s;
    animation-delay: -2s;
}

.p4 {
    left: 45%;
    top: 75%;
    width: 75px;
    animation-duration: 11s;
    animation-delay: -7s;
}

.p5 {
    left: 60%;
    top: 12%;
    width: 100px;
    animation-duration: 14s;
    animation-delay: -5s;
}

.p6 {
    left: 80%;
    top: 25%;
    width: 60px;
    animation-duration: 9s;
    animation-delay: -3s;
}

.p7 {
    left: 90%;
    top: 70%;
    width: 85px;
    animation-duration: 13s;
    animation-delay: -8s;
}

.p8 {
    left: 5%;
    top: 45%;
    width: 45px;
    animation-duration: 10s;
    animation-delay: -6s;
}

.p9 {
    left: 25%;
    top: 90%;
    width: 60px;
    animation-duration: 15s;
    animation-delay: -10s;
}

.p10 {
    left: 70%;
    top: 55%;
    width: 50px;
    animation-duration: 8s;
    animation-delay: -1s;
}

.p11 {
    left: 50%;
    top: 40%;
    width: 65px;
    animation-duration: 12s;
    animation-delay: -9s;
}

.p12 {
    left: 95%;
    top: 10%;
    width: 55px;
    animation-duration: 10s;
    animation-delay: -5s;
}
/* ------------------------- انیمیشن شناور ------------------------- */

@keyframes pineappleFloat {
    0% {
        transform: translate3d(0, 0, 0) rotate(0deg);
    }

    20% {
        transform: translate3d(35px, -45px, 0) rotate(8deg);
    }

    40% {
        transform: translate3d(-25px, -80px, 0) rotate(-6deg);
    }

    60% {
        transform: translate3d(-50px, -25px, 0) rotate(10deg);
    }

    80% {
        transform: translate3d(20px, 30px, 0) rotate(-8deg);
    }

    100% {
        transform: translate3d(0, 0, 0) rotate(0deg);
    }
}
/* ------------------------- موبایل ------------------------- */

@media (max-width: 768px) {
    .pineapple {
        opacity: 0.6;
    }

    .p1, .p3, .p8, .p10 {
        display: none;
    }

    .p2 {
        width: 60px;
    }

    .p4 {
        width: 55px;
    }

    .p5 {
        width: 70px;
    }

    .p6 {
        width: 50px;
    }

    .p7 {
        width: 65px;
    }

    .p9 {
        width: 45px;
    }

    .p11 {
        width: 50px;
    }

    .p12 {
        width: 45px;
    }
}
/* کاهش حرکت برای کاربرانی که این گزینه را فعال کرده‌اند */

@media (prefers-reduced-motion: reduce) {
    .pineapple {
        animation: none;
    }
}
