.photo-open {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
    position: relative;
    color: white
}

.photo-open--cover span {
    position: absolute;
    right: 18px;
    bottom: 18px;
    padding: 8px 13px;
    border-radius: 999px;
    background: #17291fcc;
    font: 600 12px Manrope, sans-serif;
    opacity: 0;
    transform: translateY(5px);
    transition: .25s
}

.photo-open--cover:hover span, .photo-open--cover:focus-visible span {
    opacity: 1;
    transform: none
}

.photo-open:focus-visible {
    outline: 3px solid var(--terracotta);
    outline-offset: -5px
}

.large-gallery {
    padding-bottom: 100px
}

.large-gallery__grid {
    display: grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap: 22px
}

.large-gallery figure {
    height: 500px;
    margin: 0;
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    background: var(--cream)
}

.large-gallery__lead {
    grid-column: 1/-1;
    height: 680px !important
}

.large-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease
}

.large-gallery figure:hover img {
    transform: scale(1.02)
}

.large-gallery figcaption {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 16px;
    width: max-content;
    max-width: calc(100% - 36px);
    padding: 8px 12px;
    border-radius: 10px;
    background: #17291fcc;
    color: white;
    font-size: 13px;
    pointer-events: none
}

.lightbox[hidden] {
    display: none
}

.lightbox {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: grid;
    grid-template-columns:80px minmax(0, 1fr) 80px;
    align-items: center;
    padding: 56px 28px 42px;
    background: #101713ed;
    backdrop-filter: blur(10px);
    animation: lightbox-in .2s ease
}

.lightbox__figure {
    height: calc(100vh - 110px);
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center
}

.lightbox__figure img {
    max-width: 100%;
    max-height: calc(100% - 42px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 24px 70px #0008
}

.lightbox__figure figcaption {
    margin-top: 14px;
    color: #e9eee9;
    font-size: 14px
}

.lightbox__close, .lightbox__arrow {
    border: 1px solid #ffffff4d;
    background: #15231dcc;
    color: white;
    cursor: pointer;
    transition: .2s
}

.lightbox__close:hover, .lightbox__arrow:hover {
    background: white;
    color: var(--ink)
}

.lightbox__close {
    position: absolute;
    right: 24px;
    top: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 30px;
    line-height: 1
}

.lightbox__arrow {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    font-size: 21px;
    justify-self: center
}

.lightbox__counter {
    position: absolute;
    left: 24px;
    top: 27px;
    color: #d7ded9;
    font-size: 13px;
    letter-spacing: .12em
}

.lightbox-open {
    overflow: hidden
}

@keyframes lightbox-in {
    from {
        opacity: 0
    }
    to {
        opacity: 1
    }
}

@media (max-width: 850px) {
    .large-gallery figure {
        height: 380px
    }

    .large-gallery__lead {
        height: 520px !important
    }
}

@media (max-width: 560px) {
    .large-gallery__grid {
        grid-template-columns:1fr;
        gap: 14px
    }

    .large-gallery figure, .large-gallery__lead {
        grid-column: auto;
        height: 420px !important
    }
}

@media (max-width: 640px) {
    .lightbox {
        grid-template-columns:1fr;
        padding: 70px 14px 74px
    }

    .lightbox__figure {
        height: calc(100vh - 144px)
    }

    .lightbox__arrow {
        position: absolute;
        bottom: 16px
    }

    .lightbox__arrow--prev {
        left: calc(50% - 64px)
    }

    .lightbox__arrow--next {
        right: calc(50% - 64px)
    }

    .lightbox__close {
        right: 14px;
        top: 14px
    }

    .lightbox__counter {
        left: 16px;
        top: 22px
    }
}

@media (prefers-reduced-motion: reduce) {
    .lightbox {
        animation: none
    }

    .large-gallery img {
        transition: none
    }
}

.large-gallery--thumbnails .large-gallery__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr))
}

.large-gallery--thumbnails figure {
    height: auto !important;
    aspect-ratio: 4 / 3
}

.large-gallery figcaption {
    overflow-wrap: anywhere
}

@media (max-width: 850px) {
    .large-gallery--thumbnails .large-gallery__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }
}

@media (max-width: 560px) {
    .large-gallery--thumbnails .large-gallery__grid {
        grid-template-columns: 1fr
    }
}
