section.masthead {
  position: relative;
  background-color: #343a40;
  background: url("../media/bg-masthead.jpg") no-repeat center center;
  background-size: cover;
  padding-top: 8rem;
  padding-bottom: 8rem;
}
section.masthead:before {
  content: "";
  position: absolute;
  background-color: #1c375e;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  opacity: 0.5;
}
section.masthead h1,
section.masthead .h1 {
  font-size: 2rem;
}
@media (min-width: 768px) {
  section.masthead {
    padding-top: 12rem;
    padding-bottom: 12rem;
  }
  section.masthead h1,
  section.masthead .h1 {
    font-size: 3rem;
  }
}

.gallery-item {
  display: block;
  position: relative;
  overflow: hidden;
  max-width: 530px;
  margin: auto auto 1rem;
}
.gallery-item .caption {
  display: flex;
  height: 100%;
  width: 100%;
  background-color: rgba(33, 37, 41, 0.2);
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
}
.gallery-item .caption .caption-content {
  color: #fff;
  margin: auto 2rem 2rem;
}
.gallery-item .caption .caption-content h2,
.gallery-item .caption .caption-content .h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
}
.gallery-item .caption .caption-content p {
  font-weight: 300;
  font-size: 1.2rem;
}
@media (min-width: 992px) {
  .gallery-item {
    max-width: none;
    margin: 0;
  }
  .gallery-item .caption {
    transition: background-color 0.7s, -webkit-clip-path 0.25s ease-out;
    transition: clip-path 0.25s ease-out, background-color 0.7s;
    transition: clip-path 0.25s ease-out, background-color 0.7s,
      -webkit-clip-path 0.25s ease-out;
    -webkit-clip-path: inset(0px);
    clip-path: inset(0px);
  }
  .gallery-item .caption .caption-content {
    transition: opacity 0.25s;
    margin-left: 5rem;
    margin-right: 5rem;
    margin-bottom: 5rem;
  }
  .gallery-item img {
    transition: -webkit-clip-path 0.25s ease-out;
    transition: clip-path 0.25s ease-out;
    transition: clip-path 0.25s ease-out, -webkit-clip-path 0.25s ease-out;
    -webkit-clip-path: inset(-1px);
    clip-path: inset(-1px);
  }
  .gallery-item:hover img {
    -webkit-clip-path: inset(2rem);
    clip-path: inset(2rem);
  }
  .gallery-item:hover .caption {
    background-color: rgba(29, 128, 159, 0.9);
    -webkit-clip-path: inset(2rem);
    clip-path: inset(2rem);
  }
}
