body {
  margin: 0;
  font-family: "roboto serif";
  min-height: 100vh;
  min-width: 100vw;
}

.container {
  min-height: 100vh;
  min-width: 100vw;
  display: grid;
  grid-template-areas:
    "header"
    "links"
    "content"
    "footerLinks"
    "footer";
  grid-template-rows: auto auto 1fr auto auto;
  /* auto header/footer, 1fr content */
}

header {
  grid-area: header;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.1rem;
  text-align: center;
  font-size: large;
  background-color: black;
  position: sticky;
  /* Make the header sticky */
  top: 0;
  /* Stick it to the top */
  z-index: 10;
  /* Ensure header is on top of other content */
}

header p {
  font-size: 2em;
  margin: 0;
}

header a {
  color: rgb(249, 104, 1);
}

links {
  grid-area: links;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  /* Allow links to wrap on smaller screens */
  position: sticky;
  /* Make links sticky */
  top: 51px;
  /* Stick it below the header which is 59px tall */
  z-index: 9;
  /* Ensure header is on top of other content */
  background-color: bisque;
  font-size: large;
}

links a {
  margin: 0.15rem;
  text-decoration: underline;
  color: blue;
}

links a.visited {
  margin: 0.15rem auto;
  text-decoration: underline;
  color: indianred;
}

main {
  grid-area: content;
  display: flex;
  flex-direction: column;
  align-items: center; /* Center the image horizontally */
  padding: 0.5rem;
  /* added this to space out the text and image*/
  gap: 1rem;
}

/* Style for the text added above the image */
.main .text-above-image {
  text-align: center;
  margin-bottom: 0.5rem;
}

img {
  max-inline-size: 100%;
  block-size: auto;
}

footerLinks {
  grid-area: footerLinks;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  /* Allow links to wrap on smaller screens */
  position: sticky;
  /* Make links sticky */
}

footerLinks a {
  margin: 0.15rem;
  text-decoration: underline;
  color: blue;
}

footerLinks a.visited {
  margin: 0.15rem auto;
  text-decoration: underline;
  color: indianred;
}

footer {
  grid-area: footer;
  padding: 0.2rem;
  background-color: black;
  color: rgb(249, 104, 1);
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

footer p {
  margin: 0;
  font-size: 1.5em;
}

/* Media Queries for responsiveness */
@media only screen and (max-width: 768px) {

  /* Medium screens and below */
  links {
    flex-direction: column;
    text-align: center;
  }

  main img {
    width: 95%;
  }
}

@media only screen and (max-width: 480px) {

  .container {
    grid-template-rows: auto auto 1fr auto auto;
    /* auto header/footer, 1fr content */
  }

  links {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    background-color: bisque;
    font-size: large;
  }

  links a {
    margin: 0.15rem auto;
    text-decoration: underline;
    color: blue;
  }

  links a.visited {
    margin: 0.15rem auto;
    text-decoration: underline;
    color: indianred;
  }

  main img {
    width: 90%;
  }
}

.row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  width: 100%;
  padding: 21px 5px 21px 5px;
}

.column:nth-child(odd) {
  color: brown;
  justify-content: center;
  align-items: center;
  line-height: 2;
}

.column {
  display: flex;
  flex-direction: column;
  flex-basis: 100%;
  flex: 1;
  font-size: x-large;
}

.container a {
  padding: 0.1em .2em 0.1em .2em;
}

@media (any-pointer: coarse) {
  .container a {
    padding: 0.2em .6em 0.2em .6em;
  }
}

/* For parkrun pages */
table {
  border: 2px solid black;
  border-collapse: collapse;
  font-size: larger;
}

thead > tr,
tfoot > tr {
  border: 2px solid black;
}

th,
td {
  border: 2px solid black;
}

button {
  background-color: black;
  color: white;
  border-radius: 10px 5%;
  gap: 2px;
}

/* For the menu */
.menuItem {
  display: flex;
  justify-content: left;
  align-items: left;
  font-size: 1em;
  margin-top: 1em;
  margin-bottom:1em;
  text-decoration: underline;
  color: blue;
}

.menuItem:hover {
  text-decoration: underline;
}

.hamburger {
  position: fixed;
  bottom: 100px;
  left: 20px;
  border: 0px;
  background-color: black;
  color: white;
  cursor: pointer;
}

.closeIcon {
  display: none;
}

.menu {
  position: fixed;
  transform: translateX(-100%);
  transition: transform 0.2s;
  left: 0;
  bottom: 120px;
  background-color: rgba(255,255,255, 75%);
  color: white;
  list-style: none;
  width: 200px;
}

.showMenu {
  transform: translateX(0);
}

.chart-navigation {
  display: flex;
}