
.image-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  height: 100%;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.image-grid__item {
  display: flex;
  padding: 10px;
  flex-direction: column;
  flex-grow: 0;
  flex-shrink: 0;
  flex-basis: 285px;
  align-items: stretch;
  justify-content: center;
  position: relative;
  height: 190px;
  transition: text-shadow 0.1s ease-in, -webkit-transform 0.14s ease-in;
  transition: transform 0.14s ease-in, text-shadow 0.1s ease-in;
  transition: transform 0.14s ease-in, text-shadow 0.1s ease-in, -webkit-transform 0.14s ease-in;
}
.image-grid__item:before {
  content: "";
  visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: none;
  border-radius: 3px;
  box-shadow: 0 10px 24px 0px rgba(0, 0, 0, 0.06), 0 8px 20px -2px rgba(0, 0, 0, 0.1), 0 6px 10px -6px rgba(0, 0, 0, 0.2);
  transition: visibility 0.1s ease-out, opacity 0.1s ease-out;
  opacity: 0;
}
.image-grid__item:hover:before {
  visibility: visible;
  opacity: 1;
}

.grid-item {
  display: flex;
  position: relative;
  flex-direction: column;
  flex-grow: 1;
  flex-shrink: 1;
  align-items: stretch;
  justify-content: center;
  text-decoration: none;
  color: #eeeeee;
  overflow: hidden;
}
.grid-item:hover .grid-item__image {
  -webkit-transform: scale(1.2);
          transform: scale(1.2);
}
.grid-item:hover .grid-item__hover {
  visibility: visible;
  opacity: 1;
}
.grid-item:hover .grid-item__name {
  visibility: visible;
  -webkit-transform: scale(1);
          transform: scale(1);
  opacity: 1;
}

.grid-item__image {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center center;
  -webkit-transform: scale(1);
          transform: scale(1);
  will-change: transform;
  transition: -webkit-transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), -webkit-transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 0;
}

.grid-item__hover {
  visibility: hidden;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(rgba(47, 48, 50, 0.2), rgba(47, 48, 50, 0.7));
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.15);
  border-radius: 0;
  transition: visibility 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  opacity: 0;
}

.grid-item__name {
  visibility: hidden;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  flex-shrink: 1;
  align-items: center;
  font-size: 2rem;
  font-weight: 300;
  text-shadow: 0px 0px 30px rgba(0, 0, 0, 0.4), 2px 2px 6px rgba(0, 0, 0, 0.3);
  justify-content: center;
  letter-spacing: 1px;
  -webkit-transform: scale(0.6);
          transform: scale(0.6);
  -webkit-transform-origin: center center;
          transform-origin: center center;
  transition: visibility 0.14s ease-out, opacity 0.14s ease-out, -webkit-transform 0.24s ease;
  transition: visibility 0.14s ease-out, opacity 0.14s ease-out, transform 0.24s ease;
  transition: visibility 0.14s ease-out, opacity 0.14s ease-out, transform 0.24s ease, -webkit-transform 0.24s ease;
  opacity: 0;
}
