/* --- Base Styles --- */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: #333;
}

img {
  max-width: 100%; /* Ensures all images are responsive */
  height: auto;
}

/* --- Mobile Styles --- */
.container {
  width: 90%;
  margin: 0 auto;
}

/* Header */
#top_nav {
  text-align: center;
  padding: 10px 0;
}

#top_nav h1 {
  font-size: 1.5em;
}

/* --- Hamburger Menu CSS --- */

/* Initially hide the hamburger button on larger screens */
#hamburger-btn {
  display: none;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 10px;
  z-index: 20;
  position: absolute;
  right: 5px;
  top: 210px;
}

#hamburger-btn .bar {
  display: block;
  width: 60px;
  height: 7px;
  background-color: #333;
  margin: 6px 0;
  transition: all 0.3s ease;
  position: relative;
}

/* On mobile, stack the table and hide it by default */
#links {
  display: block;
  width: 100%;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  font-size: 2em;
}

/* Mobile-specific table styling */
#links table, #links thead, #links tr {
  width: 100%;
  display: block; /* Important for making the table behave like a block element */
}

#links th {
  text-align: center;
}

#links th a {
  padding: 15px;
  text-decoration: none;
  font-weight: bold;
  color: #333;
  display: block;
}

/* Display the menu when the 'open' class is active */
#links.open {
  max-height: 500px; /* Adjust if menu is taller */
  transition: max-height 0.5s ease-in;
  /* Add the background color here */
  background-color: #FFFFFF; /* A solid white background */
  /* You may also want to add a border or shadow for definition */
  border-bottom: 1px solid #ddd;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* --- Media query for mobile view --- */
@media (max-width: 1136px) {
  #hamburger-btn {
    display: block;
  }
  
  #links th {
	display: block;
	width: 100%;
	border-bottom: 1px solid #ddd;
  }
}

/* --- Media query for desktop view --- */
@media (min-width: 1137px) {
  #links {
    max-height: none; /* Show the menu normally on desktop */
	top: 218px;
	font-size: 1.26em;
  }

  #links table {
    display: table;
  }

  #links thead, #links tr {
    display: table-row;
  }

  #links th a {
    white-space: nowrap; /* Prevent links from wrapping on larger screens */
  }
}


/* Page content */
#page_content {
  padding: 20px;
}

/* Schedule */
.schedule_table {
  width: 100%;
  overflow-x: auto; /* Allows horizontal scrolling for large tables */
  display: block;
}

.schedule_table table {
  width: 100%;
  min-width: 600px; /* Prevents schedule tables from becoming unreadable */
  border-collapse: collapse;
}

.schedule_table th, .schedule_table td {
  padding: 8px;
  border: 1px solid #ddd;
  font-size: 0.8em;
}

/* Footer */
#page_footer {
  text-align: center;
  padding: 20px;
  background-color: #f4f4f4;
}


/* --- Tablet and Desktop Styles --- */
@media screen and (min-width: 768px) {
  .container {
    width: 960px;
  }

  /* Header */
  #top_nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
  }

  /* Navigation Menu */
  #primary_nav {
    display: block;
  }

  #primary_nav ul {
    display: flex;
  }

  #primary_nav ul li {
    border-bottom: none;
    margin-right: 15px;
  }

  #primary_nav ul li a {
    padding: 10px 15px;
  }

  /* Schedule */
  .schedule_table {
    overflow-x: hidden;
  }

  .schedule_table th, .schedule_table td {
    font-size: 1em;
  }
}
