body {
  font-family: sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f2f2f2;
}

h1 {
  text-align: center;
  margin-top: 20px;
}

#gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  padding: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

#gallery img {
  max-height: 150px;
  height: auto;
  width: auto;
  object-fit: contain;
  border-radius: 5px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
}

#gallery img:hover {
  transform: scale(1.05);
}

#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

#overlay.hidden {
  display: none;
}

#overlay img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(255,255,255,0.5);
}

#closeBtn {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: white;
  cursor: pointer;
}

/* Strzałki nawigacji */
.navBtn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0,0,0,0.5);
  border: none;
  color: white;
  font-size: 50px;
  padding: 10px 15px;
  cursor: pointer;
  user-select: none;
  border-radius: 5px;
  transition: background-color 0.3s;
  z-index: 1100;
}

.navBtn:hover {
  background-color: rgba(0,0,0,0.8);
}

#prevBtn {
  left: 20px;
}

#nextBtn {
  right: 20px;
}

footer {
  text-align: center;
  padding: 10px 0;
  background-color: #ddd;
  margin-top: 20px;
}
