.section-images {
  margin: 5rem 0;
}
.section-images:first-child {
  padding-top: 3rem;
}
.section-images .container {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  flex-wrap: wrap;
  grid-gap: 50px;
  flex-direction: row-reverse;
}
.section-images .container p.subheading {
  width: 100%;
}
.section-images .container > :is(h1, h2) {
  width: 100%;
  margin: 0 0 -20px;
}
.section-images .container > :is(h1, h2):not(:first-child) {
  margin-top: -40px;
}
.section-images .container .images {
  display: flex;
  justify-content: center;
  width: 100%;
  grid-gap: 20px;
  flex-wrap: wrap;
}
.section-images .container .images .image {
  background-color: var(--light-gray);
  padding: 10px;
}
.section-images .container .images .image img {
  max-width: 100%;
  min-width: 200px;
  max-height: 400px;
  border-radius: 25px;
}
.section-images .container .images .image .caption {
  margin-top: 5px;
  font-size: 0.8em;
}
.section-images .container .images .image .caption * {
  margin: 0 0 5px;
}
.section-images .container .images .image .caption *:last-child {
  margin-bottom: 0;
}

/*

Options - Theme collage

*/
.section-images[options~=theme-collage] {
  overflow: hidden;
}
.section-images[options~=theme-collage] .container {
  max-width: unset;
  width: calc(100vw + 50px);
  margin-left: -25px;
}
.section-images[options~=theme-collage] .container .images {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: 120px;
  grid-auto-flow: dense;
}
.section-images[options~=theme-collage] .container .images .image {
  padding: 0;
}
.section-images[options~=theme-collage] .container .images .image img {
  max-width: unset;
  max-height: unset;
  min-width: unset;
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  display: block;
}
.section-images[options~=theme-collage] .container .images .image:nth-child(7n+1) {
  grid-column: 1;
  grid-row: 3/span 2;
}
.section-images[options~=theme-collage] .container .images .image:nth-child(7n+2) {
  grid-column: 2;
  grid-row: 1/span 2;
}
.section-images[options~=theme-collage] .container .images .image:nth-child(7n+3) {
  grid-column: 2;
  grid-row: 3/span 2;
}
.section-images[options~=theme-collage] .container .images .image:nth-child(7n+4) {
  grid-column: 3;
  grid-row: 2/span 4;
}
.section-images[options~=theme-collage] .container .images .image:nth-child(7n+5) {
  grid-column: 4;
  grid-row: 1/span 2;
}
.section-images[options~=theme-collage] .container .images .image:nth-child(7n+6) {
  grid-column: 4;
  grid-row: 3/span 2;
}
.section-images[options~=theme-collage] .container .images .image:nth-child(7n+7) {
  grid-column: 5;
  grid-row: 1/span 2;
}

@media (max-width: 1000px) {
  .section-images[options~=theme-collage] .container .images {
    grid-template-columns: repeat(3, 1fr);
  }
  .section-images[options~=theme-collage] .container .images .image:nth-child(7n+1) {
    grid-column: 1;
    grid-row: 1/span 2;
  }
  .section-images[options~=theme-collage] .container .images .image:nth-child(7n+2) {
    grid-column: 2;
    grid-row: 1/span 2;
  }
  .section-images[options~=theme-collage] .container .images .image:nth-child(7n+3) {
    grid-column: 2;
    grid-row: 3/span 2;
  }
  .section-images[options~=theme-collage] .container .images .image:nth-child(7n+4) {
    grid-column: 3;
    grid-row: 1/span 3;
  }
  .section-images[options~=theme-collage] .container .images .image:nth-child(7n+5) {
    grid-column: 1;
    grid-row: 3/span 1;
  }
  .section-images[options~=theme-collage] .container .images .image:nth-child(7n+6) {
    grid-column: 1;
    grid-row: 4/span 1;
  }
  .section-images[options~=theme-collage] .container .images .image:nth-child(7n+7) {
    grid-column: 3;
    grid-row: 4/span 1;
  }
}
/*

Scroll Animations

*/
.section-images .container {
  margin-top: -50px;
  opacity: 0;
  transition: all 1s;
}
.section-images.scrolled-to .container {
  margin-top: 0;
  opacity: 1;
}