/* Fotocarrousel in een blogpost: kleine foto's naast elkaar, zijwaarts te scrollen */

.carousel {
  position: relative;
  margin: 2em 0;
}

.carousel-track {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.carousel-track li {
  flex: 0 0 calc((100% - 20px) / 3);   /* drie foto's tegelijk */
  scroll-snap-align: start;
}

.carousel-track img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #f2f2f2;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0 0 3px;
  border: 1px solid var(--border, #cfcfcf);
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.carousel-prev { left: -14px; }
.carousel-next { right: -14px; }

.carousel-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

@media (max-width: 640px) {
  .carousel-track li { flex-basis: calc((100% - 10px) / 2); }   /* twee tegelijk op een telefoon */
  .carousel-prev { left: 4px; }
  .carousel-next { right: 4px; }
}

/* Foto's naast elkaar in een blogpost */

.photo-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 2em 0;
}

.photo-row img,
.photo-row video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #f2f2f2;
}

.photo-row.photo-row--2 {
  grid-template-columns: repeat(2, 1fr);   /* twee foto's naast elkaar */
}

@media (max-width: 640px) {
  .photo-row { gap: 6px; }
}
