figure {
  border: 1px solid #a6a6a6;
  cursor: pointer;
  display: inline-block;
  margin: 20px 0 20px 20px;
  overflow: show;
  padding: 10px 20px 40px 20px;
}

figcaption {
  background-color: #a6a6a6;
  color: white;
  display: inline-block;
  font-size: 16px;
  float: left;
  margin-bottom: 30px;
  margin-left: -40px;
  padding: 10px 40px;
}

figure img {
  clear: both;
  float: left;
  max-width: 100%;
}

/* The Modal (background) */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 10; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
}

/* Modal Content (Image) */
.modal-content {
  margin: 100px auto;
  display: block;
  text-align: center;
  width: 80%;
}

.modal-content img {
  max-width: 100%;
}

/* The Close Button */
.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
}

body.modal-open {
  overflow: hidden;
}

.close:hover,
.close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

/* 100% Image Width on Smaller Screens */
@media only screen and (max-width: 700px){
  .modal-content {
    width: 100%;
  }
}