.house-gallery__preview-wrapper {
  display: flex;
  justify-content: center;
  padding-inline: 1.5rem 1.25rem;
  padding-block-start: 2.3125rem;
  background: var(--wp--preset--color--ochre);
}

.house-gallery__preview {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 1512px;
  img {
    width: auto;
    max-width: 100%;
    height: 339px;
    object-fit: cover;
  }
}                                     

@media (width <= 781px) {
  .house-gallery__preview {
    max-width: 500px;

    img {
      width: 100%;
      height: auto;
    }
  }
}

.house-gallery__last-image-n-open-whole-wrapper {
  display: flex;
  gap: 1rem;
}

@media(width <= 781px) {
  .house-gallery__last-image-n-open-whole-wrapper {
    flex-direction: column;
  }
}

.house-gallery__open-whole {
  border: 1px solid #000;
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
  text-transform: uppercase;
  font-family: var(--wp--preset--font-family--inter);
  font-weight: 700;
  font-size: .9375rem;
  height: 339px;
  width: 100%;
  min-width: 14rem;
  line-height: 1rem;
  padding-inline-start: 1.5rem;
  padding-block-end: 2.1875rem;
  cursor: pointer;

  span {
    width: 5rem;
  }
}

@media(width >= 782px) {
  .house-gallery__open-whole {
    font-size: 1.125rem;
    line-height: 1.1875rem;
    max-width: 339px;
  }
}

.house-gallery__whole {
  position: absolute;
  margin-inline: 5%;
  max-width: 1512px;
  width: 90%;
  z-index: 2;
  top: 4rem;
  display: none;
  transition: cubic-bezier(.165, .84, .44, 1);

  img {
    height: 339px;
    width: auto;
    max-width: 100%;
  }
}

@media (width <= 781px) {
  .house-gallery__whole {
    top: 2.5rem;
    
    img {
      width: 100%;
      height: auto;
      object-fit: cover;
    }
  }
}

.house-gallery__whole-content {
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 3.5rem 2.25rem;
}

@media( width <= 781px) {
  .house-gallery__whole-content {
    padding-inline: 2.0625rem;
  }
}

.house-gallery__whole.show {
  display: block;
}

.house-gallery__room-name {
  font-size: 2rem;
  line-height: 3rem ;
  margin-block: 3rem 0;
}

@media( width >= 782px ) {
  .house-gallery__room-name {
    font-size: 2.75rem;
    line-height: 3.5rem;
  }
}

.house-gallery__whole-gallery-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.house-gallery__close-whole {
  position: sticky;
  left: 95%;
  margin-block-end: 2rem;
  z-index: 3;
  display: flex;
  width: fit-content;
  color: #fff;
  background: #000;
  font-family: var(--wp--preset--font-family--inter);
  text-transform: uppercase;
  font-weight: 700;
  font-size: .9375rem;
  padding: .5625rem .8125rem;
  cursor: pointer;
}

@media( width > 1663px) {
  .house-gallery__close-whole {
    left: calc( 5% + 1512px)
  }
}

@media( width <= 781px) {
  .house-gallery__close-whole {
    margin-inline: auto;
    margin-block-end: 1.25rem;
  }
}

.house-gallery__overlay {
  position: fixed;
  display: none;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--wp--preset--color--ochre);
  opacity: .9;
}

.house-gallery__whole-wrapper.show {
  display: block;
}

.house-gallery__whole-wrapper {
  position: fixed;
  display: none;
  overflow: auto;
  height: 100%;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
}

.house-gallery__whole-wrapper:-webkit-scrollbar {
  display: none;
}