/* Color definitions */
:root {
  --body-color: #003366;
  --body-background: #ffffff; /*#fffefa;*/
  --event-background: #f7f9fc;
  --event-shadow: rgba(0, 0, 0, 0.25);
  --accent-color: #b59131;
  --header-footer-color: #ffffff;
  --header-footer-background: #003366;
}

/* Body */
body {
  font-family: "Roboto", "Open Sans", sans-serif;
  font-weight: 400;
  font-size: 1.1em;
  margin: 0;
  padding: 0;
  background-color: var(--body-background);
  color: var(--body-color);
}

/* Header */
header {
  font-size: 1em;
  background: var(--header-footer-background);
  margin-bottom: 1em;
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  width: 100%;
  top: 0;
  position: fixed;
  color: var(--header-footer-color);
  box-shadow: 0 2px 5px var(--event-shadow);
}

header h1 {
  font-size: 1.5em;
  margin: 0;
  flex-grow: 1;
}

header a {
  color: var(--header-footer-color);
  text-decoration: none;
}

.header-top-row {
  flex-grow: 1;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

@media (max-width: 767px) {
  header {
    flex-direction: column;
  }
  .header-top-row {
    padding: 1.5em 0.5em;
  }
}

@media (min-width: 768px) {
  header {
    flex-direction: row;
  }
  .header-top-row {
    padding: 1em 1em;
  }
  .header-bottom-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: stretch;
  }
}

/* Navigation */

nav a {
  font-weight: bold;
}

@media (max-width: 767px) {
  .burger-menu {
    display: flex;
  }
  nav {
    display: none;
    flex-direction: column;
    align-items: baseline;
  }
  nav.active {
    display: flex;
    flex-direction: column;
    align-items: baseline;
  }
  nav a {
    padding: 1.5em 0.5em;
  }
}

@media (min-width: 768px) {
  .burger-menu {
    display: none;
  }
  nav {
    flex-grow: 1;
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: stretch;
  }
  nav a {
    margin-left: 2em;
    padding: 0em 1em;
  }
}

/* Main content */

main {
  margin-top: 5.5em;
  /* margin-bottom: 5.5em; */
}

section {
  max-width: 1000px;
  margin: auto;
  padding: 0em 0.5em;
  margin-bottom: 2.5em;
}

/* Pseudo element to allow jumping without overlap from header */
section::before {
  visibility: hidden;
  display: block;
  content: "";
  height: 100px;
  margin: -100px 0 0;
}

section h2 {
  max-width: 1000px;
  font-size: 2.2em;
  font-weight: 900;
  color: var(--accent-color);
  margin: auto;
}

p {
  line-height: 1.6;
}

/* Events */

.event-card {
  border-left: 4px solid var(--body-color);
  border-radius: 4px;
  padding: 0.5rem;
  margin: 1rem 0;
}

.event-details h3 {
  margin-top: 0;
  margin-bottom: 0.5em;
  padding: 0;
  font-size: 1.5em;
}

.event-details > div {
  display: flex;
}

.event-details > div > * {
  margin-top: 0.2em;
  margin-bottom: 0.2em;
  padding: 0;
}

@media (max-width: 767px) {
  .event-details > div > h4 {
    flex: 30%;
  }
  .event-details > div > p {
    flex: 80%;
  }
}

@media (min-width: 768px) {
  .event-details > div > h4 {
    flex: 10%;
  }
  .event-details > div > p {
    flex: 80%;
  }
}

.event-details h4 {
  font-size: 1.2em;
  color: var(--accent-color);
}

.event-details p {
  text-align: left;
  align-items: center;
}

.event-details > h4 {
  margin-bottom: 0.5em;
  margin-top: 1em;
}

.event-details > p {
  margin-top: 0.1em;
  margin-bottom: 0.1em;
}

.event-link {
  background-color: var(--body-color);
  color: var(--body-background);
  font-weight: 700;
  padding: 0.3em 0.8em;
  text-decoration: none;
  border-radius: 4px;
  display: inline-block;
  box-shadow: 2px 2px 5px var(--event-shadow);
}

.flyer-image-overlay {
  display: none;
}

.flyer-image-overlay.active {
  display: flex;
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2;
  cursor: pointer;
}

.flyer-image-overlay > .flyer-image {
  display: none;
}

.flyer-image-overlay.active > .flyer-image {
  display: flex;
  margin: auto;
  max-width: 95%;
  max-height: 95vh;
}

/* Footer */

footer {
  border-top: 2px solid var(--body-color);
  font-size: 0.9em;
  color: var(--body-color);
  text-align: center;
  padding: 0.5em 0.5em;
}

footer a {
  color: var(--body-color);
  text-decoration: none;
}

footer p {
  margin: 0.5em;
}
