#gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.thumb {
  width: 140px;
  height: 100px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s;
}

.thumb:hover {
  transform: scale(1.05);
}

#pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
}

#pagination button {
  padding: 8px 12px;
  margin: 0;
  background: crimson;
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  min-width: 36px;
  transition: background-color 0.3s, transform 0.2s;
}

#pagination button:hover:not(:disabled) {
  background-color: #e91e63;
  transform: scale(1.1);
}

#pagination button:disabled {
  background: white;
  color: crimson;
  cursor: default;
}

/* Paginace na větších obrazovkách - méně zalamování */
@media (min-width: 768px) {
  #pagination {
    flex-wrap: nowrap;
  }
}

/* Lightbox CSS */
#imgModal.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

#imgModal.lightbox.open {
  display: flex;
}

#imgModal img {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: 6px;
}

.dialog-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.dialog-controls button {
  flex: 1 0 auto;
  padding: 10px 15px;
  background: #fff;
  color: #333;
  border: none;
  border-radius: 5px;
  font-size: 18px;
  min-width: 80px;
}

.outer-grey-box {
  background-color: #1e1e1e;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
  margin: 30px auto;
  max-width: 500px;
}
.gallery-wrapper {
  background-color: #2b2a2a;  /* světle šedé pozadí */
  padding: 20px;
  border-radius: 16px;        /* zaoblené rohy */
  max-width: 1000px;
  margin: 30px auto;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}