*,
::after,
::before {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: Comfortaa, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  margin: 0;
  min-height: 52px;
}

header .contentWrapper {
  max-width: 1000px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header h1 {
  margin: 0;
}

header h1 a {
  background-color: black;
  color: white;
  font-size: large;
  text-decoration: none;
  padding: 1rem;
}

header nav ul {
  list-style: none;
  text-decoration: none;
  font-size: medium;
  padding-top: 0.75rem;
}

/* Just the top-level navigation */
header nav > ul {
  margin: 0;
  display: flex;
  gap: 1rem;
  align-items: center;
}

header nav ul li a,
header nav ul li label {
  display: flex;
  align-items: center;
  color: black;
  text-decoration: none;
}

header nav input[type="checkbox"] {
  display: none;
}

/* Parent navigation node -- add icon after */
header nav ul li:has(> .subnav) > label:after {
  content: url("./img/expand.svg");
  display: inline-block;
}

/* Don't use a different color for visited links */
header nav a:visited {
  color: inherit;
}

header nav a:hover {
  color: darkolivegreen;
}

/* Second-level navigation */
header nav .subnav {
  display: none;
  position: absolute;
  background-color: rgba(245, 245, 220);
  font-size: smaller;
  padding: 0 0.5rem;
}

header nav li:has(input[type="checkbox"]:checked) > .subnav {
  display: grid;
}

header nav .subnav a {
  padding: 0.25rem 0.5rem;
}

/* Hiding the menu icon for the desktop view */
header .menu-icon {
  display: none;
  border: none;
  background-color: transparent;
}

/* Hiding the checkbox default styling */
header .menu-icon input[type="checkbox"] {
  appearance: none;
}

.fullWidthImage {
  background-image: url("/assets/uploads/rikitiki-bw-narrow.jpg");
  background-position: 50%;
  width: 100vw;
  height: 400px;
  background-size: cover;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  margin-top: 0 !important;
}

.fullWidthImage .innerWrapper {
  display: flex;
  height: 150px;
  line-height: 1;
  justify-content: space-around;
  flex-direction: column;
}

.fullWidthImage h1 {
  background-color: rgb(255, 195, 0);
  color: white;
  font-size: 48px;
  line-height: 1;
  padding: 1rem 0.5rem 0.25rem 0.5rem;
  text-align: left;
}

.fullWidthImage h2 {
  background-color: seagreen;
  color: white;
  font-size: 24px;
  line-height: 1;
  padding: 0.25rem 0.5rem;
  text-align: left;
}

main {
  flex: 1;
  width: 800px;
  margin: 1rem auto auto auto;
  padding: 1rem;
}

h1,
h2,
h3,
h4 {
  text-align: center;
}

p {
  line-height: 150%;
  text-align: justify;
}

p img {
  max-width: 100%;
}

ul,
ol {
  line-height: 150%;
}

.buttonContainer {
  text-align: center;
}

.buttonContainer a {
  display: inline-block;
  text-decoration: none;
  padding: 0.75rem;
  background-color: white;
  border-radius: 0.25rem;
  font-weight: 700;
  color: #2e8b57;
  box-shadow: inset 0 0 0 2px #2e8b57;
  transition: all 0.15s ease;
  cursor: pointer;
}

.buttonContainer a:hover {
  color: black;
}

.columnLayout {
  display: flex;
  justify-content: space-evenly;
  gap: 1rem;
}

footer {
  margin: 0;
  padding: 1rem 2rem;
  color: white;
  background-color: #2e8b57;
}

footer p {
  text-align: center;
  font-size: smaller;
}

footer .socialIcon {
  height: 2rem;
  width: 2rem;
}

table {
  border-collapse: collapse;
  font-size: smaller;
}

th,
td {
  margin: 0;
  padding: 0.25rem;
  border: 1px solid lightgray;
}

/* On smaller screens... */
@media screen and (max-width: 820px) {
  header {
    display: block;
  }

  header .contentWrapper {
    display: block;
  }

  header h1 {
    display: flex;
    flex: 1;
  }

  header h1 a {
    display: flex;
  }

  header h1 a img {
    object-fit: cover;
    width: 100%;
  }

  header button {
    flex: 0;
  }

  /* Hiding the nav links with height and overflow */
  header nav {
    height: 0;
    overflow: hidden;
    flex-direction: column;
    position: absolute;
    background-color: rgba(245, 245, 220);
    width: 100%;
  }

  header nav ul {
    flex-direction: column;
    align-items: center;
  }

  header nav ul li {
    width: 100%;
  }

  /* Second-level navigation */
  header nav .subnav {
    position: relative;
    width: 100%;
  }

  header nav li:has(input[type="checkbox"]:checked) > .subnav {
    display: grid;
  }

  header .inner {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
  }

  /* Making the menu button visible */
  header .menu-icon {
    display: block;
  }

  header .menu-icon .close {
    display: none;
  }

  header:has(.menu-icon input[type="checkbox"]:checked) nav {
    margin-top: 1rem;
    height: auto;
  }

  header:has(.menu-icon input[type="checkbox"]:checked) .menu {
    display: none;
  }

  header:has(.menu-icon input[type="checkbox"]:checked) .close {
    display: inline-block;
  }

  main {
    width: 90%;
  }
}
