/* Bold, italic header text */
.headers {
  margin-left: 0.5%;
  margin-top: -2px;
  margin-bottom: 0px;
  font-weight: bold;
  font-style: italic;
  font-size: 21px;
  text-align: center;
}

/* Reshuffle button (kept as an ID) */
#reshuffle {
  cursor: pointer;
  margin-left: 0.5%;
  margin-top: -2px;
  margin-bottom: 0px;
  font-weight: bold;
  font-style: italic;
  font-size: 21px;
}

/* Gallery loader (switched to a class) */
.galleryLoader {
  align-content: center;
}
.galleryLoader img {
  width: 100px;
}

/* Main gallery container (switched to a class) */
.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: flex-start;
}

/* Individual image container */
.imageContainer {
  width: 150px;              /* or 'auto' if you prefer fluid width */
  text-align: center;
  margin: 10px;
  border: 3px solid black;
  padding: 10px;
  box-sizing: border-box;     /* includes border + padding in total width */
  align-self: flex-start;     /* each container can size independently */
}
.imageContainer img {
  width: 100%;
  height: auto;
  cursor: pointer;
}
.imageContainer p {
  margin: 0;
  font-size: 1em;
  word-wrap: break-word;
  cursor: pointer;
  color: orange;
}

/* Generic clickable class */
.clickable {
  cursor: pointer;
}

/* Modal background overlay */
.modal {
  display: none; 
  position: fixed;
  z-index: 1;
  padding-top: 100px;
  left: 0;
  top: 0;
  width: 100%; 
  height: 100%;
  overflow: auto; 
  background-color: rgba(0, 0, 0, 0.9);
  box-sizing: border-box;
}

/* Loading spinner or image */
.loading {
  margin: auto;
  display: block;
  max-width: 100%;
  width: 100px;
}

/* Modal content (image, etc.) */
.modal-content {
  margin: auto;
  display: block;
  max-width: 100%; 
  max-height: 90%;
  -webkit-animation-name: zoom;
  -webkit-animation-duration: 0.6s;
  animation-name: zoom;
  animation-duration: 0.6s;
}

/* Zoom animation for modal content */
@-webkit-keyframes zoom {
  from {
    -webkit-transform: scale(0);
            transform: scale(0);
  }
  to {
    -webkit-transform: scale(1);
            transform: scale(1);
  }
}
@keyframes zoom {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

/* Modal titles & captions (kept as IDs) */
#title {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: orange;
  min-height: 0px;
  font-weight: bold;
  font-style: italic;
  font-size: 120%;
}
#caption {
  margin: 0 auto;
  margin-top: 0px;
  display: block;
  width: 80%;
  max-width: 700px;
  color: white;
  height: 150px;
  text-align: center;
}

/* Close button inside the modal */
.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
}
.close:hover,
.close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}