.nohrd-gallery {
    align-items: start;
    display: grid;
    gap: var(--nohrd-gallery-gap, 16px);
    grid-template-columns: repeat(var(--nohrd-gallery-columns-desktop, 4), minmax(0, 1fr));
}

.nohrd-gallery--masonry {
    column-gap: var(--nohrd-gallery-gap, 16px);
    display: grid;
    grid-auto-flow: dense;
    grid-auto-rows: 1px;
    row-gap: 0;
}

.nohrd-gallery--slider,
.nohrd-gallery--hero_slider {
    display: block;
}

.nohrd-gallery__item {
    align-self: start;
    aspect-ratio: 4 / 3;
    display: block;
    line-height: 0;
    overflow: hidden;
    position: relative;
    text-decoration: none;
    vertical-align: top;
}

.nohrd-gallery--masonry .nohrd-gallery__item {
    aspect-ratio: auto;
    margin: 0 0 var(--nohrd-gallery-gap, 16px);
}

.nohrd-gallery__item img {
    display: block;
    height: 100%;
    object-fit: cover;
    transition: opacity .2s ease, transform .25s ease, filter .25s ease;
    width: 100%;
}

.nohrd-gallery--masonry .nohrd-gallery__item img {
    height: auto;
}

.nohrd-gallery-effect-zoom .nohrd-gallery__item:hover img {
    transform: scale(1.05);
}

.nohrd-gallery-effect-fade .nohrd-gallery__item:hover img {
    opacity: .78;
}

.nohrd-gallery-effect-lift .nohrd-gallery__item {
    transition: transform .2s ease, box-shadow .2s ease;
}

.nohrd-gallery-effect-lift .nohrd-gallery__item:hover {
    box-shadow: 0 10px 28px rgba(0, 0, 0, .16);
    transform: translateY(-3px);
}

.nohrd-gallery__meta {
    box-sizing: border-box;
    display: block;
    font-family: var(--font, din-2014, sans-serif);
}

.nohrd-gallery__title,
.nohrd-gallery__copyright {
    display: block;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.35;
}

.nohrd-gallery__title {
    color: #222;
    font-weight: 400;
}

.nohrd-gallery__copyright {
    color: #666;
}

.nohrd-gallery__copyright-icon {
    align-items: center;
    background: rgba(0, 0, 0, .56);
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 999px;
    box-sizing: border-box;
    color: #fff;
    cursor: help;
    display: inline-flex;
    font-size: 12px;
    font-weight: 400;
    height: 24px;
    justify-content: center;
    line-height: 1;
    width: 24px;
}

.nohrd-gallery__copyright-icon i {
    display: block;
    line-height: 1;
}

.nohrd-gallery-copyright-overlay .nohrd-gallery__meta,
.nohrd-gallery-copyright-copyright_icon .nohrd-gallery__meta,
.nohrd-gallery-copyright-title_copyright_icon_overlay .nohrd-gallery__meta {
    background: rgba(0, 0, 0, .40);
    bottom: 0;
    color: #fff;
    left: 0;
    padding: 6px 8px;
    position: absolute;
    right: 0;
    z-index: 2;
}

.nohrd-gallery-copyright-copyright_icon .nohrd-gallery__meta {
    background: transparent;
    bottom: 8px;
    left: auto;
    padding: 0;
    right: 8px;
}

.nohrd-gallery-copyright-overlay .nohrd-gallery__title,
.nohrd-gallery-copyright-overlay .nohrd-gallery__copyright,
.nohrd-gallery-copyright-title_copyright_icon_overlay .nohrd-gallery__title {
    color: #fff;
}

.nohrd-gallery-copyright-title_copyright_icon_overlay .nohrd-gallery__meta {
    align-items: center;
    display: flex;
    gap: 8px;
}

.nohrd-gallery-copyright-title_copyright_icon_overlay .nohrd-gallery__title {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nohrd-gallery-copyright-title_copyright_icon_overlay .nohrd-gallery__copyright-icon {
    flex: 0 0 auto;
    height: 20px;
    margin-left: auto;
    width: 20px;
}

.nohrd-gallery-copyright-below .nohrd-gallery__item,
.nohrd-gallery-copyright-below .nohrd-gallery-slider__slide,
.nohrd-gallery-copyright-title_below .nohrd-gallery__item,
.nohrd-gallery-copyright-title_below .nohrd-gallery-slider__slide,
.nohrd-gallery-copyright-title_copyright_below .nohrd-gallery__item,
.nohrd-gallery-copyright-title_copyright_below .nohrd-gallery-slider__slide,
.nohrd-gallery-copyright-title_copyright_icon .nohrd-gallery__item,
.nohrd-gallery-copyright-title_copyright_icon .nohrd-gallery-slider__slide,
.nohrd-gallery-copyright-title_copyright_icon_overlay .nohrd-gallery__item,
.nohrd-gallery-copyright-title_copyright_icon_overlay .nohrd-gallery-slider__slide {
    line-height: normal;
}

.nohrd-gallery-copyright-below .nohrd-gallery__meta,
.nohrd-gallery-copyright-title_below .nohrd-gallery__meta,
.nohrd-gallery-copyright-title_copyright_below .nohrd-gallery__meta,
.nohrd-gallery-copyright-title_copyright_icon .nohrd-gallery__meta {
    padding-top: 5px;
}

.nohrd-gallery-copyright-title_copyright_icon .nohrd-gallery__meta {
    align-items: center;
    display: flex;
    gap: 6px;
}

.nohrd-gallery-copyright-title_copyright_icon .nohrd-gallery__title {
    flex: 1 1 auto;
    min-width: 0;
}

.nohrd-gallery-copyright-title_copyright_icon .nohrd-gallery__copyright-icon {
    background: rgba(0, 0, 0, .1);
    border-color: rgba(0, 0, 0, .16);
    color: #333;
    flex: 0 0 auto;
    height: 20px;
    margin-left: auto;
    width: 20px;
}

.nohrd-gallery-copyright-below.nohrd-gallery--grid .nohrd-gallery__item,
.nohrd-gallery-copyright-title_below.nohrd-gallery--grid .nohrd-gallery__item,
.nohrd-gallery-copyright-title_copyright_below.nohrd-gallery--grid .nohrd-gallery__item,
.nohrd-gallery-copyright-title_copyright_icon.nohrd-gallery--grid .nohrd-gallery__item {
    aspect-ratio: auto;
}

.nohrd-gallery-copyright-below.nohrd-gallery--grid .nohrd-gallery__item img,
.nohrd-gallery-copyright-title_below.nohrd-gallery--grid .nohrd-gallery__item img,
.nohrd-gallery-copyright-title_copyright_below.nohrd-gallery--grid .nohrd-gallery__item img,
.nohrd-gallery-copyright-title_copyright_icon.nohrd-gallery--grid .nohrd-gallery__item img {
    aspect-ratio: 4 / 3;
}

.nohrd-gallery-slider {
    width: 100%;
}

.nohrd-gallery-slider__stage {
    aspect-ratio: 16 / 9;
    background: #111;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.nohrd-gallery--hero_slider .nohrd-gallery-slider__stage {
    aspect-ratio: 21 / 9;
    min-height: 360px;
}

.nohrd-gallery-slider__slide {
    display: block;
    height: 100%;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    text-decoration: none;
    transition: opacity .28s ease;
    width: 100%;
}

.nohrd-gallery-slider__slide.is-active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

.nohrd-gallery-slider__slide img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.nohrd-gallery--slider .nohrd-gallery-slider__slide img {
    object-fit: contain;
}

.nohrd-gallery-slider__control {
    align-items: center;
    background: rgba(0, 0, 0, .45);
    border: 1px solid rgba(255, 255, 255, .5);
    color: #fff;
    cursor: pointer;
    display: flex;
    font-size: 32px;
    height: 46px;
    justify-content: center;
    line-height: 1;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    z-index: 2;
}

.nohrd-gallery-slider__control--prev {
    left: 16px;
}

.nohrd-gallery-slider__control--next {
    right: 16px;
}

.nohrd-gallery-slider__thumbs {
    display: grid;
    gap: var(--nohrd-gallery-gap, 16px);
    grid-auto-columns: minmax(72px, 104px);
    grid-auto-flow: column;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.nohrd-gallery-slider__thumb {
    aspect-ratio: 4 / 3;
    background: transparent;
    border: 2px solid transparent;
    cursor: pointer;
    display: block;
    min-width: 0;
    overflow: hidden;
    padding: 0;
}

.nohrd-gallery-slider__thumb.is-active {
    border-color: #222;
}

.nohrd-gallery-slider__thumb img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.nohrd-gallery-lightbox {
    align-items: center;
    background: rgba(8, 8, 8, .92);
    bottom: 0;
    display: none;
    justify-content: center;
    left: 0;
    padding: 28px 72px 64px;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 9999;
}

.nohrd-gallery-lightbox.is-open {
    display: flex;
}

.nohrd-gallery-lightbox__image {
    box-shadow: 0 16px 48px rgba(0, 0, 0, .32);
    max-height: calc(100vh - 108px);
    max-width: 100%;
    object-fit: contain;
}

.nohrd-gallery-lightbox__close,
.nohrd-gallery-lightbox__prev,
.nohrd-gallery-lightbox__next {
    align-items: center;
    background: rgba(20, 20, 20, .48);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    display: flex;
    font-size: 26px;
    height: 38px;
    justify-content: center;
    line-height: 1;
    position: absolute;
    transition: background .16s ease, border-color .16s ease, opacity .16s ease;
    width: 38px;
}

.nohrd-gallery-lightbox__close:hover,
.nohrd-gallery-lightbox__prev:hover,
.nohrd-gallery-lightbox__next:hover {
    background: rgba(255, 255, 255, .16);
    border-color: rgba(255, 255, 255, .34);
}

.nohrd-gallery-lightbox__close {
    font-size: 30px;
    right: 18px;
    top: 18px;
}

.nohrd-gallery-lightbox__prev,
.nohrd-gallery-lightbox__next {
    top: 50%;
    transform: translateY(-50%);
}

.nohrd-gallery-lightbox__prev {
    left: 22px;
}

.nohrd-gallery-lightbox__next {
    right: 22px;
}

.nohrd-gallery-lightbox__meta {
    align-items: center;
    background: rgba(16, 16, 16, .72);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    bottom: 14px;
    box-sizing: border-box;
    color: #fff;
    display: flex;
    gap: 10px;
    left: 50%;
    max-width: min(720px, calc(100vw - 32px));
    min-height: 38px;
    padding: 8px 14px;
    position: absolute;
    transform: translateX(-50%);
    width: max-content;
}

.nohrd-gallery-lightbox__caption {
    font-size: 13px;
    line-height: 1.35;
    max-width: 360px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nohrd-gallery-lightbox__counter {
    color: rgba(255, 255, 255, .72);
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
}

.nohrd-gallery-lightbox__copyright {
    color: rgba(255, 255, 255, .72);
    font-size: 12px;
    line-height: 1.35;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nohrd-gallery-lightbox__meta.has-caption.has-copyright .nohrd-gallery-lightbox__copyright {
    border-left: 1px solid rgba(255, 255, 255, .16);
    padding-left: 10px;
}

@media (max-width: 1024px) {
    .nohrd-gallery {
        grid-template-columns: repeat(var(--nohrd-gallery-columns-tablet, 3), minmax(0, 1fr));
    }

    .nohrd-gallery--masonry {
        grid-template-columns: repeat(var(--nohrd-gallery-columns-tablet, 3), minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .nohrd-gallery {
        grid-template-columns: repeat(var(--nohrd-gallery-columns-mobile, 2), minmax(0, 1fr));
    }

    .nohrd-gallery--masonry {
        grid-template-columns: repeat(var(--nohrd-gallery-columns-mobile, 2), minmax(0, 1fr));
    }

    .nohrd-gallery--masonry .nohrd-gallery__item {
        margin-bottom: var(--nohrd-gallery-gap, 16px);
    }

    .nohrd-gallery-slider__stage,
    .nohrd-gallery--hero_slider .nohrd-gallery-slider__stage {
        aspect-ratio: 4 / 3;
        min-height: 0;
    }

    .nohrd-gallery-slider__control {
        height: 38px;
        width: 38px;
    }

    .nohrd-gallery-slider__control--prev {
        left: 10px;
    }

    .nohrd-gallery-slider__control--next {
        right: 10px;
    }

    .nohrd-gallery-lightbox {
        padding: 48px 14px 68px;
    }

    .nohrd-gallery-lightbox__image {
        max-height: calc(100vh - 128px);
    }

    .nohrd-gallery-lightbox__prev,
    .nohrd-gallery-lightbox__next {
        bottom: 16px;
        top: auto;
        transform: none;
    }

    .nohrd-gallery-lightbox__prev {
        left: 16px;
    }

    .nohrd-gallery-lightbox__next {
        right: 16px;
    }

    .nohrd-gallery-lightbox__meta {
        border-radius: 12px;
        flex-wrap: wrap;
        justify-content: center;
        max-width: calc(100vw - 104px);
        min-height: 38px;
        padding: 8px 10px;
    }

    .nohrd-gallery-lightbox__caption,
    .nohrd-gallery-lightbox__copyright {
        max-width: 100%;
    }
}
