.gallery-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 5rem;
}

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

.gallery-item {
  background: #fff;
  padding: 10px 10px 40px;
  box-shadow: 0 8px 30px rgba(0,0,0,.7);
  text-decoration: none;
  color: #444;
  display: block;
  transform: rotate(var(--rot));
  transition: transform .25s ease, box-shadow .25s ease;
  position: relative;
}
.gallery-item:nth-child(3n+1) { --rot: -1.5deg; }
.gallery-item:nth-child(3n+2) { --rot:  1deg;   }
.gallery-item:nth-child(3n)   { --rot: -0.5deg; }
.gallery-item:hover {
  transform: rotate(0deg) scale(1.05) translateY(-10px);
  box-shadow: 0 0 0 2px var(--pink),
              0 20px 60px rgba(255, 45, 120, .4);
  z-index: 10;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.gallery-item .caption {
  padding: .6rem .25rem 0;
  font-size: .75rem;
  color: #888;
  text-align: center;
}
