/*
  CBR Auto & Towing — global styles
  Colors: navy #1a2744, red #cc2222, white #ffffff
  No gradients, no glass effects — solid fills only.
*/

:root {
  --navy: #1a2744;
  --navy-soft: #243352;
  --red: #cc2222;
  --red-dark: #a61b1b;
  --white: #ffffff;
  --ink: #1a2744;
  --muted: #4a5568;
  --line: #e2e8f0;
  --radius: 4px;
  --font-body: "Inter", system-ui, sans-serif;
  --font-display: "Oswald", sans-serif;
  --nav-h: 72px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
}

body.menu-open {
  overflow: hidden;
}

body.has-call-bar {
  padding-bottom: 64px;
}

@media (min-width: 768px) {
  body.has-call-bar {
    padding-bottom: 0;
  }
}

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

a {
  color: var(--red);
  font-weight: 600;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ----- Sticky site header ----- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--navy);
  border-bottom: 3px solid var(--red);
}

.site-header.is-scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.nav-inner {
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--white);
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
  color: var(--white);
}

/* Logo: white artwork on navy is correct. Opaque PNG (no alpha) still looks clean with slight framing. */
.brand img {
  flex-shrink: 0;
  display: block;
  height: 44px;
  width: auto;
  max-width: min(200px, 42vw);
  object-fit: contain;
  object-position: left center;
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: var(--white);
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle:hover {
  border-color: var(--white);
}

.nav-desktop {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.25rem;
  align-items: center;
}

.nav-desktop a {
  display: block;
  padding: 0.5rem 0.85rem;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius);
}

.nav-desktop a:hover {
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
  color: var(--white);
}

.nav-desktop a.active {
  color: var(--white);
  background: var(--red);
}

.nav-mobile {
  display: none;
  position: fixed;
  inset: var(--nav-h) 0 0;
  background: var(--navy);
  padding: 1rem 1.25rem;
  z-index: 999;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-mobile.is-open {
  display: block;
}

.nav-mobile ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-mobile a {
  display: block;
  padding: 0.85rem 0;
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-mobile a.active {
  color: var(--red);
}

@media (min-width: 900px) {
  .nav-toggle {
    display: none;
  }

  .nav-desktop {
    display: flex;
  }

  .nav-mobile {
    display: none !important;
  }
}

/* ----- Buttons ----- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.75rem 1.35rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

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

.btn-red:hover {
  background: var(--red-dark);
  color: var(--white);
}

.btn-outline-light {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-outline-light:hover {
  background: var(--white);
  color: var(--navy);
}

.btn-outline-dark {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}

.btn-outline-dark:hover {
  background: var(--navy);
  color: var(--white);
}

.btn-block {
  width: 100%;
}

/* ----- Hero (home + inner) ----- */

.hero {
  position: relative;
  background: var(--navy);
  color: var(--white);
}

.hero--with-image {
  min-height: 52vh;
  display: flex;
  align-items: center;
  padding: 3rem 0;
  background-color: var(--navy);
  background-size: cover;
  background-position: center;
}

.hero--with-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(26, 39, 68, 0.82);
}

.hero--with-image .container {
  position: relative;
  z-index: 1;
}

.hero--simple {
  padding: 2.75rem 0;
  text-align: center;
  border-bottom: 4px solid var(--red);
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  max-width: 20ch;
}

.hero--with-image h1 {
  max-width: 22ch;
}

.hero--simple h1 {
  max-width: none;
}

.hero .lead {
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
  max-width: 40ch;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.hero--simple .lead {
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero--simple .hero-actions {
  justify-content: center;
}

/* ----- Sections ----- */

.section {
  padding: 3rem 0;
}

@media (min-width: 768px) {
  .section {
    padding: 4rem 0;
  }
}

.section--navy {
  background: var(--navy);
  color: var(--white);
}

.section--navy h2,
.section--navy h3 {
  color: var(--white);
}

.section--navy .muted {
  color: rgba(255, 255, 255, 0.82);
}

.section-head {
  margin-bottom: 2rem;
}

.section-head.center {
  text-align: center;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.section-head h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.65rem, 3.5vw, 2.1rem);
  color: var(--ink);
}

.section--navy .section-head h2 {
  color: var(--white);
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.section--navy .section-head p {
  color: rgba(255, 255, 255, 0.85);
}

/* ----- Division cards (home) ----- */

.division-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 720px) {
  .division-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.division-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 12px rgba(26, 39, 68, 0.06);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.division-card:hover {
  border-color: var(--red);
  box-shadow: 0 8px 24px rgba(26, 39, 68, 0.1);
  text-decoration: none;
}

.division-card .icon-wrap {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.division-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  color: var(--navy);
}

.division-card p {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
  flex-grow: 1;
}

.division-card .btn-red {
  align-self: flex-start;
  pointer-events: none;
}

/* ----- Trust bar ----- */

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

@media (min-width: 768px) {
  .trust-bar {
    grid-template-columns: repeat(4, 1fr);
  }
}

.trust-item {
  text-align: center;
  padding: 1rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: var(--navy-soft);
}

.trust-item i {
  font-size: 1.5rem;
  color: var(--red);
  margin-bottom: 0.5rem;
}

.trust-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--white);
}

.trust-item span {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.75);
}

/* ----- Service / feature grids ----- */

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

@media (min-width: 640px) {
  .card-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .card-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.info-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  border-top: 3px solid var(--red);
}

.section--navy .info-card {
  background: var(--navy-soft);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.info-card .icon-wrap {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  font-size: 1.2rem;
  margin-bottom: 0.85rem;
}

.section--navy .info-card .icon-wrap {
  background: var(--red);
}

.info-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  color: var(--navy);
}

.section--navy .info-card h3 {
  color: var(--white);
}

.info-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.section--navy .info-card p {
  color: rgba(255, 255, 255, 0.85);
}

/* ----- Callout blocks ----- */

.callout {
  background: var(--navy-soft);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-left: 5px solid var(--red);
  border-radius: var(--radius);
  padding: 1.5rem;
  color: var(--white);
}

.callout--light {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-left: 5px solid var(--red);
  color: var(--ink);
}

.callout h3 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
}

.callout p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.98rem;
}

.callout--light p {
  color: var(--muted);
}

/* ----- Forms ----- */

.form-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 560px;
}

.section--navy .form-panel {
  background: var(--navy-soft);
  border-color: rgba(255, 255, 255, 0.15);
}

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

@media (min-width: 560px) {
  .form-grid.two {
    grid-template-columns: 1fr 1fr;
  }
}

.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy);
}

.section--navy .form-group label {
  color: rgba(255, 255, 255, 0.92);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  font: inherit;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
}

.section--navy .form-group input,
.section--navy .form-group select,
.section--navy .form-group textarea {
  background: var(--white);
  border-color: #cbd5e1;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: 2px solid var(--red);
  outline-offset: 1px;
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.form-note {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.section--navy .form-note {
  color: rgba(255, 255, 255, 0.75);
}

.form-success {
  padding: 1rem;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: var(--radius);
  color: #065f46;
  font-weight: 600;
}

/* ----- Vehicle listings (sales) ----- */

.inventory-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .inventory-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .inventory-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.vehicle-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Photo gallery (sales inventory) */
.vehicle-card__gallery {
  position: relative;
  aspect-ratio: 16/10;
  background: var(--line);
}

.vehicle-card__gallery--single .vehicle-card__arrow,
.vehicle-card__gallery--single .vehicle-card__count {
  display: none;
}

.vehicle-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  vertical-align: top;
}

.vehicle-card__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: var(--radius);
  background: rgba(26, 39, 68, 0.88);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s ease;
}

.vehicle-card__arrow:hover {
  background: var(--red);
}

.vehicle-card__arrow:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

.vehicle-card__arrow--prev {
  left: 8px;
}

.vehicle-card__arrow--next {
  right: 8px;
}

.vehicle-card__count {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(26, 39, 68, 0.85);
  color: var(--white);
  padding: 0.28rem 0.55rem;
  border-radius: var(--radius);
  pointer-events: none;
}

.vehicle-card__body {
  padding: 1.1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.vehicle-card__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 0.35rem;
  color: var(--navy);
  text-transform: uppercase;
}

.vehicle-card__meta {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.vehicle-card__price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--red);
  margin-bottom: 0.5rem;
}

.vehicle-card p.desc {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  flex-grow: 1;
}

/* ----- Banners ----- */

.fin-banner {
  background: var(--navy);
  color: var(--white);
  text-align: center;
  padding: 1.75rem 1.25rem;
  border-top: 4px solid var(--red);
  border-bottom: 4px solid var(--red);
}

.fin-banner h3 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
}

.fin-banner p {
  margin: 0;
  opacity: 0.9;
}

/* ----- CTA strip ----- */

.cta-strip {
  text-align: center;
  padding: 2.5rem 1rem;
  background: var(--white);
  border-top: 1px solid var(--line);
}

.cta-strip h3 {
  margin: 0 0 0.5rem;
  color: var(--navy);
}

.cta-strip p {
  margin: 0 0 1rem;
  color: var(--muted);
}

/* ----- Footer ----- */

.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.85);
  padding: 2.5rem 0 1.5rem;
  border-top: 3px solid var(--red);
}

.footer-grid {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.site-footer h4 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
}

.site-footer p {
  margin: 0 0 0.5rem;
  font-size: 0.92rem;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--white);
  text-decoration: underline;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ----- Mobile call bar ----- */

.call-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1100;
  background: var(--red);
  padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

.call-bar a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}

.call-bar a:hover {
  text-decoration: none;
  opacity: 0.95;
}

@media (min-width: 768px) {
  .call-bar {
    display: none;
  }
}

/* ----- Utilities ----- */

.split {
  display: grid;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 900px) {
  .split--2 {
    grid-template-columns: 1fr 1fr;
  }
}

.text-center {
  text-align: center;
}

.mt-0 {
  margin-top: 0;
}
