/* Resetting Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow-y: scroll;
}

body {
  font: 18px 'Open Sans', sans-serif;
  color: #333;
  background-color: #f8f8f8;
}

a {
  text-decoration: none;
  color: #444;
}

a:hover {
  color: #305785; 
}

#countdown{
	border-top:	black 8px solid;
	height:25px;
	font-size:14px;
	color:white;
	background-color:black;
	text-align:center;
	vertical-align:center;
}

@media screen and (max-width: 640px) {
  #countdown {
    height: auto;
    padding: 10px 5px;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.4;
  }
}

/* Header and Footer (nav) Navigation - Shared Styles */
#footer_links,
#footer {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  border-top: black 2px solid;
  padding: 15px 10px;
  background-color: transparent;
  width: 100%;
  box-sizing: border-box;
  gap: 10px; /* optional: space between links */
}

#footer_links a,
#footer a.footer {
  font-size: 14px;
  color: #444;
  text-decoration: none;
  padding: 6px 10px;
  display: inline-block;
  transition: all 0.3s ease;
}

#footer_links a:hover,
#footer a.footer:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: #000;
}

#footer a.footer.active {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* Responsive layout for very narrow screens */
@media screen and (max-width: 500px) {
  #footer {
    flex-direction: column;
    padding: 10px;
  }

  #footer a.footer {
    font-size: 13px;
  }
}


/* Page Header Styling */
#page_header {
  margin: 10px 0;
  padding: 0; /* no need for vertical padding now */
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  height: 140px;
}

#page_header a {
  display: block;
  width: 100%;
  height: 140px;
  background: url('images/header_image.gif') center center no-repeat;
  background-size: contain;
}


#page_header img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Tournament Table Style */
.tournament-section {
  max-width: 600px;
  margin: 30px auto;
  background: #fff;
  border-radius: 5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  font-family: 'Open Sans', sans-serif;
}

.tournament-section caption {
  background-color: #444;
  color: white;
  font: 16px 'Open Sans', sans-serif;
  padding: 10px;
  text-align: center;
  caption-side: top;
}

.tournament-section table {
  width: 100%;
  border-collapse: collapse;
}

.tournament-section td {
  padding: 10px;
  border: none;
  text-align: left;
  font-size: 14px;
}

.tournament-section tr:nth-child(even) td {
  background-color: #f9f9f9;
}

.tournament-section tr:nth-child(odd) td {
  background-color: #ffffff;
}

.tournament-section td:first-child {
  width: 110px;
  white-space: nowrap;
}

/* Year Group Headers */
.tournament-year-header {
  background-color: #e1e1e1;
  font-weight: bold;
  text-align: center;
  padding: 8px;
  font-size: 15px;
  color: #333;
}

/* New tag */
.tournament-new {
  background-color: #ffefc5;
  color: #b56c00;
  font-weight: bold;
  font-size: 12px;
  padding: 3px 6px;
  margin-left: 6px;
  border-radius: 5px;
  display: inline-block;
  vertical-align: middle;
}

.AwardsTitle {
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
	font-weight: bold;
    color: var(--awards-title-color, white);
    text-align: center;
    margin: 20px auto;
    margin-top: 15px;
    background-color: var(--awards-title-bg, #444);
    padding: 10px;
}


/* Container */
#container {
  margin: 3% auto;
  width: 80%;
  max-width: 1200px;
  background-color: #fff;
  text-align: justify;
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
  border-radius: 8px;
  overflow-x: hidden;
}

/* Leaderboard Content Box */
.leaderboard_content_box {
  margin: 0 auto;
  padding: 0;
  width: 100%;
  overflow-x: auto;
}

.leaderboard_content_box table#myTable {
  width: 80%;
  max-width: 800px;
  margin: 0 auto;
}

/* Tables */
table {
  border-spacing: 4px;
}

table.results {
  border-spacing: 0;
  font: 14px 'Open Sans', sans-serif;
  width: 100%;
  margin-bottom: 20px;
}

table.results th {
  background-color: #444;
  color: white;
  padding: 10px;
  text-align: left;
}

table.results td {
  padding: 8px;
  text-align: left;
}

table.results tr:nth-child(even) {
  background-color: #f9f9f9;
}

table.results tr:nth-child(odd) {
  background-color: #ffffff;
}

table.results tr:hover {
  background-color: #e6e6e6;
}

table.results caption,
table caption.red {
  background-color: #444;
  color: white;
  font: 14px 'Open Sans', sans-serif;
  padding: 10px;
  text-align: center;
  caption-side: top;
}

/* Page Content */
#page_content {
  padding: 25px;
  text-align: center;
  font: 14px 'Open Sans', sans-serif;
  background-color: #f5f5f5;
  overflow-x: auto;
}

/* Dropdown */
#seasonDropdown {
  padding: 8px 16px;
  font: 11px 'Open Sans', sans-serif;
  border-radius: 5px;
  border: 1px solid #ccc;
  background-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  background-repeat: no-repeat;
  background-position: right 10px top 50%;
  background-size: 10px;
  margin: 10px;
}

#seasonDropdown:hover {
  border-color: #888;
  box-shadow: 0 3px 6px rgba(0,0,0,0.25);
}

#seasonDropdown:focus {
  outline: none;
  border-color: #555;
}

@media screen and (max-width: 640px) {
  #page_header a {
    font-size: 1.5em;
  }
}


@media screen and (max-width: 640px) {
  body {
    font-size: 14px;
  }

  #container {
    width: 100%;
    margin: 0;
    padding: 0 5px;
  }

  #footer_links,
  #footer {
    flex-direction: column;
    padding: 10px;
  }

  .leaderboard_content_box table#myTable,
  table.results {
    width: 100%;
    font-size: 12px;
  }

  table.results td,
  table.results th {
    padding: 5px;
    white-space: nowrap;
  }

  #page_header a {
    width: 100%;
    height: 140px; /* Or 140px, depending on your preference */
    /*font-size: 1.5em; */
    background: url('images/header_image.gif') center center no-repeat;
    background-size: contain;
  }
  
  #seasonDropdown {
    width: 95%;
    margin: 10px auto;
  }

  #footer a.footer.active {
    text-decoration-thickness: 1.5px;
  }
}

/* Responsive table grid layout */
#stats-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 10px;
}

.stats-table {
  flex: 0 0 32%; /* Three tables per row, each about 32% wide with small gaps */
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  background-color: white;
  border-radius: 5px;
  overflow-x: auto;
  padding-bottom: 10px;
}

/* Adjust layout for smaller screens */
@media screen and (max-width: 900px) {
  .stats-table {
    flex: 0 0 48%; /* Two tables per row on tablets */
  }
}

@media screen and (max-width: 640px) {
  .stats-table {
    flex: 0 0 100%; /* Single table per row on mobile */
  }
}

.stats-table {
  max-width: 350px; /* adjust narrower tables */
}

table.results th, table.results td {
  padding: 6px 8px; /* reduce padding */
  font-size: 14px;  /* slightly smaller font */
}

table.results td:first-child {
  width: 60%; /* narrower name column */
}

table.results td:last-child {
  width: 40%; /* wider numeric data column */
  text-align: center;
}

.tournament-section a {
  color: #305785;
  text-decoration: none;
  #transition: color 0.3s ease, text-decoration 0.3s ease;
}

.tournament-section a:hover {
  color: #1a3b6d;
  text-decoration: underline;
  text-underline-offset: 2px;
}

table.tournament-section tr:hover {
  #background-color: #e6e6e6;
}

/* Link hover consistent with leaderboard */
.tournament-section a,
.leaderboard_content_box table.results a {
  color: #444;
  text-decoration: none;
  #transition: all 0.3s ease; 
}

.tournament-section a:hover,
.leaderboard_content_box table.results a:hover {
  #background-color: rgba(0, 0, 0, 0.05);
  #color: #f9f9f9;
  text-decoration: none;
}
#myTable tr:hover td {
  #background-color: #e6e6e6;
}

.leaderboard_content_box table.results th:nth-child(1),
.leaderboard_content_box table.results td:nth-child(1) {
  width: 40%;
  text-align: left;
}

.leaderboard_content_box table.results th:nth-child(2),
.leaderboard_content_box table.results td:nth-child(2),
.leaderboard_content_box table.results th:nth-child(3),
.leaderboard_content_box table.results td:nth-child(3),
.leaderboard_content_box table.results th:nth-child(4),
.leaderboard_content_box table.results td:nth-child(4) {
  width: 20%;
  text-align: center;
}

