/* Stop mobile horizontal scroll */
* {
  box-sizing: border-box;
}

html, body {
  width: 100%;
  overflow-x: hidden;
}

/* Fix images causing overflow */
img {
  /* max-width: 100%; */
  /* height: auto;   */
  /* display: block;  */
}

/* Remove extra space caused by transform or margin shifting */
section, div, header, footer {
  /* max-width: 100%; */
  /* overflow-x: hidden; */
}


* {
    margin: 0;
    padding: 0;
}



html {
    scroll-behavior: smooth;
    /* font-family: sans-serif; */
    /* font-family: "Poppins", sans-serif; */
    font-size: large;

}


/* TOP */

.top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin: 0px;
    color: white;
    background-color: #009688;
    font-size: medium;
}

.top a {
    margin: 0px 4px;
}

.top :hover {
    color: black;
}


/* MENU */

.main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    padding: 10px;
    color: white;
    background-color: black;
    font-size: medium;
    z-index: 1;
}

#menubar,
#baricon {
    display: none;
}

.menu a {
    font-family: sans-serif;
    padding: 0px 8px;
}

.menu :hover {
    color: #009688;
}

a {
    text-decoration: none;
    color: white;
}


/* HERO SECTION */

.heroSection {
    color: white;
    text-shadow: 1px 0.5px gray;
    text-align: center;
    background-image: url(image/bc.png);
    background-repeat: no-repeat;
    background-size: cover;
    padding: 150px 100px 245px 100px;
    font-family: sans-serif;
    font-size: 21px;

}

.heroSection h1,
.heroSection p,
.heroSection button {
    margin: 0px 0px 29px 0px;
}

.heroSection button {
    padding: 16px 38px;
    color: white;
    background-color: #009688;
    border-radius: 7px;
    border: #009688;
}



.heroSection button:hover {
    border: 1px solid transparent;
    background-color: #00796b;
    transform: scale(1.07);
    cursor: pointer;
    transition: 0.5s ease;
}


/* SELECTION */


.selection {
    color: #4b4b4b;
    margin: 40px;
    padding: 50px 30px;
    box-shadow: 1px 0.5px 8px black;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

.selection select {
    margin: 20px 0px 0px 0px;
    padding: 15px 240px 15px 8px;
    /* text-decoration: none; */
    background-color: #f2f2f2;
    justify-content: space-between;
    width: 260px;
    border: none;
}

/* .selection label {
    margin: 30px 0px;
} */

.selection select {
    border-radius: 10px;
}

.selectionbtn {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
}

.selectionbtn button {
    padding: 16px 38px;
    margin: 30px;
    color: white;
    background-color: #009688;
    border-radius: 7px;
    border: none;
}

.selectionbtn button:hover {
    transform: scale(1.07);
    cursor: pointer;
    transition: 0.5s ease;
}

.card {
    color: rgb(108 117 125);
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr 1fr 1fr;
    margin: 40px 80px;
    font-family: sans-serif;
    font-weight: 100;
}

.card div {

    text-align: center;
    padding: 60px 20px;
    border: 0.6px solid silver;
    border-radius: 5px;
}

.card i,
.card h2 {
    padding: 0 0 30px 0;
}

.card h2 {
    color: black;
}

.card div:hover {
    color: white;
    background-color: #009688;
    transition: all 0.5s ease-in-out;
    transform: scale(1.03);
}


.newest {
    margin: 70px 0 40px 0;
    text-align: center;
    font-family: sans-serif;
}

.newcars {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-content: center;
    max-width: 1200px;
    font-family: sans-serif;
}

.script div {
    padding: 10px 0 10px 0;
    margin-right: 40px;
}

.script button {
    margin-top: 20px;
}

.newcars img {
    position: relative;
    bottom: 10px;
    margin: 10px;
}

.script button {
    padding: 16px 38px;
    color: white;
    background-color: #009688;
    border-radius: 7px;
    border: #009688;
}

.script button:hover {
    transform: scale(1.07);
    cursor: pointer;
    transition: 0.5s ease;
}



/* featured CARS */

.container {
    /* width: 90%; */
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    margin: auto;
    padding: 0 20px;
}

.container .box {
    border: 0.5px solid silver;
    width: 250px;
}

.container img:hover {
    transform: scale(1.09);
    cursor: pointer;
    transition: 0.5s ease;
}

.box img {
    width: 230px;
    padding: 40px;
    margin: 20px;
}

.content p,
.content h4 {
    padding: 10px;
}

.watch {
    color: gray;
    margin: 70px 0 40px 0;
    text-align: center;
    font-family: sans-serif;

}

.lastcard {
    border-radius: 10px;
    color: rgb(108 117 125);
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr 1fr 1fr;
    margin: 40px 80px;
    font-family: sans-serif;
    font-weight: 100;
}


.lastcard div {

    text-align: center;
    padding: 100px 20px;
    border: 0.6px solid silver;
    border-radius: 5px;
}

.lastcard div img,
.lastcard div p,
.lastcard div h1 {
    margin: 0 0 40px 0;
}

.lastcard div:hover {
    color: white;
    background-color: #009688;
    transition: all 0.5s ease-in-out;
    transform: scale(1.03);
}

.logo {
    display: flex;
    padding: 10px;
    margin: 100px 70px;
    justify-content: space-between;
}

/* ABOUT THE CARS AND COMPANY */

.about {
    background-color: black;
    color: white;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    padding: 30px;
}

.about div {
    padding: 0 20px;
}

#email {
    background-color: black;
    color: black;
    padding: 10px 15px;
    box-shadow: 0px 0px 5px white;
    border-radius: 10px;
}



/* footer */

footer div {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    margin: 0px;
    color: white;
    background-color: #009688;
    font-size: medium;
}

.footicon {
    gap: 13px;
}



/* MEDIA SCREEN */

@media screen and (max-width:768px) {

    /* Top Header */
    .top {
        display: none;
    }

    .menu {
        display: none;
    }


    #baricon {
        display: block;
        border: 0.1px solid silver;
    }

    #menubar:checked~.menu {
        display: flex;
        flex-wrap: wrap;
        flex-direction: column;
        position: absolute;
        top: 50px;
        background-color: black;
        width: 100%;
        left: 0;
        gap: 20px;
        padding: 20px 0;
    }

    .container {
        display: grid;
        grid-template-columns: 1fr  1fr;
        /* margin: 0 50px; */
        /* width: 500px; */
    }

   .container .box {
    width: auto;
   }

    .box img {
        width: 300px;
        padding: 30px;
        margin: 20px;
    }
 
    .selection {
        /* padding: 40px 20px; */
        margin: 40px 20px;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .selection select {
        width: 300px;
        border-radius: 10px;
    }

    .card {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .newcars {
        max-width: 100%;
        height: auto;
        display: grid;
        grid-template-columns: 1fr;
        justify-content: center;
        max-width: 1200px;
        font-family: sans-serif;
    }

    .script div {
        padding: 0px 0px 20px 10px;
    }

    .script button {
        margin-top: 20px;
    }

    .lastcard {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }


    .logo {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
    }

    .about {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }


    footer {
        display: flexbox;
    }

}


/* MOBILE SCREEN */
@media screen and (max-width:426px) {
    .heroSection {
        padding: 40px
    }

    .selection {
        display: grid;
        grid-template-columns: 1fr;
        margin: 40px 10px;
    }

    .selection select {
        width: 60px;

    }

    .card {
        display: grid;
        grid-template-columns: 1fr;
        margin: 20px;
    }

    .newcars {
        display: grid;
        grid-template-columns: 1fr;
        margin: 10px;
        /* justify-content: center;
        max-width: 1200px;
        font-family: sans-serif; */
    }

    .blackcar {
        max-width: 300px;
        height: auto;
    }


    .script div {
        padding: 0px 0px 20px 10px;
    }

    .script button {
        margin-top: 20px;
    }

    .lastcard {
        display: grid;
        grid-template-columns: 1fr;
        margin: 10px 10px;
        padding: 40px 0px;
    }

    .container {
        display: grid;
        grid-template-columns: 1fr;
        margin: 20px;
        /* width: 120px; */
    }

    .container .box {
        width: 250px;
    }

.box img {
    width: 220px;
}

    .logo {
        display: grid;
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .about {
        display: grid;
        padding: 10px;
        grid-template-columns: 1fr;
    }

    .about div {
        padding: 10px;
    }

    .about h3,
    .about h1,
    .about p {
        padding: 10px 0;
    }

    .footer {
        display: grid;
        grid-template-columns: 1fr;
        padding: 10px 0px;
    }
}