#lightbox {
  position: fixed;
  z-index: 1000;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, .8);
  outline: none !important;
  box-shadow: none !important;
  display: none;
  animation: zoom .03 linear;
  
  /* MODIFIED: Stacks the image and caption vertically */
  flex-direction: column; 
}

#lightbox.active {
  display: flex;
  justify-content: center;
  align-items: center;
}

#lightbox img {
  max-width: 90%;
  /* MODIFIED: Adjusted down slightly from 80% to 75% to guarantee */
  /* room for the caption text beneath it on small laptop screens */
  max-height: 75%; 
  padding: 4px;
  background-color: black;
  border: 2px solid white;
  
  /* ADDED: Changes cursor to a pointer to indicate it is clickable */
  cursor: pointer; 
}

/* NEW: Styles the caption directly beneath the photograph */
.lightbox-caption {
  color: #ffffff;
  font-family: Arial, sans-serif;
  font-size: 1.1rem;
  margin-top: 15px; /* Creates clean spacing directly below the white border */
  text-align: center;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}
