/* ===== BASIS ===== */
* {
  box-sizing: border-box;
}

body {
  margin: 20px;
  font-family: Arial, Helvetica, sans-serif;
  background: #fff;
  color: #000;
  overflow-x: hidden;
}

/* ===== TEKST ===== */
p {
  font-size: 15px;
  margin-bottom: 1em;
  margin-left: 20px;
  margin-right: 20px;
}

/* ===== KOP ===== */
h2 {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
}

@media (min-width: 768px) {
  h2 {
    font-size: 32px;
  }
}

/* ===== TERUG KNOP ===== */
.back-button {
  display: inline-block;
  margin-bottom: 30px;
  font-size: 14px;
  text-decoration: none;
  color: #3a2b2b;
  border: 1px solid #9e9b9b;
  padding: 6px 12px;
}

.back-button:hover {
  background: #eb1f1f;
  color: #f9f7f7;
}

/* ===== GRID ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 16px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
  max-width: 100%;
}

@media (max-width: 1200px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
  }
}

@media (max-width: 1024px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
}

@media (max-width: 768px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 0 10px;
  }
  p {
    margin-left: 10px;
    margin-right: 10px;
  }
}

@media (max-width: 480px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 0 5px;
  }
  p {
    margin-left: 5px;
    margin-right: 5px;
  }
}

/* ===== FIGURE + CAPTION ===== */
.figure {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 10px;
}

.figure img {
  width: 100%;
  max-width: 100%;
  max-height: 220px;
  display: block;
  object-fit: contain;
  margin: 0 auto;
}

.caption {
  font-size: 13px;
  margin-top: 8px;
  line-height: 1.4;
  text-align: center;
}

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(216, 216, 213, 1);
  display: none;
  align-items: flex-start;
  justify-content: center;
  z-index: 999;
  padding: 50px 20px 20px;
}

.lightbox.show {
  display: flex;
}

.lightbox-content {
  position: relative;
  text-align: center;
  width: 95%;
  max-width: 95%;
  max-height: 80vh;
  margin-top: 30px;
  display: flex;
  flex-direction: column;
}

.lightbox-content img {
  width: auto;
  max-width: 100%;
  max-height: 65vh;
  display: block;
  margin: 0 auto 12px;
  object-fit: contain;
}

.lightbox-caption {
  font-size: 14px;
  line-height: 1.5;
  max-width: 100%;
  margin: 0 auto;
  flex-shrink: 0;
  padding: 0 10px;
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
  font-size: 30px;
  color: #000;
  cursor: pointer;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.7);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 767px) {
  .lightbox {
    padding: 30px 10px 10px;
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
    font-size: 20px;
    width: 30px;
    height: 30px;
  }
}

/* ===== SCROLL GALERIJ ===== */
.wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-container {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  gap: 50px;
  padding: 50px 0;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.intro-text {
  display: block;
  margin-bottom: 20px;
  max-width: 800px;
}

.intro-slide {
  display: none;
}

.slide {
  flex: 0 0 auto;
  width: 500px;
  scroll-snap-align: start;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.slide img {
  width: 100%;
  height: 352px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #ddd;
}

.slide-date {
  font-size: 14px;
  color: #666;
}

.nav-btn {
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 15px;
  cursor: pointer;
  position: absolute;
  z-index: 10;
  border-radius: 50%;
}

.btn-left {
  left: 0;
}

.btn-right {
  right: 0;
}

/* --- MOBIEL LANDSCAPE --- */
@media only screen and (max-height: 450px) and (orientation: landscape) {
  .intro-text {
    display: none;
  }

  .intro-slide {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 0 0 auto;
    width: 80vw;
    padding-right: 40px;
    scroll-snap-align: start;
  }

  .scroll-container {
    padding: 10px 0;
    gap: 20px;
  }

  .slide {
    width: 60vw;
  }

  .slide img {
    height: 65vh;
    width: auto;
  }

  .nav-btn {
    display: none;
  }
}

/* --- MOBIEL PORTRAIT --- */
@media only screen and (max-width: 600px) and (orientation: portrait) {
  .scroll-container {
    flex-direction: column;
    overflow-x: hidden;
    align-items: center;
    padding: 0;
  }

  .slide {
    width: 100%;
    margin-bottom: 20px;
  }

  .slide img {
    height: auto;
    width: 100%;
  }

  .nav-btn {
    display: none;
  }
}

/* ===== MODAL ===== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(157, 159, 160, 0.99);
  justify-content: center;
  align-items: center;
}

.modal img {
  max-width: 90%;
  max-height: 85%;
}

.close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 40px;
  cursor: pointer;
}
