/* ============================================
   GLOBAL BASE STYLES
   ============================================ */

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

html, body{
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body{
  background: #111;
  color: #eee;
  font-family: Arial, sans-serif;

  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Main content area */
main{
  flex: 1;
  min-height: 0;

  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 26px 20px;
}

/* Wrappers should never overflow the viewport */
.content-wrapper,
.home-wrapper{
  width: 100%;
}

/* ============================================
   HEADER
   ============================================ */

.iracing-logo{
  margin-left: auto;
}

.site-header{
  width: 100%;
  background: #000;
  color: #fff;
}

.header-top{
  display: flex;
  justify-content: center;
}

.header-inner{
  width: 100%;
  max-width: 1200px;
  padding: 14px 20px;

  display: flex;
  align-items: center;
  gap: 18px;

  /* This layout supports: left logo | centered nav | right logo */
  flex-wrap: wrap;
}

/* Baseline logo sizing */
.logo-link img{
  height: 38px;
  display: block;
}

/* Make your league logo a bit more prominent */
.site-logo img{
  height: 42px;
}

/* iRacing logo: secondary + slightly smaller */
.iracing-logo img{
  height: 30px;
  opacity: 0.85;
}

/* Center the nav and let it occupy the “middle” space */
.main-nav{
  flex: 1;                 /* take the middle space */
  display: flex;
  justify-content: center; /* center its contents */
}

.iracing-logo{
  position: relative;
  display: inline-flex;
  align-items: center;
}

.iracing-logo img{
  height: 30px;
  opacity: 0.85;
}

.iracing-tip{
  position: absolute;
  right: 0;
  top: 110%;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(0,0,0,0.72);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.iracing-logo:hover .iracing-tip,
.iracing-logo:focus-visible .iracing-tip{
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px){
  .iracing-logo{
    display: none;
  }
}

/* FIXED: list layout belongs on the UL */
.main-nav > ul{
  display: flex;
  flex-wrap: wrap;
  gap: 16px;

  list-style: none;
  margin: 0;
  padding: 0;

  justify-content: center;
}

/* FIXED: link styling belongs on the A */
.main-nav a{
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;

  color: #e8e8e8;
  text-decoration: none;

  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}

.main-nav a:hover{
  color: #fff;
  border-bottom-color: #e60000;
}

.main-nav a.nav-nextgen:hover{ border-bottom-color: #ff0020; }
.main-nav a.nav-oreilly:hover{ border-bottom-color: #0af10a; }
.main-nav a.nav-trucks:hover { border-bottom-color: #1078fc; }

/* Push the iRacing logo to the far right */
.iracing-logo{
  margin-left: auto;
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* Tooltip: “Powered by iRacing” */
.iracing-tip{
  position: absolute;
  right: 0;
  top: 110%;
  white-space: nowrap;

  padding: 6px 10px;
  border-radius: 10px;

  font-size: 12px;
  font-weight: 700;

  background: rgba(0,0,0,0.72);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;

  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.iracing-logo:hover .iracing-tip,
.iracing-logo:focus-visible .iracing-tip{
  opacity: 1;
  transform: translateY(0);
}

/* Hide iRacing logo on smaller screens */
@media (max-width: 768px) {
  .iracing-logo {
    display: none;
  }
}

/* Optional: on medium screens, keep header tidy if it wraps */
@media (max-width: 980px){
  .main-nav{
    flex-basis: 100%;
    order: 3;
  }
  .site-logo{ order: 1; }
  .iracing-logo{ order: 2; }
}

.header-gradient{
  height: 4px;
  background: linear-gradient(to right, #ff0020, #0af10a, #1078fc);

  /* Subtle broadcast-style shimmer */
  background-size: 220% 100%;
  animation: broadcastSweep 6s ease-in-out infinite;
}

.hero-separator{ margin-top: 0; }

@keyframes broadcastSweep{
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@media (prefers-reduced-motion: reduce){
  .header-gradient{ animation: none; }
}

/* ============================================
   SPONSOR STRIP (legal-safe system)
   Add this HTML anywhere globally (header partial or footer):
   <section class="sponsor-strip">
     <div class="sponsor-inner">
       <span class="sponsor-label">Sponsors</span>
       <div class="sponsor-logos">
         <a class="sponsor" href="..." target="_blank" rel="noopener">
           <img src="/assets/images/sponsors/example.png" alt="Example Sponsor">
         </a>
       </div>
     </div>
     <p class="sponsor-disclaimer">
       Sponsor logos are the property of their respective owners. Display does not imply endorsement by iRacing.
     </p>
   </section>
   ============================================ */

.sponsor-strip{
  border-top: 1px solid rgba(255,255,255,0.10);
  border-bottom: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.35);
}

.sponsor-inner{
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 16px;

  display: flex;
  align-items: center;
  gap: 14px;
}

.sponsor-label{
  font-weight: 900;
  letter-spacing: 0.3px;
  opacity: 0.85;
  white-space: nowrap;
}

.sponsor-logos{
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.sponsor img{
  height: 26px;
  width: auto;
  opacity: 0.9;
  transition: transform 140ms ease, opacity 140ms ease;
}

.sponsor:hover img{
  opacity: 1;
  transform: translateY(-1px);
}

.sponsor-disclaimer{
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px 10px;

  font-size: 12px;
  opacity: 0.7;
}

@media (max-width: 768px){
  .sponsor-inner{
    flex-direction: column;
    align-items: flex-start;
  }
  .sponsor img{
    height: 22px;
  }
}

/* ============================================
   HERO BANNERS
   Desktop only — mobile hidden
   ============================================ */

.hero-banner {
  overflow: hidden;
}

/* Image-based hero */
.hero-banner img,
.hero img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  object-position: center;
  display: block;
  margin-top: 0;
}

/* Desktop series heroes (CSS backgrounds) */
@media (min-width: 701px) {
  .hero-banner {
    display: block;
    width: 100%;
    height: 320px;
    margin-top: 0;

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }

  body.nextgen-page .hero-banner { background-image: url("/assets/images/hero_nextgen.png"); }
  body.oreilly-page .hero-banner { background-image: url("/assets/images/hero_oreilly.png"); }
  body.trucks-page  .hero-banner { background-image: url("/assets/images/hero_trucks.png"); }

}

/* Mobile: hide hero entirely */
@media (max-width: 700px) {
  .hero-banner,
  .hero-banner img,
  .hero img {
    display: none !important;
  }
}

/* ============================================
   CONTENT HEADINGS
   ============================================ */

.content-wrapper h1 {
  text-align: center;
  font-size: 2.2rem;
  margin: 30px 0 10px;
  letter-spacing: 1px;
}

.series-subtext {
  text-align: center;
  opacity: 0.85;
  margin-bottom: 30px;
}

/* ============================================
   TABLES (Generic)
   ============================================ */


/* ============================================
   STANDINGS SCROLL SHELL (keeps left bar fixed)
   ============================================ */

.standings-shell{
  position: relative;
  overflow: hidden; /* clip rounded corners + fixed bar */
}

/* Inner scroller: only this scrolls */
.standings-scroll{
  overflow: auto;
}

table {
  width: 100%;
}

/* ============================================
   ROSTER / GRID ROWS (Desktop-first)
   ============================================ */

.driver-grid{
  display: grid;
  gap: 12px;
}

/* Fixed name column so long names never shift the car grid */
.driver-row{
  display: grid;
  grid-template-columns: 240px 1fr 1fr 1fr;
  gap: 14px;
  align-items: center;

  padding: 14px;
  border-radius: 14px;

  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.10);
}

.driver-row:hover{
  background: rgba(255,255,255,0.06);
}

/* Name cell */
.col-driver{
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-size: 1.05rem;

  max-width: 100%;
  overflow: hidden;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;          /* standard property */
  line-height: 1.12;
}


/* Make car tiles feel big and consistent on desktop */
.car-image{
  width: 100%;
  aspect-ratio: 16 / 6;   /* adjust: 16/5 taller, 16/7 shorter */
  object-fit: cover;
  object-position: center;

  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  display: block;
}

/* If you still want *some* mobile support:
   name + 2 cars on tablets, stack on very small */
@media (max-width: 1000px){
  .driver-row{
    grid-template-columns: 220px 1fr 1fr;
  }
}

@media (max-width: 650px){
  .driver-row{
    grid-template-columns: 1fr;
  }
}

/* ============================================
   FOOTER (TRUE STICKY FOOTER — OPTION B)
   ============================================ */

/* Footer wrapper */
.sticky-footer{
  width: 100%;
  background: #1a1a1a;
  border-top: 3px solid #333;
}

/* Main footer row */
.footer-inner{
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 20px 10px;

  display: grid;
  grid-template-columns: 1fr auto 1fr; /* left spacer | centered text | right icons */
  align-items: center;
  gap: 16px;
}

/* Right-side icons */
.footer-right{
  display: flex;
  gap: 12px;
  align-items: center;
}

.footer-right img{
  width: 28px;
  height: 28px;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.footer-right img:hover{
  opacity: 1;
  transform: translateY(-1px);
}

.footer-left{
  grid-column: 2;          /* force the copyright into the center column */
  text-align: center;
}

.footer-right{
  grid-column: 3;          /* icons stay on the right */
  justify-self: end;

  display: flex;
  gap: 12px;
  align-items: center;
}

/* Legal disclaimer line */
.footer-legal{
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px 16px;

  border-top: 1px solid rgba(255,255,255,0.08);

  font-size: 12px;
  line-height: 1.45;
  opacity: 0.6;
  text-align: center;
}

/* Mobile */
@media (max-width: 600px){
  .footer-inner{
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    padding-bottom: 12px;
  }
}

/* ============================================
   HOMEPAGE — SERIES GRID (clean overlay + 2 CTAs)
   ============================================ */

.series-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 40px auto;
  max-width: 1100px;
  padding: 0 20px;
}

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

/* Card shell */
.series-card{
  position: relative; /* required for overlay link */
  border-radius: 8px;

  border: 3px solid #222;
  padding: 20px;
  text-align: center;
  color: #fff;

  transition: transform 0.2s ease, opacity 0.2s ease;
  overflow: hidden;
}

/* Full-card link to Schedule (overlay) */
.series-card .card-link{
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 8px;
}

/* Ensure visible content is above overlay */
.series-card h2,
.series-card p,
.series-card .green-flag,
.series-card .card-actions{
  position: relative;
  z-index: 2;
}

.series-card:hover{
  transform: translateY(-4px);
  opacity: 0.95;
}

.series-card h2{
  margin: 0 0 10px;
  font-size: 1.4rem;
}

.series-card p{
  margin: 4px 0;
  opacity: 0.9;
}

/* Optional “green flag” pill (safe if you use it) */
.series-card .green-flag{
  display: inline-block;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 800;
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.16);
}

/* CTA row */
.series-card .card-actions{
  margin-top: 14px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* CTA buttons baseline (so hover is clear) */
.series-card .cta{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 10px 12px;
  border-radius: 10px;

  font-weight: 900;
  letter-spacing: 0.2px;
  text-decoration: none;
  color: #fff;

  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.18);

  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  cursor: pointer;
}

/* Only the hovered CTA highlights */
.series-card .cta:hover{
  transform: translateY(-1px);
  background: rgba(0,0,0,0.35);
  border-color: rgba(255,255,255,0.28);
}

/* IMPORTANT: hovering the card should NOT make both CTAs look active */
.series-card:hover .cta{
  transform: none;
  background: rgba(0,0,0,0.22);
  border-color: rgba(255,255,255,0.18);
}

/* Full-color series cards */
.series-card.nextgen{ background-color: #c62828; border-color: #c62828; }
.series-card.oreilly{ background-color: #2e7d32; border-color: #2e7d32; }
.series-card.trucks { background-color: #1565c0; border-color: #1565c0; }

/* Keep text bright on full-color cards */
.series-card.nextgen h2,
.series-card.nextgen p,
.series-card.oreilly h2,
.series-card.oreilly p,
.series-card.trucks h2,
.series-card.trucks p{
  color: #fff;
}

/* Fixed left accent bar (attach to shell, not the scroller) */
body.nextgen-page .standings-shell::before,
body.oreilly-page .standings-shell::before,
body.trucks-page  .standings-shell::before{
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  opacity: 0.8;
  border-radius: 16px 0 0 16px;
  pointer-events: none;
  z-index: 2;
}

body.nextgen-page .standings-shell::before{ background: #c62828; }
body.oreilly-page .standings-shell::before{ background: #2e7d32; }
body.trucks-page  .standings-shell::before{ background: #1565c0; }

/* Prevent table content from sitting under the bar (match bar width) */
.standings-scroll{
  padding-left: 14px;
  position: relative;
  z-index: 1;
}

/* ============================================
   UPDATES (Homepage teaser + Series accordion placeholder)
   ============================================ */

.updates-card{
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  border-radius: 16px;
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.updates-card-head h3{ margin: 0 0 6px; font-size: 1.25rem; }
.updates-sub{ margin: 0 0 14px; opacity: 0.85; }

.updates-feed{
  display: block;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.25);
  padding: 14px;
}

.updates-empty h4{ margin: 0 0 6px; font-size: 1.05rem; }
.updates-empty p{ margin: 0; opacity: 0.85; }

/* Homepage teaser */
.home-updates{
  width: 100%;
  max-width: 1200px;
  margin: 40px auto 0;
  padding: 0 20px;
}

.home-updates h2{
  text-align: center;
  margin-bottom: 16px;
  font-size: 1.6rem;
}

.home-updates-card{
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  border-radius: 16px;
  padding: 18px;
}

.home-updates-list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.home-update-item{
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.25);
}

.update-pill{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  letter-spacing: 0.6px;
  font-size: 0.72rem;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
}

.update-pill.recap{ color: #ffb3bb; }
.update-pill.penalties{ color: #b9ffb9; }
.update-pill.updates{ color: #bcd7ff; }

.update-text{ opacity: 0.92; }

.home-updates-actions{
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.btn-link{
  display: inline-block;
  text-decoration: none;
  font-weight: 800;
  color: #e8e8e8;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}

.btn-link:hover{
  color: #fff;
  border-bottom-color: #e60000;
}

/* Accordion items */
.update-acc-item{
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.02);
  border-radius: 14px;
  overflow: hidden;
}

.update-acc-item + .update-acc-item{ margin-top: 10px; }

.update-acc-summary{
  cursor: pointer;
  list-style: none;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 12px 12px;
}

.update-acc-summary::-webkit-details-marker{ display:none; }

.update-acc-main{
  display: grid;
  gap: 4px;
}

.update-acc-title{
  font-weight: 900;
  letter-spacing: 0.2px;
}

.update-acc-meta{
  font-size: 0.85rem;
  opacity: 0.75;
}

.update-acc-summarytext{
  opacity: 0.9;
}

.update-acc-chevron{
  opacity: 0.75;
  transform: rotate(0deg);
  transition: transform 0.15s ease;
  padding-top: 2px;
}

.update-acc-item[open] .update-acc-chevron{
  transform: rotate(180deg);
}

.update-acc-body{
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.home-update-link{
  color: #e8e8e8;
  text-decoration: none;
  font-weight: 800;
  border-bottom: 2px solid transparent;
  padding-bottom: 1px;
}

.home-update-link:hover{
  color: #fff;
  border-bottom-color: #e60000;
}

.home-update-date{
  display: inline-block;
  margin-left: 10px;
  font-size: 0.85rem;
  opacity: 0.75;
}

/* =========================
   SERIES CARDS (Homepage) – ESPN / Broadcast panels
   Background assumed: #111111
   Drop-in replacement (no color-mix)
   ========================= */

.series-grid{
  width: 100%;
  max-width: 1200px;
  margin: 40px auto 60px;
  padding: 0 20px;

  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

/* Card base (panel) */
.series-card{
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;

  padding: 20px 20px 18px;
  border-radius: 12px;

  text-decoration: none;
  color: #f3f5f7;

  /* Background comes from series-specific rules below */
  background: #2a2a2a;

  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 18px 45px rgba(0,0,0,0.55);

  overflow: hidden;
  transform: translateY(0);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

/* Strong broadcast top bar */
.series-card::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 10px;
  background: rgba(255,255,255,0.35);
}

/* Diagonal broadcast stripe (subtle texture) */
.series-card::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    transparent 0%,
    transparent 55%,
    rgba(255,255,255,0.07) 60%,
    transparent 65%,
    transparent 100%);
  opacity: 0.9;
  pointer-events: none;
}

.series-card:hover{
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.16);
  box-shadow: 0 24px 60px rgba(0,0,0,0.65);
}

.series-card h2{
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0.2px;
  line-height: 1.1;
}

.series-card p{
  margin: 0;
  opacity: 0.92;
  line-height: 1.35;
}

/* Green flag pill */
.series-card .green-flag{
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 10px 12px;
  border-radius: 10px;

  font-weight: 800;
  font-size: 0.95rem;

  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.14);
}

/* Indicator dot */
.series-card .green-flag::before{
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.55);
}

/* CTA (only styles if you add <span class="cta">View series →</span>) */
.series-card .cta{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;

  font-weight: 850;
  letter-spacing: 0.2px;

  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.14);
  color: #ffffff;

  transform: translateY(0);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.series-card:hover .cta{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.18);
}

/* Per-series broadcast panels (ESPN-ish) */
.series-card.nextgen{
  background: linear-gradient(180deg, #cc2a2a, #b42424);
}
.series-card.oreilly{
  background: linear-gradient(180deg, #2f7d32, #256628);
}
.series-card.trucks{
  background: linear-gradient(180deg, #1e6dc1, #165aa3);
}

/* Keyboard focus */
.series-card:focus-visible{
  outline: 3px solid rgba(255,255,255,0.35);
  outline-offset: 3px;
}

/* Responsive */
@media (max-width: 980px){
  .series-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px){
  .series-grid{ grid-template-columns: 1fr; }
}

/* =========================
   SCHEDULE PAGES – Shared layout (scoped)
   Applies only to schedule pages via body class
   ========================= */

body.nextgen-page .content-wrapper,
body.oreilly-page .content-wrapper,
body.trucks-page .content-wrapper{
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 26px 20px 70px;
}

/* Standard page title + subtext */
body.nextgen-page .series-subtext,
body.oreilly-page .series-subtext,
body.trucks-page .series-subtext{
  margin: 8px 0 18px;
  opacity: 0.85;
  line-height: 1.35;
}

/* Section headings */
body.nextgen-page .schedule-section h2,
body.nextgen-page .standings-section h2,
body.nextgen-page .updates-section h2,
body.oreilly-page .schedule-section h2,
body.oreilly-page .standings-section h2,
body.oreilly-page .updates-section h2,
body.trucks-page .schedule-section h2,
body.trucks-page .standings-section h2,
body.trucks-page .updates-section h2{
  margin: 28px 0 14px;
  font-weight: 900;
  letter-spacing: 0.2px;
}

/* Card grid wrapper for schedule cards */
body.nextgen-page .schedule-card-grid,
body.oreilly-page .schedule-card-grid,
body.trucks-page .schedule-card-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 980px){
  body.nextgen-page .schedule-card-grid,
  body.oreilly-page .schedule-card-grid,
  body.trucks-page .schedule-card-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px){
  body.nextgen-page .schedule-card-grid,
  body.oreilly-page .schedule-card-grid,
  body.trucks-page .schedule-card-grid{
    grid-template-columns: 1fr;
  }
}

/* Standings shell consistent treatment */
body.nextgen-page .standings-shell,
body.oreilly-page .standings-shell,
body.trucks-page .standings-shell{
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 18px 45px rgba(0,0,0,0.45);
  overflow: hidden;
}

body.nextgen-page .standings-scroll,
body.oreilly-page .standings-scroll,
body.trucks-page .standings-scroll{
  overflow: auto;
  max-height: 520px;
}

/* Table base (series CSS can still colorize via .nextgen-table, etc) */
body.nextgen-page .schedule-table,
body.oreilly-page .schedule-table,
body.trucks-page .schedule-table{
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}

body.nextgen-page .schedule-table thead th,
body.oreilly-page .schedule-table thead th,
body.trucks-page .schedule-table thead th{
  text-align: left;
  padding: 14px 14px;
  font-weight: 900;
  letter-spacing: 0.25px;

  background: rgba(0,0,0,0.35);
  border-bottom: 1px solid rgba(255,255,255,0.10);
  position: sticky;
  top: 0;
  z-index: 2;
}

body.nextgen-page .schedule-table tbody td,
body.oreilly-page .schedule-table tbody td,
body.trucks-page .schedule-table tbody td{
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  vertical-align: middle;
}

body.nextgen-page .schedule-table tbody tr:hover,
body.oreilly-page .schedule-table tbody tr:hover,
body.trucks-page .schedule-table tbody tr:hover{
  background: rgba(255,255,255,0.04);
}

/* ============================================
   SERIES SELECTOR (tabs) — single source of truth
   ============================================ */
.series-selector{
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0 22px;
}

.series-selector a{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0.2px;

  color: #fff;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.series-selector a:hover{
  background: rgba(255,255,255,0.12);
  border-color: var(--series-accent);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.10);
  transform: translateY(-1px);
}

.series-selector a.active{
  background: rgba(0,0,0,0.28);
  border-color: var(--series-accent);
  box-shadow: inset 0 0 0 2px var(--series-accent);
}

/* ============================================
   Series accent colors (global)
   ============================================ */
.nextgen-page { --series-accent:#e53935; }
.oreilly-page { --series-accent:#2ecc71; }
.trucks-page  { --series-accent:#1e88e5; }


/* =========================
   Header dropdown (About RFRL test)
   Click-to-toggle to avoid sticky hover on mobile
   ========================= */

.nav-dd{
  position: relative;
}

.nav-dd-btn{
  background: none;
  border: none;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.3px;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-caret{
  font-size: 0.85em;
  opacity: 0.8;
}

/* Dropdown menu */
.nav-dd-menu{
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 180px;

  list-style: none;
  margin: 0;
  padding: 8px;

  background: rgba(0,0,0,0.92);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(0,0,0,0.65);

  display: none;
  z-index: 9999; /* above hero + gradients */
}

.nav-dd.open .nav-dd-menu{
  display: block;
}

.nav-dd-menu li a{
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
}

.nav-dd-menu li a:hover{
  background: rgba(255,255,255,0.08);
}


/* =========================
   Nav readability tweak (desktop)
   ========================= */

.main-nav a,
.nav-dd-btn{
  font-size: 1.05rem;
  font-weight: 800;
  padding: 6px 2px;
}

.nav-dd-menu a{
  font-size: 0.95rem;
  font-weight: 700;
}


/* =========================
   Embedded Results (Series hub)
   ========================= */

/* Space above embedded results so it doesn't feel glued to the section above */
.results-embed{
  margin-top: 64px;
}

/* Base wrapper; border is applied per-series below */
.results-embed .panel-card{
  border-radius: 18px;
  padding: 2px; /* border thickness */
  background: transparent;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

/* Inner card/iframe masking (opaque so nothing bleeds through) */
.results-embed .iframe-wrap{
  border-radius: 16px;
  overflow: hidden;
  background: #0b0b0b;
}

/* Iframe sizing */
.results-embed iframe{
  width: 100%;
  height: 980px;
  border: 0;
  display: block;
  background: #0b0b0b;
}

@media (max-width: 700px){
  .results-embed iframe{ height: 1100px; }
}

/* Match Standings style: accent bar, not full border */

.results-embed .panel-card{
  border-radius: 18px;
  padding: 0;
  background: #121212;
  overflow: hidden;
}

/* Accent bar */
.results-embed .panel-accent{
  height: 3px;
  width: 100%;
}

/* Series colors */
.nextgen-page .results-embed .panel-accent{
  background: #e53935;
}

.oreilly-page .results-embed .panel-accent{
  background: #43a047;
}

.trucks-page .results-embed .panel-accent{
  background: #1e88e5;
}

/* Inner wrapper */
.results-embed .iframe-wrap{
  padding: 16px;
  background: #121212;
  border-radius: 0 0 18px 18px;
}

/* =========================================================
   Embedded Results – match Standings card style
   ========================================================= */

.results-embed .panel-card{
  background: #141414;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0,0,0,0.45);
}

/* Accent bar */
.results-embed .panel-accent{
  height: 3px;
  width: 100%;
}

/* Series colors */
.nextgen-page .results-embed .panel-accent{
  background: #e53935;
}

.oreilly-page .results-embed .panel-accent{
  background: #43a047;
}

.trucks-page .results-embed .panel-accent{
  background: #1e88e5;
}

/* Inner spacing so iframe breathes */
.results-embed .iframe-wrap{
  padding: 16px;
  background: #141414;
}

/* Make the Results accent feel like Standings */
.results-embed .panel-accent{
  height: 2px;
  opacity: 0.85;
}

/* Reduce the “divider” vibe and make it sit with the card */
.results-embed .panel-card{
  margin-top: 10px;
}


