@font-face {
  font-family: "Bitter";
  font-style: normal;
  font-weight: 500;
  src: url(./fonts/Bitter-SemiBold.woff2) format("woff2"),
    url(./fonts/Bitter-SemiBold.woff) format("woff");
}

@font-face {
  font-family: "Bitter";
  font-style: normal;
  font-weight: 700;
  src: url(./fonts/Bitter-ExtraBold.woff2) format("woff2"),
    url(./fonts/Bitter-ExtraBold.woff) format("woff");
}

html {
  min-height: 100%;
  width: 100%;
}

body {
  background-image: url(./assets/outro-bg-marktplatz.png);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  min-height: 100%;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
  font-size: 20px;
  font-size: clamp(18px, 24px, 24px);
  font-family: "Bitter";
  font-weight: 500;

  position: relative;
}

h1 {
  margin: 0;
  font-weight: 700;
  font-size: 1.5rem;
}

h2 {
  margin: 0;
  margin-top: 1rem;
  font-size: 1.2rem;
}

p {
  margin-top: 0.2rem;
}

* {
  box-sizing: border-box;
}

.button.only-sm-screen {
  display: none;
}

.wrapper {
  box-sizing: border-box;
  display: flex;
  gap: 20px;
  flex-direction: column;
  padding: 20px;
  min-height: 100svh;
  height: 100%;
  overflow-x: hidden;
  max-width: 1500px;
  margin: auto;
  padding-bottom: 60px;
}

.button {
  display: block;
  box-sizing: border-box;
  background-image: url(./assets/button.png);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45%;
  min-width: 250px;
  max-width: 300px;
  aspect-ratio: 316/101;
  font-weight: 700;
  font-size: 24px;
  text-align: center;
  color: black;
  text-decoration: none;
}

.button--close {
  height: 40px;
  width: 40px;
  background-image: url(./assets/close-button.png);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  position: absolute;
}

.button:hover {
  background-image: url(./assets/button-active.png);
  line-height: 2rem;
  padding-bottom: 5px;
}

.button:active {
  background-image: url(./assets/button.png);
}

.highlight {
  display: inline-block;
  margin-top: 1em;
  font-weight: 700;
}

/****** Logos *******/

.logos__container {
  width: 100%;
  height: 40px;
  display: flex;
  justify-content: space-between;
  padding-inline: 10px;
}

.logo {
  height: 100%;
  width: auto;
}

.logo img {
  height: 40px;
  width: auto;
}

.mittelalter__title {
  height: 20vh;
  max-height: 200px;
  width: fit-content;
  margin-inline: auto;
  margin-top: -40px;
}

.mittelalter__title img {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/*********** level selection********/
.inner-wrapper {
  display: flex;
  height: 100%;
  align-items: center;
  flex-grow: 1;
}

.level-selection__container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 1rem;
  gap: 2rem;
  width: 60%;
}

/********* description ********/
.description__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  justify-content: flex-end;
  align-self: flex-end;
  padding-right: 10px;
}

.description__text-container {
  padding: 1rem;
  background: white;
  border-radius: 20px;
  max-width: 70%;
  text-align: center;
  position: relative;
}

.description__text-container::after {
  content: "";
  display: block;
  background-image: url(./assets/sprechblase-pfeil.png);
  height: 40px;
  width: 40px;
  background-size: contain;
  background-repeat: no-repeat;
  position: absolute;
  bottom: -35px;
  right: 3rem;
  hyphens: manual;
}

.description__img {
  width: 100%;
  aspect-ratio: 946/643;
  max-height: 30vh;
  object-fit: contain;
}

/****level selection*****/

.game-selection__wrapper {
  display: flex;
  justify-content: space-evenly;
  align-items: flex-end;
  gap: 20px;
}

/***** Credits seite ******/
.game-selection__teaser {
  background-image: url(./assets/credits-hintergrund.png);
  background-size: contain;
  background-repeat: no-repeat;
  padding: 30px 30px 30px 35px;
  width: 100%;
  aspect-ratio: 523/821;
  text-align: center;
  position: relative;
}

/********** footer ******/

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  display: flex;
  gap: 20px;
  height: 60px;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  background: rgba(119, 175, 119, 0.8);
}

footer a {
  color: black;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

footer a:visited {
  color: rgb(53, 53, 53);
}

/************ Mitwirkende **********/

.mitwirkedne {
  font-size: 16px;
}

.mitwirkedne .mittelalter__title {
  height: 12vh;
}

.inner-wrapper--mitwirkende {
  background-image: url(./assets/credits-hintergrund.png);
  background-size: contain;
  background-repeat: no-repeat;
  aspect-ratio: 1642/1046;
  height: auto;
  max-height: calc(100vh - 120px - 12vh);
  max-width: 100%;
  width: calc((100vh - 120px - 12vh) * 1642 / 1046);
  padding: 60px 90px 90px 70px;
  position: relative;
  margin-inline: auto;
  scrollbar-width: thin;
}

.inner-wrapper--mitwirkende p:last-of-type {
  margin-bottom: 0;
}

::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: rgba(119, 175, 119, 0.8);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.inner-wrapper--mitwirkende div {
  overflow: auto;
  height: 100%;
  width: auto;
  hyphens: auto;
  aspect-ratio: 1642/ 1046;
}

.inner-wrapper--mitwirkende .button--close {
  right: 70px;
}

/********** level screen **********/
.gerben {
  background-image: url(./assets/gerber-werkstatt.png);
  background-position: left;
}

.drucken {
  background-image: url(./assets/druckerei_bg.png);
}

.feuerloeschen {
  background-image: url(./assets/huasbrand_bg.png);
}

.marktstand {
  background-image: url(./assets/handel-markt-rechts.png);
}

.hausbau {
  background-image: url(./assets/hausbau_bg.png);
}

.level .mittelalter__title {
  height: 12vh;
}

.level__outer-wprapper {
  display: flex;
  flex-direction: column;
}

.level__inner-wrapper {
  background-image: url(./assets/schriftrolle6.png);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  aspect-ratio: 16/9;
  height: auto;
  max-height: calc(100vh - 120px - 12vh);
  max-width: clamp(50%, 100%, 800px);
  width: auto;
  padding: 3% 8%;
  margin-inline: auto;
  position: relative;
  text-align: left;
}

.level__figur-text__container {
  height: 80%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1em;
}

.level__inner-wrapper .button--close {
  right: 11%;
  top: 10%;
}

.figur__img {
  height: 100%;
  max-width: 30%;
  object-fit: contain;
}

.level__figur-text__container p {
  height: fit-content;
  max-width: 400px;
}

.jetztspielen--button {
  margin-inline: auto;
}

@media (max-width: 1096px) {
  body {
    font-size: 22px;
  }
  .wrapper {
    padding-bottom: 50px;
  }
  .description__text-container {
    max-width: 300px;
  }
  .logos__container,
  .logo img {
    height: 20px;
  }
  footer {
    height: 40px;
  }

  .inner-wrapper {
    flex-direction: column;
    justify-content: flex-start;
  }

  .description__container {
    flex-direction: row-reverse;
    gap: 20px;
    align-self: center;
  }

  .description__text-container p {
    margin: 0;
  }

  .description__text-container::after {
    height: 20px;
    width: 20px;
    left: -15px;
    right: unset;
    bottom: 30%;
    transform: rotateZ(90deg);
  }
  .description__img {
    width: 40%;
    height: auto;
    align-self: flex-end;
    margin-bottom: -10px;
  }

  .level-selection__container {
    width: 80%;
    max-width: calc(600px + 4rem);
    padding-top: 0;
  }

  .level__inner-wrapper {
    padding: 5% 12%;
  }
}

@media (max-width: 750px) {
  body {
    font-size: 16px;
  }

  .description__text-container {
    margin-bottom: 10px;
  }

  .description__text-container {
    max-width: 220px;
  }

  .description__img {
    display: none;
  }

  .mittelalter__title {
    height: 12vh;
    margin-top: -20px;
  }

  .level-selection__container {
    max-width: 500px;
    padding-block: 0;
    justify-content: center;
    gap: 0;
    /* flex: 1; */
    align-items: flex-start;
  }

  .level .button {
    max-width: 200px;
    min-width: 170px;
    font-size: 1.1rem;
  }
  .button--close {
    height: 30px;
    width: 30px;
  }
}

@media (max-width: 750px) and (orientation: landscape) {
  .description__img {
    display: unset;
  }
}

@media (max-height: 750px) and (orientation: portrait),
  (max-width: 670px) and (max-height: 500px) {
  .button {
    max-width: 250px;
    min-width: 200px;
    font-size: 1.1rem;
  }
}

@media (max-width: 500px) {
  .level__figur-text__container .button {
    display: none;
  }

  .button.only-sm-screen {
    display: flex;
  }
}

@media (max-width: 500px), (max-height: 600px) {
  h1 {
    font-size: 1.7rem;
  }
  h2 {
    font-size: 1.3rem;
  }

  .wrapper {
    padding-inline: 0px;
    padding-top: 10px;
  }
}

@media (max-height: 600px) {
  .level__outer-wprapper {
    flex-direction: row;
  }
  .level__inner-wrapper {
    padding: 3% 7%;
  }

  .mittelalter__title {
    height: 15vh;
    margin-top: -40px;
  }

  .button {
    max-width: 200px;
    min-width: 170px;
    font-size: 1.1rem;
  }

  body {
    font-size: 16px;
  }

  .level-selection__container {
    gap: 0;
    max-width: calc(600px + 2rem);
    width: 100%;
  }
  .level__inner-wrapper {
    margin-top: -10px;
    max-height: calc(100vh - 70px - 12vh);
  }

  .button--close {
    height: 30px;
    width: 30px;
  }

  .description__text-container {
    max-width: 240px;
  }

  .inner-wrapper--mitwirkende {
    margin-top: -20px;
    max-height: calc(100vh - 60px - 12vh);
    width: calc((100vh - 60px - 12vh) * 1642 / 1046);
    padding: 30px 50px 50px 30px;
    font-size: 0.9rem;
  }

  h1 {
    font-size: 1.2rem;
  }

  h2 {
    font-size: 1rem;
  }
  .inner-wrapper--mitwirkende .button--close {
    right: 30px;
    top: 40px;
  }
}

@media (orientation: portrait) {
  .inner-wrapper--mitwirkende {
    background-image: url(./assets/credits-hintergrund2.png);
    aspect-ratio: 1046 / 1642;
    padding: 50px 50px 50px 30px;
    width: calc((100vh - 110px - 12vh) * 1046 / 1642);
  }

  .inner-wrapper--mitwirkende div {
    aspect-ratio: 1046/1642;
  }

  .inner-wrapper--mitwirkende .button--close {
    right: 40px;
    top: 40px;
  }

  h1 {
    font-size: 1.7rem;
  }
  h2 {
    font-size: 1.3rem;
  }
}
