/* ============================================
   NEXTGEN SCHEDULE PAGE — Broadcast consistency
   Background assumed: #111111
   ============================================ */

body.nextgen-page {
  --series-accent: #c62828;
  --series-hero: url("/assets/images/hero_nextgen.png");
}

/* Wrapper */
body.nextgen-page .content-wrapper {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

/* Title + subtext */
body.nextgen-page .nextgen-header {
  text-align: center;
  font-size: 2.2rem;
  margin: 0 0 10px;
  letter-spacing: 1px;
}

body.nextgen-page .series-subtext {
  text-align: center;
  font-size: 1.1rem;
  opacity: 0.85;
  margin: 0 0 30px;
}

/* SERIES SELECTOR (tabs) — shared across series pages */
.series-selector{
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 34px;
}

.series-selector a{
  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 .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

/* use series accent on hover */
.series-selector a:hover{
  background: rgba(255,255,255,0.12);
  border-color: color-mix(in srgb, var(--series-accent) 70%, rgba(255,255,255,0.18));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--series-accent) 25%, transparent);
  transform: translateY(-1px);
}

/* active tab: accented outline + subtle inset */
.series-selector a.active{
  background: rgba(0,0,0,0.28);
  border-color: var(--series-accent);
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--series-accent) 45%, transparent),
    inset 0 0 0 2px color-mix(in srgb, var(--series-accent) 55%, transparent);
}

@supports not (color-mix(in srgb, #000 50%, #fff)) {
  .series-selector a:hover{
    border-color: rgba(255,255,255,0.22);
    box-shadow: 0 0 0 2px rgba(255,255,255,0.16);
  }
  .series-selector a.active{
    border-color: rgba(255,255,255,0.28);
    box-shadow: inset 0 0 0 2px rgba(255,255,255,0.18);
  }
}

/* ============================================
   SECTION DIVIDERS
   ============================================ */

body.nextgen-page .section-break {
  height: 3px;
  width: 100%;
  margin: 40px 0;
  border-radius: 3px;
}

body.nextgen-page .nextgen-divider {
  background: var(--series-accent);
}

/* ============================================
   SECTION HEADINGS
   ============================================ */

body.nextgen-page .schedule-section h2,
body.nextgen-page .standings-section h2,
body.nextgen-page .news-section h2 {
  text-align: center;
  margin: 0 0 20px;
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.2px;
}

/* ============================================
   SCHEDULE CARDS
   ============================================ */

body.nextgen-page .schedule-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 700px) {
  body.nextgen-page .schedule-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  body.nextgen-page .schedule-card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

body.nextgen-page .schedule-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  padding: 18px;
  position: relative;
  overflow: hidden;

  box-shadow: 0 18px 45px rgba(0,0,0,0.45);
  transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.2s ease;
}

/* Accent top bar */
body.nextgen-page .schedule-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 8px;
  width: 100%;
  background: var(--series-accent);
}

body.nextgen-page .schedule-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.16);
  box-shadow:
    0 24px 60px rgba(0,0,0,0.55),
    0 0 18px rgba(0,0,0,0.25);
}

body.nextgen-page .schedule-card h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

body.nextgen-page .schedule-card p {
  margin: 4px 0;
  opacity: 0.88;
}

/* Accent date line */
body.nextgen-page .schedule-card .race-date {
  color: var(--series-accent);
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 8px;
}

body.nextgen-page .schedule-card .race-date::before {
  content: "";
  width: 9px;
  height: 9px;
  background: var(--series-accent);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.55);
}

/* Badges (Upcoming / Completed) */
body.nextgen-page .schedule-badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.2px;
  margin-bottom: 10px;
  color: #fff;
}

body.nextgen-page .schedule-badge.upcoming {
  background: var(--series-accent);
}

body.nextgen-page .schedule-badge.completed {
  background: #555;
}

/* ============================================
   STANDINGS (consistent card + sticky header)
   ============================================ */

body.nextgen-page .standings-shell {
  position: relative;
  border-radius: 16px;
  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-shell::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 5px;
  background: var(--series-accent);
}

body.nextgen-page .standings-scroll {
  max-height: 520px;
  overflow: auto;
  padding-left: 14px;
}

body.nextgen-page .standings-scroll .schedule-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: transparent;
  border: none;
}

body.nextgen-page .standings-scroll .schedule-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;

  background: rgba(0,0,0,0.90);
  backdrop-filter: blur(6px);
  color: #fff;

  padding: 14px 12px;
  text-align: center;

  font-weight: 900;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;

  border-bottom: 1px solid rgba(255,255,255,0.14);
}

body.nextgen-page .standings-scroll .schedule-table td {
  padding: 13px 12px;
  text-align: center;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

body.nextgen-page .standings-scroll .schedule-table tbody tr:nth-child(even) {
  background: rgba(255,255,255,0.03);
}

body.nextgen-page .standings-scroll .schedule-table tbody tr:hover {
  background: rgba(255,255,255,0.06);
}

body.nextgen-page .standings-scroll .schedule-table tbody td:nth-child(1) {
  font-weight: 900;
}
body.nextgen-page .standings-scroll .schedule-table tbody td:nth-child(3) {
  font-weight: 800;
}

/* ============================================
   UPDATES / ACCORDION
   (keeps your existing behavior: hidden until JS shows it)
   ============================================ */

body.nextgen-page .accordion-display {
  display: none;
}

/* ============================================
   HERO BANNER — series image override
   ============================================ */

body.nextgen-page .hero-banner {
  display: block !important;
  width: 100% !important;
  height: 320px !important;
  min-height: 320px !important;
  margin-top: 10px !important;

  background-image: var(--series-hero) !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

/* Mobile: intentionally hide hero */
@media (max-width: 700px) {
  body.nextgen-page .hero-banner,
  body.nextgen-page .hero-gradient,
  body.nextgen-page .header-gradient {
    display: none !important;
  }
}

/* Footer: schedule pages should scroll normally (no sticky footer) */
body.nextgen-page footer.sticky-footer,
body.nextgen-page .sticky-footer,
body.nextgen-page footer {
  position: static !important;
}

/* Mobile: standings wide table scroll */
@media (max-width: 600px) {
  body.nextgen-page .standings-scroll {
    max-height: 420px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.nextgen-page .standings-scroll .schedule-table {
    min-width: 900px;
  }

  body.nextgen-page .standings-scroll .schedule-table thead th,
  body.nextgen-page .standings-scroll .schedule-table td {
    padding: 9px;
    font-size: 0.85rem;
  }
}


/* Page actions (Schedule / Standings / Results / Updates / Broadcast) */
.page-actions{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 6px 0 26px;
}

.page-actions a{
  text-decoration: none;
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.2px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
}

.page-actions a:hover{
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.18);
}

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

.page-actions a{
  text-decoration: none;
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.2px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
}

.page-actions a:hover{
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.18);
}

.page-actions a.active{
  background: rgba(0,0,0,0.28);
  border-color: rgba(255,255,255,0.22);
}



/* Series selector should feel secondary to the page-actions row */
body.nextgen-page .series-selector{
  margin-bottom: 12px;
}

body.nextgen-page .series-selector a{
  font-size: 0.85rem;
  padding: 8px 12px;
  opacity: 0.9;
}

body.nextgen-page .series-selector a.active{
  opacity: 1;
}

.weather-temp{
  opacity: 0.85;
  margin-left: 6px;
  white-space: nowrap;
}

.weather-temp{
  margin-left: 6px;
  font-weight: 700;
  white-space: nowrap;
}

/* Track temp bands */
.track-temp-cool{ color: #3bb273; }  /* green */
.track-temp-warm{ color: #f4c430; }  /* yellow */
.track-temp-hot{  color: #e5533d; }  /* red */

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