#section-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: start;
  flex-direction: row;
  column-gap: 4rem;
  row-gap: 4rem;
  margin: 0 auto 6rem;
}

#gallery {
  position: relative;
  overflow: hidden;
  background-color: var(--accent-white);
  z-index: 1;
}

#gallery::before {
  content: '';
  display: block;
  background: var(--secondary-blue-bg);
  width: 100%;
  height: 100%;
  position: absolute;
  top: 80px;
  left: 0px;
  z-index: -1;
}

#gallery::after {
  content: '';
  display: block;
  background: var(--accent-white);
  position: absolute;
  width: 20%;
  aspect-ratio: 156 / 290;
  top: 80px;
  right: 0px;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
  z-index: -1;
}

.gallery-card {
  flex: 0 1 calc(33.333% - 3rem);
  display: flex;
  flex-direction: column;
  min-width: 250px;
}

.image-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: auto;
  cursor: pointer;
}

.image-container img {
  width: 100%;
  transition: transform 0.3s ease;
}

/* Lightbox styles */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  cursor: pointer;
}

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

.lightbox-img {
  height: 90vh;
  max-width: 90vw;
  object-fit: contain;
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  width: 50px;
  height: auto;
  transform: translateY(-50%);
  cursor: pointer;
  opacity: 0.8;
  color: var(--accent-white);
}

.left-arrow {
  left: 100px;
  transform: rotate(90deg);
}

.right-arrow {
  right: 100px;
  transform: rotate(270deg);
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 30px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  opacity: 0.9;
  transform: rotate(45deg);
}

@media (max-width: 768px) {
  .lightbox-arrow {
    display: none;
  }
  
  /* Swipe animation */
    .lightbox-img {
      opacity: 1;
      transform: translateX(0);
      transition: transform 0.4s ease, opacity 0.4s ease;
      position: absolute;
    }

    .lightbox-img.enter-left {
      transform: translateX(-100%);
      opacity: 0;
    }

    .lightbox-img.enter-right {
      transform: translateX(100%);
      opacity: 0;
    }

    .lightbox-img.showing {
      transform: translateX(0);
      opacity: 1;
    }

    .lightbox-img.exiting-left {
      transform: translateX(-100%);
      opacity: 0;
    }

    .lightbox-img.exiting-right {
      transform: translateX(100%);
      opacity: 0;
    }

}
