*,
*:before,
*:after {
  box-sizing: border-box;
}

body {
  /* margin: 40px; */
  font-family: "Open Sans", "sans-serif";
  background: #000;
  color: #444;
}

/* make a grid */

.wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, 400px);
  grid-auto-rows: 400px;
  /* grid-gap: 5px; */
  justify-content: center;
}

.wrapper > * {
  background-color: #444;
  color: #fff;
  /* border-radius: 4px; */
  overflow: hidden;
}

img {
  width: 400px;
}

/** Responsive styles **/

@media screen and (min-width: 320px) and (max-width: 375px) {
  .wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, 350px);
    grid-auto-rows: 350px;
    /* grid-gap: 5px; */
    justify-content: center;
  }

  img {
    width: 350px;
  }
}

@media screen and (min-width: 375px) and (max-width: 480px) {
  .wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, 400px);
    grid-auto-rows: 400px;
    justify-content: center;
  }

  img {
    width: 400px;
  }
}

@media screen and (min-width: 480px) and (max-width: 780px) {
  .wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, 350px);
    grid-auto-rows: 350px;
    /* grid-gap: 5px; */
    justify-content: center;
  }

  img {
    width: 350px;
  }
}

@media screen and (min-width: 780px) {
  .wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, 300px);
    grid-auto-rows: 300px;
    justify-content: center;
  }

  img {
    width: 300px;
  }
}
