/* Keyframe Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Animation Classes */
.animated {
    animation-duration: 1s;
    animation-fill-mode: both;
}

.fadeIn { animation-name: fadeIn; }
.slideInUp { animation-name: slideInUp; }
.slideInLeft { animation-name: slideInLeft; }
.slideInRight { animation-name: slideInRight; }
.zoomIn { animation-name: zoomIn; }
.pulse { animation-name: pulse; animation-duration: 2s; animation-iteration-count: infinite; }

/* Scroll-triggered Animations (handled by JS, but define initial state) */
.scroll-animate {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate.active {
    opacity: 1;
    transform: translateY(0);
}

.scroll-animate.left {
    transform: translateX(-50px);
}
.scroll-animate.left.active {
    transform: translateX(0);
}

.scroll-animate.right {
    transform: translateX(50px);
}
.scroll-animate.right.active {
    transform: translateX(0);
}

.scroll-animate.zoom {
    transform: scale(0.8);
}
.scroll-animate.zoom.active {
    transform: scale(1);
}

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

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

.nav-menu a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

/* Hero Parallax Effect (CSS-only for background, JS for content) */
.hero {
    background-attachment: fixed; /* For parallax background */
}

/* Testimonial Carousel */
.testimonial-carousel {
    scroll-behavior: smooth;
}

/* Dark Mode Transition */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

.header, .search-widget, .car-card, .testimonial-item {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}