/* ===================================
   PRELOADER AGRÍCOLA - MAQSA
   =================================== */

/* Partículas de semillas flotantes */
@keyframes float-seed {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-500px) translateX(var(--x-drift, 30px)) rotate(360deg);
        opacity: 0;
    }
}

.seed-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle, #7CB342 0%, #4A7C2C 100%);
    animation: float-seed linear infinite;
    --x-drift: 30px;
}

.seed-particle:nth-child(odd) {
    --x-drift: -30px;
}

/* Hojas cayendo */
@keyframes leaf-fall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(600px) rotate(360deg);
        opacity: 0;
    }
}

.leaf {
    position: absolute;
    font-size: 2rem;
    animation: leaf-fall linear infinite;
}

/* Tractor moviéndose */
@keyframes tractor-bounce {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.tractor-move {
    animation: tractor-bounce 2s ease-in-out infinite;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.2));
}

/* Plantas creciendo */

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

/* Sol girando */
@keyframes sun-rotation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.sun-rotate {
    animation: sun-rotation 20s linear infinite;
    filter: drop-shadow(0 0 20px rgba(255, 193, 7, 0.6));
}

/* Texto con gradiente animado */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.text-gradient {
    background: linear-gradient(90deg, #2D5016 0%, #7CB342 25%, #FFB300 50%, #7CB342 75%, #2D5016 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 4s linear infinite;
}

/* Barra de progreso */
@keyframes progress-fill {
    0% {
        width: 0%;
    }
    100% {
        width: 85%;
    }
}

.progress-bar {
    animation: progress-fill 3s ease-in-out forwards;
}

/* Puntos de carga */
@keyframes dot-bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

.loading-dot {
    animation: dot-bounce 1.4s infinite ease-in-out;
}

/* Transición de salida del preloader */
#preloader {
    transition: opacity 0.5s ease-out;
}
