/*Gallery*/

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: auto;
  grid-auto-flow: dense;
  gap: 6px;
}

img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

a.four-grid-cells {
  grid-row: span 2 / auto;
  grid-column: span 2 / auto;
}

a.wide-image {
  grid-column: span 2 / auto;
}

@media screen and (max-width: 768px) {
  .gallery {
    grid-template-columns: 1fr 1fr;
  }
}

@media screen and (max-width: 480px) {

  /* changes the grid layout to a single column */
  div.gallery {
    grid-template-columns: 1fr;
  }

  /* resets the grid placement properties for
  the images spanning four grid cells */
  a.four-grid-cells {
    grid-row: auto;
    grid-column: auto;
  }

  /* resets the grid placement properties for
  the images spanning two grid columns  */
  a.wide-image {
    grid-column: auto;
  }

}
