/* ============================================================
   SPEED-timing — New Homepage
   ============================================================ */

/* --- RESET & BASE --- */
:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: #1a2236;
  --bg-card-hover: #1f2a42;
  --accent: #e63946;
  --accent-light: #ff4d5a;
  --accent-dark: #b02e38;
  --gold: #ffd700;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: #1e293b;
  --border-light: #334155;
  --success: #22c55e;
  --info: #3b82f6;
  --warning: #eab308;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }

/* --- LIGHT THEME --- */
[data-theme="light"] {
  --bg-primary: #eef0f4;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f3f5f9;
  --text-primary: #1a1a2e;
  --text-secondary: #4a5468;
  --text-muted: #6b7a90;
  --border: #d2d7e0;
  --border-light: #bfc6d2;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
}

[data-theme="light"] .st-header {
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: #e0e4ea;
}

[data-theme="light"] .st-hero {
  background: linear-gradient(160deg, #ffffff 0%, #f5f7fa 60%, #ffffff 100%);
}

[data-theme="light"] .st-hero::before {
  background: radial-gradient(circle, rgba(59,130,246,0.03) 0%, transparent 70%);
}

[data-theme="light"] .st-hero-label,
[data-theme="light"] .st-sticky-hero-label {
  color: var(--text-primary);
}

[data-theme="light"] .st-sticky-hero-label {
  background: linear-gradient(160deg, #ffffff 0%, #f5f7fa 60%, #ffffff 100%);
}

[data-theme="light"] .st-hero-label .pulse {
  background: var(--accent);
}

[data-theme="light"] .st-live-card,
[data-theme="light"] .st-event-item,
[data-theme="light"] .st-event-list {
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

[data-theme="light"] .st-event-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

[data-theme="light"] .st-countdown-unit {
  background: #f8f9fb;
  border-color: #d2d7e0;
}

[data-theme="light"] .st-btn-outline {
  border-color: #c4cad6;
}

[data-theme="light"] .st-btn-outline:hover {
  background: rgba(0,0,0,0.04);
  border-color: #8892a4;
}

[data-theme="light"] .st-race-clock {
  background: linear-gradient(180deg, #ffffff 0%, #f5f7fa 100%);
  border-top-color: #e0e4ea;
}

[data-theme="light"] .st-rc-block {
  background: none;
}

[data-theme="light"] .st-partners {
  background: #f8f9fb;
}

[data-theme="light"] .st-partners-grid img {
  filter: brightness(0) drop-shadow(0 0 1px rgba(255,255,255,0.8));
}

[data-theme="light"] .st-partners-grid img:hover {
  transform: scale(1.08);
  filter: drop-shadow(0 0 0 rgba(0,0,0,1)) 
          drop-shadow(0 0 1px rgba(0,0,0,1)) 
          drop-shadow(0 0 2px rgba(0,0,0,0.8)) 
          drop-shadow(0 0 3px rgba(0,0,0,0.6));
}

[data-theme="light"] .st-footer {
  background: #ffffff;
  border-top-color: #e0e4ea;
}

[data-theme="light"] .st-mobile-menu {
  background: #ffffff;
}

[data-theme="light"] .st-mobile-overlay {
  background: rgba(0,0,0,0.3);
}

[data-theme="light"] .st-search {
  background: rgba(255,255,255,0.98);
}

[data-theme="light"] .st-dropdown {
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

[data-theme="light"] ::-webkit-scrollbar-track {
  background: #eef0f4;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: #c4cad6;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: #8892a4;
}

[data-theme="light"] .st-section-header::after {
  background: linear-gradient(90deg, var(--accent), var(--info));
}

[data-theme="light"] .st-status-upcoming {
  background: rgba(59,130,246,0.15);
}

[data-theme="light"] .st-status-cancelled {
  background: rgba(230,57,70,0.15);
}

[data-theme="light"] .st-status-rescheduled {
  background: rgba(234,179,8,0.15);
}

[data-theme="light"] .st-status-live {
  background: rgba(230,57,70,0.15);
}

[data-theme="light"] .st-event-date {
  border-right-color: var(--border);
}

[data-theme="light"] .st-event-upcoming .st-event-date {
  border-right-color: var(--info);
}

[data-theme="light"] .st-days-badge-upcoming {
  background: rgba(59, 130, 246, 0.12);
  border-right-color: rgba(59, 130, 246, 0.3);
}

[data-theme="light"] .st-days-badge-today {
  background: rgba(34, 197, 94, 0.12);
  border-right-color: rgba(34, 197, 94, 0.3);
}

[data-theme="light"] .st-days-badge-past {
  background: rgba(239, 68, 68, 0.12);
  border-right-color: rgba(239, 68, 68, 0.3);
}

[data-theme="light"] .st-results-btn {
  background: rgba(59,130,246,0.1);
  border-color: rgba(59,130,246,0.2);
}

[data-theme="light"] .st-results-btn:hover {
  background: var(--info);
  color: #fff;
}

[data-theme="light"] .st-nav-item:hover {
  background: rgba(0,0,0,0.05);
}

[data-theme="light"] .st-dropdown a:hover {
  background: rgba(0,0,0,0.04);
}

[data-theme="light"] .st-mobile-nav a:hover {
  background: rgba(0,0,0,0.04);
}

[data-theme="light"] .st-mobile-theme-toggle:hover {
  background: rgba(0,0,0,0.04);
}

[data-theme="light"] .st-event-hover-overlay {
  background: rgba(255, 255, 255, 0.96);
}

[data-theme="light"] .st-rc-time-wrapper {
  color: var(--text-primary);
}

[data-theme="light"] .st-section-icon {
  background: rgba(230,57,70,0.08);
}

[data-theme="light"] .st-live-meta-item i {
  color: var(--accent);
}

[data-theme="light"] .st-live-card:hover {
  border-color: rgba(59,130,246,0.3);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

[data-theme="light"] .st-mobile-section-title {
  color: var(--text-primary);
}

[data-theme="light"] .st-mobile-sub a,
[data-theme="light"] .st-mobile-sub-inner a {
  color: var(--text-secondary);
}

[data-theme="light"] .st-mobile-sub-title {
  color: var(--text-primary);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

a { color: var(--accent-light); text-decoration: none; }
a:hover { color: #fff; }
img { max-width: 100%; height: auto; }

/* --- HEADER --- */
.st-header {
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.3s;
}
.st-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
}
.st-logo img {
  height: 42px;
  width: auto;
}
.st-logo-text {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 1px;
}
.st-logo-text span {
  color: var(--accent);
}

/* --- NAV --- */
.st-nav { display: flex; align-items: center; gap: 4px; }
.st-nav-item {
  position: relative;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
}
.st-nav-item:hover, .st-nav-item.active {
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
}
.st-nav-item svg { width: 14px; height: 14px; }

/* Theme toggle button */
#theme-toggle {
  position: relative;
}
#theme-toggle span {
  font-size: 12px;
  white-space: nowrap;
}
#theme-toggle:hover {
  background: rgba(255,255,255,0.08);
  color: var(--accent-light);
}
[data-theme="light"] #theme-toggle:hover {
  background: rgba(0,0,0,0.06);
  color: var(--accent);
}

/* Dropdown */
.st-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 6px;
  display: none;
  z-index: 200;
}
.st-nav-item:hover > .st-dropdown { display: block; }
.st-dropdown a {
  display: block;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text-secondary);
  border-radius: 4px;
  transition: all var(--transition);
}
.st-dropdown a:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.06);
}

/* Sub-dropdown */
.st-dropdown .has-sub { position: relative; }
.st-dropdown .has-sub > .st-dropdown {
  left: 100%;
  top: 0;
}
.st-dropdown .has-sub:hover > .st-dropdown { display: block; }
.st-dropdown .has-sub:hover > a {
  color: var(--text-primary);
  background: rgba(59,130,246,0.12);
}

/* Mobile hamburger */
.st-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px;
}
.st-hamburger svg { width: 24px; height: 24px; }

/* --- HERO / LIVE TIMING BANNER --- */
.st-hero {
  background: linear-gradient(160deg, var(--bg-secondary) 0%, #0d1525 60%, var(--bg-secondary) 100%);
  padding: 0;
  position: relative;
}
.st-hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(59,130,246,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.st-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border-light) 20%, var(--border-light) 80%, transparent 100%);
}
.st-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 20px 32px;
  width: 100%;
  box-sizing: border-box;
}
.st-hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin-bottom: 20px;
}
.st-hero-label .pulse {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 1.5s ease infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(230,57,70,0.5); }
  50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(230,57,70,0); }
}

.st-no-live {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 15px;
}

/* --- LIVE EVENT CARD --- */
.st-live-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
  transition: transform var(--transition), box-shadow var(--transition);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.st-live-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 0 1px rgba(59,130,246,0.1);
  border-color: rgba(59,130,246,0.2);
}
.st-live-card-body {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  padding: 24px;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}
.st-live-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.3;
  word-wrap: break-word;
  word-break: break-word;
}
.st-live-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.st-live-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.st-live-meta-item i { color: var(--accent); font-size: 14px; }
.st-live-meta-item img { width: 28px; height: 28px; border-radius: 4px; object-fit: cover; }

/* Countdown */
.st-countdown {
  display: flex;
  gap: 8px;
  text-align: center;
}
.st-countdown-unit {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  min-width: 56px;
}
.st-countdown-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  line-height: 1;
}
.st-countdown-label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Live action buttons */
.st-live-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.st-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.st-btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(230,57,70,0.3);
}
.st-btn-primary:hover {
  background: var(--accent-light);
  color: #fff;
  box-shadow: 0 4px 16px rgba(230,57,70,0.4);
  transform: translateY(-1px);
}
.st-btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}
.st-btn-outline:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
  background: rgba(255,255,255,0.03);
}
.st-btn i { font-size: 14px; }

/* Track image */
.st-live-track {
  width: 200px;
  height: 140px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.st-live-track img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Status badges */
.st-status-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  background: rgba(230,57,70,0.12);
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.st-status-live .dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 1.5s ease infinite;
}
.st-status-upcoming {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--info);
  background: rgba(59,130,246,0.12);
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.st-status-cancelled {
  color: var(--accent-light);
  background: rgba(230,57,70,0.12);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.st-status-rescheduled {
  color: var(--warning);
  background: rgba(234,179,8,0.12);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --- MAIN CONTENT CONTAINER --- */
.st-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
  box-sizing: border-box;
}

/* --- SECTION HEADERS --- */
.st-section {
  padding: 36px 0 40px;
}
.st-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.st-section-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--info));
  border-radius: 2px;
}
.st-section-icon {
  width: 32px;
  height: 32px;
  background: rgba(230,57,70,0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.st-section-icon i { font-size: 14px; }
.st-section-title {
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- SECTION NAVIGATION --- */
.st-section-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.st-section-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 20px;
  min-width: 60px;
  text-align: center;
}
.st-nav-arrow {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  font-size: 11px;
}
.st-nav-arrow:hover:not(:disabled) {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}
.st-nav-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* --- TWO-COLUMN GRID --- */
.st-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;

  width: 100%;
  box-sizing: border-box;
}
.st-grid-col {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.st-events-section {
  padding: 36px 0 40px;
  width: 100%;
  box-sizing: border-box;
}

/* --- STICKY SECTION HEADERS --- */
.st-sticky-header {
  position: sticky;
  top: 60px; /* below the main header */
  z-index: 20;
  background: var(--bg-primary);
  padding-top: 10px;
  padding-bottom: 14px;
  margin-bottom: 0;
}
.st-sticky-hero-label {
  position: sticky;
  top: 60px;
  z-index: 20;
  background: linear-gradient(160deg, var(--bg-secondary) 0%, #0d1525 60%, var(--bg-secondary) 100%);
  padding: 8px 0;
  margin: -8px 0 12px;
}

/* --- EVENT LIST (card rows) --- */
.st-event-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.st-event-list.sliding-up {
  animation: slideUpList 0.4s ease;
}
.st-event-list.sliding-down {
  animation: slideDownList 0.4s ease;
}
@keyframes slideUpList {
  0% { transform: translateY(0); }
  100% { transform: translateY(-10px); }
}
@keyframes slideDownList {
  0% { transform: translateY(0); }
  100% { transform: translateY(10px); }
}
.st-event-empty {
  text-align: center;
  padding: 30px 10px;
  color: var(--text-muted);
  font-size: 13px;
}

/* --- EVENT ITEM --- */
.st-event-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-bottom: none;
  position: relative;
  overflow: hidden;
  transition: background 0.2s, box-shadow 0.2s;
  cursor: default;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.st-event-item.slide-in-from-bottom {
  animation: slideInFromBottom 0.4s ease forwards;
}
.st-event-item.slide-in-from-top {
  animation: slideInFromTop 0.4s ease forwards;
}
.st-event-item.slide-out-to-top {
  animation: slideOutToTop 0.4s ease forwards;
}
.st-event-item.slide-out-to-bottom {
  animation: slideOutToBottom 0.4s ease forwards;
}
@keyframes slideInFromBottom {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes slideInFromTop {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes slideOutToTop {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-100%);
  }
}
@keyframes slideOutToBottom {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(100%);
  }
}
.st-event-item:first-child {
  border-radius: var(--radius) var(--radius) 0 0;
}
.st-event-item:last-child {
  border-bottom: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
}
.st-event-item:only-child {
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius);
}
.st-event-item.first-visible {
  border-radius: var(--radius) var(--radius) 0 0;
}
.st-event-item.last-visible {
  border-bottom: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
}
.st-event-item.only-visible {
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius);
}
.st-event-item:hover {
  background: var(--bg-card-hover);
  z-index: 2;
}

/* Days badge (vertical) */
.st-days-badge {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-lr;
  transform: rotate(180deg);
  font-size: 11px;
  font-weight: 800;
  text-transform: lowercase;
  letter-spacing: 0.5px;
  z-index: 1;
}
.st-days-badge-upcoming {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-right: 2px solid rgba(59, 130, 246, 0.4);
}
.st-days-badge-today {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border-right: 2px solid rgba(34, 197, 94, 0.4);
}
.st-days-badge-past {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-right: 2px solid rgba(239, 68, 68, 0.4);
}

/* Adjust event item padding to accommodate badge */
.st-event-item {
  padding-left: 46px;
}

/* Date block on the left */
.st-event-date {
  flex-shrink: 0;
  width: 52px;
  text-align: center;
  padding: 4px 0;
  border-right: 2px solid var(--border);
}
.st-event-upcoming .st-event-date {
  border-right-color: var(--info);
}
.st-event-past .st-event-date {
  border-right-color: var(--text-muted);
}
.st-event-day {
  font-family: 'JetBrains Mono', monospace;
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.st-event-month {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-top: 2px;
}
.st-event-upcoming .st-event-month { color: var(--info); }
.st-event-date2 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 2px;
  opacity: 0.7;
  line-height: 1;
}
.st-event-date2::before {
  content: '—';
  display: block;
  font-size: 8px;
  line-height: 1;
  margin-bottom: 1px;
  color: var(--border-light);
}

/* Event info (middle) */
.st-event-info {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.st-event-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-wrap: break-word;
  word-break: break-word;
}
.st-event-place {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 3px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  overflow: hidden;
  word-wrap: break-word;
}
.st-event-place i { color: var(--accent); font-size: 11px; margin-right: 3px; }

/* Flag (right) */
.st-event-flag {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.st-event-flag img {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  object-fit: cover;
}

/* --- HOVER OVERLAY (slide from right) --- */
.st-event-hover-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: auto;
  min-width: 0;
  max-width: 100%;
  background: rgba(10, 14, 23, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 3;
}
.st-event-item:hover .st-event-hover-overlay {
  transform: translateX(0);
}
.st-hover-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s;
}
.st-hover-btn-live {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 10px rgba(230,57,70,0.4);
}
.st-hover-btn-live:hover {
  background: var(--accent-light);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(230,57,70,0.5);
}
.st-hover-btn-results {
  background: var(--info);
  color: #fff;
  box-shadow: 0 2px 10px rgba(59,130,246,0.4);
}
.st-hover-btn-results:hover {
  background: #60a5fa;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(59,130,246,0.5);
}

/* Flag code (shared) */
.st-event-flag-code {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Inline flag (shown on mobile, hidden on desktop) */
.st-event-flag-inline {
  display: none;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  vertical-align: middle;
}
.st-event-flag-inline img {
  width: 16px;
  height: 16px;
  border-radius: 2px;
  object-fit: cover;
  vertical-align: middle;
}

/* Always-visible Results button (Last Results section) */
.st-results-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 5px;
  text-decoration: none;
  background: rgba(59,130,246,0.12);
  color: var(--info);
  border: 1px solid rgba(59,130,246,0.25);
  transition: all 0.15s;
  white-space: nowrap;
}
.st-results-btn:hover {
  background: var(--info);
  color: #fff;
  box-shadow: 0 2px 10px rgba(59,130,246,0.4);
}

/* --- RACE CLOCK DASHBOARD --- */
.st-race-clock {
  background: linear-gradient(180deg, var(--bg-secondary) 0%, rgba(10,14,23,0.95) 100%);
  border-top: 1px solid var(--border);
  padding: 0;
  position: relative;
  overflow: hidden;
}
.st-race-clock::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--info), var(--accent), transparent);
  opacity: 0.5;
}
.st-race-clock-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 14px 20px;
  width: 100%;
  box-sizing: border-box;
}
.st-rc-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px;
}
.st-rc-label {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.st-rc-label i {
  font-size: 10px;
  margin-right: 3px;
  color: var(--accent);
}
.st-rc-time-wrapper {
  display: flex;
  align-items: baseline;
  justify-content: center;
  line-height: 1;
}
.st-rc-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 2px;
}
.st-rc-ms {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 700;
  color: var(--info);
  letter-spacing: 1px;
}
.st-rc-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 1px;
}
.st-rc-sep {
  width: 1px;
  height: 36px;
  background: linear-gradient(180deg, transparent, var(--border-light), transparent);
}

/* --- PARTNERS --- */
.st-partners {
  padding: 60px 0;
  border-top: 1px solid var(--border);
}
.st-partners-title {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 40px;
}
.st-partners-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  align-items: center;
}
.st-partners-grid img {
  height: 100px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  opacity: 0.7;
  filter: brightness(0) invert(1) drop-shadow(0 0 1px rgba(0,0,0,0.5));
  transition: all 0.3s;
  padding: 20px;
}
.st-partners-grid img:hover {
  opacity: 1;
  transform: scale(1.08);
  filter: drop-shadow(0 0 0 rgba(255,255,255,1)) 
          drop-shadow(0 0 1px rgba(255,255,255,0.4)) 
          drop-shadow(0 0 2px rgba(255,255,255,0.5)) 
          drop-shadow(0 0 3px rgba(255,255,255,0.6));
}

@media (max-width: 768px) {
  .st-partners {
    padding: 40px 0;
  }
  .st-partners-grid {
    gap: 28px;
  }
  .st-partners-grid img {
    height: 85px;
    max-width: 180px;
    padding: 16px;
  }
}

/* --- FOOTER --- */
.st-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 40px 0 24px;
}
.st-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.st-footer-col h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-primary);
  margin-bottom: 16px;
  position: relative;
  padding-bottom: 10px;
}
.st-footer-col h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--accent);
}
.st-footer-col p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.st-footer-col p i { color: var(--accent); width: 16px; text-align: center; }
.st-footer-col img { margin-top: 4px; }

.st-footer-bottom {
  text-align: center;
  padding: 16px 20px 0;
  margin-top: 30px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
}
.st-footer-bottom a { color: var(--accent-light); }

/* --- SEARCH OVERLAY --- */
.st-search {
  display: none;
  padding: 12px 20px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.st-search.open { display: block; }
.st-search input {
  width: 100%;
  max-width: 500px;
  padding: 10px 16px;
  font-size: 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  color: var(--text-primary);
  outline: none;
}
.st-search input::placeholder { color: var(--text-muted); }
.st-search input:focus { border-color: var(--accent); }
#st-search-result {
  max-width: 500px;
  margin-top: 8px;
}
#st-search-result a {
  display: block;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  border-radius: 4px;
}
#st-search-result a:hover { background: var(--bg-card-hover); color: var(--text-primary); }

/* --- MOBILE MENU --- */
.st-mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  height: 100vh;
  background: var(--bg-card);
  border-right: 1px solid var(--border-light);
  z-index: 500;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}
.st-mobile-menu.open { transform: translateX(0); }
.st-mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 499;
}
.st-mobile-overlay.open { display: block; }
.st-mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.st-mobile-menu-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 20px;
}
.st-mobile-nav { padding: 8px; }
.st-mobile-nav a,
.st-mobile-nav .st-mobile-section-title {
  display: block;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-secondary);
  border-radius: 6px;
  transition: all var(--transition);
}
.st-mobile-nav a:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }

.st-mobile-theme-toggle {
  display: block;
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-radius: 6px;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 8px;
}
.st-mobile-theme-toggle:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}
.st-mobile-theme-toggle i {
  margin-right: 12px;
  width: 16px;
  display: inline-block;
}

.st-mobile-section-title {
  font-weight: 700;
  color: var(--text-primary) !important;
  font-size: 12px !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 8px;
  cursor: pointer;
}
.st-mobile-sub { display: none; padding-left: 14px; }
.st-mobile-sub.open { display: block; }
.st-mobile-sub a { font-size: 13px; padding: 8px 14px; }

/* --- ANIMATIONS --- */
.fade-in { animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* --- RESPONSIVE --- */
@media (max-width: 960px) {
  .st-nav { display: none; }
  .st-hamburger { display: block; }
  .st-mobile-menu { display: block; }
  .st-footer-grid { grid-template-columns: 1fr 1fr; }
  .st-rc-block { padding: 0 16px; }
  .st-rc-time { font-size: 22px; }
}

@media (max-width: 768px) {
  .st-header-inner { padding: 12px 15px; }
  .st-hero-inner { padding: 20px 15px; }
  .st-live-title { font-size: 16px; }
  .st-live-card-body { grid-template-columns: 1fr; padding: 18px 15px; }
  .st-live-card { margin-bottom: 12px; }
  .st-live-track { display: none; }
  .st-live-meta { gap: 12px; font-size: 12px; flex-wrap: wrap; }
  .st-live-meta-item { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .st-live-actions { flex-direction: column; gap: 8px; }
  .st-live-actions .st-btn { width: 100%; justify-content: center; min-height: 40px; }
  
  .st-countdown-unit { padding: 8px 10px; min-width: 48px; }
  .st-countdown-val { font-size: 18px; }
  
  .st-section { padding: 24px 0; }
  .st-section-title { font-size: 14px; }

  .st-grid-2 { 
    grid-template-columns: 1fr; 
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
  }
  
  /* Reorder columns: Last Results before Upcoming Events on mobile */
  .st-grid-col:first-child { order: 2; }
  .st-grid-col:last-child { order: 1; }
  
  .st-event-name { font-size: 13px; -webkit-line-clamp: 3; }
  .st-event-day { font-size: 20px; }
  .st-event-item { padding: 10px 8px 10px 40px; gap: 10px; }
  .st-events-section { padding: 24px 0 30px; }
  .st-container { padding: 0 15px; max-width: 100%; }
  .st-sticky-header { top: 55px; }
  .st-sticky-hero-label { top: 55px; }
  .st-section-header { gap: 8px; }
  .st-section-icon { width: 28px; height: 28px; }
  .st-section-title { font-size: 14px; letter-spacing: 0.5px; }
  
  /* Adjust days badge for mobile */
  .st-days-badge {
    width: 28px;
    font-size: 10px;
  }

  .st-race-clock-inner { flex-wrap: wrap; gap: 8px; }
  .st-rc-sep { display: none; }
  .st-rc-block { padding: 4px 12px; }
  .st-rc-time { font-size: 20px; }
  .st-rc-ms { font-size: 13px; }
}

@media (max-width: 480px) {
  .st-header-inner { padding: 12px 12px; }
  .st-hero-inner { padding: 20px 12px; }
  .st-logo-text { font-size: 16px; }
  .st-live-card-body { padding: 15px 12px; }
  .st-live-title { font-size: 15px; }
  .st-live-meta { gap: 10px; font-size: 11px; }
  .st-live-meta-item img { width: 20px; height: 20px; }
  .st-countdown { gap: 5px; }
  .st-countdown-unit { min-width: 42px; padding: 6px 8px; }
  .st-countdown-val { font-size: 16px; }
  .st-countdown-label { font-size: 9px; }
  
  .st-live-actions { flex-direction: column; }
  .st-btn { width: 100%; justify-content: center; }
  
  .st-footer-grid { grid-template-columns: 1fr; }

  .st-event-flag--desktop { display: none; }
  .st-event-flag-inline { display: inline-flex; }
  .st-event-name { -webkit-line-clamp: 3; font-size: 12px; }
  .st-event-item { padding: 10px 6px 10px 36px; gap: 8px; }
  .st-container { padding: 0 12px; max-width: 100%; }
  .st-hero-inner { padding: 20px 12px; }
  .st-event-date { width: 44px; }
  .st-section-header { gap: 6px; }
  .st-section-icon { width: 26px; height: 26px; }
  .st-section-icon i { font-size: 12px; }
  .st-section-title { font-size: 13px; letter-spacing: 0.4px; }
  .st-section-count { font-size: 10px; padding: 3px 8px; min-width: 55px; }
  .st-nav-arrow { width: 26px; height: 26px; font-size: 10px; }
  
  /* Further adjust days badge for small mobile */
  .st-days-badge {
    width: 24px;
    font-size: 9px;
  }
  .st-event-day { font-size: 18px; }
  .st-event-hover-overlay { gap: 6px; }
  .st-hover-btn { padding: 6px 12px; font-size: 11px; }
  .st-results-btn { padding: 5px 8px; font-size: 9px; }
  
  .st-rc-time { font-size: 18px; }
  .st-rc-block { padding: 4px 8px; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(10,14,23,0.5); border-radius: 6px; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--border-light), var(--info));
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.2);
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--info), var(--accent));
  box-shadow: 0 0 6px rgba(59,130,246,0.3);
}

/* Firefox scrollbar */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--border-light) transparent;
}

/* --- SCROLL REVEAL ANIMATIONS --- */
@keyframes revealUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}
@keyframes revealScale {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 0.7; transform: scale(1); }
}
@keyframes revealItem {
  from { opacity: 0; transform: translateY(15px); }
  to   { opacity: 1; transform: none; }
}

.st-reveal.revealed {
  animation: revealUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Stagger animation for event items */
.st-event-item.st-stagger.revealed {
  animation: revealItem 0.4s ease both;
}

/* Partner logo stagger */
.st-partners-grid img.st-stagger.revealed {
  animation: revealScale 0.5s ease both;
  transition: filter 0.3s;
}
.st-partners-grid img.st-stagger.revealed:hover {
  opacity: 1;
  transform: scale(1.08);
  filter: drop-shadow(0 0 0 rgba(255,255,255,1)) 
          drop-shadow(0 0 1px rgba(255,255,255,1)) 
          drop-shadow(0 0 2px rgba(255,255,255,0.8)) 
          drop-shadow(0 0 3px rgba(255,255,255,0.6));
}

[data-theme="light"] .st-partners-grid img.st-stagger.revealed:hover {
  transform: scale(1.08);
  filter: drop-shadow(0 0 0 rgba(0,0,0,1)) 
          drop-shadow(0 0 1px rgba(0,0,0,1)) 
          drop-shadow(0 0 2px rgba(0,0,0,0.8)) 
          drop-shadow(0 0 3px rgba(0,0,0,0.6));
}

/* --- MOBILE SUB-NAVIGATION LEVELS --- */
.st-mobile-sub-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 6px;
  transition: all var(--transition);
}
.st-mobile-sub-title:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}
.st-mobile-sub-title i {
  font-size: 10px;
  transition: transform 0.2s;
}
.st-mobile-sub-title.open-sub > i,
.st-mobile-sub-title.open-sub i {
  transform: rotate(180deg);
}
.st-mobile-sub-inner {
  display: none;
  padding: 4px 8px 8px;
}
.st-mobile-sub-inner.open {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}
.st-mobile-sub-inner a {
  padding: 5px 10px !important;
  font-size: 12px !important;
  color: var(--text-muted) !important;
  min-width: 56px;
  text-align: center;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
}
.st-mobile-sub-inner a:hover {
  color: var(--text-primary) !important;
  border-color: var(--info) !important;
  background: rgba(59,130,246,0.1) !important;
}

/* --- MODERN CARD TOUCHES --- */
.st-live-card {
  position: relative;
}
.st-live-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, transparent 30%, rgba(59,130,246,0.15) 50%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  z-index: -1;
}
.st-live-card:hover::before {
  opacity: 1;
}

/* Accent glow on event hover */
.st-event-upcoming:hover .st-event-date { border-right-color: #60a5fa; }
.st-event-past:hover .st-event-date { border-right-color: var(--text-secondary); }
