.gallery {
    display: block
}

.gallery--container {
    background-color: var(--color-bg)
}

.gallery--inner {
    display: grid;
    grid-gap: 0
}

@media only screen and (min-width: 768px) {
    .gallery--inner {
        grid-template-columns:repeat(var(--gallery-columns), 1fr)
    }
}

.gallery-spacing--none .gallery--inner {
    grid-gap: 0px;
    margin: 0 auto
}

.gallery-spacing--small .gallery--inner {
    grid-gap: 3px;
    margin: 3px auto
}

.gallery-spacing--medium .gallery--inner {
    grid-gap: 10px;
    margin: 10px auto
}

.gallery-spacing--large .gallery--inner {
    grid-gap: 30px;
    margin: 0 auto
}

.gallery--item .thb-placeholder svg {
    opacity: .5
}

.gallery--item figure {
    position: relative;
    width: 100%;
    overflow: hidden;
    height: 0;
    background: var(--color-accent);
    padding-bottom: var(--ratio-percent)
}

.js .animations-true .gallery--item figure {
    opacity: 0
}

.gallery--item figure.aspect-ratio--portrait {
    padding-bottom: 125%
}

.gallery--item figure.aspect-ratio--square {
    padding-bottom: 100%
}

.gallery--item figure.aspect-ratio--landscape {
    padding-bottom: 75%
}

.gallery--item figure img, .gallery--item figure .thb-placeholder svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    object-fit: cover
}

.gallery--item figure:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 11;
    background: rgba(var(--overlay-color-rgb), var(--overlay-opacity))
}

.gallery--item .gallery--video {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none
}

.gallery--item .gallery--video video {
    height: 100%;
    width: 100%;
    object-fit: cover
}

.gallery--item-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    padding: 10px 20px 10px 10px;
    color: #fff;
    display: flex
}

@media only screen and (min-width: 1068px) {
    .gallery--item-content {
        padding: 10px 30px 40px
    }

    .gallery--item--heading {
        font-size: calc(var(--font-heading-scale) * 28px)
    }
}

@media only screen and (min-width: 1440px) {
    .gallery--item-content {
        padding: 10px 30px 30px
    }

    .gallery--item--heading {
        font-size: calc(var(--font-heading-scale) * 28px);
        line-height: calc(var(--font-heading-line-height-scale) * calc(var(--font-heading-scale) * 44px))
    }
}

.gallery--item-content.content-top-left {
    justify-content: flex-start;
    align-items: flex-start
}

.gallery--item-content.content-top-center {
    justify-content: center;
    align-items: flex-start
}

.gallery--item-content.content-top-right {
    justify-content: flex-end;
    align-items: flex-start
}

.gallery--item-content.content-middle-left {
    justify-content: flex-start;
    align-items: center
}

.gallery--item-content.content-middle-center {
    justify-content: center;
    align-items: center
}

.gallery--item-content.content-middle-right {
    justify-content: flex-end;
    align-items: center
}

.gallery--item-content.content-bottom-left {
    justify-content: flex-start;
    align-items: flex-end
}

.gallery--item-content.content-bottom-center {
    justify-content: center;
    align-items: flex-end
}

.gallery--item-content.content-bottom-right {
    justify-content: flex-end;
    align-items: flex-end
}

.gallery--item-content .gallery--item--heading {
    color: inherit;
    margin-bottom: 8px
}

.gallery--item-content .gallery--item--heading + .button {
    margin-top: 20px
}

.gallery--item-content p {
    margin-bottom: 30px
}

.gallery--item-content p.subheading {
    font-size: .75rem;
    margin-bottom: 15px
}

@media only screen and (min-width: 768px) {
    .gallery--item-content > div {
        max-width: 90%
    }
}

.gallery--item-content > div > *:last-child {
    margin-bottom: 0
}

.gallery--item-content .button, .gallery--item-content .text-button {
    position: relative;
    z-index: 22;
    text-decoration: underline
}

.gallery--item-content-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 21
}

@media only screen and (max-width: 767px) {
    .gallery.swipe-on-mobile .gallery--inner {
        grid-auto-flow: column;
        grid-auto-columns: minmax(calc(100vw + -0px), 1fr);
        overflow-x: auto;
        grid-template-columns:repeat(auto-fill, minmax(calc(100vw + -0px), 1fr));
        scroll-snap-type: x mandatory;
        scrollbar-width: thin
    }

    .gallery.swipe-on-mobile .gallery--inner::-webkit-scrollbar {
        display: none
    }

    .gallery.swipe-on-mobile .gallery--inner .gallery--item {
        scroll-snap-align: center;
        scroll-snap-stop: always
    }

    .row:not(.full-width-row-full) .gallery.swipe-on-mobile .gallery--inner {
        margin: 0 -15px;
        width: calc(100% + 30px)
    }

    .gallery--item-content .gallery--item--heading {
        margin-bottom: 0 !important
    }

    .gallery--item-content {
        padding: 10px 20px
    }

    .gallery--item--heading {
        line-height: calc(var(--font-heading-scale) * 32px)
    }
}
