body {
    margin: 0;
    padding: 0;
    position: relative;
    background-color: #dee2e6;
    color: #343a40;
    font-family: Arial, sans-serif;
}
header {
    position: fixed;
    top: 0;
    left: 0;
    background-color: #343a40;
    color: #cec4da;
    z-index: 1000;
    padding: 10px;
    width: 100%;
    display: flex;
    align-items: center;
}

.logo {
    width: 200px;
}

nav {
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.headerUl {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    flex-grow: 1;
    justify-content: left;
    margin-left: 50px; 
}

.headerli {
    margin: 0 10px;
    transition: all .40s ease;
}

.headera {
    color: #cec4da;
    text-decoration: none;
}
.headerli:hover {
    transform: translateY(-3px) translateX(-5px);
    color: gray;
}


.headera:hover {
    color: gray;
}
main {
    padding-top: 70px;
    padding-bottom: 50px;
    margin-right: 0;
    margin-left: 0;
    margin-bottom: 100px;
}


.footer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, auto));
    gap: 3.5rem;
    background: #343a40;
    position: relative;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 20px;
    color: #cec4da;
}

.footer-content li {
    margin-bottom: 16px;
    list-style: none;
}

.footer-content li a {
    display: block;
    
    color: #cec4da;
    font-size: 15px;
    font-weight: 400;
    transition: all .40s ease;
}

.footer-content li a:hover {
    transform: translateY(-3px) translateX(-5px);
    color: gray;
}

.footer .logo {
    width: 150px;
}

.icons a {
    display: inline-block;
    font-size: 22px;
    color: #d6d6d6;
    margin-right: 17px;
    transition: all .40s ease;
}

.icons a:hover {
    color: #fff;
    transform: translateY(-5px);
}

@media (max-width: 768px) {
    .footer {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, auto));
        gap: 2rem;
    }
}

.used-cars{
    text-align: center;
}
.new-cars{
    text-align: center  ;
}
.featured-cars{
    text-align: center;
}
nav :hover{
    color: gray;
}


    .car-listings {
        display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.car {
  
    width: 30%; 
    margin: 20px 0;
    text-align: center;
    font-size: small;
    box-sizing: border-box; 
}

.car img {
    max-width: 70%;
    border: 1px solid #343a40; 
    padding: 2px;
}
.car img:hover {
    transform: scale(1.1);
    transition: transform 0.3s ease; 
    cursor: pointer;
}

.featured-cars {
    position: relative;
    justify-content: center;
    align-items: center;
    display: flex;
    flex-direction: column;
    text-align: center;
    margin-top: 50px;
    
}
.featured-cars img:hover {
    transform: scale(1.1);
    transition: transform 0.3s ease; 
    cursor: pointer;
}
.search-container {
    margin-top: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.search-container label {
    margin-right: 10px;
}

.search-container input[type="text"] {
    padding: 5px;
    width: 200px;
    border: 1px solid #343a40;
    border-radius: 3px;
    margin-right: 5px;
}

.search-container button {
    padding: 5px 10px;
    background-color: #007bff;
    color: #343a40;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}
.tagline{
    text-align: center;
}
.tagline :hover{
    cursor: pointer;
    transform: scale(1.1);
    transition: transform 0.3s ease; 
}
.search-container button:hover {
    background-color: #0056b3;
}

.featured-cars .carousel-container {
    position: relative;
    margin-bottom: 100px;
    width: 400px;
    overflow: hidden;
    margin-top: 0;
}

.featured-cars .carousel-slider {
    display: flex;
    transition: transform 0.5s;
    position: relative;
}

.featured-cars img {
    min-width: 400px;
    border-radius: 5%;
}
.featured-cars button:hover {
    background-color: #cec4da;
    color: black;
}

.featured-cars button#prevShow {
    left: 10px; 
}

.featured-cars button#nextShow {
    right: 10px; 
}

button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: gray;
    color: #cec4da;
    border: none;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
}

button:hover {
    background-color: black;
}

button#prev {
    left: 10px;
}

button#next {
    right: 10px;
}
.brand {
    overflow: hidden;
    padding: 4vw 0;
    white-space: nowrap;
    position: relative;
    z-index: 1;
    text-align: center;
}

.brand:before {
    left: 0;
}

.brand:after {
    right: 0;
}

.brand-slide-left {
    display: inline-block;
    animation: 20s slide-left infinite linear;
}

.brand-slide-right {
    display: inline-block;
    animation: 20s slide-right infinite linear;
}

.brand-slide-left img,
.brand-slide-right img {
    height: 500px;
}




@keyframes slide-left {
    from {
      transform: translateX(0);
    }
    to {
      transform: translateX(-100%);
    }
}

@keyframes slide-right {
    from {
      transform: translateX(0);
    }
    to {
      transform: translateX(100%);
    }
}



@media (min-width: 576px) {
    .car {
        width: 45%;
        margin: 20px 2.5%;
    }
}
@media (min-width: 768px) {
    .car {
        width: 30%;
        margin: 20px 1.5%;
    }
}

@media (min-width: 992px) {
    .car {
        width: 22%;
        margin: 20px 1%;
    }
}
@media screen and (max-width: 400px) {
    .headerli {
        margin: 10px 0; 
    }

    .headera {
        font-size: 12px; 
    }

    .logo {
        width: 100px; 
    }

    .headerUl {
        margin-left: 0; 
    }

    .headerli:not(:last-child) {
        margin-right: 10px; 
    }
}



@media screen and (max-width: 768px) {
    main {
        margin-top: 20px;
    }
    header {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
        font-size: 10px;
    }
    .divfooter h3{
        font-size: 10px;
        
    }
    footer {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
    }
    body {
        font-size: 10px;
    }
    .gallery,
    .featured-cars {
        width: 400px; 
        margin-right: 0px;
        margin-left: 0px;
    }

    .carousel-container {
        width: 250px; 
        overflow: hidden;
    }
    .brand img {
        width: 200px;
        height: 200px;
    }
    .carousel-slider {
        display: flex;
        flex-wrap: nowrap;
        transition: transform 0.5s;
        list-style: none;
    }

    .search-container input[type="text"] {
        width: 100px;
        height: 10px;
    }

    .carousel-slider li {
        flex: 0 0 100%; 
    }

    .carousel-slider img {
        width: 250px;
        max-width: 400px;
        height: auto; 
    }
    .search-container .searchtext{
        width: 100px;
    }
    /* button#prev,
    button#next {
        display: none; 
    } */
    .featured-cars{
        height: 400px;
        width: 100%;
        
    }
    .featured-cars .carousel-container {
        align-items: center;
        width: 250px;
        margin-bottom: 50px;
        overflow: hidden;
    }

    .featured-cars img {
        min-width: 250px;
        
    }

    .featured-cars  button {
        padding: 10px;
        font-size: 14px;
        
    }
    
    .featured-cars h2{
        font-size: 12px;
    }
    .car h2{
        font-size: 12px;
    }
    .car p{
        font-size: 12px;
    }
    .logo{
        width: 100px;
    }
}
.copyright{
    margin: 0px;
}
