/* Filter Section */
.filter-section {
    margin: 20px 0;
    padding: 10px 0;
}

.filter-section .filter-btn {
    background-color: #1b1b1b;
    color: #fff;
    border: 2px solid #7fc8ff;
    border-radius: 30px;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    margin: 5px;
    transition: all 0.3s ease-in-out;
    outline: none;
}

.filter-section .filter-btn:hover {
    background-color: #7fc8ff;
    color: #1b1b1b;
    transform: translateY(-3px);
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}

.filter-section .filter-btn.active {
    background-color: #7fc8ff;
    color: #1b1b1b;
    border-color: #4fb1e6;
    box-shadow: 0px 4px 15px rgba(245, 184, 84, 0.5);
}

.filter-section .filter-btn:focus {
    outline: none;
}

/* Ensure cards are centered on mobile */
@media screen and (max-width: 768px) {
    .cars-modern .car-item {
        margin: 0 auto; /* Center cards horizontally */
        float: none; /* Reset float property */
    }
    .cars-modern .row {
        display: flex;
        flex-direction: column; /* Stack cards vertically */
        align-items: center; /* Center align items */
    }
    .car-card {
        width: 90%; /* Make cards responsive to fit smaller screens */
    }
}




















/* General Car Card Styles */
.car-card {
    background-color: #1b1b1b;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 15px auto; /* Ensures cards are centered */
    max-width: 300px; /* Optional for controlling width */
}

.car-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.car-image {
    position: relative;
    overflow: hidden;
}

.car-image img {
    width: 100%;
    height: auto;
    border-bottom: 5px solid #7fc8ff;
}

.price-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1rem;
}

.car-details {
    padding: 15px;
    color: #fff;
    text-align: center; /* Center aligns text and content */
}

.car-details h4 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #fff;
}

.car-details ul {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
}

.car-details ul li {
    font-size: 0.9rem;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center; /* Center aligns icons and text */
}

.car-details ul li i {
    margin-right: 10px;
    color: #7fc8ff;
}

.modern-btn {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #fff, #fff);
    color: #1b1b1b;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.modern-btn:hover {
    background: #7fc8ff;
    transform: scale(1.05);
}

/* Container styling */
.car-cards-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Center align cards */
    gap: 20px; /* Space between cards */
    padding: 10px; /* Add some padding */
}

/* Card styling for mobile */
@media (max-width: 768px) {
    .car-card {
        width: 90%; /* Ensure the card takes most of the width */
        max-width: 350px; /* Limit the width */
        margin: 0 auto; /* Center it horizontally */
        text-align: center; /* Center-align text inside the card */
    }

    .car-image img {
        width: 100%; /* Ensure the image scales with the card */
        border-bottom: 4px solid #7fc8ff; /* Keep the bottom border */
    }

    .price-tag {
        left: 15px; /* Adjust padding for mobile */
        top: 15px; /* Space from top */
        font-size: 0.9rem; /* Adjust font size */
    }

    .modern-btn {
        width: 100%; /* Make button full-width */
        text-align: center; /* Center-align text inside */
        margin-top: 10px; /* Add some space above the button */
    }
}
