/* Eagle Valley Motors — original stylesheet, written from scratch 2026-07-14.
   Class naming scheme: ev-* (Eagle Valley), BEM-ish. */

:root {
  /* Brand palette per EVM Brand Guidelines (Identity Manual): primary
     #C50000 red + #1733FB blue; secondary FF3B3B / 5B74EF / FF0000. */
  --ev-red: #c50000;
  --ev-red-dark: #9e0000;
  --ev-red-soft: #ff3b3b;
  --ev-blue: #1733fb;
  --ev-blue-soft: #5b74ef;
  --ev-blue-dark: #0f22b4;
  --ev-navy: #0a1543;
  --ev-ink: #1b232b;
  --ev-slate: #5b6670;
  --ev-mist: #f0f0f5;
  --ev-line: #dfe3e8;
  --ev-white: #ffffff;
  --ev-radius: 10px;
  --ev-shadow: 0 2px 10px rgba(10, 21, 67, 0.10);
  --ev-shadow-lg: 0 8px 28px rgba(10, 21, 67, 0.16);
  /* Brand type: Bernard MT Condensed headings (Alfa Slab One as web
     fallback), Poppins body. */
  --ev-font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ev-font-display: "Bernard MT Condensed", "Alfa Slab One", "Arial Black", serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--ev-font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ev-ink);
  background: var(--ev-white);
  /* safety net: a single overflowing element must never widen the page on
     phones (clip, not hidden — doesn't break position:sticky) */
  overflow-x: clip;
}

img { max-width: 100%; display: block; }

a { color: var(--ev-red); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.2; color: var(--ev-ink); margin: 0 0 0.5em; }
h1, h2 { font-family: var(--ev-font-display); font-weight: 400; letter-spacing: 0.5px; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; font-weight: 600; }

.ev-wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---------- utility bar ---------- */
.ev-utility {
  background: var(--ev-blue);
  color: var(--ev-white);
  font-size: 0.85rem;
  padding: 6px 0;
  position: relative;
  z-index: 60; /* dropdown must layer above the sticky header below it */
}
.ev-utility .ev-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.ev-utility a { color: var(--ev-white); font-weight: 600; }
.ev-utility__links { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.ev-utility .ev-nav__trigger { color: var(--ev-white); font-weight: 600; font-size: 0.85rem; padding: 4px 0; }
.ev-utility .ev-nav__trigger:hover { color: #ffd6d6; }

/* locations dropdown: two lots side by side */
.ev-locdrop__menu.ev-nav__menu {
  left: auto;
  right: 0;
  width: 520px;
  max-width: calc(100vw - 20px);
  color: var(--ev-ink);
  z-index: 70;
}
.ev-locdrop__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ev-locdrop__card { padding: 14px 16px; border-radius: 7px; }
.ev-locdrop__card:hover { background: var(--ev-mist); }
.ev-locdrop__card h4 { margin: 0 0 6px; color: var(--ev-red); font-size: 1rem; }
.ev-locdrop__addr { margin: 0 0 10px; color: var(--ev-ink); font-weight: 600; line-height: 1.4; }
.ev-locdrop__hours { margin: 0 0 12px; font-size: 0.8rem; color: var(--ev-slate); }
.ev-locdrop__hours div { display: flex; justify-content: space-between; gap: 10px; }
.ev-locdrop__hours dt { font-weight: 600; }
.ev-locdrop__hours dd { margin: 0; }
.ev-locdrop__link { display: inline-block; font-weight: 700; color: var(--ev-red) !important; }
.ev-locdrop__link:hover { text-decoration: underline; }

/* ---------- header ---------- */
.ev-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ev-white);
  border-bottom: 1px solid var(--ev-line);
  box-shadow: var(--ev-shadow);
}
.ev-header .ev-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}
.ev-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ev-navy);
  text-decoration: none;
}
.ev-logo:hover { text-decoration: none; }
.ev-logo img { height: 54px; width: auto; }

.ev-nav { display: flex; align-items: center; gap: 24px; }
.ev-nav a, .ev-nav__trigger {
  color: var(--ev-ink);
  font-weight: 600;
  font-size: 0.95rem;
}
.ev-nav a:hover { color: var(--ev-red); text-decoration: none; }

/* dropdowns */
.ev-nav__drop { position: relative; }
.ev-nav__trigger {
  background: none;
  border: none;
  padding: 8px 0;
  cursor: pointer;
  font-family: inherit;
}
.ev-nav__trigger:hover { color: var(--ev-red); }
.ev-nav__menu {
  display: none;
  position: absolute;
  top: 100%;
  left: -14px;
  min-width: 230px;
  background: var(--ev-white);
  border: 1px solid var(--ev-line);
  border-radius: var(--ev-radius);
  box-shadow: var(--ev-shadow-lg);
  padding: 8px;
  z-index: 60;
}
.ev-nav__drop.is-open .ev-nav__menu { display: block; }
.ev-nav__menu a {
  display: block;
  padding: 10px 14px;
  border-radius: 7px;
  white-space: nowrap;
}
.ev-nav__menu a:hover { background: var(--ev-mist); color: var(--ev-red); }
@media (min-width: 861px) {
  .ev-nav__drop:hover .ev-nav__menu,
  .ev-nav__drop:focus-within .ev-nav__menu { display: block; }
}

.ev-nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--ev-line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--ev-navy);
}

/* ---------- buttons ---------- */
.ev-btn {
  display: inline-block;
  background: var(--ev-red);
  color: var(--ev-white);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: var(--ev-radius);
  border: 2px solid var(--ev-red);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.ev-btn:hover { background: var(--ev-red-dark); border-color: var(--ev-red-dark); text-decoration: none; }
.ev-btn--ghost { background: transparent; color: var(--ev-red); }
.ev-btn--ghost:hover { background: var(--ev-red); color: var(--ev-white); }
.ev-btn--navy { background: var(--ev-blue); border-color: var(--ev-blue); }
.ev-btn--navy:hover { background: var(--ev-blue-dark); border-color: var(--ev-blue-dark); }

/* ---------- hero ---------- */
.ev-hero {
  background: linear-gradient(160deg, var(--ev-blue-dark) 0%, var(--ev-blue) 100%);
  color: var(--ev-white);
  padding: 72px 0 84px;
}
.ev-hero h1 { color: var(--ev-white); max-width: 640px; }
.ev-hero p { font-size: 1.15rem; max-width: 560px; color: #dfe4ff; }
.ev-hero__cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; align-items: stretch; }
.ev-hero__search { display: flex; gap: 8px; flex: 1 1 240px; max-width: 400px; min-width: 0; }
.ev-hero__search input {
  flex: 1 1 0;
  width: 0; /* flex-grow owns the width — the input's intrinsic size must never
               push the Search button past the viewport (large-font phones) */
  min-width: 0;
  border: none;
  border-radius: 8px;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ev-ink);
}
.ev-hero__search .ev-btn { flex: 0 0 auto; }
@media (max-width: 700px) {
  .ev-hero__search { flex: 1 1 100%; max-width: 100%; }
}
.ev-hero__search input:focus { outline: 2px solid var(--ev-red); }
.ev-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 48px; align-items: center; }
.ev-hero__grid > * { min-width: 0; }

/* quick-start credit app card (hero, step 1 of the application) */
.ev-quickapp {
  background: var(--ev-white);
  border-radius: var(--ev-radius);
  padding: 26px 24px 24px;
  box-shadow: 0 18px 44px rgba(6, 12, 60, 0.35);
}
.ev-quickapp h2 { margin: 0 0 2px; font-size: 1.5rem; color: var(--ev-navy); }
.ev-quickapp p { color: var(--ev-slate); font-size: 0.85rem; max-width: none; }
.ev-quickapp__sub { margin: 0 0 16px; }
.ev-quickapp .ev-form__note,
.ev-quickapp .ev-form__note label { font-size: 0.68rem; font-weight: 400; line-height: 1.5; }
.ev-quickapp .ev-form input { padding: 9px 12px; }
.ev-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- sections ---------- */
.ev-section { padding: 64px 0; }
/* why choose us */
.ev-why { padding-top: 10px; }
.ev-why h2::after { content: ""; display: block; width: 64px; height: 4px; background: var(--ev-red); margin: 14px auto 0; border-radius: 2px; }
.ev-why p { font-size: 1.05rem; margin: 18px auto 0; }
.ev-why__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.ev-section--mist { background: var(--ev-mist); }
.ev-section__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

/* ---------- vehicle cards ---------- */
.ev-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 22px;
}
.ev-car {
  background: var(--ev-white);
  border: 1px solid var(--ev-line);
  border-radius: var(--ev-radius);
  overflow: hidden;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.ev-car:hover { box-shadow: var(--ev-shadow-lg); transform: translateY(-2px); }
.ev-car a { color: inherit; text-decoration: none; display: block; }
.ev-car__photo {
  aspect-ratio: 4 / 3;
  background: var(--ev-mist);
  object-fit: cover;
  width: 100%;
}
.ev-car__body { padding: 14px 16px 18px; }
.ev-car__title { font-size: 1rem; font-weight: 700; color: var(--ev-navy); margin: 0 0 4px; }
.ev-car__meta { font-size: 0.85rem; color: var(--ev-slate); margin: 0 0 10px; }
.ev-car__price { font-size: 1.25rem; font-weight: 800; color: var(--ev-red); }
.ev-car__lot {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ev-slate);
  background: var(--ev-mist);
  border-radius: 20px;
  padding: 2px 10px;
  margin-top: 8px;
}

/* ---------- filter bar ---------- */
.ev-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: end;
  background: var(--ev-white);
  border: 1px solid var(--ev-line);
  border-radius: var(--ev-radius);
  padding: 16px;
  margin-bottom: 26px;
}
.ev-filters label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ev-slate);
}
.ev-filters select, .ev-filters input {
  font-family: inherit;
  font-size: 0.9rem;
  padding: 9px 10px;
  border: 1px solid var(--ev-line);
  border-radius: 8px;
  min-width: 130px;
  background: var(--ev-white);
}
.ev-filters__count { margin-left: auto; font-size: 0.9rem; color: var(--ev-slate); align-self: center; }

/* ---------- value props ---------- */
.ev-props { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; }
.ev-prop {
  background: var(--ev-white);
  border: 1px solid var(--ev-line);
  border-radius: var(--ev-radius);
  padding: 24px;
}
.ev-prop__icon { font-size: 1.8rem; margin-bottom: 10px; }

/* ---------- location cards ---------- */
.ev-locs { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 22px; }
.ev-loc {
  background: var(--ev-white);
  border: 1px solid var(--ev-line);
  border-radius: var(--ev-radius);
  padding: 26px;
}
.ev-loc h3 { color: var(--ev-red); }
.ev-loc dl { margin: 0; font-size: 0.95rem; }
.ev-loc dt { font-weight: 700; color: var(--ev-navy); margin-top: 12px; }
.ev-loc__map {
  width: 100%;
  height: 240px;
  border: 0;
  border-radius: 8px;
  margin-top: 16px;
  display: block;
}
.ev-loc dd { margin: 2px 0 0; color: var(--ev-slate); }

/* ---------- VDP ---------- */
.ev-vdp { display: grid; grid-template-columns: 1.4fr 1fr; gap: 34px; align-items: start; }
.ev-vdp__gallery img { border-radius: var(--ev-radius); width: 100%; }
.ev-vdp__thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 10px; }
.ev-vdp__thumbs img { border-radius: 6px; cursor: pointer; aspect-ratio: 4/3; object-fit: cover; opacity: 0.85; }
.ev-vdp__thumbs img:hover { opacity: 1; }
.ev-vdp__panel {
  background: var(--ev-white);
  border: 1px solid var(--ev-line);
  border-radius: var(--ev-radius);
  padding: 26px;
  box-shadow: var(--ev-shadow);
  position: sticky;
  top: 92px;
}
.ev-vdp__price { font-size: 2rem; font-weight: 800; color: var(--ev-red); margin: 6px 0 14px; }
.ev-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; margin: 22px 0; font-size: 0.92rem; }
.ev-specs div { border-bottom: 1px solid var(--ev-line); padding-bottom: 8px; }
.ev-specs span { display: block; font-size: 0.75rem; font-weight: 600; color: var(--ev-slate); text-transform: uppercase; letter-spacing: 0.4px; }

/* ---------- forms ---------- */
.ev-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.ev-form fieldset {
  grid-column: 1 / -1;
  border: 1px solid var(--ev-line);
  border-radius: var(--ev-radius);
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
  margin: 0 0 4px;
}
.ev-form legend { font-weight: 700; color: var(--ev-navy); padding: 0 8px; }
.ev-form label { display: flex; flex-direction: column; gap: 5px; font-size: 0.85rem; font-weight: 600; color: var(--ev-slate); min-width: 0; }
.ev-form input, .ev-form select, .ev-form textarea {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 11px 12px;
  border: 1px solid var(--ev-line);
  border-radius: 8px;
  /* fill the grid cell — inputs/textareas otherwise impose an intrinsic
     min-width (~200px) that forces horizontal overflow on phones */
  width: 100%;
  min-width: 0;
}
.ev-form input:focus, .ev-form select:focus, .ev-form textarea:focus {
  outline: 2px solid var(--ev-red);
  outline-offset: 1px;
  border-color: var(--ev-red);
}
.ev-form .ev-form__full { grid-column: 1 / -1; }
.ev-form .ev-btn { grid-column: 1 / -1; justify-self: start; }
.ev-form__note { grid-column: 1 / -1; font-size: 0.8rem; color: var(--ev-slate); }
/* consent labels hold flowing text with inline links — the flex-column label
   default would stack each link on its own line */
.ev-form__note label { display: block; font-weight: 400; font-size: inherit; }
/* checkbox lives INSIDE the label in a fixed two-column grid so no zoom,
   cache state, or flex quirk can ever separate the box from its text */
.ev-form__note label.ev-consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  text-align: left;
  justify-items: start;
  margin: 0;
  width: 100%;
}
.ev-consent input[type="checkbox"] { margin: 3px 0 0; }
.ev-form--stack { grid-template-columns: 1fr; gap: 12px; }
.ev-form--stack .ev-btn { justify-self: stretch; text-align: center; }

/* ---------- Eagle Knievel ---------- */
.ev-knievel { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 44px; align-items: center; }
.ev-knievel__img { width: 100%; height: auto; }
@media (max-width: 860px) {
  .ev-knievel { grid-template-columns: 1fr; }
  .ev-knievel__img { max-width: 260px; margin: 0 auto; }
}

.ev-videos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 26px; }
.ev-videos__item { min-width: 0; }
.ev-videos iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--ev-radius); box-shadow: var(--ev-shadow); display: block; }
.ev-videos__item p { margin: 10px 0 0; font-size: 0.9rem; font-weight: 600; color: var(--ev-slate); }
@media (max-width: 860px) {
  .ev-videos { grid-template-columns: 1fr; }
}

/* ---------- Eagle Approved process (3 steps) ---------- */
.ev-steps {
  background: linear-gradient(160deg, var(--ev-blue-dark) 0%, var(--ev-blue) 100%);
  color: var(--ev-white);
  padding: 64px 0 70px;
  text-align: center;
}
.ev-steps h2 { color: var(--ev-white); margin-bottom: 4px; }
.ev-steps__sub { color: #dfe4ff; margin: 0 0 40px; font-size: 1.05rem; }
.ev-steps__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; text-align: left; }
.ev-step {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--ev-radius);
  padding: 26px 24px;
}
.ev-step__num {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--ev-red);
  color: var(--ev-white);
  font-family: var(--ev-font-display);
  font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.ev-step h3 { color: var(--ev-white); margin: 0 0 8px; }
.ev-step p { color: #dfe4ff; margin: 0; font-size: 0.95rem; }
.ev-steps__cta { margin-top: 36px; }

/* ---------- CTA band ---------- */
.ev-band {
  background: var(--ev-red);
  color: var(--ev-white);
  padding: 46px 0;
}
.ev-band .ev-wrap { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.ev-band h2 { color: var(--ev-white); margin: 0; }
.ev-band .ev-btn { background: var(--ev-white); color: var(--ev-red); border-color: var(--ev-white); }

/* ---------- footer ---------- */
.ev-footer { background: var(--ev-navy); color: #c3cae8; padding: 54px 0 30px; font-size: 0.9rem; }
.ev-footer a { color: #e4e9ff; overflow-wrap: anywhere; }
.ev-footer__cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 34px; }
.ev-footer__cols > div { min-width: 0; }
.ev-footer h4 { color: var(--ev-white); font-size: 0.95rem; margin-bottom: 12px; }
.ev-footer ul { list-style: none; margin: 0; padding: 0; }
.ev-footer li { margin-bottom: 8px; }
.ev-footer__legal { border-top: 1px solid #1a2a6e; padding-top: 22px; font-size: 0.8rem; }

/* ---------- misc ---------- */
.ev-breadcrumb { font-size: 0.85rem; color: var(--ev-slate); margin: 18px 0; }
.ev-alert { background: #eaf6ee; border: 1px solid #bfe3cb; border-radius: var(--ev-radius); padding: 16px 20px; color: #1e6b3a; }
.ev-alert--error { background: #fdeceb; border-color: #f3c1bd; color: #9c1a0d; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .ev-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ev-white);
    border-bottom: 1px solid var(--ev-line);
    flex-direction: column;
    padding: 18px 20px;
    gap: 16px;
    box-shadow: var(--ev-shadow-lg);
  }
  .ev-nav.is-open { display: flex; }
  .ev-nav-toggle { display: block; }
  .ev-nav__drop { width: 100%; }
  .ev-nav__trigger { width: 100%; text-align: left; padding: 4px 0; }
  .ev-nav__menu {
    position: static;
    border: none;
    box-shadow: none;
    padding: 0 0 0 16px;
    min-width: 0;
  }
  .ev-vdp { grid-template-columns: 1fr; }
  .ev-vdp__panel { position: static; }
  .ev-form, .ev-form fieldset { grid-template-columns: 1fr; }
  .ev-footer__cols { grid-template-columns: 1fr 1fr; }
  .ev-hero__grid { grid-template-columns: 1fr; gap: 36px; }
  .ev-steps__grid { grid-template-columns: 1fr; gap: 18px; }
}

@media (max-width: 700px) {
  .ev-utility__tag { display: none; }
  .ev-utility__links { margin: 0 auto; }
  /* anchor-positioned panel can't fit a narrow screen — span the viewport */
  .ev-locdrop__menu.ev-nav__menu {
    position: fixed;
    left: 10px;
    right: 10px;
    top: 46px;
    width: auto;
    max-width: none;
  }
}
@media (max-width: 480px) {
  .ev-locdrop__grid { grid-template-columns: 1fr; }
  /* Turnstile widget has a hard 300px minimum — free up card padding so it
     fits small phones (incl. large-font accessibility settings) */
  .ev-quickapp { padding: 20px 12px 18px; }
  .ev-form fieldset { padding: 14px 10px; }
  .ev-form__row { grid-template-columns: 1fr; }
}
