.pi-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 20px;
  margin: 2rem 0;
}

.pi-gallery__item {
  display: block;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .10);
  transition: transform .2s ease, box-shadow .2s ease;
}

.pi-gallery__item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
  text-decoration: none;
}

.pi-gallery__item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .3s ease;
}

.pi-gallery__item:hover img {
  transform: scale(1.035);
}

.pi-gallery__caption {
  display: none;
  padding: 10px 12px;
  font-size: .9rem;
  line-height: 1.4;
  text-align: center;
}

@media (max-width: 600px) {
  .pi-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .pi-gallery__caption {
    padding: 8px 6px;
    font-size: .82rem;
  }
}
