/* =========================================================
   EXPOFUAR SPLIT GALLERY - CLEAN & MOBILE FRIENDLY
   Vereist markup:
   .gallery-wrap
     .item.left|.center|.right
       .item-bg (background-image)
       .city-date + .city-name
       .item-text (optioneel)
       .item-cta  (CTA wrapper)
   JS moet .active-1/2/3 op .gallery-wrap zetten en .is-active op .item
   ========================================================= */

/* ---------- BASIS ---------- */
html, body { height: 100%; margin: 0; }
.container { max-width: 100%; height: 100vh; margin: 0 auto; }

/* Astra spacing (als je dit nodig hebt) */
.ast-page-builder-template .entry-header.ast-header-without-markup{
  margin-top:95px;
  margin-bottom:0;
}

/* ---------- WRAPPER (DESKTOP) ---------- */
.gallery-wrap{
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: block;              /* GEEN grid */
}

/* ---------- PANELS (DESKTOP) ---------- */
.gallery-wrap .item{
  position: absolute;
  top: 0;
  bottom: 0;
  overflow: hidden;
  min-width: 0;
  transform: none !important;  /* tekst mag nooit meezoomen */
  will-change: left, width;
  transition:
    left 1000ms cubic-bezier(.16,.84,.44,1),
    width 1000ms cubic-bezier(.16,.84,.44,1);
}

/* Default 3 gelijke delen */
.gallery-wrap .item.left   { left: 0%;      width: 33.333%; }
.gallery-wrap .item.center { left: 33.333%; width: 33.333%; }
.gallery-wrap .item.right  { left: 66.666%; width: 33.333%; }

/* Active verdeling (mooi balans) */
.gallery-wrap.active-1 .item.left   { left: 0%;    width: 45%; }
.gallery-wrap.active-1 .item.center { left: 45%;   width: 27.5%; }
.gallery-wrap.active-1 .item.right  { left: 72.5%; width: 27.5%; }

.gallery-wrap.active-2 .item.left   { left: 0%;    width: 27.5%; }
.gallery-wrap.active-2 .item.center { left: 27.5%; width: 45%; }
.gallery-wrap.active-2 .item.right  { left: 72.5%; width: 27.5%; }

.gallery-wrap.active-3 .item.left   { left: 0%;    width: 27.5%; }
.gallery-wrap.active-3 .item.center { left: 27.5%; width: 27.5%; }
.gallery-wrap.active-3 .item.right  { left: 55%;   width: 45%; }

/* ---------- FOTO LAYER (ALLEEN DIT ZOOMT) ---------- */
.gallery-wrap .item-bg{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  transform: translateZ(0) scale(1);
  will-change: transform;
  transition: transform 1400ms cubic-bezier(.16,.84,.44,1);
  z-index: 0;
}

/* Zoom naar voren + subtiele pan */
.gallery-wrap .item.is-active .item-bg{ transform: translateZ(0) scale(1.14); }
.gallery-wrap .item.left.is-active .item-bg{   transform: translateZ(0) scale(1.14) translateX(3%); }
.gallery-wrap .item.center.is-active .item-bg{ transform: translateZ(0) scale(1.14) translateX(0%); }
.gallery-wrap .item.right.is-active .item-bg{  transform: translateZ(0) scale(1.14) translateX(-3%); }

/* ---------- OVERLAY (DIAGONAAL) ---------- */
.gallery-wrap .item::after{
  content:"";
  position:absolute;
  inset:0;
  z-index: 1;
  pointer-events:none;
  opacity: .92;
  transition: opacity 450ms ease;
}

/* Links – emerald */
.gallery-wrap .item.left::after{
  background: linear-gradient(135deg,
    rgba(30,120,90,0.90) 0%,
    rgba(30,120,90,0.55) 45%,
    rgba(0,0,0,0.25) 100%
  );
}

/* Midden – copper */
.gallery-wrap .item.center::after{
  background: linear-gradient(135deg,
    rgba(180,95,45,0.92) 0%,
    rgba(180,95,45,0.55) 45%,
    rgba(0,0,0,0.25) 100%
  );
}

/* Rechts – warm gold */
.gallery-wrap .item.right::after{
  background: linear-gradient(135deg,
    rgba(195,150,45,0.92) 0%,
    rgba(195,150,45,0.55) 45%,
    rgba(0,0,0,0.25) 100%
  );
}

.gallery-wrap .item.is-active::after{ opacity: .70; }

/* ---------- VERTICALE LABELS ---------- */
.city-date, .city-name{
  position:absolute;
  top:18px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  color:#fff !important;
  font-family:'Oswald', sans-serif;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:1px;
  line-height:1;
  z-index: 5;
  pointer-events:none;
}

.city-date{
  left:18px;
  font-size: clamp(12px, 1.05vw, 16px);
  opacity:.95;
  letter-spacing:.6px;
}
.city-name{
  left:48px;
  font-size: clamp(22px, 2.2vw, 34px);
}

/* ---------- ITEM TEXT (optioneel) ---------- */
.item-text{
  position:absolute;
  left:24px;
  right:24px;
  bottom:0;
  transform: translateY(120%);
  opacity:0;
  z-index:6;
  color:#fff;
  text-align:left;
  pointer-events:none;
  transition:
    opacity 450ms ease,
    transform 650ms cubic-bezier(.22,.61,.36,1);
}
.item.is-active .item-text{
  opacity:1;
  transform: translateY(0);
  bottom:18%;
}

/* ---------- CTA (Elementor-proof, geen overlap) ---------- */
.gallery-wrap .item .item-cta{
  position: absolute;
  left: 28px;
  right: 28px;        /* full width binnen panel */
  bottom: 12%;
  z-index: 6;

  display: flex;
  flex-direction: column;
  gap: 8px;

  text-decoration: none !important;
  color: #fff !important;

  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;

  transition:
    opacity 450ms ease,
    transform 850ms cubic-bezier(.22,.61,.36,1);
}

/* zichtbaar bij active */
.gallery-wrap .item.is-active .item-cta{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Elementor widgets binnen CTA normaliseren */
.gallery-wrap .item .item-cta .elementor-widget,
.gallery-wrap .item .item-cta .elementor-widget-container{
  position: static !important;
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  transform: none !important;
}

/* Zorg dat text-editor p/span geen margins hebben */
.gallery-wrap .item .item-cta p{ margin: 0 !important; }
.gallery-wrap .item .item-cta span{ margin: 0 !important; display: inline !important; }

/* CTA typography: werkt zowel op jouw .cta-* classes als op Elementor headings */
.gallery-wrap .item .item-cta .cta-date,
.gallery-wrap .item .item-cta .cta-date *{
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: .12em !important;
  text-transform: uppercase !important;
  opacity: .9 !important;
  line-height: 1.2 !important;
}

.gallery-wrap .item .item-cta .cta-title,
.gallery-wrap .item .item-cta .cta-title *{
  font-size: clamp(24px, 2.2vw, 38px) !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: .03em !important;
  line-height: 1.05 !important;
}

.gallery-wrap .item .item-cta .cta-link,
.gallery-wrap .item .item-cta .cta-link *{
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: .16em !important;
  text-transform: uppercase !important;
  line-height: 1.2 !important;
}

/* underline animatie */
.gallery-wrap .item .item-cta .cta-link::after{
  content:"";
  display:block;
  width:0;
  height:2px;
  background:#fff;
  margin-top:8px;
  transition: width 300ms ease;
}
.gallery-wrap .item .item-cta:hover .cta-link::after{ width:48px; }

/* ---------- MOBIEL: stack, geen absolute panels ---------- */
@media (max-width: 768px){
  .container{ height:auto; }

.ast-header-break-point #ast-mobile-header {
    display: block;
	margin-top:-87px;
}

/* Astra spacing (als je dit nodig hebt) */
.ast-page-builder-template .entry-header.ast-header-without-markup{
  margin-top:95px;
  margin-bottom:0;
}

  .gallery-wrap{
    height: auto;
  }

  .gallery-wrap .item{
    position: relative;
    left: auto !important;
    width: 100% !important;
    height: 62vh;            /* pas aan naar smaak */
    transition: none !important;
  }

  /* Zoom nog steeds oké */
  .gallery-wrap .item-bg{
    transition: transform 1200ms cubic-bezier(.16,.84,.44,1);
  }

  /* CTA: op mobiel altijd zichtbaar en in de flow */
  .gallery-wrap .item .item-cta{
    position: absolute;       /* blijft mooi boven foto */
    left: 16px;
    right: 16px;
    bottom: 10%;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  /* Labels iets kleiner */
  .city-date{ font-size: 12px; }
  .city-name{ font-size: 22px; }
}

/* ===========================
   MOBIEL (portrait + landscape)
   =========================== */
@media (max-width: 1024px){

  /* container mag scrollen */
  .container{
    height: auto !important;
    min-height: 100vh;
  }
  .ast-header-break-point #ast-mobile-header {
    display: block;
	margin-top:-87px;
}



}


/* FALLBACK: als JS niet werkt, doe hover op item zelf */
.gallery-wrap .item:hover .item-bg{
  transform: translateZ(0) scale(1.14) !important;
}
.gallery-wrap .item.left:hover .item-bg{   transform: translateZ(0) scale(1.14) translateX(3%) !important; }
.gallery-wrap .item.center:hover .item-bg{ transform: translateZ(0) scale(1.14) translateX(0%) !important; }
.gallery-wrap .item.right:hover .item-bg{  transform: translateZ(0) scale(1.14) translateX(-3%) !important; }

.gallery-wrap .item:hover::after{ opacity: .70 !important; }

.gallery-wrap .item:hover .item-cta{
  opacity: 1 !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}



/* ==== SEAM-FIX: gebruik LEFT+RIGHT i.p.v. WIDTH ==== */
.gallery-wrap .item{
  width: auto !important;               /* belangrijk: width uitzetten */
  transition:
    left 1000ms cubic-bezier(.16,.84,.44,1),
    right 1000ms cubic-bezier(.16,.84,.44,1) !important;
}

/* Default 3 gelijke delen */
.gallery-wrap .item.left   { left: 0%;      right: 66.666%; }
.gallery-wrap .item.center { left: 33.333%; right: 33.333%; }
.gallery-wrap .item.right  { left: 66.666%; right: 0%;      }

/* Active-1: 45 / 27.5 / 27.5 */
.gallery-wrap.active-1 .item.left   { left: 0%;    right: 55%;   }
.gallery-wrap.active-1 .item.center { left: 45%;   right: 27.5%; }
.gallery-wrap.active-1 .item.right  { left: 72.5%; right: 0%;    }

/* Active-2: 27.5 / 45 / 27.5 */
.gallery-wrap.active-2 .item.left   { left: 0%;    right: 72.5%; }
.gallery-wrap.active-2 .item.center { left: 27.5%; right: 27.5%; }
.gallery-wrap.active-2 .item.right  { left: 72.5%; right: 0%;    }

/* Active-3: 27.5 / 27.5 / 45 */
.gallery-wrap.active-3 .item.left   { left: 0%;    right: 72.5%; }
.gallery-wrap.active-3 .item.center { left: 27.5%; right: 45%;   }
.gallery-wrap.active-3 .item.right  { left: 55%;   right: 0%;    }

/* Active panel altijd bovenop (zodat overlays niet “lekken”) */
.gallery-wrap .item{ z-index: 1; }
.gallery-wrap .item.is-active{ z-index: 5; }

/* ===== MOBIEL FIX: zet absolute layout UIT ===== */
@media (max-width: 768px){

  .container{
    height: auto !important;
  }

  .gallery-wrap{
    height: auto !important;
    overflow: visible !important;
    display: block !important;
    background: transparent !important;
  }

  /* panels terug naar normale flow */
  .gallery-wrap .item{
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    width: 100% !important;
    height: 60vh !important;     /* pas aan: 50vh/70vh */
    min-height: 420px;           /* zodat CTA/labels niet klemmen */
    transition: none !important;
  }

  /* foto dekkend */
  .gallery-wrap .item-bg{
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }

  /* op mobiel geen “active” schuiven */
  .gallery-wrap.active-1 .item,
  .gallery-wrap.active-2 .item,
  .gallery-wrap.active-3 .item{
    left: auto !important;
    right: auto !important;
  }

  /* CTA altijd zichtbaar, netjes binnen de foto */
  .gallery-wrap .item .item-cta{
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
    left: 16px !important;
    right: 16px !important;
    bottom: 10% !important;
  }

  /* labels iets kleiner */
  .city-date{ font-size: 12px !important; left: 12px !important; top: 12px !important; }
  .city-name{ font-size: 22px !important; left: 38px !important; top: 12px !important; }
}
@media (max-width: 768px){

  /* wrapper: GEEN eigen scroll container meer */
  .gallery-wrap{
    height: auto !important;
    overflow: visible !important;
    scroll-snap-type: none !important;
  }

  /* panels onder elkaar, elk 100vh, en snap op de pagina */
  .gallery-wrap .item{
    position: relative !important;
    left: auto !important;
    width: 100% !important;
    height: 100vh !important;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  /* zet de absolute desktop layout uit op mobiel */
  .gallery-wrap .item.left,
  .gallery-wrap .item.center,
  .gallery-wrap .item.right{
    left: auto !important;
    width: 100% !important;
  }

  /* subtiele zoom op actieve panel */
  .gallery-wrap .item-bg{
    transition: transform 900ms cubic-bezier(.16,.84,.44,1) !important;
  }
  .gallery-wrap .item.is-active .item-bg{
    transform: translateZ(0) scale(1.10) !important;
  }

  /* CTA: altijd zichtbaar op mobiel */
  .gallery-wrap .item .item-cta{
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
    left: 16px !important;
    right: 16px !important;
    bottom: 10% !important;
  }

  /* labels iets kleiner */
  .city-date{ font-size: 12px !important; }
  .city-name{ font-size: 22px !important; }
}


