/* GRID CONTAINER */
.pg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

/* ITEM CONTAINER */
.pg-item {
  position: relative;
  width: 100%;
  height: var(--pg-item-height, 460px);
  overflow: hidden;
  box-sizing: border-box;
  border-bottom: 6.5px solid #FF8F00;
}

/* MEDIA WRAPPER */
.pg-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* ---------- SLIDESHOW ---------- */
.pg-slider .pg-slides {
  position: absolute;
  inset: 0;
}

.pg-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .35s ease;
}

.pg-slide.is-active {
  opacity: 1;
}

.pg-slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pg-object-position, center center);
  display: block;
}

/* ---------- BEFORE / AFTER (clip-based, no scaling) ---------- */
.pg-before-after {
  position: absolute;
  inset: 0;
  --pg-ba: 50%;
}

.pg-ba-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pg-object-position, center center);
  display: block;
}

.pg-ba-after {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Before image stays full-size; we only reveal part via clip-path */
.pg-ba-before-img {
  position: absolute;
  inset: 0;
  z-index: 1;
  clip-path: inset(0 calc(100% - var(--pg-ba)) 0 0);
}

/* Before/After tags (top-left) */
.pg-before-after .pg-ba-tags {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  gap: 8px;
  z-index: 999999;     /* boven overlay en handle */
  pointer-events: none; /* tags zijn puur visueel */
}

.pg-before-after .pg-ba-tag {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;

  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 10px 28px rgba(0,0,0,0.18);

  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  color: rgba(0,0,0,0.78);
}

/* Accent: orange outline for extra brand consistency */
.pg-before-after .pg-ba-tag--before,
.pg-before-after .pg-ba-tag--after {
  border-color: rgba(255,143,0,0.55);
}

/* Range input over full image */
.pg-ba-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  z-index: 3;
}

/* Visible handle line */
.pg-ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-1px);
  background: rgba(255,255,255,0.95);
  z-index: 2;
  pointer-events: none;
}

.pg-ba-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: rgba(0,0,0,0.35);
  border: 2px solid rgba(255,255,255,0.95);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

/* OVERLAY + TEXT
   Belangrijk: overlay mag interactiviteit niet blokkeren (before/after + pagination) */
.pg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.25), rgba(0,0,0,0.75));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
  color: #fff;

  z-index: 10;
  pointer-events: none; /* voorkomt dat overlay clicks opvangt */
}

.pg-overlay h3,
.pg-overlay p {
  margin: 0;
}

.pg-overlay h3 {
  margin: 0 0 .5rem;
  font-family: 'Archivo', sans-serif;
}

/* Pagination: top-left, modern container, boven overlay-content */
.pg-pagination {
  position: absolute;
  top: 14px;
  left: 14px;

  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 8px 10px;
  border-radius: 999px;

  background: rgba(0,0,0,0.26);
  border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(10px);

  z-index: 99999;
  pointer-events: auto; /* wél klikbaar */
}

/* Inactive dot */
.pg-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;

  border: 1px solid rgba(255,255,255,0.65);
  background: rgba(255,255,255,0.22);

  padding: 0;
  cursor: pointer;

  transition: all .18s ease;
}

.pg-dot:hover {
  background: rgba(255,255,255,0.45);
  border-color: rgba(255,255,255,0.85);
}

/* Active: white fill + orange outline */
.pg-dot.is-active {
  width: 28px;
  height: 7px;

  background: #ffffff;
  border: 2px solid #FF8F00;

  box-shadow: 0 10px 24px rgba(0,0,0,0.22);
}

/* WIDTH VARIANTS */
.pg-w1 { grid-column: span 1; }
.pg-w2 { grid-column: span 2; }
.pg-w3 { grid-column: span 3; }

/* MOBILE */
@media (max-width: 768px) {
  .pg-grid { grid-template-columns: 1fr; }

  .pg-item {
    height: var(--pg-item-height-mobile, 320px);
    border-bottom: 6.5px solid #FF8F00;
  }

  .pg-w2, .pg-w3 { grid-column: span 1; }

  .pg-pagination {
    top: 12px;
    left: 12px;
    padding: 7px 9px;
  }
}
/* ------------------------------------------------------------
   FORCE pagination styling (overrides theme/Elementor buttons)
   ------------------------------------------------------------ */
.pg-overlay .pg-pagination{
  position: absolute !important;
  top: 14px !important;
  left: 14px !important;

  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;

  padding: 8px 10px !important;
  border-radius: 999px !important;

  background: rgba(255,255,255,0.94) !important;
  border: 1px solid rgba(0,0,0,0.06) !important;
  box-shadow: 0 10px 28px rgba(0,0,0,0.18) !important;

  z-index: 999999 !important;      /* boven alles */
  pointer-events: auto !important; /* klikbaar */
}

/* Reset button styles that theme/Elementor applies */
.pg-overlay .pg-pagination .pg-dot{
  -webkit-appearance: none !important;
  appearance: none !important;

  border: 0 !important;
  background: rgba(0,0,0,0.18) !important;
  background-image: none !important;

  padding: 0 !important;
  margin: 0 !important;

  width: 8px !important;
  height: 8px !important;
  min-width: 8px !important;
  min-height: 8px !important;

  border-radius: 999px !important;
  display: block !important;

  cursor: pointer !important;

  box-shadow: none !important;
  line-height: 0 !important;
  font-size: 0 !important;
  text-indent: -9999px !important; /* geen rare tekstweergave */
}

/* Active: echte pill, wit gevuld, oranje omlijning */
.pg-overlay .pg-pagination .pg-dot.is-active{
  width: 30px !important;
  height: 10px !important;
  min-width: 30px !important;
  min-height: 10px !important;

  background: #ffffff !important;
  border: 2px solid #FF8F00 !important;
  border-radius: 999px !important;

  box-shadow: 0 8px 18px rgba(0,0,0,0.12) !important;
}

/* Nette focus state (toetsenbord) */
.pg-overlay .pg-pagination .pg-dot:focus-visible{
  outline: 2px solid rgba(255,143,0,0.55) !important;
  outline-offset: 3px !important;
}
/* ---------------------------
   LIGHTBOX (modal gallery)
   --------------------------- */
.pg-lightbox{
  position: fixed;
  inset: 0;
  z-index: 9999999;
  display: none;
}

.pg-lightbox.is-open{
  display: block;
}

.pg-lightbox__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.72);
}

.pg-lightbox__panel{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(1120px, calc(100vw - 32px));
  height: min(720px, calc(100vh - 32px));
  background: rgba(15,15,15,0.92);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.55);
  overflow: hidden;

  display: flex;
}

.pg-lightbox__close{
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.95);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.pg-lightbox__main{
  flex: 1;
  display: grid;
  place-items: center;
  padding: 18px;
}

.pg-lightbox__img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
}

.pg-lightbox__side{
  width: 190px;
  border-left: 1px solid rgba(255,255,255,0.10);
  padding: 18px 12px;
  overflow: auto;
}

.pg-lightbox__thumbs{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pg-lightbox__thumb{
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  border-radius: 12px;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
}

.pg-lightbox__thumb img{
  width: 100%;
  height: 92px;
  object-fit: cover;
  display: block;
}

.pg-lightbox__thumb.is-active{
  border-color: rgba(255,143,0,0.75);
  box-shadow: 0 10px 24px rgba(255,143,0,0.18);
}

/* Als er maar 1 foto is: thumbnails verbergen */
.pg-lightbox.is-single .pg-lightbox__side{
  display: none;
}

/* Mobile: thumbnails onderaan */
@media (max-width: 768px){
  .pg-lightbox__panel{
    flex-direction: column;
    height: min(760px, calc(100vh - 24px));
  }

  .pg-lightbox__side{
    width: 100%;
    height: 140px;
    border-left: 0;
    border-top: 1px solid rgba(255,255,255,0.10);
    padding: 12px;
  }

  .pg-lightbox__thumbs{
    flex-direction: row;
  }

  .pg-lightbox__thumb img{
    width: 140px;
    height: 90px;
  }
}
.pg-media[data-pg-gallery]{
  cursor: zoom-in;
}
:root{ --pg-accent:#FF8F00; }

/* Lightbox wrapper */
.pg-lightbox{
  position: fixed;
  inset: 0;
  z-index: 9999999;
  display: none;
}
.pg-lightbox.is-open{ display:block; }

.pg-lightbox__backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.72);
}

/* Panel */
.pg-lightbox__panel{
  position:absolute;
  top:50%;
  left:50%;
  transform: translate(-50%, -50%);
  width: min(1120px, calc(100vw - 32px));
  height: min(720px, calc(100vh - 32px));
  background: rgba(15,15,15,0.92);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.55);
  overflow:hidden;

  display:flex;
  flex-direction: column;
}

/* Topbar: close staat hier, dus nooit over foto */
.pg-lightbox__topbar{
  height: 56px;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.18);
  backdrop-filter: blur(10px);
  flex: 0 0 auto;
}

.pg-lightbox__content{
  display:flex;
  flex: 1 1 auto;
  min-height: 0;
}

/* Close */
.pg-lightbox__close{
  position: static !important;
  width: 42px;
  height: 42px;
  border-radius: 999px;

  border: 1px solid rgba(255,255,255,0.14) !important;
  background: rgba(255,255,255,0.10) !important;
  color: rgba(255,255,255,0.95) !important;

  font-size: 26px;
  line-height: 1;
  cursor: pointer;

  outline: none !important;
}
.pg-lightbox__close:hover{
  border-color: rgba(255,143,0,0.65) !important;
  box-shadow: 0 10px 24px rgba(255,143,0,0.18);
}

/* Main image */
.pg-lightbox__main{
  flex: 1;
  display:grid;
  place-items:center;
  padding: 18px;
}
.pg-lightbox__img{
  width:100%;
  height:100%;
  object-fit: contain;
  border-radius: 12px;
}

/* Side thumbs */
.pg-lightbox__side{
  width: 190px;
  border-left: 1px solid rgba(255,255,255,0.10);
  padding: 18px 12px;
  overflow:auto;
}
.pg-lightbox__thumbs{
  display:flex;
  flex-direction: column;
  gap: 10px;
}
.pg-lightbox__thumb{
  border: 1px solid rgba(255,255,255,0.12) !important;
  background: rgba(255,255,255,0.06) !important;
  border-radius: 12px;
  overflow:hidden;
  padding: 0;
  cursor:pointer;
  outline: none !important;
}
.pg-lightbox__thumb img{
  width:100%;
  height: 92px;
  object-fit: cover;
  display:block;
}
.pg-lightbox__thumb.is-active{
  border-color: rgba(255,143,0,0.85) !important;
  box-shadow: 0 10px 24px rgba(255,143,0,0.20);
}

/* Oranje focus (geen WP roze) */
.pg-lightbox button:focus,
.pg-lightbox button:focus-visible{
  outline: 2px solid rgba(255,143,0,0.70) !important;
  outline-offset: 3px !important;
}

/* Single image: thumbs verbergen */
.pg-lightbox.is-single .pg-lightbox__side{ display:none; }

/* Klik feedback */
.pg-media[data-pg-gallery]{ cursor: zoom-in; }

/* Mobile layout */
@media (max-width: 768px){
  .pg-lightbox__panel{ height: min(760px, calc(100vh - 24px)); }
  .pg-lightbox__topbar{ height: 52px; }

  .pg-lightbox__content{ flex-direction: column; }

  .pg-lightbox__side{
    width: 100%;
    height: 140px;
    border-left: 0;
    border-top: 1px solid rgba(255,255,255,0.10);
    padding: 12px;
  }

  .pg-lightbox__thumbs{ flex-direction: row; }
  .pg-lightbox__thumb img{ width: 140px; height: 90px; }
}
.pg-before-after .pg-ba-open{
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 9999999;
  pointer-events: auto;

  width: 38px;
  height: 38px;
  border-radius: 999px;

  border: 1px solid rgba(255,143,0,0.55);
  background: rgba(255,255,255,0.92);
  color: rgba(0,0,0,0.82);

  display: grid;
  place-items: center;

  padding: 0;
  line-height: 0;      /* voorkomt font baseline-shifts */
  font-size: 0;        /* voorkomt dat tekst invloed heeft */
  cursor: pointer;

  box-shadow: 0 10px 28px rgba(0,0,0,0.18);
}

.pg-before-after .pg-ba-open__icon{
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
}

.pg-before-after .pg-ba-open__icon svg{
  display: block;
  width: 18px;
  height: 18px;
}

/* Lightbox: toon afbeeldingen altijd volledig */
.pg-lightbox .pg-lightbox__main {
  background: #000;
}

.pg-lightbox .pg-lightbox__img {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center center !important;
}

/* Before/After in lightbox: nooit croppen */
.pg-lightbox .pg-lb-ba {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
}

.pg-lightbox .pg-lb-ba .pg-ba-img {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center center !important;
  background: #000;
}
/* Gewone gallery-afbeelding in lightbox altijd volledig zichtbaar */
.pg-lightbox .pg-lightbox__main {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  background: #000 !important;
}

.pg-lightbox .pg-lightbox__main .pg-lightbox__img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  background: #000 !important;
}