/*=============== GOOGLE FONTS ===============*/
@import url('https://fonts.googleapis.com/css2?family=Boldonse&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Syne:wght@400..800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400..700&family=Outfit:wght@100..900&display=swap');



/*=============== VARIABLES CSS ===============*/
:root {
  --header-height: 3.5rem;

  /*========== Colors ==========*/
  /*Color mode HSL(hue, saturation, lightness)*/
  --first-color: #daa520;
  --first-color-light: #868585;
  --text-light: #e1e0e6;
  --bg-light: rgb(214, 213, 218, .3);
  --bg-color: #0d0a24;
  --text-color: #13131B;
  --white-color: #f8f9fa;
  --text-color-light: hsl(203, 8%, 80%);

  /*========== Font and typography ==========*/
  /*.5rem = 8px | 1rem = 16px ...*/
  --body-font: "Outfit", serif;
  --header-font: "Syne", sans-serif;
  --biggest-font-size: 2.25rem;
  --h2-font-size: 1.25rem;
  --normal-font-size: .938rem;
  --smaller-font-size: .75rem;

  /*========== Font weight ==========*/
  --font-semi-bold: 600;

  /*========== z index ==========*/
  --z-fixed: 100;
}

/* Responsive typography */
@media screen and (min-width: 1024px) {
  :root {
    --biggest-font-size: 4rem;
    --h2-font-size: 1.5rem;
    --normal-font-size: 1rem;
    --smaller-font-size: .813rem;
  }
}

/*=============== BASE ===============*/
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

h1,
h2,
h3,
h4 {
  color: var(--black-color);
}

p,
span {
  font-family: var(--body-font);
  font-size: 15px;
  font-weight: 300
}

body {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: #000000;
  color: var(--text-color);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  font-family: var(--body-font);
}

img {
  max-width: 100%;
  height: auto;
}

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
  max-width: 1224px;
  margin-inline: 1.5rem;
}

.main {
  overflow: hidden;
  /* For the animations */
}

/*=============== HEADER & NAV ===============*/
.header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: var(--z-fixed);
  transition: background .3s;

}

.nav {
  position: relative;
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo,
.nav__toggle,
.nav__link,
.nav__close {
  color: var(--white-color);
}


.nav__logo span {
  font-size: 25px;
  font-family: var(--header-font);
  color: var(--white-color);
}


.logo-dark {
  display: none;
}

.nav__toggle {
  display: inline-flex;
  font-size: 1.25rem;
  cursor: pointer;
}

.nav-buttons {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--white-color);
}

.nav-button {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--white-color);
  border-radius: 10px;
  font-size: 13px;
}

.nav-button-2 {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--white-color);
  border-radius: 10px;
  font-size: 13px;
}

.toggle-background i {
  color: var(--whitet-color);
  font-size: 20px;
}

.change-theme {
  font-size: 1.25rem;
  color: var(--container-color);
  cursor: pointer;
  transition: color .3s;
}


body.dark-theme {
  --title-color: hsl(207, 4%, 95%);
  --text-color: hsl(207, 4%, 95%);
  --body-color: var(--first-color);
  --container-color: var(--first-color);
}

body.dark-theme {
  background-color: var(--container-color);
}


@media screen and (max-width: 767px) {
  .nav__menu {
    position: fixed;
    background-color: #000000;
    color: var(--white-color);
    width: 100%;
    left: 0;
    top: -100%;
    box-shadow: 0 3px 8px hsla(203, 71%, 4%, .2);
    padding: 4rem 0 3.5rem;
    transition: top .4s;
    overflow: hidden;
  }
}

.nav__list {
  display: flex;
  flex-direction: column;
  text-align: center;
  row-gap: 2rem;
}

.nav__link {
  color: var(--white-color);
}

.nav__link:hover::after {
  width: 100%;
}

.active-link {
  background: linear-gradient(45deg, rgba(175, 175, 204, 0.5) 30%, rgba(54, 52, 100, 0.4) 70%);
  padding: 10px 24px;
  border-radius: 10px;
}

.nav__close,
.nav__img {
  position: absolute;
}

.nav__close {
  top: 1rem;
  right: 1.5rem;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Show menu */
.show-menu {
  top: 0;
}


/* Change background header */
.header-bg {
  background-color: #000000;
  box-shadow: 0 2px 4px hsla(0, 0%, 1%, 0.2);
}

.header-bg .nav__link,
.header-bg .toggle-background i {
  color: var(--white-color);
}

.dark-theme .header-bg {
  background-color: var(--container-color);
}


/*=============== HOME ===============*/

.home {
  position: relative;
  height: 50vh;
  width: 100%;
  background: url(../img/background.jpg);
  background-position: center;
  background-attachment: fixed;
  background-size: cover;
  background-color: rgba(0, 0, 0, 0.7);
  background-blend-mode: overlay;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.home-banner h1 {
  font-size: 70px;
  font-family: var(--header-font);
  color: var(--white-color);
}



.cars-form {
  position: relative;
  padding: 100px 0;
}


.cars-input-fields {
  background: rgb(221, 221, 221, .1);
  width: 100%;
  padding: 20px 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dropdown {
  position: relative;
  width: 20%;
}

.dropdown-button,
.dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  column-gap: 1rem;
}

.dropdown-button {
  border: none;
  outline: none;
  background-color: rgba(59, 59, 59, 0.1);
  padding: 12px 24px;
  border-radius: .75rem;
  cursor: pointer;
  width: 100%;
}

.dropdown-icon,
.dropdown-icons {
  font-size: 1.25rem;
  color: var(--first-color);
}

.dropdown-name {
  font-weight: 500;
  color: var(--first-color-light);
}

.dropdown-icons {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
}

.dropdown-arrow,
.dropdown-close {
  position: absolute;
  transition: opacity .1s, transform .4s;
}

.dropdown-close {
  opacity: 0;
}

.dropdown-menu {
  background-color: rgb(0, 0, 0, .4);
  color: var(--white-color);
  padding: 1rem 1.25rem;
  border-radius: .75rem;
  display: grid;
  row-gap: 1.5rem;
  position: absolute;
  left: 0;
  top: 4.5rem;
  width: 100%;
  transform: scale(.1);
  transform-origin: 10rem -2rem;
  transition: opacity .4s, transform .4s;
  z-index: 11111;
  opacity: 0;
}

.dropdown-menu .dropdown-name {
  color: var(--first-color-light);
}

.dropdown-item {
  cursor: pointer;
  transition: color .3s;
}

.dropdown-item:hover {
  color: var(--first-color);
}

.show-dropdown .dropdown-close {
  opacity: 1;
  transform: rotate(-180deg);
}

.show-dropdown .dropdown-arrow {
  opacity: 0;
  transform: rotate(-180deg);
}

.show-dropdown .dropdown-menu {
  opacity: 1;
  transform: scale(1);
  pointer-events: initial;
}




.search-form {
  display: flex;
  gap: 20px;
  width: 100%;
}

.search {
  background: transparent;
  border: none;
  outline: none;
  width: 100%;
  display: block;
  color: var(--first-color-light);
  font-size: 18px;
}

.search::placeholder {
  font-family: var(--body-font);
  color: var(--first-color-light);
  font-size: 18px;
}

.search-btn {
  border: none;
  outline: none;
  background: var(--first-color);
  padding: 12px 24px;
  color: var(--white-color);
  display: flex;
  gap: 3px;
  font-size: 14px;
  font-family: var(--body-font);
  align-items: center;
}

.search-btn span {
  color: var(--white-color);
}


/* Cars */

.cars {
  position: relative;
  overflow: hidden;
  padding-bottom: 100px;
}

.car-gridz {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.car-grid {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.car-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.car-grid .layer {
  background: linear-gradient(360deg, rgba(0, 0, 0, 0.7) 50%, rgba(0, 0, 0, 0.5) 70%);
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.car-details {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 0 10px 10px;
}

.car-details h3 {
  font-size: 20px;
  font-family: var(--header-font);
  color: var(--white-color);
  padding-bottom: 5px;
}

.car-details p {
  color: var(--first-color);
  font-size: 20px;
  font-family: var(--header-font);
}

.car-specifications {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 20px;
  padding: 10px 10px 0 0;
}

.car-spec-details {
  text-align: center;
  color: var(--white-color);
}

.car-spec-details h4 {
  font-family: var(--header-font);
  font-size: 15px;
}

/* Footer */

.footer {
  position: relative;
  padding: 0 0 20px;
  overflow: hidden;
}

.footer-line {
  width: 100%;
  height: 1px;
  background: var(--first-color-light);
}

.footer-grids {
  display: flex;
  justify-content: space-between;
  padding: 100px 0;
}

.footer-grid {
  flex: 5;
}

.footer-grid h3 {
  font-size: 50px;
  color: var(--white-color);
  font-family: var(--header-font);
  padding-bottom: 20px;
}

.footer-grid p {
  color: var(--first-color-light);
  padding-bottom: 10px;
}

.footer-grid a {
  color: var(--first-color);
  font-weight: 300;
}

.footer-grid-links {
  flex: 2;
}

.footer-grid-links h3 {
  font-size: 20px;
  color: var(--white-color);
  font-family: var(--header-font);
  padding-bottom: 20px;
}

.footer-links {
  padding-bottom: 10px;
}

.footer-links a {
  color: var(--first-color-light);
  font-weight: 300;
}

.footer-grid-2 {
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-grid-2 p {
  color: var(--white-color);
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-links {
  height: 50px;
  width: 50px;
  border-radius: 50%;
  background: var(--first-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-links a {
  color: #000000;
  font-size: 20px;
}















/*=============== BREAKPOINTS ===============*/
/* For small devices */
@media screen and (max-width: 340px) {
  .container {
    margin-inline: 1rem;
  }
}

/* For medium devices */
@media screen and (min-width: 767px) {
  .nav {
    height: calc(var(--header-height) + 1.5rem);
  }

  .nav__toggle,
  .nav__close,
  .nav__img {
    display: none;
  }

  .nav__link {
    font-size: 12px;
    color: var(--white-color);
  }

  .nav__list {
    flex-direction: row;
    column-gap: 1.5rem;
  }
}


/* For large devices */

@media screen and (min-width: 1048px) {
  .container {
    margin-inline: auto;
  }
}

@media screen and (max-width: 500px) {
  .dropdown-button .dropdown-name {
    display: none;
  }

  .search-btn {
    display: none;
  }


  .search-btn span {
    display: none;
  }

  .dropdown-menu {
    background: none;
    padding: 0;
  }
}

@media screen and (max-width: 768px) {
  .home-banner h1 {
    font-size: 30px;
  }

  .cars-form {
    position: relative;
    padding: 50px 0;
  }

   .footer-grids {
    flex-direction: column;
    gap: 30px;
  }

  .footer-grid-2 {
    flex-direction: column;
    gap: 20px;
  }
}