@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #cfbb08ff;
  --secondary-color: #333333ff;
}

ul,
a {
  list-style: none;
  text-decoration: none;
}

body {
  font-family: "Inter", sans-serif;
}

header nav {
  width: 100%;
  display: flex;
  position: fixed;
  background: #fff;
  justify-content: space-between;
  align-items: center;
  padding: 0 80px;
  height: 70px;
  border-bottom: 1px solid #ddd;
  z-index: 1000;
}

header nav .logo {
  width: 100px;
  height: 50px;
}

header nav ul {
  display: flex;
  align-items: center;
  gap: 20px;
}

header nav ul a {
  color: var(--secondary-color);
  font-size: 15px;
  font-weight: 500;
}

header nav ul li a:hover {
  color: var(--primary-color);
}

header nav .toggle-bar {
  display: none;
  font-size: 24px;
  cursor: pointer;
}

@media (max-width: 768px) {
  header nav {
    padding: 0 20px;
  }

  header nav .logo {
    width: 80px;
    height: 40px;
  }

  header nav ul {
    position: fixed;
    top: 70px;
    right: 0;
    width: 260px;
    height: calc(100% - 70px);
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 12px 16px;
    align-items: stretch;
    box-shadow: -8px 0 24px rgba(11, 32, 71, 0.08);
    transform: translateX(100%);
    transition: transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1),
      opacity 220ms ease;
    opacity: 0;
    z-index: 1200;
    overflow-y: auto;
  }

  header nav.open ul {
    transform: translateX(0);
    opacity: 1;
  }

  header nav .toggle-bar {
    z-index: 1300;
  }

  header nav ul a {
    font-size: 14px;
  }

  header nav .toggle-bar {
    display: block;
  }
}

/* hero styles */

.hero {
  position: relative;
  padding: 0;
  height: calc(100vh - 70px);
  min-height: 420px;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: brightness(0.8) saturate(0.95);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* darken gradient left-to-right */
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.81) 0%,
    rgba(0, 0, 0, 0.9) 50%,
    rgba(0, 0, 0, 0.88) 100%
  );
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 48px 16px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.hero-copy h2 {
  font-size: 36px;
  color: #fff;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 1) 0%,
    var(--primary-color) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-copy p {
  color: rgba(255, 255, 255, 0.9);
}

.search-form {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.search-form input {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.search-form input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.search-form button {
  padding: 10px 14px;
  border-radius: 8px;
  border: none;
  background: var(--primary-color);
  color: #111;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 450px) {
  .hero {
    height: auto;
    padding: 60px 16px;
  }
  .search-form {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Car listing styles */

.view-cars {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 60px 120px;
  background: #f9f9f9;
}

.view-cars .section-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-color);
}

.view-cars .section-header p {
  font-size: 15px;
  font-weight: 400;
  color: var(--secondary-color);
}

.view-cars .car-listing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.view-cars .car-listing .car-card {
  height: 25em;
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 2px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.view-cars .car-listing .car-card img {
  width: 100%;
  height: 50%;
  object-fit: cover;
}

.view-cars .car-listing .car-card .car-details {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.view-cars .car-listing .car-card .car-details h3 {
  font-size: 17px;
  font-weight: 600;
  color: #1d1c1cff;
}

.view-cars .car-listing .car-card .car-details .car-d1,
.car-d2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.view-cars .car-listing .car-card .car-details .car-d1 .car-type {
  color: #3b3b3bff;
}

.view-cars .car-listing .car-card .car-details .car-d1 .car-year {
  color: #777;
}

.view-cars .car-listing .car-card .car-details .car-d2 .car-price {
  color: #2c2929ff;
  font-weight: 700;
}

.view-cars .car-listing .car-card .car-details .car-d2 p {
  color: #777;
}

.car-card .seperator {
  border-top: 1px solid #e0dedeff;
  margin: 8px 16px;
}

.car-d3 {
  width: 100%;
  padding: 4px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}

.car-d3 .car-d4 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.car-d3 .car-d4 i {
  color: #777;
}

.car-d3 .car-d4 span {
  color: #5c5454ff;
  font-size: 13px;
  font-weight: 500;
}

@media (max-width: 1200px) {
  .view-cars {
    padding: 40px 60px;
  }
}

@media (max-width: 900px) {
  .view-cars {
    padding: 40px 60px;
  }

  .view-cars .car-listing {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 700px) {
  .view-cars {
    padding: 30px 20px;
  }
}

@media (max-width: 900px) {
  .view-cars .car-listing {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
  }
}

footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px;
}

footer .footer-content p {
    color: var(--secondary-color);
    font-size: 14px;    
    font-weight: 400;
}
