* {
  margin: 0;
  padding: 0;
}

:root {
  --padding: 1rem;
  --padding-s: .75rem;
  --padding-xs: .5rem;
  --color-black: #000;
  --color-white: #fff;
  --color-light-grey: #ccc;
  --color-grey: #545454;
  --color-sky: #94cbf2;
  --color-blue-sky: #3682c5;
  --color-dark-sky: #5aaae4;
  --color-green: #8cc833;
  --color-yellow: #fef6b4;
  --color-light: #efefef;
  --color-text: var(--color-black);
  --color-text-shadow: #4f95c8;
  --color-text-grey: var(--color-grey);
  --color-background: var(--color-white);
  --color-code-light-grey: #cacbd1;
  --color-code-comment: #a9aaad;
  --color-code-white: #c5c9c6;
  --color-code-red: #d16464;
  --color-code-orange: #de935f;
  --color-code-yellow: #f0c674;
  --color-code-green: #a7bd68;
  --color-code-aqua: #8abeb7;
  --color-code-blue: #7e9abf;
  --color-code-purple: #b294bb;

  /* Css variables for cookie consent */
  --cc-btn-primary-bg: var(--color-sky);
  --cc-btn-primary-hover-bg: var(--color-green);
}

html {
  color: var(--color-text);
  background: var(--color-background);
}

body {
  margin: 0 auto;
  color: var(--color-text-grey);
  font-family: 'Lato', sans-serif;

  @media (min-width: 55rem) {
    padding-top: min(7vw, 7.5rem);
  }
}

.header {
  z-index: 1;
  position: fixed;
  top: 0;
  width: 100%;
  max-height: 4rem;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  background-color: var(--color-sky);
  color: var(--color-white);
  transition: all .3s;

  &.compact {
    box-shadow: 0 2px 4px var(--color-light-grey);

    .logo {
      flex-basis: 30vw;
      margin-left: var(--padding);
    }
  }

  @media (min-width: 55rem) {
    max-height: 7.5rem;

    &.compact {
      max-height: 4rem;
    }
  }
}

.logo {
  flex-basis: 30vw;
  margin-left: var(--padding);

  & img {
    max-width: 14rem;
    height: 100%;
    object-fit: contain;
  }

  @media (min-width: 55rem) {
    flex-basis: auto;
    margin: 0 var(--padding);

    & img {
      max-width: 25vw;
    }
  }
}

li {
  list-style: none;
}

.menu {
  text-transform: uppercase;
  background-color: var(--color-dark-sky);

  @media (max-width: 55rem) {
    position: absolute;
    top: 100%;
    right: 0;
    display: grid;
    grid-template-rows: 0fr;
    width: 100%;
    font-size: .8rem;
    transition: grid-template-rows 0.5s ease-in-out;
    box-shadow: 0 2px 4px var(--color-light-grey);
    border-radius: 0 0 1rem 1rem;

    &.open {
      grid-template-rows: 1fr;
    }
  }

  @media (min-width: 55rem) {
    display: flex;
  }
}

.menu__toggle {
  padding: var(--padding-xs);
  margin: var(--padding-s);
  border: 1px solid var(--color-white);
  border-radius: 4px;

  &.active {
    background-color: var(--color-dark-sky);
  }

  @media (min-width: 55rem) {
    display: none;
  }
}

.menu__list {
  &>li a {
    display: block;

    &:hover,
    &.active {
      color: var(--color-white);
      background-color: var(--color-green);
    }
  }

  @media (max-width: 55rem) {
    overflow: hidden;

    &>li a {
      padding: var(--padding);
    }
  }

  @media (min-width: 55rem) {
    display: flex;
    align-items: center;

    &>li {
      display: flex;
      position: relative;
      height: 100%;
      width: 12vw;
      border-right: 1px solid var(--color-sky);
    }

    & li:last-child {
      border-right: none;
    }

    &>li>a {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      padding: 0 1vw;
      transition: all 0.3s ease-in-out;
      background-position: 50% 50%;
      font-weight: bold;
      text-shadow: 1px 1px 1px var(--color-text-shadow);
    }

    &>li:hover>a,
    &>li>.active {
      background-image: url(../img/nav_act.png);
      background-repeat: no-repeat;
      background-position: center top;
    }

    & li:hover .menu__sub,
    .menu__sub.visible {
      position: absolute;
      top: 100%;
      display: block;
      width: 100%;
      box-shadow: 0 2px 4px var(--color-light-grey);
    }
  }
}

.menu__sub {
  &>li a {
    color: var(--color-dark-sky);
    background-color: var(--color-white);

    &:hover,
    &.active {
      color: var(--color-white);
      background-color: var(--color-sky);
    }
  }

  @media (min-width: 55rem) {
    display: none;

    &>li a {
      padding: var(--padding-s);
      font-size: .9rem;
    }
  }
}

.cover {
  display: flex;
  margin-top: 4rem;

  & img {
    width: 100%;
    height: 45vw;
    object-fit: cover;
  }

  @media (min-width: 55rem) {
    margin-top: 0;

    & img {
      height: 32vw;
    }

    &.compact img {
      height: 20vw;
    }
  }
}

.main {
  padding: 3rem 1rem;

  @media (min-width: 55rem) {
    padding: 4rem 8vw;
  }
  @media (min-width: 70rem) {
    padding: 4rem 10vw;
  }
}

.section {
  padding: 3rem 0;
}

/* Typography */

a {
  color: currentColor;
  text-decoration: none;

  &:focus-visible {
    outline: var(--color-dark-sky) solid 2px;
    border-radius: 2px;
  }
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Cabin Sketch', Arial;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  color: var(--color-dark-sky);
  text-transform: uppercase;
}

button {
  font: inherit;
  background: none;
  border: 0;
  color: currentColor;
  cursor: pointer;
}

strong,
b {
  font-weight: 600;
}

*/ small {
  font-size: inherit;
  color: var(--color-text-grey);
}

h1,
.h1,
.intro {
  font-size: 2rem;
  margin-bottom: 1rem;
  line-height: 1.25em;

  @media (min-width: 55rem) {
    font-size: 3.5rem;
    margin-bottom: 2rem;
    line-height: 1.25em;
  }
}

h2,
.h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.25rem;

  @media (min-width: 55rem) {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    line-height: 1.25em;
  }
}

h3,
.h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1.25rem;

  @media (min-width: 55rem) {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    line-height: 1.25em;
  }
}

.content {
  line-height: 1.5em;

  p {
    font-weight: 100;
  }

  a {
    color: var(--color-dark-sky);
    text-decoration: underline;
    transition: color .3s;

    &:hover {
      color: var(--color-green);
    }
  }

  img {
    max-width: 100%;
    height: auto;
  }

  .grid {
    --columns: 12;
    --gutter: 2rem;
    display: grid;
    grid-gap: var(--gutter);
    grid-template-columns: 1fr;

    &>.column {
      margin-bottom: var(--gutter);

      figure {
        padding-bottom: 2.5rem;
        border-bottom: 2px dashed var(--color-sky);

        &:last-child {
          border-bottom: none;
        }
      }
    }

    @media screen and (min-width: 60rem) {
      grid-template-columns: repeat(12, 1fr);

      &>.column {
        grid-column: span var(--columns);
      }
    }
  }

  .autogrid {
    --gutter: 3rem;
    --min: 10rem;
    display: grid;
    grid-gap: var(--gutter);
    grid-template-columns: repeat(auto-fit, minmax(var(--min), 1fr));
    grid-auto-flow: dense;
  }

  .teaser {
    display: flex;
    flex-flow: row;
    gap: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    color: var(--color-white);
    text-decoration: none;
    text-shadow: 1px 1px 0px var(--color-dark-sky);
    background-color: var(--color-sky);
    box-shadow: inset 0 0 4rem 2.5rem var(--color-dark-sky);
    border: 1px solid var(--color-blue-sky);
    border-radius: 2.5rem;

    /* We tell all items to be 100% width, via flex-basis */
    &>* {
      flex: 1 50%;
    }

    &::before {
      content: "";
      width: 6vw;
      height: 6vw;
      background-image: url(../img/icon_download.png);
      background-repeat: no-repeat;
      background-position: left center;
      background-size: contain;
    }

    &:hover {
      color: var(--color-white);
    }

    h4 {
      font-size: 1.5rem;
      line-height: 2rem;
      color: var(--color-white);
    }
  }

  .button {
    padding: .4rem .8rem;
    text-decoration: none;
    color: var(--color-white);
    border: 2px solid var(--color-dark-sky);
    border-radius: 4px;
    background-color: var(--color-sky);
    box-shadow: 0 2px 4px var(--color-light-grey);
    transition: all .3s;

    &:hover {
      color: var(--color-white);
      background-color: var(--color-dark-sky);
      box-shadow: none;
    }
  }
}

.content :first-child {
  margin-top: 0;
}

.content :last-child {
  margin-bottom: 0;
}

.content p,
.content ul,
.content ol {
  margin-bottom: 1.5rem;
}

.content ul,
.content ol {
  margin-left: 1rem;
}

.content ul p,
.content ol p {
  margin-bottom: 0;
}

.content ul>li {
  list-style: disc;
}

.content ol>li {
  list-style: decimal;
}

.content ul ol,
.content ul ul,
.content ol ul,
.content ol ol {
  margin-bottom: 0;
}

.content figure {
  margin: 3rem 0;

  .gallery {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: 1fr 1fr 1fr;
    margin: 0;
    line-height: 0;

    li {
      list-style: none;
    }

    img {
      width: 100%;
      height: 100%;
      object-fit: cover;

      &[data-lightbox] {
        cursor: pointer;
      }
    }

    figcaption {
      padding-top: .75rem;
      color: var(--color-text-grey);
    }

    @media (min-width: 55rem) {
      grid-template-columns: repeat(8, 1fr);

      li:nth-child(1) {
        grid-column-start: 1;
        grid-column-end: 3;
        grid-row-start: 1;
        grid-row-end: 3;
      }

      li:nth-child(2) {
        grid-column-start: 3;
        grid-column-end: 5;
        grid-row-start: 1;
        grid-row-end: 3;
      }

      li:nth-child(3) {
        grid-column-start: 5;
        grid-column-end: 9;
        grid-row-start: 1;
        grid-row-end: 6;
      }

      li:nth-child(4) {
        grid-column-start: 1;
        grid-column-end: 5;
        grid-row-start: 3;
        grid-row-end: 6;
      }

      li:nth-child(5) {
        grid-column-start: 1;
        grid-column-end: 5;
        grid-row-start: 6;
        grid-row-end: 9;
      }

      li:nth-child(6) {
        grid-column-start: 5;
        grid-column-end: 9;
        grid-row-start: 6;
        grid-row-end: 9;
      }
    }
  }
}

.lightbox {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  justify-content: center;

  figcaption {
    padding: var(--padding-xs);
    color: var(--color-white);
  }

  img {
    max-width: 80vw;
    max-height: 80vh;
  }

  button {
    padding: 0.5rem;
    color: var(--color-white);
    font-size: 1.5rem;
  }
}

.news-list {
  article {
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-bottom: 2px dashed var(--color-sky);

    &:last-child {
      border-bottom: none;
    }
  }
}

.news-list--short {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem;
  background-color: var(--color-yellow);

  @media (min-width: 48rem) {
    flex-direction: row;
  }

  @media (min-width: 55rem) {
    padding: 1rem;
    padding-left: 20vw;
  }
}

.news-list__image {
  display: none;

  @media (min-width: 55rem) {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 20vw;
    display: block;
  }
}

.news-article--short {
  flex: 1 1 auto;
  padding: 1rem 0;
  border-bottom: 2px dashed var(--color-sky);

  &:last-child {
    border-bottom: none;
  }

  .h3 {
    margin-bottom: 1rem;
  }

  p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
    font-size: .9rem;
  }

  .news-article__link {
    display: inline-flex;
    padding: .5rem;
    padding-left: 2.5rem;
    background-image: url(../img/icon_morebutton.png);
    background-repeat: no-repeat;
    background-position: .1rem center;
    color: var(--color-dark-sky);
    transition: all 0.3s ease-in-out;

    &:hover {
      text-decoration: underline;
      background-position: .5rem center;
    }
  }

  @media (min-width: 48rem) {
    padding: 0 1rem;
    border-bottom: none;

    &+.news-article--short {
      border-left: 2px dashed var(--color-sky);
    }
  }

  @media (min-width: 55rem) {
    padding: 1rem 2rem;
  }
}

.footer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.5em;

  & h2 {
    font-weight: 600;
    margin-bottom: .75rem;
  }

  & ul,
  & p {
    color: var(--color-white);
  }

  & p {
    text-align: center;
  }

  & a:hover {
    color: var(--color-sky);
  }
}

.footer__group {
  padding: 2rem;
  background-color: var(--color-green);

  & .footer__group-menu {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
  }

  & .footer__group-headline {
    margin-bottom: 1rem;
    text-align: center;
    color: var(--color-white);
  }

  li {
    padding: 1vw;
    transition: all 0.5s ease-in-out 0s;

    &:hover {
      border-radius: 50%;
      box-shadow: inset 0 0 25px var(--color-white);
    }

    a {
      display: flex;
      flex-direction: column;
      align-items: center;
      text-transform: uppercase;
      font-weight: 300;
      font-size: .8rem;

      &:hover {
        color: var(--color-white);
      }
    }

    img {
      padding: 1rem;
    }
  }

  @media (min-width: 55rem) {
    padding: 2rem 6rem;

    li {
      padding: 2vw;
    }
  }
}

.footer__menu,
.footer__contact {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 3rem;
  background-color: var(--color-dark-sky);
}

.footer__menu {
  gap: 1rem;
  padding: 2rem;
  font-size: .8rem;
  text-transform: uppercase;
  border-bottom: 2px dashed var(--color-sky);

  @media (min-width: 55rem) {
    gap: 2rem;
    padding: 3rem;
    font-size: 1rem;
  }
}