body {
  margin: 0;
  background: #f1f1f1;
  font-family: sans-serif;
}

.wrapper {
  max-width: 900px;
  margin: 50px auto;
  padding: 20px;
  background: #2a2a2a;
  border-radius: 12px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

.gallery img {
  width: 100%;
  aspect-ratio: 1 / 1.414;
  object-fit: contain;
  background: #1a1a1a;
}

.gallery a {
  display: block;
  overflow: hidden;
  border-radius: 10px;
  position: relative;
}

.gallery img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.gallery a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery a:hover img {
  transform: scale(1.1);
}

.gallery a:hover::after {
  opacity: 1;
}

.gallery a:hover {
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}