/*styling for mobile phones */

@media (max-width: 768px) {

  header {
    background-image: url("images/header-mobile.jpg");
    background-size: cover;
    background-position: center;
    height: 30vh;
  }
  main{
    background: #eceff2;
  }
  #search-dropdown {
    margin: 20px auto 0 auto;
    display: flex;
    justify-content: center;
    gap: 1em;
    font-family: "gotham-rounded-book";
    font-size: 30px;
    max-width: 300px;
    border-bottom: #333333 solid 2px;
  }

  .fa-caret-down {
    margin: auto 0;
  }
  #search-Section {
    position: relative;
    overflow: hidden;
  }
  #search-container {
    background: #eceff2;
    text-align: center;
    color: #333333;
    font-family: "gotham-rounded-book";
    display: none;
    transform: scaleY(0);
    transform-origin: top;
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
    overflow: hidden;
    width: 300px;
    margin: 0 auto;
  }
  #search-container.show{
    display: block;
    transform: scaleY(1);
    opacity: 1;

  }
  #fa-caret-down.rotate {
  transform: rotate(180deg);
  transition: transform 0.3s ease;
}
  #search-container h4{
    margin: 30px;
    font-size: 30px;
    border-bottom: 2px #efc514 solid;
  }
  #brand-inputs, #type-inputs{
    display: flex;
    gap: 1em;
    flex-wrap: wrap;
  }
  #inside-header {
    display: none;
  }
  #motorville {
    display: none;
  }
  #logo-Letter {
    width: 100px;
    margin: auto auto;
  }
  .fa-bars {
    color: #efc514;
    font-size: 30px;
    margin: auto 0;
  }
  .fa-times {
    color: #efc514;
    font-size: 30px;
  }
  nav {
    display: flex;
    justify-content: space-between;

    position: fixed;
    top: 0;
    right: 0;
    left: 0;
  }
  #nav-links ul .fa {
    margin-right: 10px;
    color: #ffcc00;
  }
  #nav-links {
    background: #333333;
    width: 35vw;
    height: 100vh;
    position: fixed;
    top: 0;
    right: -50vw;
    padding: 20px;
    transition: right 0.3s ease;
    z-index: 2;
  }
  #nav-links a {
    line-height: 40px;
    text-decoration: none;
    color: #efc514;
    font-family: "Gotham-Light";
  }
  #nav-links ul {
    list-style-type: none;
    padding: 0;
  }
  h2 {
    font-family: "Gotham-Light";
    font-weight: bold;
    color: black;
    font-size: 20px;
    text-align: center;
    padding: 13px 20px;
    width: 50%;
    margin: 0 auto 1em auto;
  }
  #cars-container {
    display: flex;
    align-content: center;
    justify-content: center;
    flex-direction: column;
    gap: 50px;
    margin: 0 auto 2em auto;
    width: 80%;
    max-width: 400px;
  }
  .car-container {
    background: white;
    padding-bottom: 10px;
    margin-left: auto ;
    margin-right: auto;
    /* remove these when content is added */
   
    border-radius: 10px;
    box-shadow: 6px 6px 15px white;

    border-bottom: #efc514 4px solid;
    display: flex;
    flex-direction: column;
    align-content: space-around;
    
  }
  .car-container #coverImage {
    width: 100%;
  }
  .car-details {
    border-top: 2px solid #333333;
    border-bottom: 2px solid #333333;
    margin: 0 20px;
  }

  .car-details .feature {
    display: flex; /* put img + label side by side */
    align-items: center; /* vertical alignment */

    justify-content: space-around;
  }

  .car-details img {
    width: 20px; /* consistent icon size */
    height: 20px;
    border-bottom: #efc514 3px solid;
  }

  .car-details label {
    font-size: 14px;
    color: #333;
    width: 110px;
    border-top: #efc514 2.5px solid;
    border-bottom: #efc514 2.5px solid;
    text-align: center;
  }
  button {
    padding: 8px 16px;
    background: #efc514;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: "gotham-ultra";
    font-size: large;
    margin-top: 10px;
  }

  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none; /* hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 1000;
  }
  /* Popup box */
  .popup {
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 80%;
    height: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: scroll;
  }
  .cur-img {
    display: flex;
  }
  .cur-img .arrow {
    width: 30px;
    height: 30px;
    margin: auto auto;
  }
  .cur-img #left-arrow {
    margin-right: 5px;
  }
  .cur-img #right-arrow {
    margin-left: 5px;
  }

  /* Main image */
 /* Main image */
  .main-Image {
    width:95%;
    height: 200px;
    border-radius: 6px;
    margin-bottom: 15px;
    border: 5px solid #0a1f44;
  }

  /* Thumbnails */
  .side-bar-imgs {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    margin-bottom: 15px;
    width: 90%;
  }

  .side-bar-img{
    width: 60px;
    height: auto;
    margin: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border 0.3s;
  }
  .side-bar-img img:hover {
    border: 2px solid #007bff;
  }
  #motorville-footer{
     font-family: "Helvetica Neue", Arial, sans-serif; /* clean sans-serif */
      font-style: italic;
      font-size: 60px;
      color: #efc514;
      margin: auto auto;
  }
}
/*styling for desktop ,Ipads etc larger screens */
@media (min-width: 768px) {
  body {
    background-color: #eceff2;
    display: grid;
    grid-template-columns: 300px 1fr 1fr;
    grid-template-areas:
      "header header header"
      "aside main main"
      "aside main main"
      "aside main main"
      "footer footer footer";
    min-height: 100vh;
    gap: 1em;
  }
  #logo {
    display: flex;
    align-content: center;
  }
  #motorville {
    width: 200px;
    height: 200px;
  }
  #logo-Letter {
    display: none;
  }
  nav .fa-bars,
  nav .fa-times {
    display: none;
  }
  nav {
    margin-top: 0;
    margin-bottom: 0;
    display: flex;
    justify-content: space-between;
  }
  nav ul {
    display: flex;
    justify-content: end;
    font-family: "Inknut+Antiqua_Medium";

    text-decoration: none;
    list-style: none;
    gap: 20px;
  }
  nav a {
    text-decoration: none;
    color: #333333;
    font-family: "gotham-thinitalic";
    font-size: 20px;
  }
  nav img {
    width: 20px;
    height: 20px;
    margin-right: 5px;
  }

  header {
    grid-area: header;
    background: url("images/4ec28321-56bf-49d3-b95f-e180601252bc.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    height: 80vh;
  }
  #search-dropdown {
    display: none;
  }
  #search-Section {
    grid-area: aside;
    height: 70%;
    margin: auto 0;
    border-right: 2px solid #efc514;
    padding: 2em;
    overflow-y: scroll;
  }
  #search-container {
    background-color: white;
    border-top: 4px #efc514 solid;
    border-bottom: 4px #efc514 solid;
    width: 100%;
    padding: 0 0 1em 1em;
    border-radius: 30px;
  }
  #search-container h4 {
    font-size: 25px;
    text-align: center;
  }
  
  #brand-inputs {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
  }
  #price-inputs input::placeholder {
    color: #3961a7;
    font-family: "Inknut+Antiqua_Light";
    font-size: 10px;
  }
  #price-inputs {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
  }
  #price-inputs input {
    border-radius: 16px;
    border-top: 2px solid #efc514;
    border-bottom: 2px solid #efc514;
    border-left: none;
    border-right: none;
    padding: 10px 18px;
  }
  h2 {
    background: #333333;
    color: white;
    text-align: center;
    padding: 13px 20px;
    width: 375px;
    height: 40px;
    margin: 0 auto 1em auto;
    border-bottom-left-radius: 60px;
    border-bottom-right-radius: 60px;
    font-family: "Inknut+Antiqua_Bold";
  }
  h3 {
    background: #333333;
    color: white;
    text-align: center;
    width: 170px;
    height: 40px;
    margin: 0 auto 1em auto;
    border-bottom-left-radius: 40px;
    border-bottom-right-radius: 40px;
    padding: 10px 7px;
    font-family: "Inknut+Antiqua_Bold";
  }
  h4 {
    color: #0a1f44;
    font-family: "Gotham-Light";
  }
  #search-container h4 {
    color: #0a1f44;
    font-family: "Gotham-Light";
    border-bottom: #333333 2px solid;
    width: 200px;
    text-align: center;
  }
  #cars-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3em;
  }
  main {
    grid-area: main;
    max-height: 150vh;
    overflow-y: auto;
    padding: 0 4em;
    margin: 0 auto;
    width: 70%;
    border-top: 2px solid #efc514;
  }
  .car-container {
    background: white;
    padding-bottom: 10px;
    margin: 0 auto;
    /* remove these when content is added */
    width: 400px;
    border-radius: 10px;
    box-shadow: 6px 6px 15px white;

    border-bottom: #efc514 4px solid;
    display: flex;
    flex-direction: column;
    align-content: space-around;
  }
  .car-container img {
    width: 100%;
    height: 40%;
    border-radius: 10px 10px 0 0;
  }
  .car-details {
    border-top: 2px solid #333333;
    border-bottom: 2px solid #333333;
    margin: 0 20px;
  }

  .car-details .feature {
    display: flex; /* put img + label side by side */
    align-items: center; /* vertical alignment */

    justify-content: space-around;
  }

  .car-details img {
    width: 20px; /* consistent icon size */
    height: 20px;
    border-bottom: #efc514 3px solid;
  }

  .car-details label {
    font-size: 14px;
    color: #333;
    width: 110px;
    border-top: #efc514 2.5px solid;
    border-bottom: #efc514 2.5px solid;
    text-align: center;
  }

  /* Overlay background */
  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none; /* hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 1000;
  }

  /* Popup box */
  .popup {
    background-image: url("images/19089.jpg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    padding: 20px;
    border-radius: 8px;
    max-width: 80%;
    height: 80%;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: scroll;
  }
  .cur-img {
    display: flex;
  }
  .cur-img .arrow {
    width: 50px;
    height: 80px;
    margin: auto 0;
  }
  .cur-img #left-arrow {
    margin-right: 10px;
  }
  .cur-img #right-arrow {
    margin-left: 10px;
  }

  /* Main image */
  .main-Image {
    width: 500px;
    height: 500px;
    width: 100%;
    border-radius: 6px;
    margin-bottom: 15px;
    border: 5px solid #0a1f44;
  }

  /* Thumbnails */
  .side-bar-imgs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 15px;
  }

  .side-bar-img{
    width: 60px;
    height: auto;
    margin: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border 0.3s;
  }

  .side-bar-imgs img:hover {
    border: 2px solid #007bff;
  }

  /* Close button */
  button {
    padding: 8px 16px;
    background: #efc514;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: "gotham-ultra";
    font-size: large;
    margin-top: 10px;
  }
  button:hover {
    background: #ffcc00;
  }
}
footer {
  grid-area: footer;
  display: flex;
  flex-direction: column;
  background: #efc514;
  padding: 0px 0;
}
footer img {
  width: 80px;
  height: 80px;
  opacity: 100%;
}
label {
  color: #0a1f44;
  font-family: "Inknut+Antiqua_Light";
}
#motorville-logo{
  margin: auto auto;
  width: auto;
  height: 200px;
}
footer h4 {
  color: #333333;
  font-family: "Gotham-Light";
  font-size: "Inknut+Antiqua_Medium";
}
footer #contact-details {
  margin: auto auto;
}
footer #contact-details img {
  width: 30px;
  height: 30px;
  margin-right: 10px;
  filter: invert(1);
}
@font-face {
  font-family: "Inknut+Antiqua_Bold";
  src: url("fonts/InknutAntiqua-Bold.ttf");
}
@font-face {
  font-family: "Inknut+Antiqua_Medium";
  src: url("fonts/InknutAntiqua-Medium.ttf");
}
@font-face {
  font-family: "Inknut+Antiqua_Light";
  src: url("fonts/InknutAntiqua-Light.ttf");
  font-weight: 300;
}
@font-face {
  font-family: "Inknut+Antiqua_Regular";
  src: url("fonts/InknutAntiqua-Regular.ttf");
}
@font-face {
  font-family: "Gotham-Light";
  src: url("fonts/Gotham/Gotham-Light.otf");
}
@font-face {
  font-family: "gotham-ultra";
  src: url("fonts/Gotham/GOTHAM-ULTRA.TTF");
}
@font-face {
  font-family: "gotham-thinitalic";
  src: url("fonts/Gotham/GOTHAM-THINITALIC.TTF");
}
@font-face {
  font-family: "gotham-rounded-book";
  src: url("fonts/Gotham/gotham-rounded-book.otf");
}
