/* Bestaande CSS */
.three-images-container {
  width: 100%;
  margin: 0 auto;
}

.three-images-container .three-images-wrapper {
  display: flex;
  width: 100%;
  margin: 0 -10px;
  margin-left: -30vw;
}

.three-images-container .three-images-wrapper .image-column {
  width: 33vw;
  padding: 0 10px;
  box-sizing: border-box;
  flex: 0 0 auto;
}

@media (max-width: 767px) {
  .three-images-container .three-images-wrapper .image-column {
    width: 100%;
    margin-bottom: 20px;
  }
  
  .three-images-wrapper {
    flex-direction: column;
    margin-left: unset !important;
  }
  
  .image-column {
    transform: unset !important;
  }
  
  .image-column.first, .image-column.last {
    display: none;
  }
}

.image-column {
  will-change: transform;
}

.three-images-container .three-images-wrapper .image-column figure {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.three-images-container .three-images-wrapper .image-column figure img.three-image-item {
  width: 100%;
  height: auto;
  display: block;
  -o-object-fit: cover;
  object-fit: cover;
  transition: transform 0.3s ease;
  aspect-ratio: 2/1.5;
}

.three-images-container .three-images-wrapper .image-column figure img.three-image-item:hover {
  transform: scale(1.03);
}

/* Lightbox cursor voor klikbare afbeeldingen */
.three-images-container .three-images-wrapper .image-column figure img.lightbox-trigger {
  cursor: pointer;
}

.three-images-container .three-images-wrapper .image-column figure figcaption {
  padding: 8px 0;
  font-size: 14px;
  text-align: center;
  color: #666;
}

@media (max-width: 499px) {
  .three-images-container .three-images-wrapper .image-column figure img.three-image-item {
    width: 125% !important;
  }
  .three-images-container .three-images-wrapper {
    margin-left: -70vw;
  }
}

/* LIGHTBOX CSS */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(10px);
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-container {
  position: relative;
  max-width: 90vw;
  max-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: lightboxZoom 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes lightboxZoom {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.lightbox-image {
max-width: 100%;
    max-height: 90%;
    height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  transition: opacity 0.3s ease;
}

.lightbox-close {
  position: absolute;
  top: -60px;
  right: 40px;
  width: 45px;
  height: 45px;
    background: rgb(0 0 0 / 15%);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: bold;
  color: white;
  transition: all 0.3s ease;
  backdrop-filter: blur(20px);
  z-index: 10001;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.1) rotate(90deg);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 55px;
  height: 55px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  transition: all 0.3s ease;
  backdrop-filter: blur(20px);
  z-index: 10001;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.05);
}

.lightbox-nav:disabled:hover {
  transform: translateY(-50%) scale(1);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
  left: 30px;
}

.lightbox-next {
  right: 30px;
}

.lightbox-caption {
  position: absolute;
  bottom: -70px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 16px;
  text-align: center;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 24px;
  border-radius: 25px;
  backdrop-filter: blur(20px);
  max-width: 80%;
  font-weight: 400;
  line-height: 1.4;
}

.lightbox-counter {
  position: absolute;
  top: -70px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 20px;
  border-radius: 20px;
  backdrop-filter: blur(20px);
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Loading spinner */
.lightbox-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 45px;
  height: 45px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top: 3px solid white;
  border-radius: 50%;
  animation: lightboxSpin 1s linear infinite;
  z-index: 10000;
}

@keyframes lightboxSpin {
  0% { 
    transform: translate(-50%, -50%) rotate(0deg); 
  }
  100% { 
    transform: translate(-50%, -50%) rotate(360deg); 
  }
}

/* Smooth fade transition voor afbeelding */
.lightbox-image {
  transition: opacity 0.3s ease;
}

/* FIXED: Prevent scrolling when lightbox is open without height manipulation */
body.lightbox-open {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
}

/* FIXED: Ensure smooth scroll behavior is properly managed */
html {
  scroll-behavior: smooth;
}

html.no-scroll-behavior {
  scroll-behavior: auto !important;
}

/* Mobile responsive */
@media (max-width: 767px) {
  .lightbox-container {
    max-width: 95vw;
    max-height: 70vh;
  }

  .lightbox-nav {
    width: 45px;
    height: 45px;
    font-size: 18px;
  }

  .lightbox-prev {
    left: 15px;
  }

  .lightbox-next {
    right: 15px;
  }

  .lightbox-close {
    top: -50px;
    right: -5px;
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .lightbox-caption {
    bottom: -60px;
    font-size: 14px;
    padding: 10px 20px;
    max-width: 90%;
  }

  .lightbox-counter {
    top: -60px;
    font-size: 13px;
    padding: 6px 16px;
  }

  .lightbox-loading {
    width: 35px;
    height: 35px;
  }
}

@media (max-width: 480px) {
  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }

  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .lightbox-close {
    width: 35px;
    height: 35px;
    font-size: 18px;
  }

  .lightbox-caption {
    bottom: -50px;
    font-size: 13px;
    padding: 8px 16px;
  }

  .lightbox-counter {
    top: -50px;
    font-size: 12px;
    padding: 5px 12px;
  }
}

/* Accessibility improvements */
.lightbox:focus {
  outline: none;
}

.lightbox-nav:focus,
.lightbox-close:focus {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .lightbox {
    background: rgba(0, 0, 0, 0.85);
  }
  
  .lightbox-close,
  .lightbox-nav {
    background: rgba(255, 255, 255, 0.9);
    color: black;
    border-color: white;
  }
  
  .lightbox-caption,
  .lightbox-counter {
    background: rgba(0, 0, 0, 0.9);
    border-color: white;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .lightbox-container {
    animation: none;
  }
  
  .lightbox {
    transition: none;
  }
  
  .lightbox-image {
    transition: none;
  }
  
  .lightbox-close:hover {
    transform: scale(1.1);
  }
}