main {
  height: 100dvh;
  padding: 2rem;
  padding-bottom: 105px;
  overflow: scroll;
}

main > div:first-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

main > div:first-child h1 {
  font-size: 5rem;
  font-weight: 400;
}

main > div:first-child p {
  font-size: 1.4rem;
  max-width: 400px;
}

main > hr {
  margin: 1.5rem 0;
}

main > div:last-child {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(4, 1fr);
}

main > div:last-child > div {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  height: 250px;
}

main > div:last-child > div > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.subject-box {
  position: absolute;
  inset: 0;
  backdrop-filter: brightness(0.15);
  -webkit-backdrop-filter: brightness(0.15);
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 0.5rem;
  padding: 1rem;
  border-radius: 1rem;
}

.subject-box > h2 {
  color: #fff;
  font-size: 25px;
  font-weight: 400;
}

.subject-box > p {
  color: #b5b3b3;
}

.subject-box > a {
  color: #fff;
  width: fit-content;
}

/*-------------For phones and small mobile devices section--------------*/

@media screen and (max-width: 767px) {
  main {
    padding: 1rem;
    padding-bottom: 105px;
  }

  main > div:first-child {
    flex-direction: column;
    gap: 10px;
    padding: 0 1rem;
  }

  main > div:first-child h1 {
    font-size: 3rem;
  }

  main > div:first-child p {
    text-align: center;
  }

  main > div:last-child {
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
  }

  main > div:last-child > div {
    height: 200px;
  }

  .subject-box > p,
  .subject-box > a {
    font-size: 1.2rem;
  }
}

/*-------------For ipads and tablets section--------------*/

@media screen and (min-width: 768px) and (max-width: 1024px) {
  main > div:last-child {
    grid-template-columns: repeat(2, 1fr);
  }
}
