.m-photo-slot {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  scroll-margin-top: 96px;
}

.m-photo-slot__image {
  width: 100%;
  background: var(--color-coloring-grey);
  display: block;
  position: relative;
}

.m-photo-slot__image > img,
.m-photo-slot__image > video {
  width: 100%;
  height: auto;
  display: block;
}

.m-photo-slot--placeholder .m-photo-slot__image {
  aspect-ratio: 4 / 5;
  background: var(--color-light-grey);
  border: 1px dashed var(--color-dark-grey);
  display: flex;
  align-items: center;
  justify-content: center;
}

.m-photo-slot--placeholder .m-photo-slot__image::before {
  content: attr(data-placeholder-label);
  color: var(--color-dark-grey);
  font-size: var(--type-button-s);
  line-height: var(--type-button-s-lh);
}

.m-photo-slot--wide {
  width: min(1108px, 100%);
}

.m-photo-slot--wide.m-photo-slot--compact {
  width: min(calc(1108px / 2), 100%);
}

.m-photo-slot__caption {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
  width: 100%;
  color: var(--color-neutral-caption);
}

.m-photo-slot__title,
.m-photo-slot__copyright {
  display: block;
  font-size: var(--type-button-s);
  line-height: var(--type-button-s-lh);
}

.m-photo-slot__copyright a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.m-photo-row {
  width: min(1108px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--grid-gutter);
  align-items: start;
}

.m-photo-row--three {
  grid-template-columns: 1fr 1fr 1fr;
}

.m-photo-row--equal .m-photo-slot__image {
  aspect-ratio: var(--photo-row-ratio, 4 / 3);
  overflow: hidden;
}

.m-photo-row--equal .m-photo-slot__image > img,
.m-photo-row--equal .m-photo-slot__image > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.m-photo-row--ratio-8-5 {
  --photo-row-ratio: 8 / 5;
}

.m-photo-row--ratio-2-3 {
  --photo-row-ratio: 2 / 3;
}

@media (max-width: 767px) {
  .m-photo-row,
  .m-photo-row--three {
    grid-template-columns: 1fr;
    /* Keep clearer separation between caption and next image in stacked layout */
    gap: 28px;
  }
}
