/* =========================================================
   BETOPICK BLOG — header.css
   Design: Premium sports editorial · Light-first · Clean & crisp
   Font stack: Barlow Condensed (display) + Barlow (body)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* ── CSS Variables (LIGHT MODE DEFAULT) ─────────────────── */
:root {
  /* Light mode colors (default) */
  --clr-bg:        #ffffff;
  --clr-surface:   #f8f9fc;
  --clr-surface2:  #f1f3f8;
  --clr-border:    #e2e6ee;
  --clr-accent:    #922395;        /* amber — pick indicator */
  --clr-accent2:   #e8304a;        /* red — live / hot */
  --clr-accent3:   rgb(255 255 255 / 91%);        /* teal — tips / category */
  --clr-text:      #1a1f2e;
  --clr-muted:     #5e657a;
  --clr-muted2:    #9aa1b5;
  --clr-white:     #ffffff;

  --header-h:      58px;
  --topbar-h:      36px;
  --nav-h:         42px;

  --radius-sm:     4px;
  --radius-md:     8px;
  --radius-lg:     14px;

  --font-display: 'Poppins', sans-serif;
  --font-body:    'Poppins', sans-serif;

  --transition:    0.22s cubic-bezier(.4,0,.2,1);
}

/* Dark mode overrides — applied when toggle is checked */
.dark-mode-toggle:checked ~ :root,
:root:has(.dark-mode-toggle:checked) {
  --clr-bg:        #0d0f14;
  --clr-surface:   #161921;
  --clr-surface2:  #1e2230;
  --clr-border:    #252a3a;
  --clr-text:      #f0f2f7;
  --clr-muted:     #7b8299;
  --clr-muted2:    #4a5068;
}

/* For browsers without :has() support, apply dark mode via body class */
body.dark-mode {
  --clr-bg:        #0d0f14;
  --clr-surface:   #161921;
  --clr-surface2:  #1e2230;
  --clr-border:    #252a3a;
  --clr-text:      #f0f2f7;
  --clr-muted:     #7b8299;
  --clr-muted2:    #4a5068;
}

/* ── Reset / Base ───────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--clr-bg);
  color: var(--clr-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* ── Utility ────────────────────────────────────────────── */
.flex         { display: flex; }
.flex_center  { display: flex; align-items: center; justify-content: center; }
.flex_sb      { display: flex; align-items: center; justify-content: space-between; }
.flex_in      { display: flex; align-items: center; }
.sr-only      { position: absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }

/* ── TOPBAR ─────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: #f2f4f9;
  border-bottom: 1px solid var(--clr-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background var(--transition), border-color var(--transition);
}

/* Dark mode topbar adjustment */
body.dark-mode .topbar {
  background: #090c11;
}

.topbar__left {
  display: flex;
  align-items: center;
  gap: 20px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--clr-muted);
}
.topbar__left a { transition: color var(--transition); }
.topbar__left a:hover { color: var(--clr-text); }
.topbar__left .live-pill {
  display: flex; align-items: center; gap: 5px;
  color: var(--clr-accent2);
  font-size: 11px;
}
.live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--clr-accent2);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.4; transform:scale(1.5); }
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar__auth-btn {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}
.topbar__auth-btn.login {
  background: transparent;
  color: var(--clr-muted);
  border: 1px solid var(--clr-border);
}
.topbar__auth-btn.login:hover {
  color: var(--clr-text);
  border-color: var(--clr-muted2);
}
.topbar__auth-btn.join {
  background: var(--clr-accent);
  color: #000;
}
.topbar__auth-btn.join:hover { background: #ffc14d; }

/* ── PRIMARY HEADER ─────────────────────────────────────── */
.primary-header {
  height: var(--header-h);
  background: var(--clr-surface);
  border-bottom: 2px solid var(--clr-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: var(--topbar-h);
  z-index: 999;
  gap: 16px;
  transition: background var(--transition), border-color var(--transition);
}

/* Logo */
.primary_logo a { display: flex; align-items: center; }
.primary_logo img { height: 34px; width: auto; }

/* Search */
.search_ba {
  flex: 1;
  max-width: 420px;
  position: relative;
}
.search_ba form { width: 100%; }
.search_ba .search_wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search_ba .search_icon {
  position: absolute;
  left: 12px;
  display: flex;
  align-items: center;
  pointer-events: none;
}
.search_ba .search_icon svg {
  width: 16px;
  height: 16px;
  stroke: var(--clr-muted);
  fill: none;
}
.search_it {
  width: 100%;
  background: var(--clr-surface2);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  color: var(--clr-text);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 8px 14px 8px 40px;
  outline: none;
  transition: border-color var(--transition), background var(--transition);
}
.search_it::placeholder { color: var(--clr-muted2); }
.search_it:focus {
  border-color: var(--clr-accent3);
  background: var(--clr-bg);
}

/* Header right: nav + toggles */
.header__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Dark mode toggle - light mode first styling */
.switch-label {
  position: relative;
  width: 40px;
  height: 22px;
  background: #e0e4ed;
  border: 1px solid var(--clr-border);
  border-radius: 11px;
  cursor: pointer;
  transition: background var(--transition);
  flex-shrink: 0;
}
.switch-label::after {
  content:'';
  position: absolute;
  top: 3px; left: 3px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  transition: transform var(--transition), background var(--transition);
}
.dark-mode-toggle:checked + .switch-label {
  background: var(--clr-accent3);
}
.dark-mode-toggle:checked + .switch-label::after {
  transform: translateX(18px);
  background: #fff;
}
.dark-mode-toggle { display: none; }

/* Mobile icon buttons */
.icon-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  color: var(--clr-muted);
  transition: color var(--transition), border-color var(--transition);
}
.icon-btn:hover { color: var(--clr-text); border-color: var(--clr-muted2); }
.icon-btn svg { width: 18px; height: 18px; }

/* ── PRIMARY NAVIGATION ─────────────────────────────────── */
.primary-navigation {
  display: flex;
  align-items: center;
  gap: 2px;
}
.primary-navigation li a {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--clr-muted);
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
}
.primary-navigation li a:hover,
.primary-navigation li.active a {
  color: var(--clr-text);
  background: rgba(0,0,0,0.04);
}
body.dark-mode .primary-navigation li a:hover,
body.dark-mode .primary-navigation li.active a {
  background: var(--clr-surface2);
}

/* Sure Picks blinking badge */
.elmbling {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--clr-accent2);
  animation: pulse 1.2s ease-in-out infinite;
  margin-right: 2px;
}

/* Tips Banker dot */
.dot {
  width: 5px; height: 5px;
  background: var(--clr-accent);
  border-radius: 50%;
  margin-left: 4px;
}

/* Join / login pill in nav */
#join a {
  background: var(--clr-accent) !important;
  color: #000 !important;
  font-weight: 800 !important;
}
#join a:hover { background: #ffc14d !important; }
#login a {
  border: 1px solid var(--clr-border) !important;
  color: var(--clr-text) !important;
}
#login a:hover {
  border-color: var(--clr-muted2) !important;
  background: transparent !important;
}

/* ── CATEGORY NAV BAR ───────────────────────────────────── */
.MenuNavBarsContainer {
  background: var(--clr-bg);
  border-bottom: 1px solid var(--clr-border);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.MenuNavBarsContainer::-webkit-scrollbar { display: none; }

.MenuNavBarsContainerPadding {
  padding: 0 24px;
}
.MenuNavBarsContainerInner ul {
  display: flex;
  align-items: center;
  gap: 0;
  height: var(--nav-h);
}
.MenuNavBarsContainerInner li { flex-shrink: 0; }
.MenuNavBarsContainerInner li a {
  display: block;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--clr-muted);
  padding: 0 16px;
  height: var(--nav-h);
  line-height: var(--nav-h);
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.MenuNavBarsContainerInner li a:hover,
.MenuNavBarsContainerInner li.active a {
  color: var(--clr-text);
  border-color: var(--clr-accent);
}

/* ── MOBILE NAV DRAWER ──────────────────────────────────── */
.nav-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
}
.nav-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
}
.nav-drawer__panel {
  position: absolute;
  top: 0; left: 0;
  width: min(320px, 88vw);
  height: 100%;
  background: var(--clr-surface);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  box-shadow: 2px 0 12px rgba(0,0,0,0.1);
}
.nav-drawer.open .nav-drawer__panel { transform: translateX(0); }
.nav-drawer.open { display: flex; }

.nav-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--clr-border);
}
.nav-drawer__head img { height: 28px; }
.nav-drawer__close {
  background: none; border: none;
  color: var(--clr-muted);
  cursor: pointer;
  display: flex; align-items: center;
}
.nav-drawer__close svg { width: 22px; height: 22px; }

.nav-drawer__body {
  overflow-y: auto;
  flex: 1;
  padding: 12px 0;
}
.nav-drawer__body li a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--clr-muted);
  padding: 13px 20px;
  border-left: 3px solid transparent;
  transition: all var(--transition);
}
.nav-drawer__body li a:hover {
  color: var(--clr-text);
  border-color: var(--clr-accent);
  background: rgba(0,0,0,0.03);
}
body.dark-mode .nav-drawer__body li a:hover {
  background: var(--clr-surface2);
}

.nav-drawer__section-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--clr-muted2);
  padding: 16px 20px 6px;
}

/* ── MOBILE SEARCH ──────────────────────────────────────── */
.mobile-search-bar {
  display: none;
  background: var(--clr-surface);
  border-bottom: 1px solid var(--clr-border);
  padding: 10px 16px;
}
.mobile-search-bar.open { display: block; }
.mobile-search-bar .search_it {
  width: 100%;
  font-size: 16px;
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1100px) {
  .primary-navigation { display: none; }
  .icon-btn { display: flex; }
}

@media (max-width: 768px) {
  .topbar { padding: 0 16px; }
  .topbar__left { gap: 12px; font-size: 11px; }
  .primary-header { padding: 0 16px; }
  .MenuNavBarsContainerPadding { padding: 0 16px; }
  .search_ba { max-width: none; }
}

@media (max-width: 540px) {
  .topbar__left .topbar__links { display: none; }
  .search_ba { display: none; }
  .search_ba.mobile-open { display: block; }
}