/* Animations */

/* Fade In Up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0; /* Start hidden */
}

/* Scale In */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.scale-in {
    animation: scaleIn 0.6s ease-out forwards;
    opacity: 0;
}

/* Slide In Left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.7s ease-out forwards;
    opacity: 0;
}

/* Slide In Right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.7s ease-out forwards;
    opacity: 0;
}

/* Hero Text Animation */
.hero h1 {
    animation-delay: 0.2s;
}

.hero p {
    animation-delay: 0.4s;
}

.hero .btn {
    animation-delay: 0.6s;
}

/* Feature Item Animation */
.features .feature-item {
    animation-delay: 0.1s; /* Staggered delay for each item */
}

/* Car Item Animation */
.car-listings .car-item {
    animation-delay: 0.1s; /* Staggered delay for each item */
}

/* Hover Effects */
.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.car-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

/* Keyframe for background parallax effect */
@keyframes parallaxScroll {
    from {
        background-position: center 0;
    }
    to {
        background-position: center 100%;
    }
}

.hero {
    animation: parallaxScroll 60s linear infinite alternate; /* Adjust duration for speed */
}

/* Loading Spinner (optional, for preloader) */
.spinner {
    border: 8px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}