:root {
  --bg-primary: #000F24;
  --bg-secondary: #081A2F;
  --text-primary: #E6F1FF;
  --text-secondary: #CBD1DB;
  --accent-muted: #94A9CF;
  --accent-main: #4da3ff;
  --button-text: #000F24;
  --button-hover: #7A8DB7;
  --call-text: #000F24;
  --card-bg: rgba(255,255,255,0.05);
  --contact-bg: #1f2933;
  --contact-text: #FFFFFF;
  --contact-focus-bg: #28343f;
  --header-line-height: 1.25;
  --about-line-height: 1.25;
  --inventory-line-height: 1.25;
  --message-rows: 4;
  --row-height: 2.25rem;
}

/* ----------------------------
Global Box Sizing
---------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

/* ----------------------------
Body
---------------------------- */
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: linear-gradient(160deg, var(--bg-primary), var(--bg-secondary));
  color: var(--text-primary);
  overflow-x: hidden; /* prevent horizontal overflow */
}

/* ----------------------------
Header
---------------------------- */
header {
  display: flex;
  flex-wrap: nowrap;        /* prevent logo from wrapping */
  align-items: center;      /* vertical centering */
  gap: 1.5rem;
  padding: 2rem 1rem;
  justify-content: flex-start;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  background: var(--bg-primary); /* optional background */
}

header img {
  max-height: 100px;
  width: auto;
  flex-shrink: 0;
  display: block;           /* ensures proper vertical alignment */
}

header .header-text {
  display: flex;
  flex-direction: column;
  justify-content: center;  /* vertically centers text relative to logo */
}

header .header-text h1 {
  font-size: 2rem;
  color: #E6F1FF;
  margin: 0;
  font-weight: 700;
}

header .header-text p.byline {
  font-size: 1rem;
  color: #E6F1FF;
  line-height: var(--header-line-height);
  margin: 0;
}

/* No mobile adjustments — header stays horizontal on all screens */

/* ----------------------------
Sections
---------------------------- */
section {
  padding: 1.5rem;
  margin: 1rem;
  background: var(--card-bg);
  border-radius: 18px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}

section + section {
  margin-top: 2rem; /* breathing room between sections */
}

/* ----------------------------
About Me Section — Mobile-First
---------------------------- */
#about {
  padding: 1rem;
  margin: 0.5rem;
  background: var(--card-bg);
  border-radius: 18px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}

#about h2 {
  color: var(--accent-muted);
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

#about h3 {
  color: var(--accent-muted);
  font-size: 1.1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

#about p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.25;
  margin: 0;
}

#about p + p {
  margin-top: 0.6rem;  /* spacing between consecutive paragraphs */
}

#about p:last-of-type {
  margin-bottom: 2.2rem;  /* thematic break before next section */
}

#about ul {
  padding-left: 1rem;
}

/* Unified spacing for <li> under <h3> only */
#about h3 + ul li {
  font-size: 1rem;
  line-height: 1.25;
  color: var(--text-secondary);
  margin-bottom: 0.75rem; /* unified spacing between list items */
}

/* ----------------------------
Headings
---------------------------- */
h2 {
  color: var(--accent-muted);
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
}

h3 {
  color: var(--accent-muted);
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
}

/* ----------------------------
Paragraphs and Lists
---------------------------- */
p, li {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.55;
  margin-bottom: 0.75rem;
}

ul {
  padding-left: 1.2rem;
}

li {
  margin-bottom: 0.25rem;
}

/* ----------------------------
Vehicle Cards
---------------------------- */
.vehicles {
  display: grid;
  gap: 1rem;
}

.vehicle-card {
  background: rgba(0,0,0,0.35);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: opacity, transform;
}

.vehicle-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.vehicle-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.vehicle-card div {
  padding: 1rem;
}

.vehicle-card h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.vehicle-card span {
  font-size: 1rem;
  color: var(--text-secondary);
  display: block;
  margin-top: 0.25rem;
}

/* --- Price Line Container (no highlight) --- */
.vehicle-card div span.price {
  margin-top: 0.25rem;
}

/* --- Gold Highlight ONLY on dollar amount --- */
.vehicle-card div span.price-amount {
  background-color: #FFD700;
  color: #000;
  padding: 0 0.25rem;
  border-radius: 3px;
  display: inline-block;
  font-weight: normal;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

/* Hover effect applies ONLY to the dollar amount */
.vehicle-card:hover div span.price-amount {
  background-color: #FFC700;
  transform: scale(1.05);
}

.vehicle-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

/* ----------------------------
CTA Buttons
---------------------------- */
.cta {
  display: flex;
  justify-content: center;    /* horizontally center buttons */
  flex-direction: row;        /* horizontal layout */
  flex-wrap: wrap;            /* wrap on small screens */
  gap: 0.75rem;               /* space between buttons */
  margin-top: 0.5rem;         /* space above buttons */
  margin-bottom: 2rem;        /* blank space below buttons; adjust as needed */
}

.cta a,
.cta button {
  text-align: center;
  padding: 0.8rem;           /* preserves button height */
  font-size: 1rem;           /* keeps text size consistent */
  font-weight: 600;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  min-width: 200px;          /* ensures consistent width */
  transition: background-color 0.2s ease, transform 0.2s ease; /* smooth hover */
}

/* Sticky blue primary button */
.primary {
  background: var(--accent-main); /* sticky blue */
  color: var(--call-text);        /* readable text */
}

.primary:hover {
  background: var(--button-hover); /* hover shade */
  transform: scale(1.02);
}

/* Secondary button styling */
.secondary {
  background: transparent;
  color: var(--accent-muted);
  border: 2px solid var(--accent-muted);
}

/* ----------------------------
Contact Form
---------------------------- */
form {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

#contactForm label { 
    color: var(--byline-color); 
    font-size: 0.95rem; 
    font-weight: 500; 
    margin-bottom: 0.25rem; 
    display: block; 
}

#contactForm input,
#contactForm textarea {
    background-color: var(--contact-bg);
    color: var(--contact-text);
    border: 1px solid #444;
    border-radius: 10px;
    padding: 0.75rem;
    font-size: 0.95rem;
    width: 100%;
}

/* Focus outline */
#contactForm input:focus,
#contactForm textarea:focus {
    outline: none;
    box-shadow: 0 0 4px 2px rgba(148,169,207,0.4);
}

#message {
    height: 22rem;
    min-height: 22rem;
    max-height: none;
    resize: vertical;
    overflow-y: hidden;
}

/* Fix Chrome autofill overriding background + text */
#contactForm input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--contact-bg) inset;
  -webkit-text-fill-color: var(--contact-text);
}

/* ----------------------------
Contact Section — bottom spacing
---------------------------- */
#contactForm {
  padding-bottom: 0rem; /* safe space between Send Inquiry button and footer */
}

/* ------------------------------------------
Footer — See separate footer stylesheet 
---------------------------------------------*/
footer {
  margin-top: 0rem;      /* space from previous section */
  margin-bottom: 0.3rem; /* small gap from viewport bottom */
}

/* ----------------------------
Sticky Call Button
---------------------------- */
.sticky-call {
  position: fixed;
  bottom: 20px;
  right: -200px;
  background: var(--accent-main);
  color: var(--call-text);
  padding: 0.9rem 1.5rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  z-index: 999;
  box-shadow: 0 6px 15px rgba(0,0,0,0.4);
  text-decoration: none;
  transition: right 0.6s ease-out;
}

.sticky-call.show {
  right: 20px;
}

/* ------------------------------------
Responsive Media Tweaks – Annotated
--------------------------------------- */
/* -----------------------------------------------
  Extra Small Screens: 0–480px
  - General responsive tweaks for small devices
  - Vehicles, CTA buttons, sticky call adjustments
-----------------------------------------------*/
@media (max-width: 480px) {
  .vehicles {
    grid-template-columns: 1fr;       /* single column vehicles */
  }

  .cta {
    flex-direction: column;           /* stack buttons vertically */
    align-items: center;              /* center horizontally */
  }

  .sticky-call {
    right: 50%;                       /* center sticky call button */
    transform: translateX(50%);
  }

  section + section {
    margin-top: 2rem;                 /* spacing between sections */
  }

  p, li {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0.6rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  h3 {
    font-size: 1.1rem;
    margin-top: 2rem;
  }

  ul {
    padding-left: 1rem;
  }
}

/* -----------------------------------------------
  Small Screens: 481–600px
  - Vehicles layout and CTA adjustments
  - Header untouched (logo stays left-aligned)
-----------------------------------------------*/
@media (max-width: 600px) {
  .vehicles {
    grid-template-columns: 1fr;      /* single column for small screens */
  }

  .cta {
    flex-direction: column;          /* vertical stacking */
    align-items: center;
  }

  .sticky-call {
    right: 50%;
    transform: translateX(50%);
  }
}

/* -----------------------------------------------
  Medium Screens: 601–768px
  - Typography and section spacing adjustments
  - Header remains default horizontal
----------------------------------------------- */
@media (max-width: 768px) {
  section + section {
    margin-top: 2rem;
  }

  p, li {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0.6rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  h3 {
    font-size: 1.1rem;
    margin-top: 2rem;
  }

  ul {
    padding-left: 1rem;
  }
}

/* -----------------------------------------------
  Larger Screens: 601px+
  - Vehicles in two columns
  - Header remains default horizontal
-----------------------------------------------*/
@media (min-width: 601px) {
  .vehicles {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* -----------------------------------------------
  Critical Header Overrides — Must be at the bottom
  - Keeps logo left-aligned and prevents jumping
  - Uses !important to enforce layout
-----------------------------------------------*/
@media (max-width: 480px) {
  header {
    flex-direction: row !important;  
    align-items: center !important;
    gap: 1.5rem !important;
    padding: 2rem 1rem !important;
  }

  header .header-text h1 {
    text-align: left !important;
    font-size: 2rem !important;
    color: #E6F1FF !important;
    font-weight: 700 !important;
  }

  header .header-text p.byline {
    text-align: left !important;
    font-size: 1rem !important;
    color: #E6F1FF !important;
    line-height: var(--header-line-height) !important;
  }
}

/* ----------------------------
About Me Section — Media Queries
---------------------------- */
/* Ultra-Small Phones (<360px) */
@media (max-width: 359px) {
  #about p + p {
    margin-top: 0.25rem;    /* slightly tighter spacing */
  }

  #about h2 {
    font-size: 1.2rem;
  }

  #about h3 {
    font-size: 1rem;
    margin-top: 1.25rem;
  }

  #about ul {
    padding-left: 0.9rem;
  }

  #about h3 + ul li {
    margin-bottom: 0.6rem; /* slightly tighter spacing for ultra-small screens */
  }
}

/* Desktop Overrides (10% audience) */
@media (min-width: 769px) {
  #about {
    padding: 1.5rem;
    margin: 1rem;
  }

  #about h2 {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
  }

  #about h3 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
  }

  #about p + p {
    margin-top: 0.5rem;
  }

  #about ul {
    padding-left: 1.2rem;
  }

  #about h3 + ul li {
    margin-bottom: 0.75rem; /* unified spacing with main About Me rules */
  }
}

