.gallery {
  display: grid;
  grid-template-columns: repeat(3, 377px);
  grid-template-rows: repeat(2, 350px);
  gap: 20px;
  max-width: 1170px;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  overflow: hidden;
}


.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
	transition: filter 0.3s ease;
}

.gallery-item:hover img {
  filter: brightness(70%);
}

.gallery-item-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  padding: 17px;
  transition: height 0.5s ease;
  height: 85px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.gallery-item:hover .gallery-item-caption,
.gallery-item:focus .gallery-item-caption {
  height: 66%
}

.gallery-item-caption h3 {
  font-size: 19px;
  margin-bottom: 10px;
  line-height: 24px;
}

.caption-expand {
  opacity: 0;
  transition: opacity 0.5s ease;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.caption-expand li {
  font-weight: bold;
}

.gallery-item:hover .caption-expand,
.gallery-item:focus .caption-expand {
  opacity: 1;
}

.more-info {
  color: #1a7897;
	font-weight: 600;
}

.gallery-item:hover, .gallery-item:focus {
  opacity: 1;
}

@media screen and (max-width: 1220px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 350px);
  }
}

@media screen and (max-width: 600px) {
  .gallery {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(6, 350px);
  }
}