/* Fields gallery */

.com-content-article.item-page .item-image {
  margin-bottom: 0;
}
.com-content-article.item-page .com-content-article__body {
  margin-top: 2rem;
}

.fields-container {
  list-style-type: none;
  padding-left: 0;
  flex-wrap: wrap;
  display: flex;
  /* background-color: black; */
  padding: 0.5rem;  
  overflow: hidden;
}

.fields-container > *:nth-child(n+7) {
  display: none;
}

.fields-container > *:nth-child(6) {
  position: relative;
}

.fields-container > *:nth-child(6)::before {
  content: '\2022\2022\2022'; /* Unicode for the camera/gallery icon */
  font-size: 40px;
  color: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2; /* Ensure the icon is above the overlay */
  pointer-events: none;
}

.fields-container > *:nth-child(6)::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: black; /* Orange overlay */
  opacity: 0.5;
  z-index: 1; /* Place the overlay below the icon */
  pointer-events: none;
  margin: 0.5rem;
}

.fields-container > *:nth-child(6) > * {
  position: relative;
  z-index: 0; /* Ensure content is above the overlay */
}

.fields-container .field-entry {
  flex: none;
  width: 33.3333%;
  padding: 0.5rem;
}

@media (width >= 768px) {
  .fields-container .field-entry {
      flex: none;
      width: 33.3333%;
  }
}

@media (width >= 992px) {
  .fields-container .field-entry {
      flex: none;
      width: 16.6667%;
  }
}

.fields-container .field-label {
  display: none;
}

.fields-container .field-entry img {
  aspect-ratio: 124 / 70;
  object-fit: cover;
}

/* Lightbox Styles */

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  touch-action: none;
}

.lightbox img {
  max-width: 90%;
  max-height: 80%;
  border: 3px solid white;
}

.lightbox .arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  color: white;
  cursor: pointer;
  user-select: none;
}

.lightbox .arrow.left {
  left: 10px;
}

.lightbox .arrow.right {
  right: 10px;
}

.lightbox .close {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 1.5rem;
  color: white;
  cursor: pointer;
  user-select: none;
}
