@import url("https://fonts.googleapis.com/css2?family=Darumadrop+One&family=Kite+One&display=swap");

*,
*::before,
*::after {
  box-sizing: border-box;
  border: none;
  padding: 0;
  margin: 0;
  text-decoration: none;
  list-style: none;
}

body {
  background:
    linear-gradient(hsla(0, 0%, 8%, 75%), hsla(0, 0%, 8%, 100%)),
    url("logobackground.webp") center/cover no-repeat fixed;
  background-color: hsl(0, 0%, 8%);
  font-family: "Kite One", sans-serif;
}

.maingrid {
  display: grid;
  grid-template-columns: 1fr 3fr;
  grid-template-rows: auto;
  grid-template-areas: "upcoming info-container";
  gap: 4em;
  padding-block: 2em;
  max-width: 1600px;
  margin: auto;
}

header {
  z-index: 100;
  background-color: hsla(0, 0%, 2%, 1);
  height: 4.375rem;
  display: flex;
  flex-direction: row;
  justify-content: center;
  font-family: "Darumadrop One", sans-serif;
  color: white;
  font-size: 3rem;
}

.header-logo {
  display: flex;
  flex-direction: row;
  align-items: center;
  img {
    transform: translateY(0.938rem);
    margin-inline: 0.5rem;
  }
  h2 {
    transform: translateY(-0.5rem);
  }
}

.upcoming {
  background-color: hsla(0, 0%, 2%, 0.6);
  color: white;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2rem;
  a {
    color: grey;
  }
  h1 {
    align-self: center;
    color: hsl(353, 89%, 38%);
  }
  h2 {
    color: hsl(353, 89%, 38%);
  }
  border-radius: 10px;
  backdrop-filter: blur(2px);
  grid-area: upcoming;
  height: fit-content;
}

.futsal-header,
.kylpyla-cup-header {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 0.5rem;
}

.futsal,
.peltorance,
.kylpyla-cup {
  display: flex;
  flex-direction: column;
  p {
    line-height: 2.5;
  }
}

.info-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.kuva img {
  border-radius: 8px;
}

.teksti {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  h2 {
    align-self: center;
    color: hsl(353, 89%, 38%);
  }
  p {
    line-height: 1.75;
    font-size: 1.2rem;
  }
}

.tf-info,
.kcup-info,
.futsal-info,
.rautaratsu-info,
.peltorance-info {
  background-color: hsla(0, 0%, 2%, 0.6);
  color: white;
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
  padding: 2rem;
  border-radius: 10px;
  backdrop-filter: blur(2px);
  min-height: 20rem;
}

.tf-info {
  min-height: fit-content !important;
}

.footer {
  background-color: hsla(0, 0%, 2%, 0.1);
  color: white;
  height: 4.375rem;
  text-align: center;
  padding: 1.5em;
  small {
    margin-right: 0.5rem;
  }
  a {
    color: hsl(353, 89%, 38%);
  }
}

@media (max-width: 1024px) {
  .maingrid {
    display: flex;
    flex-direction: column;
    gap: 1.5em;
    padding: 1em 5%;
    width: 100%;
    max-width: 700px;
    margin: auto;
  }

  header {
    font-size: 2rem;
    height: 3.5rem;
    padding: 0.5em 5%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0.5em;
  }

  .header-logo {
    flex-direction: row;
    align-items: center;
    gap: 0.25em;
  }

  .header-logo img {
    max-height: 4rem;
    width: auto;
    transform: translateY(0);
  }

  .header-logo h2 {
    font-size: 2rem;
  }

  .upcoming,
  .tf-info,
  .kcup-info,
  .futsal-info,
  .rautaratsu-info,
  .peltorance-info,
  .teksti {
    width: 100%;
    padding: 1em;
    gap: 0.75em;
    border-radius: 10px;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
  }

  .upcoming h1,
  .upcoming h2,
  .teksti h2 {
    font-size: 1.4rem;
  }

  .teksti p,
  .futsal p,
  .peltorance p,
  .kylpyla-cup p {
    font-size: 1rem;
    line-height: 1.5;
  }

  .futsal-header,
  .kylpyla-cup-header {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5em;
  }

  .footer {
    font-size: 0.85rem;
    padding: 0.8em 5%;
    text-align: center;
  }

  .upcoming img,
  .tf-info img,
  .kcup-info img,
  .futsal-info img,
  .rautaratsu-info img,
  .peltorance-info img,
  .teksti img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    object-fit: cover;
  }
}

@media (max-width: 480px) {
  header {
    font-size: 1.6rem;
    gap: 0.25em;
  }

  .header-logo h2 {
    font-size: 1.2rem;
  }

  .upcoming h1,
  .upcoming h2,
  .teksti h2 {
    font-size: 1.2rem;
  }

  .teksti p,
  .futsal p,
  .peltorance p,
  .kylpyla-cup p {
    font-size: 0.9rem;
  }

  .upcoming,
  .tf-info,
  .kcup-info,
  .futsal-info,
  .rautaratsu-info,
  .peltorance-info,
  .teksti {
    padding: 0.8em;
    gap: 0.5em;
  }

  .futsal-header,
  .kylpyla-cup-header {
    gap: 0.25em;
  }

  .footer {
    font-size: 0.8rem;
    padding: 0.6em 5%;
  }
}
