body {
  width: 80%;
  margin: 30px auto;
  font-family: sans-serif;
}

h3 {
  text-align: center;
  font-size: 1.65em;
  margin: 0 0 30px;
}

div {
  font-size: 0;
}

a {
  font-size: 16px;
  overflow: hidden;
  display: inline-block;
  margin-bottom: 8px;
  width: calc(50% - 4px);
  margin-right: 8px;
}

a:nth-of-type(2n) {
  margin-right: 0;
}

.full-img {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

a.next,a.prev{
  width: auto;
  padding: 2rem;
  font-size: 36px;
  color: red;
  font-weight: bold;
  text-decoration: none;
}

.red{
  color: red;
  font-weight: bold;
}

@media screen and (min-width: 50em) {
  a {
    width: calc(25% - 6px);
  }
  
  a:nth-of-type(2n) {
    margin-right: 8px;
  }
  
  a:nth-of-type(4n) {
    margin-right: 0;
  }
}

a:hover img {
  -webkit-transform: scale(1.15);
          transform: scale(1.15);
}

figure {
  margin: 0;
}

img {
  border: none;
  max-width: 100%;
  height: auto;
  display: block;
  background: #ccc;
  -webkit-transition: -webkit-transform .2s ease-in-out;
  transition: -webkit-transform .2s ease-in-out;
  transition: transform .2s ease-in-out;
  transition: transform .2s ease-in-out, -webkit-transform .2s ease-in-out;
}

.p a {
  display: inline;
  font-size: 13px;
  margin: 0;
}

.p {
  text-align: center;
  font-size: 13px;
  padding-top: 100px;
}