* {
  box-sizing: border-box;
}
body {
  margin: 0px;
  background-color: #38bdc7;
  font-weight: 500;
  font-style: normal;
}

/*  h2 otsikot keskitetty.  */
h2 {
  text-align: center;
}

/*  headeri flexaa, määritelty väri keskitys ja padding.  */
.header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #C2B280;
  color: #fff;
  text-align: center;
  padding: 0px 0px;
}

/*  Headerin tekstiosuuden fonttikoko.  */
.header p {
  font-size: 1.2em;
}

/*  Headerin kuvan koko.  */
.header img {
  width: 80%;
  height: auto;
}

/*  Topnav a: block, keskitys, fontin väri, ei alaviivaa ja padding. Topnav a:hover painikkeen väri vaihtuu.  */
.topnav {
  position: fixed;
  background-color: #bd0606;
  left: 0;
  top: 0;
  width: 100%;
  max-height: 55vh;
  padding: 10px;
  border: none;
}
.topnav a {
  display: block;
  text-align: center;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  padding: 1px 10px;
}
.topnav a:hover {
  background-color: #BEE2DE;
  color: #000000;
}

/*  sisällön keskittäminen.  */
.content {
  padding: 0px 5px;
}

/*  luotu flex continer jonka sisään kuvat järjestellään.  */
.gallery {
  display: flex;
  gap: 2em;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  width: auto;
}

/*  määritelty yhden flexin kooksi 70%.  */
.gallery-item {
  align-items: center;
  justify-content: center;
  width: 70%;
  gap: 10px;
  border-radius: 10px;
}

.desc {
  text-align: center;
  margin: 10px;
}

.team {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.devs {
  align-items: center;
  justify-content: center;
  width: 70%;
  margin: 10px;
  border-radius: 10px;
}

.devs img {
  box-shadow: 0 0 20px 0 rgb(0, 65, 255);
  border-radius: 10px;
  width: 100%;
  height: 100%;
  max-width: 768px;
  max-height: 614px;
  align-items: center;
  justify-content: center;
}

.innerBox {
  margin: 10px;
}

/*  Logojen asettelu.  */
.logo {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
  padding: 5px;
}

/*  Logojen koon määrittely.  */
.logo img {
  max-width: 80%;
}

.logo div {
  display: flex;
  justify-content: center;
}

.trailer iframe {
  aspect-ratio: 16/9;
  width: 80vw;
}

.trailer {
  justify-content: center;
  align-items: center;
  text-align: center;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 10px;
  border-radius: 10px;
}

.footer a {
  text-decoration: none;
  color: #ffffff;
}

/*  Erilaisille näytöille erilaisia konfiguraatioita.  */
@media screen and (min-width: 400px) {
  .topnav a {
    display: inline-block;
  }
  .topnav {
    text-align: center;
  }

  .logo img {
    max-width: 40%;
  }

}
@media screen and (max-width: 400px) {
  .page-layout {
    margin-top: 110px;
  }
  .gallery-item {
    width: 90vw;
  }
}
@media screen and (max-width: 464px) {
  .page-layout {
    margin-top: 65px;
  }
  .gallery-item {
    width: 90vw;
  }
}

@media (min-width: 768px) {
  .gallery {
    flex-direction: column;
  }

  .gallery-item {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    max-width: 45%;
  }

  .gallery-item img {
    max-width: 45%;
  }

  .trailer iframe {
    width: 40vw;
  }

  .devs {
    display: flex;
    max-width: 100%;
  }

  .logo {
    flex-wrap: none;
    flex-direction: row;
  }

  .logo img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: 100px;
  }
}