.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 15px;
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
}

.img-box {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  height: 220px;
}

/* Sizes */
.img-box.small { grid-row: span 1; grid-column: span 1; }
.img-box.wide  { grid-column: span 2; }
.img-box.big   { grid-row: span 2; grid-column: span 2; height: 450px; }

/* Image */
.img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.img-box:hover img {
  transform: scale(1.1);
}

/* Overlay centered */
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  opacity: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  color: white;
  padding: 20px;
  text-align: center;
  transition: opacity .3s ease;
}

.img-box:hover .overlay,
.img-box:focus .overlay { /*iosHover*/
  opacity: 1;
}

.overlay h3 {
  margin: 0 0 8px 0;
  font-size: 1.5em;
}

.overlay p {
  margin: 0;
  max-width: 80%;
}

html, body {
  height: 100%;            /* Make sure they fill the viewport */
  margin: 0;               /* Remove default margins that can mess up layout */
}

body {
  background: radial-gradient(circle at center, #f2f2f5 60%, #d3d4d7);
  background-repeat: no-repeat;  
  background-attachment: fixed;  /* Optional: keeps gradient fixed during scroll */
}
