.mx_photo_album {
  display: flex;
  flex-wrap: wrap;
  gap: 15px; /* ruimte tussen de items */
  justify-content: center;
  padding: 0;
  margin: 0 auto;
  max-width: 1400px;
}

.mx_photo_album_subalbum,
.mx_photo_album_image {
  flex: 1 1 calc(16.666% - 15px); /* 6 per rij */
  box-sizing: border-box;
  text-align: center;
  max-width: 200px; /* maximale grootte van elk bolletje */
  margin: 0 auto; /* centreren binnen flex-item */
}

/* Links */
.mx_photo_album_subalbum a,
.mx_photo_album_image a {
  display: block;
  width: 100%;
  height: 100%;
}

/* Afbeeldingen */
.mx_photo_album_subalbum img,
.mx_photo_album_image img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;        /* vierkante verhouding */
  object-fit: cover;          /* snijdt de foto mooi bij */
  border-radius: 50%;         /* maakt hem perfect rond */
  transition: transform 0.3s ease;
}

.mx_photo_album_subalbum img:hover,
.mx_photo_album_image img:hover {
  transform: scale(1.05); /* subtiel zoom-effect bij hover */
}

/* Bijschrift */
.mx_photo_album_subalbum span,
.mx_photo_album_image span {
  display: block;
  margin-top: 7px;
  line-height: 1.2em;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9em;
  color: #333;
}

/* Fancybox afgeronde hoeken */
.fancybox-inner img {
  border-radius: 30px 0 30px 0 !important;
}

/* --- TABLET: 3 per rij --- */
@media screen and (max-width: 1023px) {
  .mx_photo_album_subalbum,
  .mx_photo_album_image {
    flex: 1 1 calc(33.333% - 15px);
  }
}

/* --- MOBIEL: 2 per rij --- */
@media screen and (max-width: 767px) {
  .mx_photo_album_subalbum,
  .mx_photo_album_image {
    flex: 1 1 calc(50% - 15px);
    max-width: 200px; /* behoud maximale grootte */
  }
}
