body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f4f4f4;
}

#site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: top 0.3s ease-in-out;
}

.topnav {
  background: #004080;
  color: white;
  display: flex;
  justify-content: space-between;
  padding: 10px 20px;
  align-items: center;
  flex-wrap: wrap;
}

.topnav .logo span {
  color: #e63946;
}

.topnav nav a {
  color: white;
  margin: 0 10px;
  text-decoration: none;
}

.login-area {
  font-size: 0.9em;
}

.layout {
  display: flex;
  flex-wrap: wrap;
  margin: 20px;
  gap: 20px;
}

.left-sidebar,
.right-sidebar {
  flex: 0 1 300px;      /* Start at 250px */
  min-width: 300px;     /* Don't go smaller */
  max-width: 300px;     /* Allow up to 300px */
  order: 1;             /* .right-sidebar should be order: 3 */
}

.main-col {
    flex: 2 1 400px;
    order: 2;
}
  
.right-sidebar {
    order: 3;
}

.filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  padding: 10px;
  background-color: #e6e6e6;
  border-radius: 6px;
  margin-bottom: 20px;
  align-items: center;
  font-size: 0.95em;
}

.filterbar > div {
  display: flex;
  align-items: center;
  gap: 6px;
}


.box, .headlines, .ad {
  background: white;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 6px;
}

.video-scroll {
  display: flex;
  overflow-x: auto;
  gap: 10px;
}

.video-card {
  min-width: 200px;
  background: #ddd;
  padding: 10px;
  border-radius: 6px;
}

footer {
  text-align: center;
  padding: 15px;
  background: #333;
  color: white;
  margin-top: 40px;
}

.carousel-left,
.carousel-right {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border: 1px solid #ccc;
  border-radius: 8px;
}
.carousel-left h3 {
  font-size: 18px;
  padding: 10px;
  margin: 0;
  background: #f2f2f2;
  border-bottom: 1px solid #ccc;
}
.carousel-item {
  display: none;
  animation: fade 1s ease-in-out;
  padding: 10px;
}
.carousel-item.active {
  display: block;
}
.carousel-item a {
  display: flex;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}
.carousel-item img {
  width: 100px;
  height: 75px;
  object-fit: cover;
  border-radius: 4px;
}
.carousel-content {
  flex: 1;
}
.carousel-title {
  font-weight: bold;
  font-size: 15px;
  margin-bottom: 5px;
}
.carousel-description {
  font-size: 13px;
  color: #666;
}

/* News carousel: big, edge-to-edge image */
.news-carousel .carousel-item a {
  display: block;
}

.news-carousel .carousel-item img {
  width: 100%;
  height: 540px;         /* adjust as you like */
  object-fit: cover;     /* crop to fill without distortion */
  border-radius: 6px;
  display: block;
  margin-bottom: 8px;
}

.news-carousel .carousel-title {
  font-weight: 700;      /* bold */
  font-size: 1rem;
  margin: 4px 0 6px;
}

.news-carousel .carousel-description {
  font-size: 0.9rem;
  color: #333;
  margin-bottom: 8px;
}

.news-carousel .carousel-event {
  font-size: 0.9rem;
  margin-top: 4px;
}

.news-carousel .carousel-event .event-name {
  font-weight: 700;      /* bold event name */
}

.news-carousel .carousel-event a {
  text-decoration: none;
  margin-left: 8px;
  color: #004080;
}
.news-carousel .carousel-event a:hover {
  text-decoration: underline;
}


@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.team_left, .team_right {
    display: flex;
    align-items: stretch;
    position: relative;
    overflow: hidden;
}

.team_left::before, .team_right::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 150px; /* adjust as needed */
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0.4;
    z-index: 0;
}

.team_left::before {
    left: 0;
    background-image: var(--flag-url);
    background-position: left center;
    background-color: white;
    background-blend-mode: lighten;
    mask-image: linear-gradient(to right, black 0%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 0%, transparent 100%);
}

.team_right::after {
    right: 0;
    background-image: var(--flag-url);
    background-position: right center;
    background-color: white;
    background-blend-mode: lighten;
    mask-image: linear-gradient(to left, black 0%, transparent 100%);
    -webkit-mask-image: linear-gradient(to left, black 0%, transparent 100%);
}

.team-flag {
    border: 2px solid #ffffff;
}

/* Raise team_info to top layer */
.team_info {
    position: relative;
    z-index: 1;
}

#featured-event {
  background: #a3e0fc;
  border-radius: 6px;
  padding: 12px 16px;
  margin-top: 10px;
  margin-bottom: 5px;
  border: 5px solid #9cd0fa;
  font-size: 1rem;
}


.featured-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start; /* ✅ aligns top line */
  flex-wrap: nowrap; /* ✅ prevent wrapping */
  gap: 10px;
}

.featured-title {
  flex: 0 0 80%; /* ✅ fixed width */
  font-size: 1.4em;
  font-weight: bold;
  text-align: left;
}

.featured-title a {
  text-decoration: none;
  color: #004080;
}


.featured-dates {
  flex: 0 0 20%; /* ✅ fixed width */
  text-align: right;
  font-size: 0.90em;
  color: #000000;
  margin-top: 0; /* ✅ remove default spacing */
}


.featured-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: nowrap;
}

.featured-flag {
    border: 2px solid #ffffff;
}

.featured-location {
  flex: 0 0 25%;
  text-align: left;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.featured-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 8px;
  flex-wrap: nowrap;
}

.featured-champion {
  flex: 0 0 35%;
  text-align: left;
  color: #333;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
}

.featured-champion a {
  color: #004080;
  text-decoration: none;
  margin-left: 8px;
}

.featured-champion a:hover {
  text-decoration: underline;
}


.featured-links {
  flex: 0 0 65%;
  text-align: right;
}

.featured-links a {
  color: #004080;
  text-decoration: none;
  margin-left: 8px;
}

.featured-links a:hover {
  text-decoration: underline;
}


.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #c7c7c7; /* light grey */
  padding: 8px 12px;
  font-weight: bold;
  font-size: 0.85rem;
  border-radius: 4px; /* optional: for rounded edges */
  margin-bottom: 5px;
}

.game-draw {
  text-align: left;
}

.game-date {
  text-align: right;
}



.search-dropdown {
  position: absolute;
  background: white;
  border: 1px solid #ccc;
  max-height: 400px;
  width: 250px;
  overflow-y: auto;
  z-index: 999;
  display: none;
}

.search-dropdown div {
  padding: 6px 10px;
  cursor: pointer;
}

.search-dropdown div:hover {
  background-color: #f0f0f0;
}

#search-results {
  position: absolute;
  top: 100%; /* appear directly below input */
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ccc;
  border-top: none;
  z-index: 1000;
  max-height: 400px;
  width: 140%; /* 🔥 50% wider than the parent input box */
  overflow-y: auto;
  display: none;
  font-size: 0.9rem;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#search-results div {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
}

#search-results div:hover {
  background-color: #f5f5f5;
}

#search-results a:hover {
  text-decoration: underline;
}


.news-story { background:#fff; border:1px solid #ddd; border-radius:6px; padding:12px; margin-bottom:14px; }
.story-title { margin:0 0 10px; font-size:1.25rem; }
.story-image.right-50 { float:right; width:50%; margin:0 0 10px 12px; }
.story-image.right-50 img { width:100%; height:auto; display:block; border-radius:4px; }
.story-content { overflow:hidden; } /* clear the float */
.video-embed { position:relative; width:100%; aspect-ratio:16/9; background:#000; margin:10px 0; }
.video-embed iframe { position:absolute; inset:0; width:100%; height:100%; border:0; }

/* Mobile: stack the image */
@media (max-width: 768px) {
  .story-image.right-50 { float:none; width:100%; margin:0 0 10px 0; }
}





@media screen and (max-width: 1024px) {

  .layout {
      flex-direction: column;
    }
  
    .main-col {
      order: -1; /* Moves main content to top on smaller screens */
    }
  
    .left-sidebar,
    .right-sidebar {
      max-width: 100%;
    }
    
  .news-carousel .carousel-item img {
    width: 100%;
    height: 340px;         /* adjust as you like */
    object-fit: cover;     /* crop to fill without distortion */
    border-radius: 6px;
    display: block;
    margin-bottom: 8px;
  }
}


.game-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 5px;
}

.gr-one {
    background: #e7e5e5;
}
.gr-two {
    background: #f5f3f3;
}
  
.team_left,
.team_right {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 40%;
}
  
.team_left {
    justify-content: flex-start;
    text-align: left;
}
  
.team_right {
    justify-content: flex-end;
    text-align: right;
}
  
.team_left img,
.team_right img {
    width: 36px;
    height: auto;
}
  
.team_left .team_info,
.team_right .team_info {
    display: flex;
    flex-direction: column;
}
  
.team_name {
    font-size: 1.4em;
    font-weight: bold;
}
  
.team_city {
    font-size: 0.8em;
    font-weight: normal;
    color: #666;
}

.score {
    width: 5%;
    text-align: center;
    font-size: 2.2em;
    font-weight: bold;
}
.status {
    width: 20%;
    text-align: center;
    color: #666;
    font-size: 0.9em;
    font-weight: bold;
}

.desktop-only {
    display: inline;
}

.mobile-only {
    display: none;
}

@media screen and (max-width: 768px) {


  .layout {
    margin: 0 0 0 0px;      /* top right bottom left */
    padding-left: 0px;      /* buffer inside the left edge */
    gap: 1px;              /* optional: smaller gap for mobile */
    flex-wrap: wrap;
    max-width: 100%;        /* prevent overflow */
    box-sizing: border-box; /* make padding count in total width */
  }

  /* 1) Kill inline min-width on GPT ad divs */
  [id^="div-gpt-ad"] {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  /* Header ad wrapper that had 728px min-width inline */
  #div-gpt-ad-1752552591114-0 { min-width: 0 !important; }

  #featured-event {
    width: 100%;
    padding: 10px;
    font-size: 0.7rem;
    box-sizing: border-box;
  }

  .featured-title {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 4px;
    text-align: left;
  }

  .featured-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
  }

  .featured-location {
    font-size: 0.75rem;
    flex-wrap: nowrap;
    text-align: left;
  }

  .featured-dates {
    font-size: 0.75rem;
    flex-wrap: nowrap;
    text-align: right;
  }

  .featured-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
  }
  
  .featured-champion {
    font-size: 0.75rem;
    flex-wrap: nowrap;
    text-align: left;
  }

  .featured-champion a {
    text-decoration: none;
    margin-left: 6px;
    color: #004080;
  }



  .featured-links {
    font-size: 0.75rem;
    flex-wrap: nowrap;
    text-align: right;
  }

  .featured-links a {
    text-decoration: none;
    margin-left: 6px;
    color: #004080;
  }

  .game-row {
    flex-direction: row;
    flex-wrap: nowrap;         /* ❗ prevent wrapping */
    align-items: center;
    justify-content: space-between;
    font-size: 0.6rem;
    padding: 4px 6px;
    gap: 4px;
    width: 100%;
    box-sizing: border-box;
  }
  
  .desktop-only {
      display: none;
  } 

  .mobile-only {
      display: inline;
  }

  .team_left,
  .team_right {
    width: 30%;                /* ❗ adjust for layout */
    flex-shrink: 1;
    justify-content: flex-start;
  }

  .team_right {
    justify-content: flex-end;
  }

  .score {
    width: 6%;                /* ❗ reduced from default */
    text-align: center;
    font-size: 1.8rem;
  }

  .status {
    width: 20%;
    text-align: center;
    font-size: 0.55rem;
    flex-shrink: 1;
  }

    .filterbar {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .filterweek,
  .filteryear,
  .filtertype,
  .filterevent,
  .filterteam {
    width: 100%;
  }

  .filteryear,
  .filtertype {
    display: inline-block;
    width: 48%; /* two side-by-side */
  }

  .filteryear select,
  .filtertype select,
  .filterweek select,
  .filterevent input,
  .filterteam input {
    width: 100%;
    box-sizing: border-box;
    font-size: 0.9rem;
  }

  .filterevent,
  .filterteam {
    display: flex;
    flex-direction: column;
  }

  .filterevent b,
  .filterteam b {
    font-size: 0.9rem;
    margin-bottom: 4px;
  }

  .filterweek button {
    font-size: 0.9rem;
    padding: 4px 8px;
  }

  #search-results {
    width: 100% !important;
  }

  .filter-bar-row {
    display: flex;
    justify-content: space-between;
    gap: 4%;
  }

  /* 2) Filter year/type row: make the math work */
  .filter-bar-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 10px; /* real pixels instead of % so we don't exceed 100% */
  }
  .filteryear, .filtertype { width: 100% !important; }

  /* 3) Search dropdown must not overflow */
  #search-results {
    width: 100% !important;
    max-width: 100% !important;
    left: 0; right: auto;
  }

  /* 4) Media should never overflow */
  img, video, iframe {
    max-width: 100%;
    height: auto;
  }

  /* Make all primary blocks truly fluid */
  .layout, .main-col, .left-sidebar, .right-sidebar, #featured-event, .game-row {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box;
  }

  /* Keep game rows on one line on mobile */
  .game-row {
    flex-wrap: nowrap !important;   /* do not wrap */
    gap: 4px;
  }
  .team_left, .team_right { width: 30%; min-width: 0; }
  .score { width: 10%; }
  .status { width: 20%; min-width: 0; }
  .team_name, .team_city { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  
  .news-carousel .carousel-item img {
    width: 100%;
    height: 240px;         /* adjust as you like */
    object-fit: cover;     /* crop to fill without distortion */
    border-radius: 6px;
    display: block;
    margin-bottom: 8px;
  }

  .video-embed {
    position: relative;
    width: 100%;
    max-width: 800px;        /* tweak for your layout */
    margin-left: auto;       /* right-align if your column is wider */
    aspect-ratio: 16 / 9;    /* modern browsers */
    background: #000;
  }
  .video-embed iframe {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    border: 0;
  }

}

/* Last resort (safety net). Keep at the very end: */
html, body { overflow-x: hidden; }




    