/* ===== CarSpareFinder — brand palette (sampled from logo) ===== */
:root {
  --blue: #1e5a96;
  --blue-dark: #163f6b;
  --orange: #f5820a;
  --orange-dark: #c46600;
  --ink: #23292f;
  --steel: #5b6773;
  --steel-light: #8993a0;
  --paper: #ffffff;
  --paper-alt: #f4f7fa;
  --line: #e3e8ee;
  --max-width: 1140px;
  --radius: 4px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: 'Oswald', 'Arial Narrow', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--blue-dark);
  font-weight: 600;
}
a { color: var(--blue); }
a:hover { color: var(--orange); }
.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ===== Header ===== */
.site-header { background: var(--paper); border-bottom: 3px solid var(--orange); padding: 14px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo { display: flex; align-items: center; text-decoration: none; }
.logo-img { display: block; height: 40px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav > a {
  color: var(--blue-dark); text-decoration: none; font-size: 0.92rem; font-weight: 500;
  padding: 10px 12px; border-radius: var(--radius);
}
.main-nav > a:hover { color: var(--orange); background: var(--paper-alt); }
.nav-toggle { display: none; background: none; border: none; color: var(--blue-dark); font-size: 1.5rem; cursor: pointer; }

/* dropdown (Makes / Categories) built with <details><summary> — no JS needed */
.nav-dropdown { position: relative; }
.nav-dropdown summary {
  list-style: none; cursor: pointer; color: var(--blue-dark); font-size: 0.92rem; font-weight: 500;
  padding: 10px 12px; border-radius: var(--radius); display: flex; align-items: center; gap: 5px;
}
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-dropdown summary::after { content: "▾"; font-size: 0.7em; color: var(--steel-light); }
.nav-dropdown summary:hover { color: var(--orange); background: var(--paper-alt); }
.nav-dropdown[open] summary { color: var(--orange); }
.dropdown-panel {
  position: absolute; top: 100%; left: 0; margin-top: 4px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(30,90,150,0.12); padding: 8px; min-width: 180px; z-index: 100;
}
.dropdown-panel a {
  display: block; padding: 8px 12px; color: var(--ink); text-decoration: none; font-size: 0.9rem; border-radius: var(--radius);
}
.dropdown-panel a:hover { background: var(--paper-alt); color: var(--orange); }

/* ===== Main content ===== */
main.wrap { padding: 40px 24px 70px; }
h1 { font-size: 2.3rem; margin: 0 0 6px; color: var(--blue-dark); }
h1::after { content: ""; display: block; width: 60px; height: 4px; margin-top: 14px; background: var(--orange); border-radius: 2px; }
.intro, .lede { color: var(--steel); font-size: 1.08rem; max-width: 68ch; }
.breadcrumb { font-size: 0.85rem; color: var(--steel-light); }
.breadcrumb a { color: var(--steel-light); text-decoration: none; }
.breadcrumb a:hover { color: var(--orange); }

/* sub-category pills */
.subcat-list { list-style: none; padding: 0; display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 30px; }
.subcat-list a {
  display: inline-block; padding: 9px 18px; background: var(--blue); color: #fff;
  text-decoration: none; font-family: 'Oswald', sans-serif; font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: 0.03em; border-radius: 20px;
}
.subcat-list a:hover { background: var(--orange); }

/* article grid / cards */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 26px; margin-top: 18px; }
.post-card {
  background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--orange);
  border-radius: var(--radius); overflow: hidden; transition: transform .15s ease, box-shadow .15s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(30,90,150,0.1); }
.post-card img { width: 100%; height: 160px; object-fit: cover; display: block; }
.post-card .card-body { padding: 14px 16px 18px; }
.post-card h3 { font-size: 1.02rem; margin: 0 0 8px; text-transform: none; letter-spacing: 0; color: var(--blue-dark); }
.post-card h3 a { color: var(--blue-dark); text-decoration: none; }
.post-card h3 a:hover { color: var(--orange); }
.post-card p { color: var(--steel); font-size: 0.9rem; margin: 0; }

/* single post */
.single-post .cats { text-transform: uppercase; font-size: 0.78rem; letter-spacing: 0.05em; }
.single-post .cats a { color: var(--blue); text-decoration: none; margin-right: 4px; }
.single-post img { max-width: 100%; height: auto; border-radius: var(--radius); margin: 14px 0; }
.single-post h2 { margin-top: 1.9em; font-size: 1.4rem; color: var(--blue-dark); }
.single-post h2::before { content: ""; display: inline-block; width: 18px; height: 3px; background: var(--orange); margin-right: 10px; vertical-align: middle; }
.video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 ratio, works in all browsers including old IE/Edge (no aspect-ratio dependency) */
  height: 0;
  margin-top: 22px;
  margin-bottom: 22px;
  overflow: hidden;
  background: #000;
  border-radius: var(--radius);
}
.video-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

/* ===== Homepage hero ===== */
.hero { background: var(--blue); color: #fff; padding: 56px 24px 46px; margin: -40px -24px 40px; }
.hero .wrap { padding: 0; }
.hero h1 { color: #fff; font-size: 2.7rem; max-width: 16ch; }
.hero h1::after { background: var(--orange); }
.hero p.intro { color: #dce6f0; font-size: 1.1rem; max-width: 55ch; }
.hero-stats { display: flex; gap: 36px; margin-top: 28px; flex-wrap: wrap; }
.hero-stats .num { font-family: 'Oswald', sans-serif; font-size: 2rem; color: var(--orange); font-weight: 600; display: block; }
.hero-stats .lbl { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: #b9c9db; }

/* ===== Footer (flex-wrap so it scales as more categories/makes are added) ===== */
.site-footer { background: var(--blue-dark); color: #cddbe9; margin-top: 40px; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 32px 48px; padding: 36px 24px 20px; }
.footer-grid > div:first-child { flex: 1 1 220px; }
.footer-grid > div { flex: 1 1 140px; }
.footer-grid h4 { color: #fff; font-size: 0.85rem; margin: 0 0 12px; }
.footer-grid a { display: block; color: #a8bbd0; text-decoration: none; font-size: 0.9rem; margin-bottom: 8px; }
.footer-grid a:hover { color: var(--orange); }
.disclaimer { font-size: 0.85rem; color: #a8bbd0; max-width: 32ch; }
.copyright { padding: 16px 24px; border-top: 1px solid #2a4b70; font-size: 0.8rem; color: #93a9c2; }

@media (max-width: 760px) {
  .main-nav { display: none; flex-direction: column; align-items: stretch; width: 100%; background: #fff; position: absolute; top: 62px; left: 0; padding: 10px 24px; z-index: 50; border-bottom: 1px solid var(--line); }
  .main-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .site-header { position: relative; }
  .dropdown-panel { position: static; box-shadow: none; border: none; padding-left: 12px; margin-top: 0; }
  .hero h1 { font-size: 2rem; }
}
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
