/* css/main.css */

/* color variables */

:root {
  --color-dark-blue: #14305e;
  --color-yellow: #e6c342;
  --color-grey-dark: #666;
  --color-grey: #bbb;
  --color-grey-light: #ddd;
  --color-off-white: #eee;
  --color-off-white-light: #f8f8f8;
  --color-white: #fff;
  --color-light-blue: #4b96cd;
}

/* header */

#header {
  position: relative;
  z-index: 10;
  width: 100%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
}

#scroller-container {
  width: 100%;
  padding: 0;
  margin: 0;
}

.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-dark-blue);
  padding: 0 1.5em;
  height: 60px;
}

.main-header .logo img {
  height: 50px;
}

.main-nav {
  display: flex;
  gap: 0.5em;
  flex: 1;
  justify-content: center;
  margin-left: 1.5em;
}

.main-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--color-grey);
  font-weight: 500;
  height: 60px;
  padding: 0 0.75em;
  transition: color 0.2s ease-in-out;
  text-transform: uppercase;
  font-family: "League Spartan", sans-serif;
  font-weight: 700;
}

.main-nav a:hover {
  color: var(--color-white);
}

.main-nav a.active {
  color: var(--color-white);
}

.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 5px;
  background: var(--color-light-blue);
  border-radius: 0px;
}

.user-actions {
  display: flex;
  gap: 1em;
}

.user-actions a {
  text-decoration: none;
  color: #cccccc;
  font-weight: 500;
  transition: color 0.2s ease-in-out;
}

.user-actions a:hover {
  color: var(--color-white);
}

/* body */
body {
  font-family: sans-serif;
  margin: 0;
  padding: 0;
}

/* Outer wrapper for background and full-width behavior */
#container-external {
  width: 100%;
  background: var(--color-off-white);
  display: flex;
  justify-content: center; /* center the internal container */
  padding: 2rem 1rem; /* space around content */
  box-sizing: border-box;
}

/* Inner wrapper for actual content */
#container-internal {
  width: 100%;
  max-width: 1300px;
  background: var(--color-white);
  padding: 2rem;
  box-sizing: border-box;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow-x: hidden;
}

/* Heading styling */
#container-internal h1 {
  margin-top: 0;
  font-size: 2rem;
  color: var(--color-dark-blue);
}

#page-content {
  min-height: 800px;
}

/* hamburger menu */
#hamburger {
  display: none;
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  font-size: 28px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  z-index: 11;
}

/* =======================
   Responsive Adjustments
   ======================= */

/* Phones (≤ 480px) */
@media (max-width: 480px) {
  #container-external {
    padding: 1rem 1rem;
  }

  .main-header {
    flex-direction: row; /* keep row */
    justify-content: space-between;
    align-items: center;
    height: auto;
    padding: 0.5em 1em;
    gap: 0;
  }

  .main-header .logo img {
    height: 40px;
  }

  .main-nav {
  }

  .user-actions {
    display: none; /* optional: hide on very small screens */
  }

  .gamecard-grid .game-card.large {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .game-card.large {
    width: 100% !important;
  }

  .game-card.large {
    font-size: 0.85rem !important;
    padding: 0.5rem !important;
  }

  .game-card.large .game-header {
    font-size: 0.65rem !important;
  }

  .game-card.large .game-team img {
    height: 20px !important;
    margin-right: 0.4rem !important;
  }

  .game-card.large .team-score {
    font-size: 1rem !important;
  }

  .game-card.large .game-extra {
    font-size: 0.75rem !important;
  }

  .game-card.large .cta-link {
    font-size: 0.85rem !important;
  }

  .game-event-info {
    font-size: 0.75rem !important;
    min-height: 50px !important;
  }

  .game-event-meta,
  .game-event-meta.period-time {
    font-size: 0.7rem !important;
  }

  .game-event-headshot,
  .game-event-teamlogo,
  .game-event-neutral {
    width: 32px !important;
    height: 32px !important;
    margin-right: 6px !important;
  }

  .game-card.small {
    width: 160px;
    min-width: 160px;
  }

  .boxscore th.period-score,
  .boxscore td.period-score {
    width: 10px;
    max-width: 10px;
  }

  .boxscore-name {
    font-size: 0.9rem !important;
  }

  .boxscore-total {
    font-size: 1rem !important;
  }

  .boxscore-logo {
    width: 28px !important;
    height: 28px !important;
  }

  .boxscore.small {
    margin-top: 0px !important;
  }

  .tabs,
  .sub-tabs {
    flex-wrap: wrap;
    gap: 0.3rem;
  }

  .odds-row {
    display: flex;
    flex-direction: row !important;
    gap: 8px; /* smaller gap if needed to make it fit */
    flex-wrap: nowrap;
    justify-content: space-between;
  }

  .odds-btn {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: none !important;
    width: auto !important;
  }

  .odds-label {
    font-size: 11px !important;
    top: 5px !important;
    left: 5px !important;
  }

  .odds-main {
    font-size: 15px !important;
    margin-bottom: 3px !important;
  }

  .odds-sub {
    font-size: 10px !important;
    bottom: 5px !important;
  }

  .schedule-game {
    grid-template-columns: 30px 0.5fr 20px 0.5fr auto !important;
    gap: 3px;
    padding: 6px 5px !important;
    font-size: 0.8rem;
  }

  .schedule-time {
    grid-row: 1;
    text-align: left;
    padding-right: 0px !important;
    text-align: left !important;
  }

  .schedule-home,
  .schedule-away,
  .schedule-vs {
    justify-content: flex-start;
  }

  .schedule-day ul {
    padding: 0rem 0rem;
    margin-bottom: 1em;
  }

  .standings-table.compact {
    width: 100%;
    font-size: 0.75rem;
  }

  .player-box,
  .official-box {
    width: 70px;
    height: 70px;
  }

  .player-number {
    font-size: 28px;
  }

  .player-last {
    font-size: 11px;
  }

  .game-event-list .game-event-item {
    flex-wrap: wrap !important;
    height: auto !important;
    padding: 0.5em !important;
  }

  .game-event-list .period-time {
    font-size: 0.7rem !important;
    opacity: 0.7;
    white-space: wrap !important;
    width: 60px !important;
  }

  .game-event-list .game-event-image {
  }

  .game-event-list .game-event-title {
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    white-space: wrap !important;
  }

  .game-event-list .game-event-additional {
    display: block !important;
    font-size: 0.7rem !important;
    opacity: 0.85 !important;
    margin-top: 0.3em !important;
    white-space: wrap !important;
  }
}

/* Tablets (≤ 768px) */
@media (max-width: 768px) {
  #container-internal {
    padding: 0.2rem 1.2rem;
  }
  #container-internal h1 {
    margin-top: 0.5rem;
  }

  .gamecard-grid .game-card.large {
    flex: 1 1 calc(50% - 1rem); /* 2 per row */
    max-width: none;
  }

  .main-header {
    padding: 0 1em;
  }

  .odds-btn {
    min-width: 160px;
  }

  #hamburger {
    display: block;
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    font-size: 28px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    z-index: 1001;
  }

  /* Slide-in nav */
  .main-nav {
    box-sizing: border-box;
    position: fixed;
    top: 0;
    right: -260px;
    width: 250px;
    max-width: 80vw;
    height: 200vh;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--color-dark-blue);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 80px 1em 1em;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.7);
    z-index: 1000;
    transition: right 0.3s ease-in-out;
    gap: 1rem;
  }

  .main-nav.show {
    right: 0;
  }

  .main-nav a {
    height: 30px;
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    flex: 0 0 auto;
  }

  .main-nav a.active::after {
    display: none;
  }

  body.menu-open {
    overflow: hidden;
  }
}

body.menu-open,
html.menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  touch-action: none;
}

.horizontal-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.horizontal-scroll > * {
  min-width: 600px; /* or however wide these need to be */
}
