.gallery {
  display: grid;
}

.gallery .item {
  width: 100%;
  padding-bottom: 30px;
  text-align: center;
}

.gallery figure {
  position: relative;
  text-align: left;
}

.gallery figure p {
  border-top: solid 1px #ccc;
  margin-top: 10px;
  height: 80px;
}

.gallery figure i {
  position: absolute;
  right: 0;
  top: 10px;
}

.gallery .item img {
  max-width: 100%;
}

.gallery .item.limit-height img {
  max-width: 85%;
  max-height: 200px;
}

.h-6.w-6 {
  width: 20px;
  position: absolute;
  right: 70px;
  bottom: 110px;
  color: #666;
}

@media only screen and (min-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(12, 1fr);
    column-gap: 50px;
    grid-auto-flow: dense;
    align-items: end;
  }
  .gallery .item.columns-0 {
    grid-column-end: span 3;
  }
  .gallery .item.columns-1 {
    grid-column-end: span 12;
  }
  .gallery .item.columns-2 {
    grid-column-end: span 6;
  }
  .gallery .item.columns-3 {
    grid-column-end: span 4;
  }
  .gallery .item.columns-4 {
    grid-column-end: span 3;
  }

  .gallery .item {
    padding-bottom: 30px;
  }

  .h-6.w-6 {
    width: 20px;
    position: absolute;
    right: 70px;
    bottom: 110px;
    color: #666;
  }
}
