/* ============================================
   O'REILLY PAGE — LAYOUT + STYLING
   ============================================ */

/* Wrapper
   NOTE: main.css already provides horizontal padding.
   We keep max-width + vertical spacing here. */
.oreilly-page .content-wrapper {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0; /* prevent double-padding with main.css */
}

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

.series-subtext {
    text-align: center;
    font-size: 1.1rem;
    opacity: 0.85;
    margin-bottom: 40px;
}

/* 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
   ============================================ */

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

.oreilly-divider {
    background: #2e7d32;
}

/* ============================================
   SCHEDULE CARDS (green top bar + glow)
   ============================================ */

.schedule-section h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.6rem;
}

.schedule-card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

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

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

.schedule-card {
    background: #1a1a1a;
    border: 3px solid #222;
    border-radius: 8px;
    padding: 18px;
    position: relative;
    transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.25s ease;
}

/* Green top accent bar */
.schedule-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 6px;
    width: 100%;
    background: #2e7d32;
    border-radius: 8px 8px 0 0;
}

/* Hover glow */
.schedule-card:hover {
    transform: translateY(-4px);
    opacity: 0.95;
    box-shadow: 0 0 14px rgba(46, 125, 50, 0.55);
}

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

.schedule-card p {
    margin: 4px 0;
    opacity: 0.85;
}

/* Green dot next to date */
.schedule-card .race-date {
    color: #2e7d32;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
}

.schedule-card .race-date::before {
    content: "";
    width: 8px;
    height: 8px;
    background: #2e7d32;
    border-radius: 50%;
}

/* ============================================
   BADGES (Completed / Upcoming)
   ============================================ */

.schedule-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #fff;
}

.schedule-badge.upcoming {
    background: #2e7d32; /* green */
}

.schedule-badge.completed {
    background: #555; /* neutral gray */
}

/* ============================================
   STANDINGS TABLE (Premium box + Sticky header, no gradients)
   ============================================ */

.standings-section h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.6rem;
}

/* Scroll container (this is the “box”) */
.oreilly-page .standings-scroll {
    position: relative;
    width: 100%;
    max-height: 520px;
    overflow: auto;

    padding-left: 14px; /* space for accent bar */
    border-radius: 16px;

    }


/* Table base (wrapper owns the “card”) */
.oreilly-page .standings-scroll .schedule-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
    border: none;
}

/* Sticky header */
.oreilly-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: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;

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

/* Cells */
.oreilly-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);
}

/* Zebra + hover */
.oreilly-page .standings-scroll .schedule-table tbody tr:nth-child(even) {
    background: rgba(255,255,255,0.03);
}

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

/* Emphasis columns */
.oreilly-page .standings-scroll .schedule-table tbody td:nth-child(1) {
    font-weight: 800;
}
.oreilly-page .standings-scroll .schedule-table tbody td:nth-child(3) {
    font-weight: 700;
}

/* ============================================
   NEWS SECTION
   ============================================ */

.news-section h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.6rem;
}

.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

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

.news-card {
    background: #1a1a1a;
    border: 3px solid #222;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.news-card:hover {
    transform: translateY(-4px);
    opacity: 0.9;
}

.news-card h3 {
    margin: 0 0 10px;
    font-size: 1.25rem;
}

.news-card p {
    opacity: 0.85;
}

/* Green border for O'Reilly */
.oreilly-news {
    border-color: #2e7d32;
}

/* Accordion */
.accordion-display {
    display: none;
    background: #1a1a1a;
    border: 3px solid #2e7d32;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.accordion-display h3 {
    margin-top: 0;
    font-size: 1.3rem;
}

.accordion-display p {
    opacity: 0.85;
    line-height: 1.5;
}

/* ============================================
   MOBILE TWEAKS
   ============================================ */

@media (max-width: 600px) {
    .schedule-card { padding: 16px; }
    .news-card { padding: 18px; }

    .oreilly-page .standings-scroll {
        max-height: 420px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Force wide standings to scroll inside the box */
    .oreilly-page .standings-scroll .schedule-table {
        min-width: 900px;
    }

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

@media (min-width: 701px) {
  body.oreilly-page .hero-banner {
    display: block !important;
    width: 100% !important;
    height: 320px !important;
    margin-top: 10px !important;

    background-image: url("/assets/images/hero_oreilly.png") !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
  }

  body.oreilly-page .hero-gradient { display: block !important; }
}

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

  background-image: url("/assets/images/hero_oreilly.png") !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

@media (max-width: 700px) {
  body.oreilly-page .hero-banner,
  body.oreilly-page .hero-gradient { display: none !important; }
}


/* 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);
}



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

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

body.oreilly-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 */

.nextgen-page { --series-accent:#e53935; }
.oreilly-page { --series-accent:#2ecc71; }
.trucks-page  { --series-accent:#1e88e5; }
