.hidden-news {
  display: none;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

#gallery-title {
  text-align: center;
  margin-bottom: 40px;
  margin-top: 40px;
}

#gallery-title h1 {
  font-size: 3em;
  font-weight: lighter;
  color: #333;
}

.grid {
  display: grid;
  grid-template-rows: repeat(4, 180px);
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 5px;
  margin: 20px auto;
  max-width: 1000px;
}

.grid .item:nth-child(1) {
  grid-row: 1 / 4;
}

.grid .item:nth-child(2) {
  grid-column: 2 / 4;
  grid-row: 1 / 3;
}

.grid .item:nth-child(3) {
  grid-column: 3 / 4;
  grid-row: 3 / 5;
}

.grid .item:nth-child(4) {
  grid-column: 2 / 3;
  grid-row: 3 / 4;
}

.grid .item:nth-child(5) {
  grid-column: 1 / 3;
  grid-row: 4 / 5;
}

.grid .item {
  position: relative;
  overflow: hidden;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.grid .item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.grid .item .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.grid .item:hover .overlay {
  opacity: 1;
}

.grid .item .overlay p {
  text-align: center;
  font-size: 16px;
  font-weight: bold;
  margin: 0;
}

.life-page {
  width: 100%;
}

@media (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .grid .item,
  .grid .item:nth-child(1),
  .grid .item:nth-child(2),
  .grid .item:nth-child(3),
  .grid .item:nth-child(4),
  .grid .item:nth-child(5) {
    grid-column: auto;
    grid-row: auto;
    min-height: 220px;
  }
}
