/* ========== Base Styles ========== */
:root {
  --primary-color: #2563eb;
  --secondary-color: #0f172a;
  --accent-color: #3b82f6;
  --light-color: #f8fafc;
  --dark-color: #1e293b;
  --gray-color: #64748b;
  --light-gray: #e2e8f0;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --border-radius: 8px;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--dark-color);
  background-color: #f9fafb;
}

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

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: var(--transition);
}

a:hover {
  color: var(--accent-color);
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== Typography ========== */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin-bottom: 1rem;
  line-height: 1.2;
  font-weight: 700;
  color: var(--secondary-color);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1rem;
}

small {
  font-size: 0.875rem;
  color: var(--gray-color);
}

/* ========== Buttons ========== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-size: 1rem;
}

.primary-btn {
  background-color: var(--primary-color);
  color: white;
}

.primary-btn:hover {
  background-color: var(--accent-color);
  color: white;
}

.secondary-btn {
  background-color: var(--light-gray);
  color: var(--dark-color);
}

.secondary-btn:hover {
  background-color: var(--gray-color);
  color: white;
}

/* ========== Header & Navigation ========== */
header {
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 20px;
}

.logo a {
  display: flex;
  align-items: center;
  color: var(--secondary-color);
}

.logo h1 {
  font-size: 1.5rem;
  margin-bottom: 0;
}

nav ul {
  display: flex;
}

nav ul li {
  margin-left: 1.5rem;
}

nav ul li a {
  color: var(--dark-color);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

nav ul li a:after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--primary-color);
  transition: var(--transition);
}

nav ul li a:hover:after,
nav ul li a.active:after {
  width: 100%;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
}

.mobile-menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--dark-color);
  border-radius: 3px;
  transition: var(--transition);
}

/* ========== Hero Section ========== */
.hero {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--accent-color)
  );
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: white;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.vin-search-form {
  max-width: 600px;
  margin: 0 auto;
}

.input-group {
  display: flex;
  box-shadow: var(--box-shadow);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.input-group input {
  flex: 1;
  border: none;
  padding: 1rem 1.5rem;
  font-size: 1rem;
}

.input-group button {
  border-radius: 0;
  padding: 1rem 1.5rem;
}

.form-help {
  margin-top: 0.5rem;
  text-align: left;
}

.form-help small {
  color: var(--secondary-color);
}

/* ========== Features Section ========== */
.features {
  padding: 4rem 0;
  background-color: white;
}

.features h2 {
  text-align: center;
  margin-bottom: 3rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-item {
  text-align: center;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.feature-item:hover {
  transform: translateY(-5px);
}

.feature-icon {
  margin-bottom: 1.5rem;
}

.feature-icon img {
  margin: 0 auto;
}

.feature-item h3 {
  margin-bottom: 1rem;
}

/* ========== Recent Vehicles ========== */
.recent-vehicles {
  padding: 4rem 0;
  background-color: var(--light-color);
}

.recent-vehicles h2 {
  text-align: center;
  margin-bottom: 3rem;
}

.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.vehicle-card {
  background-color: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.vehicle-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.vehicle-image {
  height: 200px;
  overflow: hidden;
}

.vehicle-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.vehicle-card:hover .vehicle-image img {
  transform: scale(1.05);
}

.vehicle-details {
  padding: 1.5rem;
}

.vehicle-details h3 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.vehicle-details p {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.vehicle-details .btn {
  margin-top: 1rem;
}

.view-all {
  text-align: center;
  margin-top: 3rem;
}

/* ========== CTA Section ========== */
.cta {
  padding: 4rem 0;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--accent-color)
  );
  color: white;
  text-align: center;
}

.cta h2 {
  color: white;
  margin-bottom: 1.5rem;
}

.cta p {
  margin-bottom: 2rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.cta .btn {
  background-color: white;
  color: var(--primary-color);
}

.cta .btn:hover {
  background-color: var(--light-gray);
}

/* ========== Footer ========== */
footer {
  background-color: var(--secondary-color);
  color: white;
  padding: 4rem 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-column h3 {
  color: white;
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

.footer-column ul li {
  margin-bottom: 0.75rem;
}

.footer-column ul li a {
  color: var(--light-gray);
}

.footer-column ul li a:hover {
  color: white;
}

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
  color: var(--light-gray);
  font-size: 0.875rem;
}

/* ========== Page Header ========== */
.page-header {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--accent-color)
  );
  color: white;
  padding: 3rem 0;
  text-align: center;
}

.page-header h1 {
  color: white;
  margin-bottom: 1rem;
}

.page-header p {
  font-size: 1.1rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* ========== Search Bar ========== */
.search-bar {
  background-color: white;
  padding: 1.5rem 0;
  box-shadow: var(--box-shadow);
}

.search-bar .vin-search-form {
  max-width: 800px;
}

/* ========== Filter Controls ========== */
.filter-controls {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding: 1rem;
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.filter-item {
  margin-right: 1rem;
  margin-bottom: 1rem;
}

.filter-item label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.filter-item select {
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--light-gray);
  font-size: 1rem;
  min-width: 150px;
}

/* ========== Breadcrumbs ========== */
.breadcrumbs {
  padding: 1rem 0;
  background-color: white;
  border-bottom: 1px solid var(--light-gray);
}

.breadcrumbs ul {
  display: flex;
  flex-wrap: wrap;
}

.breadcrumbs ul li {
  display: flex;
  align-items: center;
}

.breadcrumbs ul li:not(:last-child)::after {
  content: "›";
  margin: 0 0.5rem;
  color: var(--gray-color);
}

.breadcrumbs ul li:last-child {
  color: var(--gray-color);
}

/* ========== Vehicle Detail ========== */
.vehicle-detail {
  padding: 3rem 0;
}

.vehicle-header {
  margin-bottom: 2rem;
}

.vehicle-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.vin-badge,
.date-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: var(--light-gray);
  border-radius: var(--border-radius);
  font-weight: 500;
}

.vehicle-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.vehicle-gallery {
  background-color: white;
  border-radius: var(--border-radius);
  padding: 1rem;
  box-shadow: var(--box-shadow);
}

.main-image {
  margin-bottom: 1rem;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.main-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.thumbnail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.5rem;
}

.thumbnail {
  cursor: pointer;
  border-radius: 4px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: var(--transition);
}

.thumbnail.active {
  border-color: var(--primary-color);
}

.thumbnail img {
  width: 100%;
  height: 60px;
  object-fit: cover;
}

.info-card,
.history-card {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.info-item {
  margin-bottom: 1rem;
}

.info-label {
  font-size: 0.875rem;
  color: var(--gray-color);
  margin-bottom: 0.25rem;
}

.info-value {
  font-weight: 500;
}

.price-value {
  font-size: 1.25rem;
  color: var(--primary-color);
  font-weight: 700;
}

.history-timeline {
  margin-top: 1.5rem;
}

.timeline-item {
  padding-left: 2rem;
  position: relative;
  margin-bottom: 2rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 2px;
  background-color: var(--light-gray);
}

.timeline-item::after {
  content: "";
  position: absolute;
  left: -4px;
  top: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--primary-color);
}

.timeline-date {
  font-size: 0.875rem;
  color: var(--gray-color);
  margin-bottom: 0.5rem;
}

.timeline-content h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.similar-vehicles {
  padding: 3rem 0;
  background-color: var(--light-color);
}

.similar-vehicles h2 {
  text-align: center;
  margin-bottom: 2rem;
}

/* ========== 404 Page ========== */
.error-page {
  padding: 5rem 0;
  text-align: center;
}

.error-page h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.error-page p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ========== Legal Pages ========== */
.legal-content {
  padding: 3rem 0;
}

.legal-section {
  margin-bottom: 3rem;
  background-color: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.legal-section h2 {
  border-bottom: 1px solid var(--light-gray);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.legal-section ul {
  list-style: disc;
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.legal-section ul li {
  margin-bottom: 0.5rem;
}

/* ========== About Page ========== */
.about-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.about-image img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.values-grid,
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.value-item,
.team-member {
  background-color: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  text-align: center;
}

.team-member img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  object-fit: cover;
}

.values-section,
.team-section {
  margin-bottom: 3rem;
}

/* ========== Contact Page ========== */
.contact-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.contact-form-container,
.contact-card {
  background-color: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--light-gray);
  border-radius: var(--border-radius);
  font-size: 1rem;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
}

.checkbox-group input {
  width: auto;
  margin-right: 0.5rem;
  margin-top: 0.25rem;
}

.checkbox-group label {
  margin-bottom: 0;
  font-weight: normal;
}

.contact-item {
  margin-bottom: 1.5rem;
}

.contact-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.social-media {
  margin-top: 2rem;
}

.social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--light-gray);
  border-radius: 50%;
  transition: var(--transition);
}

.social-icon:hover {
  background-color: var(--primary-color);
}

.social-icon img {
  width: 20px;
  height: 20px;
}

.map-section,
.faq-section {
  margin-bottom: 3rem;
}

.map-container {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.faq-item {
  background-color: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 1rem;
}

.faq-item h3 {
  margin-bottom: 0.75rem;
  color: var(--primary-color);
}

/* ========== Responsive Styles ========== */
@media (max-width: 992px) {
  .vehicle-content {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .hero h2 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

  nav {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    background-color: white;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    transform: translateY(-150%);
    transition: transform 0.3s ease;
    z-index: 90;
  }

  nav.active {
    transform: translateY(0);
  }

  nav ul {
    flex-direction: column;
    align-items: center;
  }

  nav ul li {
    margin: 0.5rem 0;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }

  .mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  .info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .input-group {
    flex-direction: column;
  }

  .input-group input {
    border-radius: var(--border-radius) var(--border-radius) 0 0;
  }

  .input-group button {
    border-radius: 0 0 var(--border-radius) var(--border-radius);
  }

  .vehicle-meta {
    flex-direction: column;
  }

  .thumbnail-gallery {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  }
}
