.gallery-page {
    padding-bottom: 8rem;
}

/* .gallery-container {
    max-width: 1500px;
} */

.gallery-header {
    margin: 4rem 0 5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.gallery-grid {
    columns: 4 220px;
    column-gap: 1.6rem;
}

.gallery-item {
    display: inline-block;
    width: 100%;
    margin: 0 0 1.6rem;
    break-inside: avoid;
    color: inherit;
    border-radius: 16px;
  overflow: clip;
}

.gallery-item figure {
    margin: 0;
}

.gallery-item img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 3px;
    transform: scale(1);
    transition: transform 0.3s ease, opacity 180ms ease;
}

.gallery-video-item video {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 3px;
}

.gallery-video-item figcaption {
    display: block;
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
    transform: scale(1.015);
    opacity: 0.82;
}

.gallery-item figcaption {
    padding-top: 0.8rem;
    color: #555;
    font-size: 1.4rem;
    line-height: 1.45;
    display: none; 
}

.gallery-item:focus-visible {
    outline: 2px solid #111;
    outline-offset: 4px;
}

.lg-backdrop {
    background-color: rgba(20, 20, 20, 0.38);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

@media (max-width: 800px) {
    .gallery-page {
        padding-bottom: 4rem;
    }

    .gallery-header {
        margin: 2rem 0 3rem;
    }

    

    .gallery-grid {
        columns: 2 150px;
        column-gap: 1rem;
    }

    .gallery-item {
        margin-bottom: 1rem;
    }
}

@media (max-width: 420px) {
    .gallery-grid {
        columns: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-item img {
        transition: none;
    }
}

/* Lightbox panels */
.lg-outer {
    background: transparent;
}

.lg-container {
    font-family: "Work Sans", sans-serif;
}

.lg-outer {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    width: 100%;
    height: 100%;
    background: transparent;
}

.lg-outer .lg-content {
    position: relative;
    grid-column: 1;
    grid-row: 1;
    top: 0;
    right: auto;
    bottom: 0;
    left: auto;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.lg-outer .lg-inner {
    inset: 0;
    width: 100%;
    height: 100%;
}

.lg-outer .lg-item {
    background: transparent;
}

.lg-outer .lg-item .lg-img-wrap {
    inset: 40px;
    width: auto;
    height: auto;
}

.lg-outer .lg-image {
    border-radius: 12px;
    transition: transform 0.5s cubic-bezier(0.12, 0.415, 0.01, 1.19), opacity 0.15s;
}

.lg-outer > .lg-sub-html {
    position: relative;
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 0;
    width: auto;
    height: auto;
    margin: 0;
    padding: 100px 32px 32px;
    overflow: auto;
    background: #fff;
    color: #111;
    opacity: 1;
    text-align: left;
    transition: none;
}

.lg-outer > .lg-sub-html .gallery-caption {
    margin: 0;
    color: #111;
    font-size: 2.4rem;
    line-height: 1.45;
}

.lg-outer .lg-toolbar {
    position: absolute;
    top: 0;
    right: 0;
    left: auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    width: 33.3333%;
    height: auto;
    padding: 32px;
    pointer-events: none;
}

.lg-outer .lg-toolbar .lg-icon,
.lg-outer .lg-prev,
.lg-outer .lg-next {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    float: none;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f4f4f4;
    color: #111;
    font-size: 24px;
    line-height: 1;
    pointer-events: auto;
}

.lg-outer .lg-toolbar .lg-close {
    order: 1;
    margin-left: auto;
}

.lg-outer .lg-prev {
    order: -2;
}

.lg-outer .lg-next {
    order: -1;
}

.lg-outer .lg-toolbar .lg-icon:hover,
.lg-outer .lg-next:hover:not(.disabled),
.lg-outer .lg-prev:hover:not(.disabled) {
    background: #e7e7e7;
    color: #111;
}

.lg-outer .lg-prev.disabled,
.lg-outer .lg-next.disabled {
    opacity: 0.45;
}

@media (max-width: 800px) {
    .lg-outer {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr) auto;
    }

    .lg-outer .lg-content {
        grid-column: 1;
        grid-row: 1;
    }

    .lg-outer .lg-item .lg-img-wrap {
        inset: 24px;
    }

    .lg-outer > .lg-sub-html {
        grid-column: 1;
        grid-row: 2;
        max-height: 100%;
        padding: 24px 24px 100px;
        align-items: flex-start;
    }

    .lg-outer > .lg-sub-html .gallery-caption {
        font-size: 2rem;
    }

    .lg-outer .lg-toolbar {
        top: auto;
        right: 0;
        bottom: 0;
        width: 100%;
        padding: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lg-outer .lg-image {
        transition: none;
    }
}

#lg-more-1 {display: none;}

.lg-outer.lg-closing,
.lg-outer.lg-closing *,
.lg-backdrop:not(.in) {
    animation: none !important;
    transition: none !important;
}

.lg-outer.lg-closing {
    opacity: 0;
}