html.is-lightbox {
    /*overflow: hidden;*/
}

* {
    box-sizing: border-box;
}

.c-gallery__wrapper {
    display: grid;
    grid-gap: 20px;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto;
}

.c-gallery-item {
    /*width: 200px;*/
    position: relative;
    aspect-ratio: 4/3;
    grid-row-start: auto;
    margin: 0;
    overflow: hidden;
}

.c-gallery-item a {
    position: absolute;
    left: 0;
    top: 0;

    width: 100%;
    height: 100%;
    cursor: zoom-in;
    overflow: hidden;

    transition: border ease-in-out 0.3s;
    border: 0 solid #ea882f;
}

.c-gallery-item a:focus,
.c-gallery-item a:hover {
    border-width: 8px;
}

.c-gallery-item:nth-of-type(1),
.c-gallery-item:nth-of-type(5) {
    grid-row-start: span 2;
    aspect-ratio: auto;
}

.c-gallery-item__image {
    position: absolute;
    left: 0;
    top: 0;

    width: 100%;
    height: 100%;
    object-fit: cover;
}

.c-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    display: flex;
    cursor: zoom-out;

    transition: ease-in-out 0.3s;
    transition-property: visibility, opacity;
    /*background: rgba(0, 0, 0, 0.8);*/
    visibility: hidden;
    opacity: 0;
}

.is-lightbox .c-lightbox {
    visibility: visible;
    opacity: 1;
}

.c-lightbox__wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    z-index: 99;

    background-color: black;
}

.c-lightbox__wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
