* {
  box-sizing: border-box;
}

body {
  margin: 20px;
}

.gallery {
  display: grid;
  grid-gap: 10px;
}

.gallery img {
  object-fit: cover;
  width: 100%;
  border-radius: 10px;
}

@media screen and (min-width: 600px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (min-width: 1024px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
  .gallery img:nth-of-type(7) {
    grid-column: 2 / 4;
    grid-row: 1 / 3;
  }
}