.gallery {
  position: relative;
  padding: 5rem 0 6.25rem 0;
  padding-bottom: 17.69rem;
  max-width: 100%;
  background: #fff7f0;
  overflow: hidden;
}

.gallery__container {
  max-width: 82.5rem;
  max-height: 33.25rem;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
}

.gallery__left {
  flex: 1;
  max-width: 27.25rem;
  min-height: 33.25rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-radius: 1.25rem;
}

.gallery__right {
  flex: 1;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  flex-shrink: 0;
  margin-left: 1rem;
}

.gallery__top {
  width: 100%;
  min-height: 14.25rem;
  align-self: stretch;
}

.gallery__bottom {
  margin-top: 1rem;
  width: 100%;
  min-height: 14.25rem;
  display: flex;
}

.gallery__bottom-item {
  flex: 1;
  min-width: 0;
  height: 100%;
}

.gallery__bottom-item:nth-child(n + 2) {
  margin-left: 1rem;
}

.gallery__left img,
.gallery__top img,
.gallery__bottom-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1.25rem;
}

@media (max-width: 639.98px) {
  .gallery {
    position: relative;
    padding: 1.8125rem 1rem 10.94rem;
    width: 100%;
    background: #fff7f0;
  }

  .gallery__container {
    max-width: 100%;
    max-height: none;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
  }

  .gallery__left {
    order: 1;
    max-width: 100%;
    width: 100%;
    min-height: 26.1875rem;
    border-radius: 1.125rem;
  }

  .gallery__right {
    order: 2;
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column-reverse;
    margin-left: 0;
  }

  .gallery__top {
    margin-top: 0.5rem;
    width: 100%;
    height: 8.75rem;
    min-height: auto;
    border-radius: 1.125rem;
  }

  .gallery__bottom {
    margin-top: 0.5rem;
    min-height: 6.34025rem;
    width: 100%;
    display: flex;
  }

  .gallery__bottom-item {
    border-radius: 1rem;
    height: 6.34025rem;
  }

  .gallery__bottom-item img {
    width: 100%;
    min-height: 100%;
    object-fit: cover;
  }

  .gallery__bottom-item:nth-child(n + 2) {
    margin-left: 0.5rem;
  }

  .gallery__left img,
  .gallery__top img,
  .gallery__bottom-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 1rem;
  }
}
