* {
  box-sizing: border-box;
}

body {
  background-color: #f0e7d8;
}

h1 {

  color: white;
  text-align: center;
  border-style: dotted;
  border-color: #df6e7d;
  border-radius: 5px;
  padding: 20px;
  margin-left: 50px;
  margin-right: 50px;
  font-family: "Arial Rounded MT Bold";
  font-size: x-large;
}

.topnav {

  overflow: hidden;
  background-color: #9bcfcf;
  color: white;
  font-family: "Ink free"

}

.topnav a {
  float: left;
  color: white;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
  font-size: 17px;
}

.topnav a:hover {
  background-color: #df6e7d;
  color: #9bcfcf;
}

.topnav a.active {
  background-color: #B20A2C;
  color: white;
}

.topnav a:link {
  color: white;
}

.topnav a:visited {
  color: #f0e7d8;
}

.topnav {
  width: 75%;
  text-align: center;
  margin-left: 10%;
}

h2 {
  color: black;
  text-align: center;
  font-family: "Ink free";
  font-weight: bold;
  font-size: large
}

p {
  color: black;
  font-family: "Grandview Display";
  border-style: dotted;
  border-color: #df6e7d;
  border-radius: 5px;
  text-align: left;
  padding: 20px;
  font-size: medium;
  flex: 1;

}




h3 {
  font-family: "Grandview Display";
  font-size: large;
  color: #B20A2C;
  margin-left: 15px;
}

h4 {
  background-image: url("Alabanneri.jpg");
  background-repeat: no-repeat;
  width: 65%;
  font-family: "Ink free";
  font-weight: bold;
  text-align: left;
  margin-left: 20%;
  margin-right: 20%;
  color: white;
  font-size: large;
  padding: 15px;
  border: 2px solid black;
  border-radius: 5px;
}

a:link {
  color: black;
  background-color: transparent;
  text-decoration: none;
}

a:visited {
  color: #df6e7d;
  background-color: transparent;
  text-decoration: none;
}

a:hover {
  color: #B20A2C;
  background-color: transparent;
  text-decoration: underline;
}

a:active {
  color: #9bcfcf;
  background-color: transparent;
  text-decoration: underline;
}



.content-box {
  display: flex;
  gap: 30px;
  align-items: center;

  margin-left: 70px;
  margin-right: 70px;
}



.suosituslinkkiteksti {
  width: 220px;

  background-color: #9bcfcf;
  border: 15px solid #df6e7d;
  border-radius: 5px;

  outline-style: dotted;
  outline-color: #B20A2C;

  padding: 20px;

  text-align: center;
  font-family: "Ink free";
  font-weight: bold;
}

.mainosteksti {
  width: 100%;
}

.mainosteksti p {
  overflow-wrap: break-word;
}



.suosituslinkkiteksti a:link,
.suosituslinkkiteksti a:visited {
  color: #df6e7d;
  text-decoration: none;
}

.suosituslinkkiteksti a {
  font-family: "Ink Free";
  color: #df6e7d;
  text-decoration: none;
}

.suosituslinkkiteksti a:hover {
  color: #B20A2C;
  text-decoration: underline;
}

.suosituslinkkiteksti {
  width: 100%;
}

.suosituslinkkiteksti p {
  overflow-wrap: break-word;
  word-break: normal;
  overflow-wrap: break-word;
  white-space: normal;
}




/* isolle näytölle eka*/
@media only screen and (min-width: 1025px) {
  .content-box {
    width: 25%;
    height: 65%;
    margin-left: 35%;
  }

  .aside {
    width: 45%;
    height: 65%;
  }

}

/* keskikokoiselle näytölle */
@media only screen and (min-width: 768px) and (max-width:1023px) {

  .topnav a {
    float: none;
    display: block;
    width: 100%;
    text-align: center;
  }

  .content-box {
    display: flex;
    flex-direction: row;
    /* vierekkäin */
    justify-content: center;
    align-items: stretch;
    gap: 20px;

    width: 100%;
    margin: 0 auto;
    padding: 20px;
  }

  .mainosteksti {
    width: 45%;
  }

  .suosituslinkkiteksti {
    width: 30%;
    min-width: 220px;

    text-align: center;

    word-break: normal;
    overflow-wrap: break-word;
    white-space: normal;
  }

  .mainosteksti p,
  .suosituslinkkiteksti p {
    word-break: normal;
    overflow-wrap: break-word;
    white-space: normal;
  }
}

/* pienelle näytölle */


@media only screen and (max-width:767px) {
  .topnav a {
    float: none;
    display: block;
    width: 100%;
    text-align: center;
  }

  .content-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-left: 0;
  }

  .mainosteksti,
  .suosituslinkkiteksti {
    width: 85%;
    max-width: 400px;
    box-sizing: border-box;
  }

  .suosituslinkkiteksti {
    text-align: center;
    word-break: normal;
    overflow-wrap: break-word;
    white-space: normal;
  }

}

footer {
  color: #B20A2C;
  font-family: "Grandview Display";
  font-size: small;
  text-align: center;
}