/* ═══════════════════════════════════════════════════════════════
   DIRT BIKE ROUNDUP — REDESIGN CSS
   Design System: Saira Condensed + Space Grotesk
   Colors: #CC1A1A (accent), #111 (dark), #F5F5F5 (alt bg), #E0E0E0 (borders)
   ═══════════════════════════════════════════════════════════════ */

/* ── Legacy font-faces (kept for other pages during transition) ── */

@font-face {
  font-family: "old-spirits";
  src: url('../fonts/OldSpirits.eot');
  src: url('../fonts/OldSpirits.woff') format("woff"),
    url('../fonts/OldSpirits.ttf') format("opentype"),
    url('../fonts/OldSpirits.svg#OldSpirits') format("svg");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "old-spirits-inked-two";
  src: url('../fonts/OldSpirits-InkedTwo.eot');
  src: url('.../fonts/OldSpirits-InkedTwo.woff') format("woff"),
    url('../fonts/OldSpirits-InkedTwo.ttf') format("opentype"),
    url('../fonts/OldSpirits-InkedTwo.svg#OldSpirits-InkedTwo') format("svg");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'oatmeal-stout-aged';
  src: url('../fonts/oatmealstout-aged-webfont.woff2') format('woff2'),
    url('../fonts/oatmealstout-aged-webfont.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'oatmeal-stout-aged-rough';
  src: url('../fonts/oatmealstoutagedrough-regular-webfont.woff2') format('woff2'),
    url('../fonts/oatmealstoutagedrough-regular-webfont.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'oatmeal-stout-regular';
  src: url('../fonts/oatmealstout-regular-webfont.woff2') format('woff2'),
    url('../fonts/oatmealstout-regular-webfont.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'oatmeal-stout-rough';
  src: url('../fonts/oatmealstout-rough-webfont.woff2') format('woff2'),
    url('../fonts/oatmealstout-rough-webfont.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'oatmeal-stout-shadow-regular';
  src: url('../fonts/oatmealstoutshadow-regular-webfont.woff2') format('woff2'),
    url('../fonts/oatmealstoutshadow-regular-webfont.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "barbaro";
  src: url('../fonts/barbaro.ttr');
  src: url('../fonts/barbaro.ttf') format("opentype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "montserrat-light";
  src: url("../fonts/Montserrat/static/Montserrat-Light.ttf") format("opentype");
}

@font-face {
  font-family: "montserrat-thin";
  src: url("../fonts/Montserrat/static/Montserrat-Thin.ttf") format("opentype");
}

@font-face {
  font-family: "montserrat-thin-ilatic";
  src: url("../fonts/Montserrat/static/Montserrat-ThinItalic.ttf") format("opentype");
}

@font-face {
  font-family: "montserrat-thin-italic";
  src: url("../fonts/Montserrat/static/Montserrat-LightItalic.ttf") format("opentype");
}


/* ═══════════════════════════════════════════════════════════════
   NEW DESIGN SYSTEM — GLOBAL
   ═══════════════════════════════════════════════════════════════ */

:root {
  --accent: #CC1A1A;
  --accent-hover: #e52020;
  --dark: #111111;
  --text: #111111;
  --text-secondary: #666666;
  --text-muted: #888888;
  --text-faint: #999999;
  --bg-alt: #F5F5F5;
  --border: #E0E0E0;
  --font-heading: 'Saira Condensed', sans-serif;
  --font-body: 'Space Grotesk', sans-serif;
}

body {
  margin: 0;
  padding: 0;
  background-color: #fff;
  font-family: var(--font-body);
  color: var(--text);
}

#home-body {
  background-color: var(--dark);
}

main {
  margin: 0;
  padding: 0;
}

/* Remove spacing from navbar wrapper row used on some pages */
main > .row:first-child {
  margin: 0;
  padding: 0;
}

/* Eliminate thin gap between navbar and content on quiz/other pages */
main > .row:first-child + body,
main > .row:first-child ~ body {
  margin-top: 0;
}

#quiz-body #quiz-container {
  margin-top: 0;
  padding-top: 0;
}


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


/* ═══════════════════════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════════════════════ */

#navbar-custom {
  background-color: var(--dark) !important;
  padding: 0 16px;
  height: auto;
  min-height: 80px;
  border: none;
  z-index: 1030;
  align-items: center;
}

#navbar-custom .navbar-brand {
  padding: 0;
}

#navbar-logo {
  height: 123px;
  width: auto;
}

#navbar-custom .nav-link {
  font-family: var(--font-body);
  font-size: 13px;
  color: #999 !important;
  letter-spacing: 0.02em;
  transition: color 0.15s;
  text-transform: none;
}

#navbar-custom .nav-link:hover {
  color: #fff !important;
}

#navbar-custom .nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 9px 28px !important;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.06em;
  transition: background 0.2s;
  text-decoration: none;
}

#navbar-custom .nav-cta:hover {
  background: var(--accent-hover);
  color: #fff !important;
}

#navbar-custom .navbar-toggler {
  border-color: rgba(255,255,255,0.3);
}

#navbar-custom .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.7%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}


/* ═══════════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════════ */

#hero-section {
  position: relative;
  min-height: 580px;
  display: flex;
  align-items: center;
  margin-top: 130px;
  background-image: url('https://firebasestorage.googleapis.com/v0/b/dirt-bike-roundup-2023.appspot.com/o/images%2Flanding-bg-simple.webp?alt=media&token=da9e7193-79c8-403c-b9cb-0ac637d036d5');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  padding: 80px 80px;
  max-width: 900px;
}

.accent-bar {
  width: 4px;
  min-height: 180px;
  background: var(--accent);
  flex-shrink: 0;
  margin-right: 32px;
}

.hero-text {
  padding-top: 8px;
}

.hero-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(42px, 6vw, 80px);
  color: #fff;
  line-height: 0.92;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0 0 24px 0;
}

.hero-title .text-accent {
  color: var(--accent);
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: 17px;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
  max-width: 480px;
  margin: 0 0 36px 0;
}

.btn-primary-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  padding: 16px 44px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: background 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary-cta:hover {
  background: var(--accent-hover);
  color: #fff;
  text-decoration: none;
}


/* ═══════════════════════════════════════════════════════════════
   SHARED SECTION STYLES
   ═══════════════════════════════════════════════════════════════ */

.section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.accent-bar-sm {
  width: 4px;
  height: 32px;
  background: var(--accent);
  flex-shrink: 0;
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 40px);
  color: var(--text);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0;
  line-height: 1;
}

.section-body {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 480px;
}

.btn-outline-cta {
  display: inline-flex;
  padding: 12px 36px;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-outline-cta:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}


/* ═══════════════════════════════════════════════════════════════
   TRAIL SECTION (Where Will Your Trail Lead?)
   ═══════════════════════════════════════════════════════════════ */

#trail-section {
  background: var(--bg-alt);
  padding: 60px 0;
  overflow: hidden;
}

.trail-section-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
}

.trail-text-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 440px;
}

.trail-img-col {
  flex: 0 0 auto;
  width: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trail-img-col a {
  display: block;
}

.trail-hero-img {
  width: 100%;
  height: auto;
  max-width: 380px;
  transition: transform 0.4s;
}

.trail-img-col:hover .trail-hero-img {
  transform: scale(1.03);
}


/* ═══════════════════════════════════════════════════════════════
   LEGACY BUYERS GUIDES
   ═══════════════════════════════════════════════════════════════ */

#legacy-section {
  background: #fff;
  padding: 80px 0;
}

.legacy-card {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 0;
  text-decoration: none;
  height: 340px;
  transition: transform 0.2s;
}

.legacy-card:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.legacy-card-img {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.legacy-card-img img {
  width: 100%;
  height: 100%;
  object-position: center 80%;
  object-fit: cover;
  filter: sepia(0.15) saturate(0.9);
  transition: transform 0.4s;
}

.legacy-card:hover .legacy-card-img img {
  transform: scale(1.04);
}

/* Gradient overlay for text readability */
.legacy-card-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 28px;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
  z-index: 1;
}

.legacy-card-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 32px;
  color: #fff;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0 0 6px 0;
}

.legacy-card-desc {
  font-family: var(--font-body);
  font-size: 17px;
  color: rgba(255,255,255,0.75);
  line-height: 1.5;
  margin: 0;
}

/* Smaller variant for legacy landing page */
.legacy-card-sm {
  height: 260px;
}

.legacy-card-sm .legacy-card-title {
  font-size: 26px;
}

.legacy-card-sm .legacy-card-desc {
  font-size: 15px;
}


/* ═══════════════════════════════════════════════════════════════
   RECENT ARTICLES
   ═══════════════════════════════════════════════════════════════ */

#articles-section {
  background: var(--bg-alt);
  padding: 80px 0;
}

.see-all-link {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
  white-space: nowrap;
}

.see-all-link:hover {
  color: var(--accent-hover);
}

.articles-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article-row {
  display: flex;
  gap: 0;
  background: #fff;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s;
}

.article-row:hover {
  transform: translateX(4px);
  text-decoration: none;
  color: inherit;
}

.article-row-img {
  width: 260px;
  min-height: 170px;
  flex-shrink: 0;
  overflow: hidden;
}

.article-row-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.3) saturate(0.8);
}

.article-row-body {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 3px solid var(--accent);
}

.article-row-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 22px;
  color: var(--text);
  letter-spacing: 0.02em;
  margin: 0 0 8px 0;
}

.article-row-desc {
  font-family: var(--font-body);
  font-size: 14px;
  color: #777;
  line-height: 1.5;
  margin: 0 0 14px 0;
}

.article-row-date {
  font-family: var(--font-body);
  font-size: 12px;
  color: #bbb;
  letter-spacing: 0.02em;
}


/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */

#site-footer {
  background: var(--dark);
  padding: 52px 0;
}

.footer-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 36px;
}

.footer-brand {
  margin-bottom: 20px;
}

.footer-logo {
  height: 100px;
  width: auto;
  margin-bottom: 14px;
}

.footer-copyright {
  font-family: var(--font-body);
  font-size: 13px;
  color: #555;
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 32px;
  justify-content: center;
}

.footer-links a {
  font-family: var(--font-body);
  font-size: 13px;
  color: #777;
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-disclaimer {
  font-family: var(--font-body);
  font-size: 11px;
  color: #444;
  line-height: 1.7;
  border-top: 1px solid #222;
  padding-top: 24px;
}


/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {

  /* Navbar */
  #navbar-custom {
    height: auto;
    padding: 8px 12px;
  }

  #navbar-logo {
    height: 52px;
  }

  #navbar-custom .navbar-collapse {
    padding: 16px 0;
  }

  #navbar-custom .nav-link {
    font-size: 15px;
    padding: 8px 0 !important;
  }

  #navbar-custom .nav-cta {
    display: inline-block;
    margin-top: 8px;
    padding: 10px 24px !important;
    font-size: 15px;
  }

  /* Hero */
  #hero-section {
    min-height: 420px;
    padding-top: 70px;
    background-image: url('https://firebasestorage.googleapis.com/v0/b/dirt-bike-roundup-2023.appspot.com/o/images%2Flanding-bg-simple-mobile.webp?alt=media&token=cba132c1-0cf8-4644-b9fe-b1c49b356e4d');
  }

  .hero-content {
    padding: 48px 24px;
  }

  .accent-bar {
    min-height: 120px;
    margin-right: 20px;
  }

  .hero-subtitle {
    font-size: 15px;
  }

  .btn-primary-cta {
    padding: 14px 32px;
    font-size: 18px;
  }

  /* Trail section stacks on mobile */
  .trail-section-inner {
    flex-direction: column;
    gap: 32px;
    padding: 0 24px;
  }

  .trail-text-col {
    max-width: 100%;
  }

  .trail-img-col {
    width: 280px;
  }

  .trail-hero-img {
    max-width: 280px;
  }

  /* Sections */
  #legacy-section,
  #articles-section {
    padding: 48px 0;
  }

  .section-title {
    font-size: 26px;
  }

  /* Legacy cards */
  .legacy-card {
    height: 220px;
  }

  /* Articles — stack vertically on mobile */
  .article-row {
    flex-direction: column;
  }

  .article-row-img {
    width: 100%;
    height: 260px;
  }

  .article-row-body {
    border-left: none;
    border-top: 3px solid var(--accent);
    padding: 20px 24px;
  }

  .article-row:hover {
    transform: translateY(-2px);
  }

  /* Footer */
  #site-footer {
    padding: 36px 0;
  }

  .footer-top {
    flex-direction: column;
    gap: 24px;
  }

  .footer-links {
    gap: 20px;
    flex-wrap: wrap;
  }

  .see-all-link {
    font-size: 13px;
  }

  /* FAQ page — reduce stacked top margins */
  #faq-body .row[style*="margin-top"] {
    margin-top: 80px !important;
  }
  #faq-body #faq-container {
    margin-top: 20px !important;
  }

  /* Legacy bikes page — reduce top margin */
  #legacy-features-body section[style*="margin-top"] {
    margin-top: 100px !important;
  }

  /* Contact page — reduce top margins */
  #contactus-body .row[style*="margin-top"] {
    margin-top: 80px !important;
  }
  #contactus-body #faq-container {
    margin-top: 20px !important;
  }
  #contactus-body h1 {
    font-size: 36px !important;
  }

  /* Article images — full width on mobile */
  .article-body .float-md-start,
  .article-body .float-md-end {
    max-width: 100% !important;
    float: none !important;
    margin: 16px auto !important;
  }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 991px) {
  .hero-content {
    padding: 60px 48px;
  }

  .legacy-card {
    height: 240px;
  }

  .article-row-img {
    width: 200px;
  }
}


/* ═══════════════════════════════════════════════════════════════
   QUIZ PAGE REDESIGN
   Overrides legacy quiz styles with new design-system look.
   Scoped under #quiz-body for specificity.
   ═══════════════════════════════════════════════════════════════ */

/* ── Quiz body: remove old background image, clean white base ── */
#quiz-body {
  background: #fff !important;
  background-image: none !important;
  font-family: var(--font-body);
  color: var(--text);
  overflow-x: hidden;
}

/* ── Quiz container spacing ── */

/* Make quiz layout full-width so welcome hero isn't boxed in */
#quiz-body #quiz-container > .row > .col-md-2 {
  display: none;
}

#quiz-body #quiz-container > .row > .col-md-8 {
  flex: 0 0 100%;
  max-width: 100%;
  width: 100%;
  padding: 0;
}

#quiz-body #quiz-form-container,
#quiz-body #input-form {
  padding: 0;
  margin: 0;
  overflow: visible;
}

/* Hide whitespace around welcome hero and between hidden question divs */
#quiz-body #quiz-welcome .col-12.mt-5 {
  margin-top: 0 !important;
}

#quiz-body #input-form > br {
  display: none;
}

#quiz-body #quiz-welcome br {
  display: none;
}

/* ── Welcome / hero section ── */
#quiz-body #quiz-welcome {
  background-color: var(--dark);
  background-image: url('https://firebasestorage.googleapis.com/v0/b/dirt-bike-roundup-2023.appspot.com/o/images%2FAWP-119.webp?alt=media&token=8da7f97d-e5fd-478c-b9b1-f7719c3269be');
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  position: relative;
  color: #fff;
  font-family: var(--font-body);
  padding: 160px 24px 80px;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Dark overlay for readability */
#quiz-body #quiz-welcome::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 0;
}

/* Ensure content sits above overlay */
#quiz-body #quiz-welcome > * {
  position: relative;
  z-index: 1;
}

#quiz-body #quiz-welcome h3,
#quiz-body #quiz-welcome h3 span {
  font-family: var(--font-heading) !important;
  font-weight: 400;
  font-size: 1rem !important;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: #ccc;
  margin-bottom: 8px;
}

#quiz-body #quiz-welcome h4,
#quiz-body #quiz-welcome h4 span {
  font-family: var(--font-heading) !important;
  font-weight: 700;
  font-size: 3.5rem !important;
  line-height: 1.1 !important;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #fff;
  margin-bottom: 16px;
}

/* Color "Wizard" in red — relies on the text node order in HTML */
/* Since we can't change HTML, we apply red to the full h4 and use a gradient trick */
/* Actually, let's just keep it white for now; a JS-free approach isn't reliable here */

#quiz-body #quiz-welcome h6 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: #ccc;
  font-weight: 400;
  max-width: 540px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

#quiz-body #quiz-welcome h6 b {
  font-weight: 400;
}

/* Disclaimer text in welcome */
#quiz-body #quiz-welcome .container-fluid span {
  font-family: var(--font-body) !important;
  font-size: 0.8rem !important;
  color: #888;
  line-height: 1.5;
}

/* ── Start Quiz button ── */
#quiz-body .take-quiz-btn {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  background-color: var(--accent);
  color: #fff;
  border: none;
  margin: 0 auto;
  border-radius: 0;
  padding: 16px 56px;
  width: auto;
  height: auto;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#quiz-body .take-quiz-btn:hover {
  background-color: var(--accent-hover);
}

/* ── Learn More button ── */
#quiz-body .learn-more-btn {
  display: block;
  margin: 16px auto 28px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  background-color: transparent;
  color: #fff;
  border: 1px solid #fff;
  border-radius: 0;
  padding: 12px 36px;
  width: auto;
  height: auto;
  cursor: pointer;
  transition: all 0.2s ease;
}

#quiz-body .learn-more-btn:hover {
  background-color: #fff;
  color: var(--dark);
}

#quiz-body a:has(.learn-more-btn),
#quiz-body #quiz-welcome a {
  text-decoration: none;
}

/* ── Form container ── */
#quiz-body #quiz-form-container {
  background-color: #fff;
  color: var(--text);
  font-family: var(--font-body);
}

#quiz-body #input-form {
  font-family: var(--font-body);
  color: var(--text);
  background-color: #fff;
  border: none !important;
  margin-top: 0 !important;
  min-height: auto !important;
  overflow-y: auto;
}

/* ── Question containers: alternating backgrounds ── */
#quiz-body [id^="q-"] {
  padding: 90px 20px 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

#quiz-body #q-1   { background-color: var(--bg-alt); }
#quiz-body #q-1-1 { background-color: var(--bg-alt); }
#quiz-body #q-2   { background-color: var(--bg-alt); }
#quiz-body #q-3   { background-color: var(--bg-alt); }
#quiz-body #q-4   { background-color: var(--bg-alt); }
#quiz-body #q-5   { background-color: var(--bg-alt); }
#quiz-body #q-6   { background-color: var(--bg-alt); }
#quiz-body #q-7   { background-color: var(--bg-alt); }
#quiz-body #q-8   { background-color: var(--bg-alt); }

/* ── Question headers: accent bar + Saira Condensed ── */
#quiz-body .question-header {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.6rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text);
  text-align: center;
  position: relative;
  padding-top: 20px;
  margin-top: 32px;
}

#quiz-body .question-header::before {
  content: '';
  display: block;
  width: 48px;
  height: 4px;
  background-color: var(--accent);
  margin: 0 auto 16px;
}

/* Sub-headers */
#quiz-body .question-subheader {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0;
  color: var(--text-secondary);
  text-align: center;
}

/* ── Quiz option buttons (Bootstrap btn-check + btn-danger labels) ── */
#quiz-body .btn-check + .btn-danger {
  background-color: #fff !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  border-radius: 4px !important;
  font-family: var(--font-body);
  transition: border-color 0.2s ease, background-color 0.2s ease;
  box-shadow: none !important;
}

#quiz-body .btn-check + .btn-danger:hover {
  background-color: var(--bg-alt) !important;
  border-color: #ccc !important;
  color: var(--text) !important;
}

#quiz-body .btn-check:checked + .btn-danger,
#quiz-body .btn-check:active + .btn-danger {
  background-color: #fef2f2 !important;
  border: 2px solid var(--accent) !important;
  color: var(--accent) !important;
  box-shadow: none !important;
}

#quiz-body .btn-check:checked + .btn-danger .quiz-button-title,
#quiz-body .btn-check:active + .btn-danger .quiz-button-title {
  color: var(--accent);
}

/* Override Bootstrap focus styling */
#quiz-body .btn-check:focus + .btn-danger {
  box-shadow: 0 0 0 2px rgba(204, 26, 26, 0.25) !important;
}

/* ── Quiz button title text ── */
#quiz-body .quiz-button-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  color: var(--text);
}

/* Description spans inside buttons */
#quiz-body .btn-danger span[name$="btn-desc"] {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-secondary);
}

/* ── Next / Prev buttons ── */
/* Nav button row — flex layout for Prev / Next / Skip */
#quiz-body .col-12:has(.nextPrevButton) {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
}

#quiz-body .col-12:has(.nextPrevButton) p {
  width: 100%;
  text-align: center;
}

#quiz-body .col-12:has(.nextPrevButton) br {
  display: none;
}

/* When there's only one nav button (no Prev), push it right */
#quiz-body .col-12 > .nextPrevButton:first-child:not(:only-of-type) {
  /* Prev button — stays left */
}
#quiz-body .col-12 > .nextPrevButton:only-of-type {
  margin-left: auto;
}

#quiz-body .nextPrevButton {
  display: inline-block !important;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  background-color: var(--accent);
  color: #fff;
  border: none;
  border-radius: 0;
  padding: 12px 32px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#quiz-body .nextPrevButton:hover {
  background-color: var(--accent-hover);
}

/* ── Form selects inside quiz ── */
#quiz-body .form-select {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 14px;
  background-color: #fff;
  transition: border-color 0.2s ease;
}

#quiz-body .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(204, 26, 26, 0.15);
}

/* ── Button custom ── */
#quiz-body .button-custom {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  background-color: var(--accent);
  color: #fff;
  border: none;
  border-radius: 0;
  padding: 10px 24px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#quiz-body .button-custom:hover {
  background-color: var(--accent-hover);
}

#quiz-body .button-custom-red {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  background-color: var(--accent);
  color: #fff;
  border: none;
  border-radius: 0;
  padding: 10px 28px;
}

/* ── Submit button ── */
#quiz-body #submitBtn {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  background-color: var(--accent);
  color: #fff;
  border: none;
  border-radius: 0;
  padding: 14px 40px;
  height: auto;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#quiz-body #submitBtn:hover {
  background-color: var(--accent-hover);
}

#quiz-body #submitBtn:disabled {
  background-color: #ccc;
  color: #888;
  border-color: #ccc;
  cursor: not-allowed;
}

/* ── Results section ── */
#quiz-body #results {
  font-family: var(--font-body);
  color: var(--text);
  overflow-y: auto;
  border: none;
  padding: 40px 20px;
}

#quiz-body #results-table {
  width: 100%;
  table-layout: auto;
  font-family: var(--font-body);
  font-size: 0.9rem;
}

#quiz-body #results-table thead {
  background-color: var(--dark);
  color: #fff;
}

#quiz-body #results-table th {
  font-family: var(--font-heading);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.8rem;
  padding: 12px 10px;
  border-bottom: 2px solid var(--accent);
  width: auto;
  overflow: visible;
}

#quiz-body #results-table td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  width: auto;
  overflow: visible;
}

#quiz-body #results-table tbody tr:nth-child(even) {
  background-color: var(--bg-alt);
}

#quiz-body #results-table tbody tr:nth-child(odd) {
  background-color: #fff;
}

/* ── Quiz result badges ── */
.quiz-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 4px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  line-height: 1.3;
  color: #fff;
  max-width: 120px;
  white-space: normal;
  vertical-align: middle;
}

.quiz-badge svg {
  flex-shrink: 0;
}

/* Grade badges — larger text, no icon */
.quiz-badge[class*="badge-grade-"] {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  min-width: 48px;
  justify-content: center;
  max-width: none;
  padding: 6px 14px;
}

.badge-grade-app { background: #16a34a; }
.badge-grade-ap  { background: #22b556; }
.badge-grade-a   { background: #2fc960; }
.badge-grade-am  { background: #4dd470; }
.badge-grade-bp  { background: #7cc840; }
.badge-grade-b   { background: #e2b735; }
.badge-grade-bm  { background: #daa030; }
.badge-grade-cp  { background: #d48a28; }
.badge-grade-c   { background: #cc5c1a; }
.badge-grade-cm  { background: #c44020; }
.badge-grade-dp  { background: #b03020; }
.badge-grade-d   { background: #992218; }
.badge-grade-dm  { background: #881818; }
.badge-grade-f   { background: #661414; }

/* Key concern / indicator badges */
.badge-great       { background: #16a34a; }
.badge-warn-yellow { background: #e2b735; }
.badge-warn-amber  { background: #d48a28; }
.badge-warn-orange { background: #cc5c1a; }
.badge-info-blue   { background: #5588bb; }
.badge-info-purple { background: #6b5bbf; }

/* Past bike highlight in results table */
#quiz-body #results-table .past-bike-row {
  background-color: #e8e8e8 !important;
  font-style: italic;
}

/* Override table-dark and table-striped from Bootstrap when scoped to quiz */
#quiz-body .table-dark {
  --bs-table-bg: #fff;
  --bs-table-striped-bg: var(--bg-alt);
  --bs-table-color: var(--text);
  --bs-table-border-color: var(--border);
}

/* ── Bike wizard title ── */
#quiz-body #bike-wizard-title {
  font-family: var(--font-heading);
  color: #fff;
}

/* ── Welcome message ── */
#quiz-body #welcome-msg {
  font-family: var(--font-heading);
  color: #fff;
}

/* ── Quiz footer ── */
#quiz-body #footer-quiz {
  background-color: var(--dark);
  padding: 40px 0;
  height: auto;
}

/* ── Override legacy checked+label for quiz ── */
#quiz-body input:checked + label {
  background-color: #fef2f2 !important;
}

/* ── Results section fixes ── */
#quiz-body #results {
  color: var(--text);
}

#quiz-body #results .text-light {
  color: var(--text) !important;
}

#quiz-body #results .article-header {
  font-family: var(--font-heading);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  background-color: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

#quiz-body #results .article-header:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Feedback button */
#quiz-body #results .btn-danger {
  background-color: var(--accent) !important;
  border: none !important;
  font-family: var(--font-heading);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 0;
}

#quiz-body #results .btn-danger:hover {
  background-color: var(--accent-hover) !important;
}

/* ── Terms checkbox ── */
#quiz-body .form-check-input:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}

#quiz-body .form-check-input:focus {
  box-shadow: 0 0 0 2px rgba(204, 26, 26, 0.25);
  border-color: var(--accent);
}

/* ── Optional/skip text ── */
#quiz-body h5 {
  font-family: var(--font-body);
  font-weight: 500;
}

#quiz-body h6 {
  font-family: var(--font-body);
}

/* ── Show/Hide description buttons ── */
#quiz-body #q-1 .container > button,
#quiz-body #q-2 .container > button {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 0 !important;
}

/* ── Responsive overrides for quiz ── */
@media (max-width: 904px) {
  #quiz-body #quiz-container {
    margin-top: 0;
  }
  #quiz-body #quiz-welcome {
    padding-top: 100px;
  }
}

@media (min-width: 905px) {
  #quiz-body #quiz-container {
    margin-top: 0;
  }
}

@media (max-width: 576px) {
  #quiz-body #quiz-welcome h4,
  #quiz-body #quiz-welcome h4 span {
    font-size: 2.4rem !important;
    line-height: 1.1 !important;
  }

  #quiz-body .take-quiz-btn {
    padding: 14px 40px;
    font-size: 1rem;
  }

  #quiz-body .question-header {
    font-size: 1.3rem;
  }

  #quiz-body [id^="q-"] {
    padding: 60px 16px 28px;
  }
}


/* ═══════════════════════════════════════════════════════════════
   ARTICLE PAGES REDESIGN
   Override legacy fonts with new design system.
   ═══════════════════════════════════════════════════════════════ */

/* Body text — replace Mulish with Space Grotesk */
.article-body {
  font-family: var(--font-body) !important;
  color: var(--text);
  background-color: #fff !important;
  background-image: none !important;
}

#article-body {
  font-family: var(--font-body) !important;
  font-size: 16px;
  color: var(--text);
  line-height: 1.7;
}

/* Article title — replace barbaro/oatmeal-stout with Saira Condensed */
.article-header {
  font-family: var(--font-heading) !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em;
  color: var(--text) !important;
  text-transform: uppercase;
}

/* Main h1 title */
.article-body h1.article-header {
  font-size: 36px !important;
  line-height: 1.1;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--accent);
}

/* Date and back-link spans */
.article-body span.article-header {
  font-size: 14px !important;
  font-weight: 500 !important;
  text-transform: none;
  color: var(--text-secondary) !important;
}

/* Subheaders */
.article-subheader {
  font-family: var(--font-heading) !important;
  font-weight: 600;
  font-size: 22px;
  color: var(--text) !important;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Sidebar "In this article" */
#in-this-article h4 {
  font-family: var(--font-heading) !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

#list-example {
  font-family: var(--font-body) !important;
  font-weight: 400;
  font-size: 14px;
}

.list-group-item.active {
  background-color: var(--accent) !important;
  border-color: var(--accent) !important;
}

/* Floated image containers — ensure images fill width and captions stay below */
.article-body .float-md-start,
.article-body .float-md-end {
  max-width: 50%;
}

.article-body .float-md-start img,
.article-body .float-md-end img {
  display: block;
  margin: 0 auto;
}

/* Force captions below images, not beside them */
.article-body .float-md-start span,
.article-body .float-md-end span {
  display: block;
  clear: both;
}

/* Clear floats before subheaders so they don't wrap beside images */
.article-body .article-subheader {
  clear: both;
}

/* Article main column — clean white bg, no transparency */
#article-main-column {
  background-color: #fff !important;
}

#all-articles-main-column {
  background-color: #fff !important;
}


/* ═══════════════════════════════════════════════════════════════
   PRIVACY POLICY, TERMS & FAQ PAGES REDESIGN
   Override legacy fonts/dark overlay with clean white layout.
   ═══════════════════════════════════════════════════════════════ */

#faq-body {
  font-family: var(--font-body) !important;
  font-size: 16px;
  color: var(--text) !important;
  background-color: #fff !important;
  background-image: none !important;
}

#faq-main-column {
  background-color: #fff !important;
  color: var(--text) !important;
}

/* Page titles — replace barbaro */
#faq-body h3 {
  font-family: var(--font-heading) !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text) !important;
  font-size: 28px;
  border-bottom: 3px solid var(--accent);
  padding-bottom: 12px;
  display: inline-block;
}

/* FAQ section titles (h2) — replace barbaro */
#faq-body h2 {
  font-family: var(--font-heading) !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text) !important;
  font-size: 36px !important;
  border-bottom: 3px solid var(--accent);
  padding-bottom: 12px;
  display: inline-block;
}

/* FAQ question headings (h4) — replace Roboto Condensed */
#faq-body h4 {
  font-family: var(--font-heading) !important;
  font-weight: 600;
  font-size: 20px !important;
  color: var(--text) !important;
  letter-spacing: 0.02em;
}

/* Body text color fix (was white for dark bg) */
#faq-body p,
#faq-body li,
#faq-body span,
#faq-body div {
  color: var(--text) !important;
}

/* Links */
#faq-body a {
  color: var(--accent);
}

#faq-body a:hover {
  color: var(--accent-hover);
}


/* ═══════════════════════════════════════════════════════════════
   LEGACY STYLES — OTHER PAGES (quiz, articles, etc.)
   These are preserved from the original CSS so other pages
   continue to work during the transition.
   ═══════════════════════════════════════════════════════════════ */

h1 {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 60px;
}

/* Quiz body backgrounds */
@supports (-webkit-touch-callout: none) {
  #quiz-body {
    background-image: url('https://firebasestorage.googleapis.com/v0/b/dirt-bike-roundup-2023.appspot.com/o/images%2FAWP-119.webp?alt=media&token=8da7f97d-e5fd-478c-b9b1-f7719c3269be');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 45% 10%;
  }
}

@supports not (-webkit-touch-callout: none) {
  #quiz-body {
    background-image: url('https://firebasestorage.googleapis.com/v0/b/dirt-bike-roundup-2023.appspot.com/o/images%2FAWP-119.webp?alt=media&token=8da7f97d-e5fd-478c-b9b1-f7719c3269be');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center 10%;
    background-attachment: fixed;
  }
}

/* Article body backgrounds */
@media (max-width: 767px) {
  .article-body {
    background-image: url('https://firebasestorage.googleapis.com/v0/b/dirt-bike-roundup-2023.appspot.com/o/images%2FAWP-119-mobile.webp?alt=media&token=027c98e4-d9df-41c2-a454-2d0b30eb19a2');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center 10%;
    background-attachment: fixed;
  }
}

@media (min-width: 768px) {
  .article-body {
    background-image: url('https://firebasestorage.googleapis.com/v0/b/dirt-bike-roundup-2023.appspot.com/o/images%2FAWP-119_dark.webp?alt=media&token=28037b46-b267-434e-80db-cc122bcd6600');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center 10%;
    background-attachment: fixed;
    background-color: rgba(10,20,30,0.5);
  }
}

/* Quiz page margins */
@media (max-width: 904px) {
  #quiz-container {
    margin-top: 50px;
  }

  .article-body {
    margin-top: 100px;
  }
}

@media (min-width: 905px) {
  #quiz-container {
    margin-top: 70px;
  }

  .article-body {
    margin-top: 130px;
  }
}

.article-subheader {
  color: rgb(15, 15, 15);
  padding-top: 3em;
  margin-top: -3em;
}

/* Quiz buttons & form styles */
.take-quiz-btn {
  font-family: 'oatmeal-stout-regular';
  font-size: 40px;
  border-radius: 4px;
  background-color: rgb(0, 0, 0);
  color: white;
  border-color: rgb(173, 33, 28);
  border-width: 3px;
  width: 230px;
  height: 65px;
}

.take-quiz-btn2 {
  font-family: 'oatmeal-stout-regular';
  border-radius: 4px;
  background-color: rgb(173, 33, 28);
  color: rgb(255, 255, 255);
  border-color: #ffffff;
  border-width: 2px;
}

.learn-more-btn {
  font-family: 'oatmeal-stout-regular';
  font-size: 26px;
  border-radius: 4px;
  background-color: white;
  color: black;
  border-color: black;
  border-width: 3px;
  width: 160px;
  height: 45px;
}

#bike-wizard-title {
  font-family: 'Roboto Condensed', sans-serif;
  color: white;
}

.question-header {
  font-family: 'barbaro';
  letter-spacing: 1px;
  font-size: 2em;
}

.question-subheader {
  font-family: 'barbaro';
  letter-spacing: 1px;
  font-size: 1.2em;
}

.quiz-button-title {
  font-size: 1.3em;
  letter-spacing: 1px;
  font-style: bold;
  font-family: 'Roboto Condensed';
}

.btn-danger {
  background-color: rgba(255, 255, 255, 0.9);
  border: white;
  color: rgba(15, 15, 15);
  transition: all .3s;
}

.btn-danger:hover {
  background-color: rgb(173, 33, 28) !important;
}

input:checked+label {
  background-color: rgb(173, 33, 28) !important;
}

.button-custom {
  font-family: 'Ubuntu', sans-serif;
  font-weight: 300px;
  font-size: 16px;
  border-radius: 4px;
  background-color: white;
  color: rgb(15, 15, 15);
  border-color: white;
  border-width: 1px;
}

.button-custom-red {
  font-family: 'Ubuntu', sans-serif;
  font-weight: 300px;
  font-size: 18px;
  border-radius: 4px;
  background-color: rgb(173, 33, 28);
  color: white;
  border-color: rgb(173, 33, 28);
  border-width: 1px;
}

.nextPrevButton {
  font-family: 'Mulish';
  font-size: 20px;
  border-radius: 4px;
  background-color: rgb(173, 33, 28);
  color: white;
  border-color: rgb(173, 33, 28);
  border-width: 1px;
  width: auto;
  margin-top: 2px;
  font-style: bold;
}

#submitBtn {
  font-family: 'oatmeal-stout-regular', sans-serif;
  font-size: 24px;
  border-radius: 4px;
  background-color: white;
  color: rgba(209, 16, 0);
  border-color: rgb(173, 33, 28);
  border-width: 1px;
  width: auto;
  height: 2em;
}

#submitBtn:disabled {
  background-color: lightgray;
  color: gray;
  border-color: gray;
}

.form-inline .form-group {
  margin-right: 4px;
}

#welcome-msg {
  font-family: 'Roboto Condensed', sans-serif;
  color: white;
}

#article-main-column {
  background-color: rgba(255, 255, 255, 1.0);
}

#all-articles-main-column {
  background-color: rgba(255, 255, 255, 0.9);
}

#faq-main-column {
  background-color: rgba(15, 15, 15, 0.7);
}

#contactus-main-column {
  background-color: rgba(255, 255, 255, 0.6);
}

#quiz-form-container {
  font-family: 'Montserrat Light', sans-serif;
  font-weight: 300;
  font-size: 15px;
  color: rgba(15, 15, 15);
  background-color: rgba(14, 2, 1, 0.6);
}

#quiz-welcome {
  font-family: 'Montserrat Light', sans-serif;
}

#input-form {
  font-family: 'Mulish', sans-serif;
  font-weight: 500;
  font-size: 15px;
  overflow-y: scroll;
  border-color: rgb(15, 15, 15);
  border: 1px;
  color: rgb(255, 255, 255);
}

#results {
  font-family: 'Roboto Condensed', sans-serif;
  overflow-y: scroll;
  border-color: black;
  border: 1px;
}

#results-table {
  width: 100%;
  table-layout: auto;
}

#results-table th,
#results-table td {
  overflow: hidden;
}

#faq-body {
  font-family: 'montserrat-light';
  size: 16px;
  color: rgb(255, 255, 255);
  background-image: url("https://firebasestorage.googleapis.com/v0/b/dirt-bike-roundup-2023.appspot.com/o/images%2Ffaq-background2.png?alt=media&token=40443fcc-f2eb-467a-aaa7-c9fa4a6097b2");
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
}

#legacy-features-body {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text);
  background-color: #fff;
  background-image: none;
}

#contactus-body {
  font-family: var(--font-body);
  color: var(--text);
  background-color: #fff;
}

.article-header {
  font-family: 'oatmeal-stout-rough', sans-serif;
  color: rgb(15, 15, 15);
}

#article-body {
  font-family: 'Mulish';
  size: 16px;
  color: rgb(15, 15, 15);
}

#list-example {
  font-family: 'Ubuntu', sans-serif;
  font-weight: 300;
  font-size: 15px;
}

.list-group-item.active {
  background-color: rgb(21, 1, 22) !important;
  border-color: rgb(21, 1, 22) !important;
  color: white !important;
}

tr {
  line-height: 30px;
}

@media (max-width: 991px) {
  #in-this-article {
    display: none;
  }
}

@media screen and (max-width:767px) {
  iframe[src*="youtube"] {
    width: 100% !important;
  }
}

/* Old footer style (kept for other pages) */
#footer {
  background-color: rgba(0, 0, 0, 0.8);
  font-family: 'barbaro';
  font-weight: 300;
  color: rgb(255, 255, 255);
}

#footer-disclaimer {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 12px !important;
  color: rgb(255, 255, 255);
}

#footer-quiz {
  background-color: rgba(10, 20, 30);
  height: 300px;
}
