* {
  border-radius: 0 !important;
}

div.img-overlay {
    opacity: 0; 
    transition: opacity 0.2s ease; 
    background-color: rgba(0, 0, 0, 0.7); 
    border-radius: 3%;
    position: absolute;
    width: 70%;
    height: 100%; 
    top: 0px;
}

div.gallery-photo-overlay {
    opacity: 0; 
    transition: opacity 0.2s ease; 
    background-color: rgba(0, 0, 0, 0.7); 
    border-radius: 3%;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.photo {
    border-radius: 3%;
    margin-left: auto;
    margin-right: auto;
    display: block;
    max-width: 100%;
    opacity: 1;
    transition: .2s ease;
}

.img-wrapper {
    border-radius: 3%;
    border-radius: 3%;
    margin-left: auto;
    margin-right: auto;
    display: block;
    max-width: 70%;
}

.img-wrapper:hover .img-overlay {
    opacity: 1; /* Show overlay on hover */
}

.gallery-photo:hover .gallery-photo-overlay {
    opacity: 1; /* Show overlay on hover */
}

.gallery-photo:active .gallery-photo-overlay {
    opacity: 1; /* Show overlay on hover */
}

.overlay-text {
    color: white;
    font-size: 1.3vw;
    font-weight: 300;
    text-anchor: middle;
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
} 

.gallery {
    margin-top: 30px;
    display: grid;
    /* grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); */
    gap: 32px;
    align-items: start;
}

.gallery-col {
    display: grid;
    row-gap: 32px;
    grid-template-columns: minmax(0px, 1fr);
}

.gallery-photo {
    width: 100%; 
    height: auto; 
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.gallery-photo img {
    width: 100%;
    height: auto;
    display: block; /* Remove any default inline styling on the image */
}

.gp-subsections {
    padding-left: calc(15% + 10px);
    padding-right: calc(15% + 10px);
}

@media screen and (max-width: 850px) {
    .overlay-text {
        font-size: 3.5vw;
    }
    .gp-subsections {
        padding-right: 15%;
        padding-left: 15%;
    }
}



/* Lightbox dialog overlay */

#lightbox::backdrop {
  background: rgba(0, 0, 0, 0.85);
}

#lightbox {
  border: none;
  padding: 0;
  background: transparent;
  width: 100dvw;
  height: 100dvh;
  max-width: 100dvw;
  max-height: 100dvh;
  inset: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 80px 1fr 80px;
  grid-template-rows: 80px 1fr 80px;
  align-items: center;
  justify-items: center;
}

#lightbox:not([open]) {
  display: none;
}

#lightbox-img {
  grid-column: 2;
  grid-row: 2;
  max-width: calc(100dvw - 160px);
  max-height: calc(100dvh - 160px);
  object-fit: contain;
  box-shadow: 0 8px 30px rgba(0,0,0,0.45);
}

/* Controls */
.lb-close,
.lb-prev,
.lb-next {
  position: relative;
  z-index: 1;
  background: rgba(0,0,0,0.55);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 28px;
  line-height: 1;
  width: 48px;
  height: 48px;
  cursor: pointer;
}

.lb-close {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  align-self: start;
  margin: 16px;
}

.lb-prev {
  grid-column: 1;
  grid-row: 2;
  justify-self: center;
}

.lb-next {
  grid-column: 3;
  grid-row: 2;
  justify-self: center;
}

/* Make sure it is above nav/overlays if needed */
#lightbox {
  z-index: 9999;
}
