/* NORMAL GALLERY: SELECTED IMAGE ENLARGED, PREVIEW OF OTHER IMAGES BELOW */
figure.gallery {
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    position: relative;

    &>img.selected-image {
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        width: 100%;
        height: 78%;
        object-fit: contain;
    }

    &>nav.gallery-previewer {
        position: absolute;
        bottom: 1em;
        left: 0;
        right: 0;
        display: flex;
        justify-content: center;
        height: 15%;
        gap: 1em;

        & img {
            padding: 3px;
        }

        & img:hover,
        & img.selected {
            cursor: pointer;
            box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
            border-radius: 3px;
            box-sizing: border-box;
        }
    }
}

/* ENLARGEABLE IMAGE: CLICK TO OPEN NEARLY FULL SCREEN DIALOG */
img.enlargeable:hover {
    cursor: zoom-in;
}

dialog.enlarged-image {
    border: none; outline: none;
    padding: 2.5em;

    & img {
        max-width: 86vw;
        max-height: 86vh;
        object-fit: contain;
    }
}
dialog.enlarged-image:hover {
    cursor: zoom-out;
}

/* STAIRCASE GALLERY: 2 IMAGES, WITH 1 IMAGE SLIGHTLY LOWER */
figure.staircase-gallery {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.2em;
    margin: 1em 0;

    & img {
        max-width: 95%;
        width: auto;
    }
}

@media only screen and (min-width: 800px) {
    figure.staircase-gallery {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 0;

        & img {
            max-width: 50%;
        }

        & img:nth-child(1) {
            margin-bottom: 2.5em;
        }

        & img:nth-child(2) {
            margin-top: 2.5em;
        }
    }
}