/* ==============================================
   ROW 1 — Top bar (light, league + socials)
   ============================================== */
.ch-top-bar {
  background: var(--soft);
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  letter-spacing: 0.01em;
}

.ch-top-bar-inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 8px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.ch-top-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ch-top-bar-league-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.ch-top-bar-league-link:hover {
  color: var(--ink);
}

.ch-top-bar-league-img {
  display: block;
  height: 18px;
  width: auto;
  opacity: 0.85;
}

.ch-top-bar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.ch-top-bar-right a {
  display: flex;
  align-items: center;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.15s ease, transform 0.15s ease;
}

.ch-top-bar-right a:hover {
  color: var(--ink);
}

/* ==============================================
   ROW 2 — Brand bar (navy, logo + wordmark + last-game card)
   ============================================== */
.ch-brand-bar {
  /* background: var(--primary-dark); */
  background: linear-gradient(90deg, var(--primary-dark), var(--tertiary));
  border-bottom: 3px solid var(--tertiary);
  border-top: 3px solid var(--tertiary);
  color: #fff;
  transition: box-shadow 0.25s ease;
}

.ch-brand-bar-stuck {
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
}

.ch-brand-bar-inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 10px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Brand block (logo + wordmark) */
.ch-logo-block {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
  margin-right: auto;
}

.ch-logo-img {
  display: block;
  height: 56px;
  width: auto;
  max-width: 64px;
  object-fit: contain;
}

.ch-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.ch-primary-name {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  display: block;
  line-height: 1;
}

.ch-primary-name-accent {
  color: var(--secondary);
}

/* ==============================================
   Scoreboard — wraps next-game + last-game cards
   ============================================== */
.ch-scoreboard {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex-shrink: 0;
}

.ch-game-card {
  display: grid;
  grid-template-rows: auto 1fr 1fr;
  gap: 2px;
  background: var(--primary-dark);
  border: 1px solid var(--tertiary);
  border-radius: 8px;
  padding: 8px 10px;
  min-width: 150px;
  text-decoration: none;
  color: #fff;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ch-game-card:hover {
  background: rgba(0, 35, 71, 0.7);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.ch-gc-header {
  display: flex;
  align-items: baseline;
  gap: 15px;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
}

/* "Next" / "Last" tag pill */
.ch-gc-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--secondary);
}

.ch-gc-when {
  color: rgba(255, 255, 255, 0.6);
}

.ch-gc-row {
  display: grid;
  grid-template-columns: 22px auto 1fr 12px;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1;
  padding: 0;
}

/* Next-game card has no scores → simpler 2-col grid */
.ch-game-card--next .ch-gc-row {
  grid-template-columns: 22px auto;
  color: #fff;
}

.ch-gc-row.is-winner {
  color: #fff;
}

.ch-gc-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}

.ch-gc-logo-placeholder {
  display: block;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}

.ch-gc-abbr {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: inherit;
}

.ch-gc-score {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  color: inherit;
  justify-self: end;
}

/* Winner triangle pointer (right side) */
.ch-gc-arrow {
  width: 0;
  height: 0;
  justify-self: end;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-right: 6px solid var(--secondary);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.ch-gc-row.is-winner .ch-gc-arrow {
  opacity: 1;
}

/* ==============================================
   ROW 3 — Nav bar (white, menu + CTA + search)
   ============================================== */

/* Divi's #page-container can carry overflow:hidden which silently breaks
   position:sticky — override it so the header actually sticks. */
#page-container,
#et-main-area {
  overflow: visible;
}

.ch-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 80;
  transition: box-shadow 0.25s ease;
}

.ch-header-stuck {
  box-shadow: 0 1px 6px rgba(0, 35, 71, 0.08);
}

.ch-header-inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: stretch;
  height: 56px;
  gap: 24px;
}

/* ==============================================
   Nav (left/center, full-height links)
   ============================================== */
.ch-nav {
  display: flex;
  align-items: stretch;
  height: 100%;
}

.ch-nav-list {
  list-style: none;
  display: flex;
  align-items: stretch;
  height: 100%;
  margin: 0;
  padding: 0;
  gap: 0;
}

.ch-nav-list > li {
  position: relative;
  display: flex;
  align-items: stretch;
  margin: 0;
  padding: 0;
}

.ch-nav-list > li > a {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  transition: color 0.15s ease;
  height: 100%;
}

/* Bottom ink underline */
.ch-nav-list > li > a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--secondary);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ch-nav-list > li > a:hover {
  color: var(--ink);
}

.ch-nav-list > li > a:hover::before {
  transform: scaleX(1);
}

.ch-nav-list > li.current-menu-item > a,
.ch-nav-list > li.current_page_item > a {
  color: var(--primary);
}

.ch-nav-list > li.current-menu-item > a::before,
.ch-nav-list > li.current_page_item > a::before {
  transform: scaleX(1);
  background: var(--primary);
}

/* External-link arrow (target="_blank" links) */
.ch-nav-list > li > a[target="_blank"]::after {
  content: '';
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-left: 6px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><line x1='7' y1='17' x2='17' y2='7'/><polyline points='7 7 17 7 17 17'/></svg>") no-repeat center / contain;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><line x1='7' y1='17' x2='17' y2='7'/><polyline points='7 7 17 7 17 17'/></svg>") no-repeat center / contain;
  flex-shrink: 0;
}

/* Chevron for parent items */
.ch-nav-list > li.menu-item-has-children > a::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  margin-left: 6px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  opacity: 0.6;
  background: none;
  -webkit-mask: none;
          mask: none;
}

.ch-nav-list > li.menu-item-has-children:hover > a::after {
  transform: rotate(180deg);
  opacity: 1;
}

/* ==============================================
   Dropdown (sub-menu)
   ============================================== */
.ch-nav-list > li > ul.sub-menu {
  position: absolute;
  inset-block-start: 100%;
  inset-inline-start: 0;
  display: flex;
  flex-direction: column;
  min-width: 200px;
  list-style: none;
  margin: 0;
  padding: 6px 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 2px solid var(--secondary);
  border-radius: 0 0 4px 4px;
  box-shadow: 0 18px 36px -22px rgba(0, 51, 102, 0.32);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 300;
}

.ch-nav-list > li:hover > ul.sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.ch-nav-list > li > ul.sub-menu > li {
  list-style: none;
  margin: 0;
  padding: 0;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.ch-nav-list > li:hover > ul.sub-menu > li {
  opacity: 1;
  transform: translateY(0);
}

.ch-nav-list > li:hover > ul.sub-menu > li:nth-child(2) { transition-delay: 0.04s; }
.ch-nav-list > li:hover > ul.sub-menu > li:nth-child(3) { transition-delay: 0.08s; }
.ch-nav-list > li:hover > ul.sub-menu > li:nth-child(4) { transition-delay: 0.12s; }
.ch-nav-list > li:hover > ul.sub-menu > li:nth-child(5) { transition-delay: 0.16s; }
.ch-nav-list > li:hover > ul.sub-menu > li:nth-child(6) { transition-delay: 0.20s; }

.ch-nav-list > li > ul.sub-menu > li > a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.ch-nav-list > li > ul.sub-menu > li > a:hover {
  color: var(--ink);
  background: var(--soft);
  border-left-color: var(--secondary);
}

.ch-nav-list > li > ul.sub-menu > li > a::before {
  display: none;
}

/* ==============================================
   Header actions (CTA + search)
   ============================================== */
.ch-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ch-header-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 9px 16px;
  background: var(--primary-dark);
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.15s ease;
}

.ch-header-cta:hover {
  background: var(--primary);
  color: #fff;
}

/* ==============================================
   Hamburger toggle
   ============================================== */
.ch-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

.ch-hamburger,
.ch-hamburger::before,
.ch-hamburger::after {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
  position: relative;
}

.ch-hamburger::before,
.ch-hamburger::after {
  content: '';
  position: absolute;
  left: 0;
}

.ch-hamburger::before { top: -7px; }
.ch-hamburger::after  { top: 7px; }

.ch-menu-toggle[aria-expanded="true"] .ch-hamburger {
  background: transparent;
}

.ch-menu-toggle[aria-expanded="true"] .ch-hamburger::before {
  top: 0;
  transform: rotate(45deg);
}

.ch-menu-toggle[aria-expanded="true"] .ch-hamburger::after {
  top: 0;
  transform: rotate(-45deg);
}
