/* ==================================================================
   MONTANA TECH — Game ticker, TEAM mega menu, home game bands
   Layered over the green + copper masthead. UTEP-athletics density,
   Iowa-Wild-style roster mega menu.
   ================================================================== */

/* Shared result colors (W / L / OTL / T) */
.mt-result-w { color: #5fbf7a; }
.mt-result-l { color: #e07a6a; }
.mt-result-otl { color: var(--secondary-light); }
.mt-result-t { color: rgba(238, 240, 230, 0.7); }

/* ==============================================
   ROW 0 — Game ticker (above the top bar)
   ============================================== */
.mt-ticker {
  background: #0c2516;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: stretch;
  height: 40px;
  font-family: var(--font-sans);
  position: relative;
  z-index: 95;
}
.mt-ticker-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 0 18px;
  background: var(--secondary);
  color: #15241b;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  padding-right: 26px;
}
.mt-ticker-label-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #15241b;
  animation: mt-pulse 1.6s ease-in-out infinite;
}
@keyframes mt-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.mt-ticker-track {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1 1 auto;
  margin-left: -12px;
  direction: rtl;           /* overflow off the left edge; scroll anchored right */
}
.mt-ticker-track::-webkit-scrollbar { display: none; }

.mt-ticker-game {
  display: flex;
  flex: 1 0 auto;            /* grow to fill the strip; never shrink below content */
  justify-content: center;  /* center each game in its segment (UTEP-style) */
  align-items: center;
  direction: ltr;           /* keep each game's inner content left-to-right */
  gap: 10px;
  padding: 0 22px;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease;
}
.mt-ticker-game:hover { background: rgba(255, 255, 255, 0.04); }
.mt-ticker-date {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--secondary-light);
}
.mt-ticker-match {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: rgba(238, 240, 230, 0.92);
}
.mt-ticker-abbr { font-weight: 700; letter-spacing: 0.03em; }
.mt-ticker-vs { color: rgba(238, 240, 230, 0.5); font-size: 11px; }
.mt-ticker-score { font-family: var(--font-display); font-size: 16px; line-height: 1; color: rgba(238,240,230,0.6); }
.mt-ticker-score.is-win { color: #fff; }
.mt-ticker-result {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
}
.mt-ticker-when { color: rgba(238, 240, 230, 0.55); font-size: 11px; }

.mt-ticker-full {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
  background: #0a1f12;
  color: var(--secondary-light);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-left: 1px solid rgba(255, 255, 255, 0.07);
  transition: color 0.15s ease;
}
.mt-ticker-full:hover { color: #fff; }

/* ==============================================
   TEAM mega menu
   ============================================== */
.ch-nav-list > li.ch-has-mega { position: static; }

.ch-mega {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, #143521 0%, #0f2a18 100%);
  border-top: 3px solid var(--secondary);
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.7);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  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.ch-has-mega:hover > .ch-mega,
.ch-nav-list > li.ch-has-mega:focus-within > .ch-mega {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.ch-mega-inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 28px 32px 32px;
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 36px;
}

/* Left rail */
.ch-mega-rail { border-right: 1px solid rgba(255, 255, 255, 0.10); padding-right: 30px; }
.ch-mega-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 14px;
}
.ch-mega-rail-links { list-style: none; margin: 0 0 20px; padding: 0; }
.ch-mega-rail-links li { margin: 0; }
.ch-mega-rail-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  transition: color 0.15s ease, padding-left 0.18s ease;
}
.ch-mega-rail-links a:hover { color: var(--secondary-light); padding-left: 6px; }
.ch-mega-arrow { color: var(--secondary); opacity: 0; transform: translateX(-6px); transition: all 0.18s ease; }
.ch-mega-rail-links a:hover .ch-mega-arrow { opacity: 1; transform: translateX(0); }

/* Next-game card in rail */
.ch-mega-next {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-left: 3px solid var(--secondary);
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}
.ch-mega-next:hover { background: rgba(255, 255, 255, 0.07); transform: translateY(-2px); }
.ch-mega-next-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--secondary);
}
.ch-mega-next-match { font-family: var(--font-display); font-size: 19px; color: #fff; letter-spacing: 0.02em; }
.ch-mega-next-when { font-size: 12px; color: rgba(238, 240, 230, 0.8); }
.ch-mega-next-venue { font-size: 11px; color: rgba(238, 240, 230, 0.5); }

/* Roster columns */
.ch-mega-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* Schedule mega — three game boxes (ch-game-card) in the content column:
   1 recent result + 2 upcoming (or 3 results off-season). Equal thirds. */
.ch-mega-games {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  align-content: start;
  gap: 16px;
}
.ch-mega-games .ch-game-card {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
}
.ch-mega-games .ch-game-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(196, 126, 60, 0.45);
}
/* Slightly larger type than the compact brand-bar scoreboard. */
.ch-mega-games .ch-gc-header { font-size: 10.5px; margin-bottom: 2px; }
.ch-mega-games .ch-gc-abbr { font-size: 12px; }
.ch-mega-games .ch-gc-score { font-size: 17px; }
.ch-mega-games .ch-gc-row { gap: 12px; }

/* Extra detail footer on past-game boxes (result · score, matchup, venue). */
.ch-gc-meta {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ch-gc-result {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ch-gc-matchup {
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: rgba(238, 240, 230, 0.85);
  line-height: 1.3;
}
.ch-gc-venue {
  font-size: 11px;
  color: rgba(238, 240, 230, 0.5);
  line-height: 1.3;
}
.ch-mega-col-head {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--secondary-light);
  padding-bottom: 10px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.ch-mega-players { list-style: none; margin: 0; padding: 0; columns: 1; }
.ch-mega-players li { margin: 0; }
.ch-mega-players a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 5px 0;
  text-decoration: none;
  color: rgba(238, 240, 230, 0.84);
  font-size: 13.5px;
  transition: color 0.15s ease, transform 0.15s ease;
}
.ch-mega-players a:hover { color: #fff; transform: translateX(3px); }
.ch-mega-num {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--secondary);
  min-width: 24px;
  text-align: right;
}
.ch-mega-pname { font-weight: 500; }
.ch-mega-empty { color: rgba(238, 240, 230, 0.5); font-size: 13px; font-style: italic; }

/* ==============================================
   Home — record strip (under hero)
   ============================================== */
.mt-record-strip {
  background: linear-gradient(90deg, var(--primary-dark) 0%, #0f2a18 100%);
  border-bottom: 3px solid var(--secondary);
}
.mt-record-inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
}
.mt-record-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 16px 28px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
}
.mt-record-item--game, .mt-record-item--next { align-items: flex-start; }
.mt-record-val {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1;
  color: #fff;
  letter-spacing: 0.01em;
}
.mt-record-item--record .mt-record-val { color: var(--secondary-light); }
.mt-record-lbl {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(238, 240, 230, 0.6);
}
.mt-record-game {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
}
.mt-record-res { font-family: var(--font-display); font-size: 18px; }
.mt-record-opp { font-weight: 500; color: rgba(238, 240, 230, 0.7); font-size: 13px; }
.mt-record-item--game:hover .mt-record-game,
.mt-record-item--next:hover .mt-record-game { color: var(--secondary-light); }
.mt-record-item--next { margin-left: auto; border-right: none; }

/* ==============================================
   Home — upcoming games grid
   ============================================== */
.mt-game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.mt-game-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--secondary);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.mt-game-card:hover { transform: translateY(-4px); box-shadow: 0 18px 36px -22px rgba(16, 48, 28, 0.4); }
.mt-game-card-top { display: flex; align-items: center; justify-content: space-between; }
.mt-game-ha {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
}
.mt-game-ha--home { background: var(--primary); color: #fff; }
.mt-game-ha--away { background: var(--soft); color: var(--ink-soft); }
.mt-game-date {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--muted-ink);
  text-transform: uppercase;
}
.mt-game-match { display: flex; align-items: center; gap: 10px; }
.mt-game-logo { width: 34px; height: 34px; object-fit: contain; flex-shrink: 0; }
.mt-game-vs { font-family: var(--font-mono); font-size: 12px; color: var(--muted-ink); text-transform: uppercase; }
.mt-game-opp {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.02;
  color: var(--ink);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.mt-game-meta { display: flex; flex-direction: column; gap: 2px; margin-top: auto; }
.mt-game-time { font-weight: 700; color: var(--ink); font-size: 14px; }
.mt-game-venue { font-size: 12px; color: var(--ink-soft); }
.mt-game-btn {
  margin-top: 4px;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--bone);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 9px 14px;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.mt-game-btn:hover { background: var(--secondary); color: #fff; border-color: var(--secondary); }

/* Recent-results variant of the game card (off-season) */
.mt-game-card--final .mt-game-date { color: var(--secondary-dark); }
.mt-game-result { display: flex; align-items: baseline; gap: 10px; margin-top: auto; }
.mt-game-resbadge { font-family: var(--font-display); font-size: 22px; line-height: 1; }
.mt-game-result .mt-result-w { color: #2f8f4e; }
.mt-game-result .mt-result-l { color: #c0492f; }
.mt-game-result .mt-result-otl { color: var(--secondary-dark); }
.mt-game-result .mt-result-t { color: var(--muted-ink); }
.mt-game-score { font-family: var(--font-display); font-size: 26px; line-height: 1; color: var(--ink); }

/* ==============================================
   Responsive
   ============================================== */
@media (max-width: 1100px) {
  .mt-game-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 980px) {
  /* Ticker: hide the recent finals, keep it tight */
  .mt-ticker { height: 36px; }
  .mt-ticker-full { display: none; }

  /* Mega menu → mobile accordion: show only the rail links */
  .ch-nav-list > li.ch-has-mega { position: relative; }
  .ch-mega {
    position: static;
    opacity: 1;
    visibility: hidden;
    transform: none;
    display: none;
    box-shadow: none;
    border-top: none;
    background: #102f1c;
  }
  .ch-nav-list > li.ch-has-mega.ch-sub-open > .ch-mega { display: block; visibility: visible; }
  .ch-mega-inner { grid-template-columns: 1fr; padding: 6px 0; gap: 0; }
  .ch-mega-rail { border-right: none; padding: 0; }
  .ch-mega-eyebrow { display: none; }
  .ch-mega-rail-links a { font-size: 15px; padding: 13px 32px; justify-content: center; font-family: var(--font-sans); font-weight: 600; }
  /* Hover-only affordance — drop it on touch so it can't flash in via sticky
     :hover and so its (opacity:0) box doesn't push the centered label off-center. */
  .ch-mega-arrow { display: none; }
  .ch-mega-next, .ch-mega-cols, .ch-mega-games { display: none; }

  .mt-record-item--next { margin-left: 0; }
  .mt-record-inner { justify-content: center; }
}
@media (max-width: 600px) {
  .mt-game-grid { grid-template-columns: 1fr; }
  .mt-record-item { padding: 12px 18px; }
  .mt-record-val { font-size: 24px; }
}

/* ==============================================
   Divi cleanup — hide the default page title on pages (we render custom
   heroes via [ch_hero] / [ch_page_hero]). Single posts keep their title.
   ============================================== */
.page .entry-title.main_title,
.page .et_post_meta_wrapper > .entry-title,
body.home .entry-title.main_title { display: none !important; }

/* ==================================================================
   NEWS PAGE — card grid ([mt_news_grid])
   ================================================================== */
.mt-news-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
  max-width: var(--content-max-width);
  margin: 0 auto;
}
.mt-news-card {
  /* Flex item: 3 across, capped at one-third so a partial last row
     centers (grid would have left-aligned the orphan cards). */
  flex: 1 1 300px;
  max-width: calc((100% - 44px) / 3);
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--secondary);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.mt-news-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -24px rgba(16, 48, 28, 0.45); }
.mt-news-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary) 0%, var(--bg-drop) 100%);
}
.mt-news-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.mt-news-card:hover .mt-news-thumb img { transform: scale(1.05); }
.mt-news-thumb-ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 64px; color: rgba(255,255,255,0.12);
}
.mt-news-tag {
  position: absolute; top: 12px; left: 12px;
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  background: var(--secondary); color: #15241b;
  padding: 4px 9px; border-radius: 4px;
}
.mt-news-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.mt-news-date {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted-ink);
}
.mt-news-title {
  font-family: var(--font-display); font-size: 22px; line-height: 1.08;
  letter-spacing: 0.01em; color: var(--ink); margin: 0; text-transform: uppercase;
}
.mt-news-card:hover .mt-news-title { color: var(--secondary-dark); }
.mt-news-excerpt { font-size: 14px; line-height: 1.55; color: var(--ink-soft); margin: 0; }
.mt-news-more {
  margin-top: auto; padding-top: 6px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--secondary-dark);
}

/* ==================================================================
   STAFF PAGE — placeholder grid ([mt_staff])
   ================================================================== */
.mt-staff-intro { max-width: 720px; margin: 0 auto 28px; text-align: center; }
.mt-staff-intro p { font-size: 16px; line-height: 1.6; color: var(--ink-soft); }
.mt-staff-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: var(--content-max-width);
  margin: 0 auto;
}
.mt-staff-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--secondary);
  border-radius: 12px;
  padding: 22px;
}
.mt-staff-photo {
  flex-shrink: 0;
  width: 72px; height: 72px;
  border-radius: 50%;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--bg-drop) 100%);
}
.mt-staff-photo span {
  font-family: var(--font-display); font-size: 26px; letter-spacing: 0.02em;
  color: rgba(255,255,255,0.7);
}
.mt-staff-photo--img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mt-staff-info { display: flex; flex-direction: column; gap: 2px; }
.mt-staff-role {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--secondary-dark);
}
.mt-staff-name {
  font-family: var(--font-display); font-size: 24px; line-height: 1;
  text-transform: uppercase; color: var(--ink);
}

.mt-staff-bio { font-size: 13.5px; line-height: 1.55; color: var(--ink-soft); margin: 8px 0 0; }
.mt-staff-cta { text-align: center; margin: 36px auto 0; }
.mt-staff-cta p {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted-ink); margin: 0 0 12px;
}

@media (max-width: 980px) {
  .mt-news-card { max-width: calc((100% - 22px) / 2); }  /* 2 across */
  .mt-staff-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .mt-news-card { flex-basis: 100%; max-width: 100%; }   /* 1 across */
  .mt-staff-grid { grid-template-columns: 1fr; }
}

/* ==================================================================
   PUCK PRESS WIDGET WIDTH — keep stats / standings / schedule / slider
   in line with the rest of the site (page hero + home sections use
   --content-max-width with a 24px gutter). The full-width Divi page
   template doesn't constrain them, so cap + center here.
   ================================================================== */
body .standard_stats_container,
body .standings_container,
body .accordion_schedule_container,
body .gameslider_slider_container {
  max-width: var(--content-max-width) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 24px;
  padding-right: 24px;
  box-sizing: border-box;
}
/* Let wide tables scroll inside the capped container instead of overflowing */
body .standard_stats_container .pp-stats-table-wrapper,
body .standings_container .pp-standings-table-wrapper {
  overflow-x: auto;
}

/* ==================================================================
   DIVI 5 BLOCK SECTION CENTERING — the News page section carries a
   custom max-width (1280px) set in the builder but no horizontal
   margins, so the section (and the [mt_news_grid] inside it) pins to
   the left of the full-width page template. Auto-margin every builder
   section: capped sections center, full-width ones are unaffected.
   ================================================================== */
body .et-l--post .et_pb_section {
  margin-left: auto !important;
  margin-right: auto !important;
}
