/* Car Animation */
.car-animation-container {
    position: relative;
    width: 100%;
    height: 80px;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(0,0,0,0.05) 50%, rgba(255,255,255,0) 100%);
    overflow: hidden;
    margin: 20px 0 40px;
}

.car {
    position: absolute;
    left: -200px;
    font-size: 36px;
    will-change: transform;
    top: 50%;
    transform: translateY(-50%);
}

.car-1 {
    color: #007bff;
    animation: drive 8s linear infinite;
}

.car-2 {
    color: #ff6b6b;
    animation: drive 8s linear 2.5s infinite;
}

.car-3 {
    color: #28a745;
    animation: drive 8s linear 5s infinite;
}

.car i {
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.3));
    display: block;
}

.road {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #333;
    opacity: 0.2;
    transform: translateY(-50%);
}

.road:before,
.road:after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: #333;
    opacity: 0.2;
}

.road:before {
    top: -15px;
}

.road:after {
    bottom: -15px;
}

@keyframes drive {
    0% {
        transform: translateX(-200px) translateY(-50%);
    }
    100% {
        transform: translateX(calc(100vw + 200px)) translateY(-50%);
    }
}

/* Pause animation on hover */
.car-animation-container:hover .car {
    animation-play-state: paused;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .car {
        font-size: 28px;
    }
    
    .car-animation-container {
        height: 60px;
        margin: 10px 0 30px;
    }
}
