:root {
  --primary: #00897b;
  --primary-hover: #00796b;
  --primary-focus: rgba(0, 137, 123, 0.125);
  --typography-spacing-vertical: 1.5rem;
  --muted-color: #ccc;
  --block-space: 2rem;
  --inline-space: 1rem;
  --text-color: #3d3f3f;
  --font-size: 16px;
  --border-color: var(--text-color);
  --border-color-mutted: #ddd;
  --border: 2px solid var(--border-color);
  --border-mutted: 1px solid var(--border-color-mutted);
}
header, main, aside, footer {
  padding: var(--block-space);
}
header {
  grid-row:    header;
  grid-column: header;
  padding: 0;
}
header nav ul {
  margin-top: 0;
  border-bottom: var(--border-mutted);
  padding: var(--inline-space) var(--block-space);
}
main {
  grid-row:    content;
  grid-column: content;
}
aside {
  grid-row:    sidebar;
  grid-column: sidebar;
}
main article, aside article {
  border-top: var(--border);
  padding-top: var(--inline-space);
}
footer {
  grid-row:    footer;
  grid-column: footer;
  background-color: #000;
  margin-top: var(--block-space);
}
body {
  font-size: var(--font-size);
  color:  var(--text-color);
  display: grid;
  grid-column-gap: 1rem;
  justify-content: center;
  grid-template-areas:   "header"
                          "content"
                          "sidebar"
                          "footer";
  grid-template-rows:    200px 1fr 1fr 150px;
  grid-template-columns: 95%;
}
h1 a {
  display: inline-block;
  width: 100px;
  height: 50px;
  background-image: url("/static/img/logo-medium.0da2fa71ea84.png");
  background-size: contain;
}

@media (min-width: 576px) {
  body {
    grid-template-columns: 90%;
  }
  h1 a {
    width: 200px;
    height: 100px;
  }
}
@media (min-width: 992px) {
  body {
    grid-template-areas:   "header header header header"
                            ". content sidebar ."
                            "footer footer footer footer";
    grid-template-rows:    300px 1fr 150px;
    grid-template-columns: 1fr 600px 300px 1fr;
  }
  aside {
    border-left: var(--border-mutted);
  }
  h1 a {
    width: 300px;
    height: 150px;
  }
}
@media (min-width: 1200px) {
  body {
    grid-template-columns: 1fr 800px 300px 1fr;
  }
}
@media (min-width: 1400px) {
  body {
    grid-template-columns: 1fr 900px 300px 1fr;
  }
}
figure {
  margin: 0;
}


/* Typography  */
p {
  margin-top: var(--block-space);
}
a {
  text-decoration: none;
  color: var(--text-color);
}
a.secondary, a.contrast {
  text-decoration: underline;
}
header nav.main ul {
  font-family: sans-serif;
  font-weight: bold;
}
header nav.secondary ul {
  font-family: sans-serif;
  align-items: center;
  justify-content: center;
  border-top: var(--border-mutted);
}
footer a {
  color: #fff;
  font-family: sans-serif;
}
h1, h2, h3, h4, h5, h6 {
  font-family: sans-serif;
  letter-spacing: -0.016em;
  font-size: var(--font-size);
  margin-top: var(--typography-spacing-vertical);
  margin-bottom: var(--typography-spacing-vertical);
}
h1 {
  --font-size: 6rem;
  --typography-spacing-vertical: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

h2 {
  --font-size: 1.75rem;
  --typography-spacing-vertical: 2.625rem;
}

h3 {
  --font-size: 1.5rem;
  --typography-spacing-vertical: 2rem;
}

h4 {
  --font-size: 1.25rem;
  --typography-spacing-vertical: 1.874rem;
}

h5 {
  --font-size: 1.125rem;
  --typography-spacing-vertical: 1.6875rem;
}
h6 {
  --font-size: 1.1rem;
  --typography-spacing-vertical: 1rem;
  color: var(--primary);
}
nav ul {
  display: flex;
}
nav li {
  margin: 0;
}
nav li + li {
  margin-left: var(--inline-space);
}
/* Used by Wagtail for photo inside content  */
.left {
  float: left;
  margin-right: var(--inline-space);
}
.text {
  text-align: justify;
}
.text a {
  text-decoration: underline;
}
.text .full-width {
  width: 100%;
  margin-bottom: var(--inline-space);
}


/* Elements  */
#map {
  width: 100%;
  height: 600px;
}
aside article {
  margin-bottom: var(--block-space);
}
.no-image {
  width: 100%;
  aspect-ratio: 1.5;
  background-color: #f1f1f1;
}
.feed {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--block-space) var(--inline-space);
}
.feed article {
  display: inline-block;
  min-width: 100%;
}
.feed article img {
  width: 100%;
}
.newsfeed article:first-child {
  width: 100%;
}
.tilefeed article,
.newsfeed article:not(:first-child) {
  flex: 1;
}
.newsfeed article:nth-child(n+14) figure {
  display: none;
}
@media (min-width: 768px) {
  .tilefeed article,
  .newsfeed article {
    min-width: calc(50% - var(--inline-space) / 2);
  }
}
@media (min-width: 992px) {
  .tilefeed article,
  .newsfeed article {
    min-width: calc((100% - var(--inline-space) * 2) / 3);
  }
  .newsfeed article:nth-child(5) {
    min-width: calc(50% - var(--inline-space) / 2);
  }
}
@media (min-width: 1200px) {
  .newsfeed article:first-child {
    display: flex;
    flex-direction: row-reverse;
  }
  .newsfeed article:first-child hgroup {
    width: 52%;
    margin-right: var(--inline-space);
  }
  .newsfeed article:first-child h3,
  .newsfeed article:nth-child(10) h3 {
    font-size: 3rem;
    line-height: 3.2rem;
  }
  .newsfeed article:nth-child(10) {
    min-width: 100%;
    display: flex;
  }
  .newsfeed article:nth-child(10) hgroup {
    width: 39%;
    margin-left: var(--inline-space);
  }
}
