:root {
  --orange: #ff7200;
}

body {
  font-family: "Franziska", serif;
  font-size: 1.25rem;
  background-color: #fff;
}

.wrapped {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 5%;
}

main.main {
  padding: 5% 0;
  @media (min-width: 1280px) {
    padding: 3rem 0;
  }
}

.main {
  background-color: #f1f1f1;
}

.button {
  text-decoration: none;
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  justify-content: center;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border: none;
  background: #ccc;
  cursor: pointer;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.5em 1em;
  border-radius: 2px;
  font-weight: 600;
  font-size: 1.2rem;
  & span {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    min-width: 1rem;
    min-height: 1rem;
    background: white;
    color: var(--blue);
    border-radius: 50%;
    line-height: 1;
    font-size: 0.8rem;
  }

  &.plaintext {
    background: none;
    color: #000;
    border: 1px solid #000;
    &:hover {
      background-color: #ddd;
    }
    & svg {
      fill: #000;
    }
  }
  &.fixed {
    pointer-events: none;
  }
  & svg {
    width: 1.7rem;
    height: 1.7rem;
    fill: #fff;
  }
}

.herotitle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2em;
  font-weight: 700;
  font-size: clamp(2rem, 7vw, 5.5rem);
  color: var(--orange);
  font-style: italic;
  margin: 0 0 2rem 0;
  @media screen and (max-width: 700px) {
    display: none;
  }
  & .subtitle {
    color: #888;
    font-size: clamp(1rem, 4vw, 3rem);
    margin-left: 0.4em;
    padding-left: 0.5em;
    border-left: 3px solid #888;
  }
}

.title {
  color: var(--orange);
  font-weight: 700;
  font-size: clamp(1.75rem, 5vw, 3rem);
  line-height: 1.1;
  margin: 0.4em 0 1em 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  & .subtitle {
    border-left: 2px solid var(--orange);
    padding-left: 1rem;
    margin-left: 0.8rem;
    letter-spacing: 0;
    font-weight: 400;
    font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  }
}

.text.usertext {
  display: flex;
  flex-direction: column;
  gap: 0.6em;
  margin: 0.6em 0;
}

.teaser {
  font-size: clamp(1rem, 3vw, 1.25rem);
  font-weight: 700;
  margin: 1.2rem 0;
  max-width: 53rem;
  * {
    display: inline;
  }
  em {
    font-weight: 400;
    font-style: italic;
  }
}

.teaserimage {
  max-width: 53rem;
  margin: 4% 0;
}

.heromenu {
  margin: 1.2rem 0;
  border-bottom: 2px solid var(--orange);
  padding-bottom: 4.5rem;
  line-height: 1;

  @media screen and (max-width: 700px) {
    display: none;
  }
  & .wrapped {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 5%;
  }
  & .teaserimage {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 0.5rem;
    transition: transform 0.2s ease;
  }
  & img {
    width: 100%;
    height: 100%;
    object-fit: cover;

    transition: transform 0.1s ease;
    /*
    &:hover {
      transform: scale(1.05);
    }
      */
  }
  & a {
    display: flex;
    gap: 0.5rem;
    flex-direction: column;
    text-align: center;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.6rem;
    color: #666;

    &:hover {
      color: var(--orange);
      .teaserimage {
        transform: translateY(-0.13rem);
        outline: 1px solid var(--orange) !important;
        outline-offset: 3px;
      }
    }
  }
}

.storieswrap {
  display: flex;
  gap: 7%;
  padding-top: 3rem;
  padding-bottom: 5rem;

  @media (max-width: 1000px) {
    flex-direction: column;
    gap: 5rem;
    align-items: center;
    gap: 2rem;
  }
  @media (max-width: 500px) {
    padding-top: 0;
  }
}

.stories {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.story {
  a {
    display: block;
    text-decoration: none;
    color: var(--orange);
    &:hover {
      text-decoration: underline;
      text-underline-offset: 0.2em;
      text-decoration-thickness: 1px;
    }
  }
  .storytitle {
    font-size: clamp(1.4rem, 4vw, 2.25rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--orange);
    margin: 0 0 0.75em 0;
    max-width: 53rem;
  }
  .teasertext {
    font-size: clamp(1rem, 3vw, 1.25rem);
    font-weight: 700;
    margin: 1.2rem 0;
    max-width: 53rem;
    * {
      display: inline;
    }
    & em {
      font-weight: 400;
      font-style: italic;
    }
  }
}

.pagination {
  margin-top: 2.5rem;
  @media (max-width: 1000px) {
    margin-top: 0;
    margin: 0 auto;
    padding-bottom: 2rem;
  }

  ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 50%;
    border: 2px solid var(--orange);
    color: var(--orange);
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
    transition:
      background-color 0.15s ease,
      color 0.15s ease;

    &:hover {
      background-color: var(--orange);
      color: #fff;
      text-decoration: none;
    }

    &[aria-current="page"] {
      background-color: var(--orange);
      color: #fff;
    }

    &:focus-visible {
      outline: 3px solid var(--orange);
      outline-offset: 3px;
    }
  }
}

.block-type-heading,
.block-type-quote,
.block-type-image {
  margin: 2rem 0;
  max-width: 53rem;
}

.block-type-quote {
  margin: 3rem 0;
}

.block-type-image {
  margin: 2.5rem 0 3rem;
}

.block-type-list {
  margin-bottom: 4rem;
}

.storyboxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-auto-rows: auto;
  gap: 2rem;
  padding-bottom: 8%;
  @media (min-width: 1280px) {
    padding-bottom: 5rem;
  }
  background-color: #f1f1f1;
}

.storybox {
  grid-row: span 2;
  background-color: #fff;
  border-radius: 0.5rem;
  display: grid;
  grid-template-rows: subgrid;
  align-content: start;
  overflow: hidden;
  transition: transform 0.2s ease;

  text-decoration: none;
  color: inherit;

  & .headline {
    grid-row: 1;
    padding: 1rem;
    padding-bottom: 0;
    margin-bottom: -1rem;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--orange);
  }
  .teaserimage {
    grid-row: 2;
    margin: 0;
    overflow: hidden;
  }
  .teasertext {
    padding: 1.5rem 1rem 0;
    margin-bottom: -1rem;
    line-height: 1.4;
  }
  & img {
    grid-row: 2;
    width: 100%;
    height: auto;
    transition: transform 0.2s ease;
  }
  &:hover {
    outline: 1px solid var(--orange) !important;
    outline-offset: 3px;
    transform: translateY(-0.2rem);
  }
  /*
  &:hover .teaserimage img {
    transform: scale(1.02);
  }

  &:hover .headline {
    text-decoration: underline;
    text-underline-offset: 0.2em;
    text-decoration-thickness: 1px;
  }
    */
}

.top-button {
  position: fixed;
  right: 2rem;
  bottom: 2rem;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  border: none;
  background-color: var(--orange);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  cursor: pointer;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(1rem);
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    visibility 0.3s ease;
  z-index: 100;
  svg {
    width: 1.5rem;
    height: 1.5rem;
    filter: brightness(0) invert(1);
  }
}

.top-button--visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

figcaption {
  font-size: clamp(1rem, 3vw, 1.25rem);
  text-align: center;
  padding-top: 0.5rem;
  margin-top: 0.5rem;
  text-wrap: balance;
  font-style: italic;
  line-height: 1.3;
  &:empty {
    display: none;
  }
}

.readmore {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 2rem;
  max-width: 53rem;

  .storylink {
    text-decoration: none;
    color: var(--orange);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    &::before {
      content: "";
      position: relative;
      top: -0.1em;
      content: "";
      background: url(/assets/icons/arrow-up-orange.svg) no-repeat center center;
      background-size: contain;
      width: 0.75em;
      height: 0.75em;
      transform: rotate(90deg);
    }

    &:hover {
      text-decoration: underline;
      text-underline-offset: 0.2em;
      text-decoration-thickness: 1px;
    }
  }
  .commentlink {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.2;
    color: #888;
  }
}
