.wp-block-gallery {
    gap: 30px !important;
    clear: both;
    margin: 30px 0;
}

.wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) {
    width: calc(50% - 30px);
}

.wp-block-gallery.has-nested-images.type-30 figure.wp-block-image:nth-child(1):not(#individual-image),
.wp-block-gallery.has-nested-images.type-70 figure.wp-block-image:nth-child(2):not(#individual-image) {
    width: calc(30% - 30px);
}

.wp-block-gallery.has-nested-images.type-40 figure.wp-block-image:nth-child(1):not(#individual-image),
.wp-block-gallery.has-nested-images.type-60 figure.wp-block-image:nth-child(2):not(#individual-image) {
    width: calc(40% - 30px);
}

.wp-block-gallery.has-nested-images.type-30 figure.wp-block-image:nth-child(2):not(#individual-image),
.wp-block-gallery.has-nested-images.type-70 figure.wp-block-image:nth-child(1):not(#individual-image) {
    width: calc(70% - 30px);
}

.wp-block-gallery.has-nested-images.type-40 figure.wp-block-image:nth-child(2):not(#individual-image),
.wp-block-gallery.has-nested-images.type-60 figure.wp-block-image:nth-child(1):not(#individual-image) {
    width: calc(60% - 30px);
}

.wp-block-gallery.has-nested-images figure.wp-block-image {
    display: flex;
    flex-grow: 1;
    justify-content: center;
    position: relative;
    flex-direction: column;
    max-width: 100%;
    box-sizing: border-box;
}

.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) a,
.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) img {
    width: 100%;
    flex: 1 0 0%;
    height: 100%;
    object-fit: cover;
}

.wp-block-image img {
      max-width: 100%;
}
