/* css/main.css */

/* Top Bar */
.top-bar {
  background-color: var(--dark-topbar-bg);
  color: var(--text-light);
  padding: 8px 4%;
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
}

.top-bar a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 600;
}

/* Main Header */
header {
  background-color: var(--dark-bg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  width: 100%;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 4%;
  max-width: 1300px;
  margin: 0 auto;
  width: 100%;
}

/* Logo Styling & Hover Effects */
.logo {
  font-size: clamp(1.2rem, 4vw, 1.6rem);
  font-weight: 800;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: -0.3px;
  display: inline-flex;
  align-items: center;
  transition: transform 0.3s ease, text-shadow 0.3s ease;
  word-break: break-word;
}

.logo span {
  color: var(--neon-blue);
  margin-left: 4px;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

/* Navigation Links */
.nav-links {
  display: flex;
  list-style: none;
  gap: 20px;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-light);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--neon-blue);
}

/* Header Call Button */
.btn-call {
  background-color: var(--primary-color);
  color: #fff !important;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-weight: 700;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
}

/* Mobile Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  background: none;
  border: none;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: #ffffff;
  border-radius: 2px;
}

/* Hero Section */
.hero {
  background: linear-gradient(rgba(18, 24, 36, 0.82), rgba(18, 24, 36, 0.88)), url('https://images.unsplash.com/photo-1552519507-da3b142c6e3d?auto=format&fit=crop&w=1400&q=80') center/cover no-repeat;
  color: #fff;
  padding: 60px 4%;
  text-align: center;
  width: 100%;
}

.hero h1 {
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  margin-bottom: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.hero p {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  max-width: 750px;
  margin: 0 auto 30px;
  color: #e2e8f0;
}

/* Search Bar */
.search-bar {
  background: #fff;
  padding: 16px;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  max-width: 1100px;
  width: 92%;
  margin: -30px auto 30px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  align-items: end;
  position: relative;
  z-index: 10;
}

.search-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-dark);
}

.search-group select,
.search-group input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 0.9rem;
}

.btn-search {
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  padding: 11px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
}

/* Fluid Containers & Inventory Grid */
.container, 
.vehicle-detail-wrapper {
  width: 100%;
  max-width: min(1320px, 100vw);
  margin-inline: auto;
  padding-inline: clamp(12px, 3vw, 24px);
}

.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  width: 100%;
}

.vehicle-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  width: 100%;
}

.vehicle-img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  background-color: #e9ecef;
}

.vehicle-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.vehicle-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 15px;
  background: #f8f9fa;
  padding: 10px;
  border-radius: 6px;
}

/* Responsive Image Scaling */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Footer Styling - Fixed mobile breaking */
footer {
  background-color: var(--dark-bg);
  color: #adb5bd;
  padding: 40px 4% 20px;
  font-size: 0.9rem;
  width: 100%;
  overflow: hidden;
}

.footer-container {
  max-width: 1300px;
  margin: 0 auto 30px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  width: 100%;
}

.footer-col h3 {
  color: #fff;
  margin-bottom: 12px;
  font-size: 1.05rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 8px;
  word-break: break-word;
}

.footer-col a {
  color: #adb5bd;
  text-decoration: none;
}

.legal-disclaimer {
  border-top: 1px solid #2c323f;
  padding-top: 20px;
  max-width: 1300px;
  margin: 0 auto;
  font-size: 0.75rem;
  line-height: 1.5;
  color: #8c98a4;
  width: 100%;
  word-break: break-word;
}

/* Mobile & Tablet Responsive Adjustments */
@media (max-width: 768px) {
  header {
    position: relative;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--dark-bg);
    padding: 20px 6%;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    align-items: flex-start;
  }

  .nav-links.active {
    display: flex;
  }

  .top-bar {
    text-align: center;
    justify-content: center;
    font-size: 0.78rem;
  }

  .search-bar {
    margin: -20px 4% 24px;
    grid-template-columns: 1fr;
    width: 92%;
  }

  .footer-container {
    grid-template-columns: 1fr;
  }
}