/* Algemene body/html fix voor scrollbalken */
body, html {
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* Voorkom horizontale scrollbalken op de pagina */
}

/* Algemene Glide styling (voor sliders buiten de popup) */
.glide {
  position: relative;
  width: 100%;
  max-width: 1000px;
  height: auto;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.glide__track {
  overflow: hidden; /* BELANGRIJK: voorkom overflow in de track */
}

.glide__slides {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  overflow: visible; /* Belangrijk voor peek effect */
}

.glide__slide {
  flex-shrink: 0;
  width: 100%;
}

.glide__slides img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  object-fit: cover;
}

/* Tekst overlay */
.text {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  padding: 15px;
  box-sizing: border-box;
  text-align: left;
}

.text h1 {
  margin: 0 0 5px 0;
  font-size: 18px;
}

.text p, .text .offer {
  font-size: 14px;
  color: #fff;
  text-decoration: underline;
}

/* Navigatiepijlen */
.glide__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.7);
  color: #333;
  border: none;
  width: 40px;
  height: 40px;
  font-size: 22px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 100;
  transition: background 0.3s;
  display: flex;
  justify-content: center;
  align-items: center;
}

.glide__arrow:hover {
  background: rgba(255,255,255,0.9);
}

.glide__arrow--prev { left: 10px; }
.glide__arrow--next { right: 10px; }

/* Pagina bolletjes */
.glide__bullets {
  position: absolute;
  bottom: 15px;
  left: 0;
  width: 100%;
  text-align: center;
  z-index: 100;
  padding: 0;
  margin: 0;
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

.glide__bullet {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ccc;
  border: 2px solid rgba(255,255,255,0.8);
  margin: 0 6px;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
  display: inline-block;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.glide__bullet:hover {
  background: #0056b3;
  transform: scale(1.1);
}

.glide__bullet--active {
  background: #007BFF;
  border-color: #007BFF;
  transform: scale(1.2);
}

/* ---------------- POPUP SPECIFIEK ---------------- */

/* Overlay achtergrond */
#popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  overflow: hidden; /* BELANGRIJK: voorkom scrollbalken in popup */
  padding: 0;
  margin: 0;
}

/* De innerlijke container van de popup */
#popup > div:first-of-type { 
  background: transparent; /* Transparant voor fullscreen effect */
  padding: 0;
  border-radius: 0;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  position: relative;
  box-shadow: none;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden; /* BELANGRIJK */
}

/* Slider binnen popup */
#popup #mx_slider {
  width: 100%;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden; /* BELANGRIJK */
  position: relative;
}

#popup .glide__track {
  height: 100vh;
  overflow: hidden; /* BELANGRIJK: voorkom overflow */
}

#popup .glide__slides {
  height: 100vh;
  overflow: visible; /* Nodig voor peek effect, maar track controleert de overflow */
}

#popup .glide__slide {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

#popup .glide__slide img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain; /* Houdt de hele afbeelding zichtbaar */
  border-radius: 0;
}

/* Tekst overlay binnen popup */
#popup .glide__slide .text {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 20px;
  box-sizing: border-box;
  font-size: 16px;
  z-index: 5;
}

#popup .glide__slide .text h1 {
  font-size: 22px;
  margin: 0;
}

/* Sluitknop */
#popup #closePopup {
  position: fixed;
  top: 20px;
  right: 20px;
  font-size: 32px;
  cursor: pointer;
  color: #fff;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10001;
  transition: background 0.3s, color 0.3s;
  line-height: 1;
  pointer-events: auto; /* BELANGRIJK: Zorg dat close button klikbaar blijft */
}

#popup #closePopup:hover {
  background: rgba(255,255,255,0.2);
}

/* Navigatiepijlen in popup - groter en zichtbaarder */
#popup .glide__arrow {
  background: rgba(0,0,0,0.6);
  color: #fff;
  width: 60px;
  height: 60px;
  font-size: 32px;
  z-index: 10000;
}

#popup .glide__arrow:hover {
  background: rgba(0,0,0,0.8);
}

#popup .glide__arrow--prev { 
  left: 20px; 
}

#popup .glide__arrow--next { 
  right: 20px; 
}

/* Pagina bolletjes in popup */
#popup .glide__bullets {
  bottom: 30px;
  z-index: 10000;
}

#popup .glide__bullet {
  background: rgba(255,255,255,0.5);
  border-color: rgba(255,255,255,0.8);
  width: 12px;
  height: 12px;
}

#popup .glide__bullet:hover {
  background: rgba(255,255,255,0.8);
  border-color: #fff;
}

#popup .glide__bullet--active {
  background: #007BFF;
  border-color: #007BFF;
}

/* Responsive aanpassingen */
@media (max-width: 768px) {
  #popup .glide__arrow {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }
  
  #popup .glide__arrow--prev { left: 10px; }
  #popup .glide__arrow--next { right: 10px; }
  
  #popup #closePopup {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 28px;
  }
}