/* Ensure the body scrollbar is hidden when the lightbox is open */
body.lightbox-open {
  overflow: hidden;
}

/* Lightbox overlay background */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  display: none;
  justify-content: center;
  align-items: center;
}

/* Updated lightbox content for a shorter appearance */
.lightbox-content {
  position: relative;
  max-width: 60%;
  max-height: 80%;
  text-align: center;
  line-height: 0;
  font-weight: normal;
  outline: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* Image container and image styling */
.lightbox-gallery {
  position: relative;
  background-color: white;
  padding: 4px;
  border-radius: 4px;
  box-sizing: content-box;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-image {
  display: block;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  border: 4px solid white;
  border-radius: 3px;
}

.lightbox-ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Style for individual list items */
.lightbox-list-item {
  display: none; /* Initially hidden */
}

/* Close button */
.lightbox-close-btn {
  position: absolute;
  top: -30px;
  right: -30px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 24px;
  color: #fff;
  background: transparent;
  border: none;
  padding: 0;
  line-height: 1;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
  transition: opacity 0.2s;
  z-index: 10001;
}

.lightbox-close-btn:hover {
  opacity: 0.7;
}

/* Navigation buttons */
.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 50px;
  color: #fff;
  cursor: pointer;
  padding: 0 10px;
  transition: color 0.2s;
  z-index: 10001;
}

.lightbox-nav-btn:hover {
  color: #ccc;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

/* Screen Reader Only Class */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
