.gallery {
    padding: 147px 2.5rem 100px;
  }
  @media screen and (min-width: 1025px) and (max-width: 1376px) {
    .gallery {
      padding: 147px 2.5rem 100px;
    }
  }
  @media screen and (min-width: 521px) and (max-width: 1024px) {
    .gallery {
      padding: 147px 2.5rem 70px 2.5rem;
    }
  }
  @media screen and (max-width: 520px) {
    .gallery {
      padding: 80px 2.5rem 70px 2.5rem;
    }
  }
  .gallery.with-heading .items {
    margin: 50px auto 0;
  }
  @media screen and (max-width: 520px) {
    .gallery.with-heading .items {
      margin: 20px auto 0;
    }
  }
  .gallery .gallery-container {
    text-align: center;
  }
  .gallery .gallery-container .heading {
    display: inline-block;
  }
  .gallery .gallery-container .ribbon {
    margin: 9px auto 0;
  }
  @media screen and (max-width: 520px) {
    .gallery .gallery-container .ribbon {
      margin: 5px auto 0;
    }
  }
  .gallery .gallery-container .items {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
  }
  .gallery picture {
    display: contents;
  }
  .gallery .gallery-container .items .item {
    flex: 0 0 25%;
    height: calc((100vw - 2.5rem *2) / 4);
    cursor: pointer;
    max-height: 420px;
  }
  @media screen and (min-width: 1025px) and (max-width: 1376px) {
    .gallery .gallery-container .items .item {
      height: calc((100vw - 2.5rem *2) / 4);
    }
  }
  @media screen and (max-width: 520px) {
    .gallery .gallery-container .items .item {
      margin: 10px 0 0 0;
      flex: 0 0 100%;
      height: calc(100vw - 2.5rem - 2.5rem);
    }
  }
  @media screen and (max-width: 520px) {
    .gallery .gallery-container .items .item:first-of-type {
      margin: 0;
    }
  }
  .gallery .gallery-container .items .item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }