/* ============================================
   Core Synergy Auto Sales — Main Stylesheet
   Colors: Navy #0D1B2A | Blue #2E6FD8 | White #FFFFFF
   ============================================ */

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

:root {
  --navy: #0D1B2A;
  --navy-light: #162436;
  --blue: #2E6FD8;
  --blue-dark: #1F52A8;
  --blue-light: #4A88E8;
  --white: #FFFFFF;
  --gray-50: #F8F9FA;
  --gray-100: #F1F3F5;
  --gray-200: #E9ECEF;
  --gray-400: #ADB5BD;
  --gray-600: #6C757D;
  --gray-800: #343A40;
  --font: 'Inter', sans-serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.1);
  --shadow: 0 4px 16px rgba(0,0,0,.12);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.18);
  --radius: 10px;
  --transition: .25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ---- TYPOGRAPHY ---- */
h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.15; font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
p  { color: var(--gray-600); }

.section-label {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: .5rem;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.6rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
}
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; border-color: var(--white); color: var(--white); }
.btn-outline:hover { background: var(--white); color: var(--navy); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-light); }

/* ---- LAYOUT ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }

/* ============================================
   NAV
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--navy);
  box-shadow: 0 2px 20px rgba(0,0,0,.3);
  transition: all var(--transition);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
}
.nav-logo img { height: 60px; width: auto; object-fit: contain; }
.nav-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.nav-logo-text .brand-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: .01em;
  white-space: nowrap;
}
.nav-logo-text .brand-sub {
  font-size: .7rem;
  font-weight: 500;
  color: rgba(255,255,255,.6);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  color: var(--gray-200);
  font-weight: 500;
  font-size: .95rem;
  transition: color var(--transition);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transition: transform var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links .btn { padding: .55rem 1.2rem; font-size: .875rem; }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: .5rem;
}
.nav-hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition);
}

/* Mobile nav */
.nav-mobile {
  display: none;
  flex-direction: column;
  background: var(--navy-light);
  padding: 1rem 1.5rem 1.5rem;
  gap: .25rem;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  color: var(--gray-200);
  font-weight: 500;
  padding: .65rem 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav-mobile a:last-child { border-bottom: none; }

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100vh;
  background:
    linear-gradient(rgba(13,27,42,0.78), rgba(13,27,42,0.70)),
    url('https://images.unsplash.com/photo-1680446808444-07b70aca83cd?auto=format&fit=crop&w=1600&q=80')
    center / cover no-repeat;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%232E6FD8' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-accent {
  position: absolute;
  right: -200px; top: 50%;
  transform: translateY(-50%);
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(46,111,216,.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(46,111,216,.2);
  border: 1px solid rgba(46,111,216,.4);
  border-radius: 50px;
  padding: .4rem 1rem;
  color: var(--blue-light);
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}
.hero h1 { color: var(--white); margin-bottom: 1.25rem; }
.hero h1 span { color: var(--blue); }
.hero p { color: var(--gray-400); font-size: 1.1rem; margin-bottom: 2rem; max-width: 520px; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,.1);
  flex-wrap: wrap;
}
.hero-stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}
.hero-stat-label { font-size: .85rem; color: var(--gray-400); margin-top: .25rem; }

/* ============================================
   VEHICLE CARDS
   ============================================ */
.vehicle-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: all var(--transition);
}
.vehicle-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.vehicle-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-size: .9rem;
}
.vehicle-card-img img { width: 100%; height: 100%; object-fit: cover; }
.vehicle-card-body { padding: 1.25rem; }
.vehicle-card-badge {
  display: inline-block;
  background: rgba(46,111,216,.1);
  color: var(--blue);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  border-radius: 4px;
  padding: .2rem .6rem;
  margin-bottom: .75rem;
}
.vehicle-card-title { font-size: 1.1rem; font-weight: 700; color: var(--navy); margin-bottom: .5rem; }
.vehicle-card-price { font-size: 1.4rem; font-weight: 800; color: var(--blue); margin-bottom: .75rem; }
.vehicle-card-details {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  font-size: .83rem;
  color: var(--gray-600);
}
.vehicle-card-detail { display: flex; align-items: center; gap: .3rem; }
.vehicle-card-footer { padding: 0 1.25rem 1.25rem; }

/* Inventory Grid */
.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* ============================================
   FILTER BAR
   ============================================ */
.filter-bar {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}
.filter-bar select, .filter-bar input {
  flex: 1;
  min-width: 140px;
  padding: .6rem .9rem;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  font-size: .9rem;
  font-family: var(--font);
  color: var(--gray-800);
  background: var(--gray-50);
  outline: none;
  transition: border-color var(--transition);
}
.filter-bar select:focus, .filter-bar input:focus { border-color: var(--blue); }

/* ============================================
   WHY US SECTION
   ============================================ */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2rem;
}
.why-card {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--gray-200);
  transition: all var(--transition);
}
.why-card:hover { border-color: var(--blue); box-shadow: var(--shadow); }
.why-icon {
  width: 64px; height: 64px;
  background: rgba(46,111,216,.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 1.5rem;
}
.why-card h3 { color: var(--navy); margin-bottom: .5rem; }

/* ============================================
   CTA BANNER
   ============================================ */
.cta-banner {
  background: linear-gradient(135deg, var(--navy) 0%, #133050 100%);
  color: var(--white);
  border-radius: var(--radius);
  padding: 3.5rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.cta-banner h2 { color: var(--white); margin-bottom: .5rem; }
.cta-banner p { color: var(--gray-400); }

/* ============================================
   ABOUT PAGE
   ============================================ */
.about-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #133050 100%);
  padding: 8rem 0 5rem;
  color: var(--white);
  text-align: center;
}
.about-hero h1 { color: var(--white); }
.about-hero p { color: var(--gray-400); max-width: 600px; margin: 1rem auto 0; font-size: 1.1rem; }

.about-story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.about-story-img {
  border-radius: var(--radius);
  overflow: hidden;
  height: 420px;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-story-img img { width: 100%; height: 100%; object-fit: cover; }
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}
.value-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--blue);
  background: var(--gray-50);
}
.value-card h3 { color: var(--navy); margin-bottom: .4rem; }

/* ============================================
   CONTACT PAGE
   ============================================ */
.contact-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #133050 100%);
  padding: 8rem 0 5rem;
  color: var(--white);
  text-align: center;
}
.contact-hero h1 { color: var(--white); }
.contact-hero p { color: var(--gray-400); max-width: 600px; margin: 1rem auto 0; font-size: 1.1rem; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  align-items: start;
}
.contact-info-card {
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--gray-200);
}
.contact-info-item {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--gray-200);
}
.contact-info-item:last-child { border-bottom: none; }
.contact-info-icon {
  width: 44px; height: 44px;
  background: rgba(46,111,216,.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}
.contact-info-label { font-size: .8rem; color: var(--gray-400); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.contact-info-value { font-weight: 600; color: var(--navy); margin-top: .1rem; }
.contact-info-value a:hover { color: var(--blue); }

.contact-form-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.form-group label { font-size: .875rem; font-weight: 600; color: var(--navy); }
.form-group input, .form-group select, .form-group textarea {
  padding: .7rem 1rem;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  font-size: .95rem;
  font-family: var(--font);
  color: var(--gray-800);
  outline: none;
  transition: border-color var(--transition);
  background: var(--gray-50);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--blue);
  background: var(--white);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-full { grid-column: 1 / -1; }

.map-container {
  border-radius: var(--radius);
  overflow: hidden;
  height: 380px;
  border: 1px solid var(--gray-200);
  margin-top: 3rem;
}
.map-container iframe { width: 100%; height: 100%; border: none; }

/* ============================================
   HOURS TABLE
   ============================================ */
.hours-table { width: 100%; border-collapse: collapse; }
.hours-table tr { border-bottom: 1px solid var(--gray-200); }
.hours-table td { padding: .65rem .25rem; font-size: .9rem; }
.hours-table td:first-child { font-weight: 600; color: var(--navy); }
.hours-table td:last-child { text-align: right; color: var(--gray-600); }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--navy);
  color: var(--gray-400);
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-brand img { height: 70px; margin-bottom: 1rem; }
.footer-brand p { font-size: .9rem; max-width: 280px; line-height: 1.7; }
.footer-col h4 { color: var(--white); font-size: .9rem; font-weight: 700; margin-bottom: 1rem; letter-spacing: .05em; text-transform: uppercase; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.footer-col ul a { font-size: .9rem; transition: color var(--transition); }
.footer-col ul a:hover { color: var(--white); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  font-size: .85rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ============================================
   PAGE HERO (generic)
   ============================================ */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #133050 100%);
  padding: 8rem 0 4rem;
  text-align: center;
}
.page-hero h1 { color: var(--white); margin-bottom: .75rem; }
.page-hero p { color: var(--gray-400); font-size: 1.05rem; max-width: 580px; margin: 0 auto; }

/* ============================================
   MISC UTILS
   ============================================ */
.text-center { text-align: center; }
.text-navy { color: var(--navy); }
.text-blue { color: var(--blue); }
.bg-gray { background: var(--gray-50); }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.mt-2 { margin-top: 2rem; }

.divider { height: 1px; background: var(--gray-200); margin: 0; }

/* Toast notification */
.toast {
  position: fixed;
  bottom: 2rem; right: 2rem;
  background: #22c55e;
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all .4s ease;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ============================================
   VEHICLE DETAIL PAGES
   ============================================ */
.vehicle-detail-hero {
  position: relative;
  height: 480px;
  overflow: hidden;
  margin-top: 80px;
}
.vehicle-detail-hero img {
  width: 100%; height: 100%; object-fit: cover;
}
.vehicle-detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13,27,42,.92) 0%, rgba(13,27,42,.45) 60%, transparent 100%);
  display: flex;
  align-items: flex-end;
  padding-bottom: 2.5rem;
}
.vehicle-detail-hero-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #1a2535, #2a3545);
  display: flex; align-items: center; justify-content: center;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: rgba(255,255,255,.75);
  font-size: .9rem;
  font-weight: 500;
  margin-bottom: 1rem;
  transition: color var(--transition);
}
.back-link:hover { color: var(--white); }
.vehicle-detail-title { color: var(--white); font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800; margin-bottom: .5rem; }
.vehicle-detail-price { color: var(--blue-light); font-size: 1.8rem; font-weight: 800; }

.vehicle-detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2.5rem;
  align-items: start;
}
.vehicle-specs-card, .inquiry-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.vehicle-specs-card { box-shadow: var(--shadow-sm); }
.inquiry-card {
  position: sticky;
  top: 100px;
  box-shadow: var(--shadow);
}
.specs-section-title {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 1.5rem 0 .75rem;
}
.specs-section-title:first-child { margin-top: 0; }
.specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem 1.5rem;
}
.spec-row { display: flex; flex-direction: column; gap: .1rem; }
.spec-label { font-size: .75rem; color: var(--gray-600); }
.spec-value { font-size: .95rem; font-weight: 600; color: var(--navy); }
.vin-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  padding: .6rem .9rem;
  font-family: monospace;
  font-size: .88rem;
  color: var(--gray-800);
  letter-spacing: .04em;
  margin-top: .5rem;
}

@media (max-width: 900px) {
  .vehicle-detail-grid { grid-template-columns: 1fr; }
  .inquiry-card { position: static; }
  .vehicle-detail-hero { height: 320px; }
}
@media (max-width: 480px) {
  .vehicle-detail-hero { height: 260px; margin-top: 70px; }
  .specs-grid { grid-template-columns: 1fr; }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .about-story { grid-template-columns: 1fr; }
  .about-story-img { height: 280px; }
  .contact-grid { grid-template-columns: 1fr; }
}

/* Medium nav — tighten gap so links fit before hamburger kicks in */
@media (max-width: 1100px) {
  .nav-links { gap: 1rem; }
  .nav-logo-text .brand-name { font-size: .88rem; }
  .nav-logo-text .brand-sub { font-size: .63rem; }
}

@media (max-width: 960px) {
  .nav-logo-text { display: none; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-logo-text { display: none; }
  .hero { padding-top: 100px; align-items: flex-start; min-height: auto; padding-bottom: 4rem; }
  .hero-stats { gap: 1rem; flex-wrap: wrap; justify-content: center; }
  .cta-banner { text-align: center; justify-content: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .form-grid { grid-template-columns: 1fr; }
  .contact-form-card { padding: 1.5rem; }
  .section { padding: 3.5rem 0; }
  /* Report modal */
  .modal-inner { width: 96vw; max-height: 88vh; }
  #modalImg { max-height: 60vh; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.9rem; }
  .hero-stat-num { font-size: 1.7rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; }
  .filter-bar select, .filter-bar input { min-width: 100%; }
  /* Feature checkboxes — larger tap target on phones */
  .feature-checkbox { min-height: 44px; font-size: .85rem; padding: .55rem .7rem; }
  /* Submit row stacks on phone */
  .submit-row { flex-direction: column; gap: .75rem; }
  .submit-row .btn { width: 100%; justify-content: center; }
}
