.mf-page-gallery__image {
    transition: opacity .3s ease;
}

.mf-page-gallery__image.is-loading {
    filter: blur(8px);
    transform: scale(1.03);
}

.mf-page-gallery__image.is-loaded {
    filter: blur(0);
    transform: scale(1);
}


.mf-page-gallery {
    margin: 0 0 28px;
    max-width: 100%;
    overflow: hidden;
}

.mf-page-gallery__main {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden !important;
    border-radius: 18px;
    background: transparent;
    box-shadow: 0 18px 45px rgba(22, 28, 36, 0.16);
}

.mf-page-gallery__main .swiper-wrapper {
    align-items: flex-start;
}

.mf-page-gallery__main .swiper-slide {
    height: auto;
    background: transparent;
}

.mf-page-gallery__main a {
    display: block;
    width: 100%;
    height: auto;
}

.mf-page-gallery .mf-page-gallery__image {
    display: block;
    width: 100%;
    height: auto !important;
    max-height: 620px;
    object-fit: cover;
}

.mf-page-gallery__thumbs {
    margin-top: 12px;
    padding: 2px 1px 6px;
    height: 88px;
    max-height: 88px;
    overflow: hidden;
}

.mf-page-gallery__thumbs .swiper-wrapper {
    align-items: flex-start;
    height: 76px !important;
    max-height: 76px !important;
}

.mf-page-gallery__thumbs .swiper-slide {
    width: 112px;
    height: 76px !important;
    max-height: 76px !important;
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    opacity: 0.58;
    overflow: hidden;
    transition: border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.mf-page-gallery__thumbs .swiper-slide-thumb-active,
.mf-page-gallery__thumbs .swiper-slide.is-active {
    border-color: #c9a25c;
    opacity: 1;
}

.mf-page-gallery__thumbs .swiper-slide:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.mf-page-gallery__thumb {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mf-page-gallery__nav {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 50%;
    background: rgba(12, 18, 24, 0.54);
    backdrop-filter: blur(8px);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.mf-page-gallery__nav:hover {
    background: rgba(12, 18, 24, 0.78);
    border-color: rgba(255, 255, 255, 0.72);
}

.mf-page-gallery__nav::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 11px;
    height: 11px;
    border-top: 2px solid #fff;
    border-left: 2px solid #fff;
}

.mf-page-gallery__nav--prev {
    left: 16px;
}

.mf-page-gallery__nav--prev::before {
    transform: translate(-36%, -50%) rotate(-45deg);
}

.mf-page-gallery__nav--next {
    right: 16px;
}

.mf-page-gallery__nav--next::before {
    transform: translate(-64%, -50%) rotate(135deg);
}

.mf-page-gallery .mf-page-gallery__pagination {
    position: absolute;
    left: 18px;
    right: auto;
    bottom: 16px;
    z-index: 4;
    width: auto !important;
    min-width: 54px;
    max-width: max-content;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(12, 18, 24, 0.58);
    color: #fff;
    font-size: 13px;
    line-height: 1.2;
    text-align: center;
    backdrop-filter: blur(8px);
    transform: none;
}

.mf-page-gallery--single .mf-page-gallery__nav,
.mf-page-gallery--single .mf-page-gallery__pagination {
    display: none;
}

.mf-page-gallery--fallback .mf-page-gallery__main .swiper-wrapper {
    display: block;
}

.mf-page-gallery--fallback .mf-page-gallery__main .swiper-slide {
    display: none;
    height: auto;
    background: transparent;
}

.mf-page-gallery--fallback .mf-page-gallery__main .swiper-slide:first-child,
.mf-page-gallery--fallback .mf-page-gallery__main .swiper-slide.is-active {
    display: block;
}

.mf-page-gallery--fallback .mf-page-gallery__main a {
    height: auto;
}

.mf-page-gallery--fallback .mf-page-gallery__image {
    height: auto !important;
    max-height: 620px;
    object-fit: contain;
}

.mf-page-gallery--fallback .mf-page-gallery__thumbs .swiper-wrapper {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.mf-page-gallery--fallback .mf-page-gallery__thumbs .swiper-wrapper::-webkit-scrollbar {
    display: none;
}

.mf-page-gallery--fallback .mf-page-gallery__thumbs .swiper-slide {
    flex: 0 0 112px;
}

.mf-related-gallery {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    margin: 12px 0 20px;
}

.mf-related-gallery .swiper-wrapper {
    align-items: stretch;
}

.mf-related-gallery .swiper-slide {
    height: auto;
}

.mf-related-gallery a {
    display: block;
   /* height: 100%;*/
}

.mf-related-gallery img {
    display: block;
    width: 100%;
    height: 174px;
    max-height: 174px;
    object-fit: cover;
    border-radius: 8px;
}

.mfp-arrow::before,
.mfp-arrow::after {
    border: 0 !important;
    margin: 0 !important;
}

.mfp-arrow::before {
    content: "" !important;
}

.mfp-arrow::after {
    position: absolute;
    inset: 50% auto auto 50%;
    width: auto;
    height: auto;
    color: #fff;
    font-family: Arial, sans-serif !important;
    font-size: 56px;
    font-weight: 300;
    line-height: 1;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .45);
    transform: translate(-50%, -50%);
}

.mfp-arrow-left::after {
    content: "\2039" !important;
}

.mfp-arrow-right::after {
    content: "\203A" !important;
}

.mf-page-gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: rgba(5, 10, 16, 0.9);
}

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

.mf-page-gallery-lightbox__image {
    display: block;
    max-width: min(1180px, 92vw);
    max-height: 86vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}

.mf-page-gallery-lightbox__close,
.mf-page-gallery-lightbox__nav {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.mf-page-gallery-lightbox__close:hover,
.mf-page-gallery-lightbox__nav:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.68);
}

.mf-page-gallery-lightbox__close {
    top: 22px;
    right: 22px;
    width: 46px;
    height: 46px;
    font-size: 30px;
    line-height: 40px;
}

.mf-page-gallery-lightbox__nav {
    top: 50%;
    width: 52px;
    height: 52px;
    transform: translateY(-50%);
}

.mf-page-gallery-lightbox__nav::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    border-top: 2px solid #fff;
    border-left: 2px solid #fff;
}

.mf-page-gallery-lightbox__nav--prev {
    left: 24px;
}

.mf-page-gallery-lightbox__nav--prev::before {
    transform: translate(-36%, -50%) rotate(-45deg);
}

.mf-page-gallery-lightbox__nav--next {
    right: 24px;
}

.mf-page-gallery-lightbox__nav--next::before {
    transform: translate(-64%, -50%) rotate(135deg);
}

.mf-page-gallery-lightbox__counter {
    position: absolute;
    left: 50%;
    bottom: 22px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 14px;
    transform: translateX(-50%);
}

@media (max-width: 767px) {
    .mf-page-gallery {
        margin-bottom: 22px;
    }

    .mf-page-gallery__main {
        border-radius: 14px;
    }

    .mf-page-gallery .mf-page-gallery__image,
    .mf-page-gallery--fallback .mf-page-gallery__image {
        max-height: 390px;
    }

    .mf-page-gallery__thumbs {
        height: 70px;
        max-height: 70px;
    }

    .mf-page-gallery__thumbs .swiper-wrapper {
        height: 58px !important;
        max-height: 58px !important;
    }

    .mf-page-gallery__thumbs .swiper-slide {
        width: 82px;
        height: 58px !important;
        max-height: 58px !important;
        border-radius: 8px;
    }

    .mf-page-gallery__nav {
        width: 38px;
        height: 38px;
    }

    .mf-page-gallery__nav--prev {
        left: 10px;
    }

    .mf-page-gallery__nav--next {
        right: 10px;
    }

    .mf-page-gallery .mf-page-gallery__pagination {
        left: 12px;
        right: auto;
        bottom: 12px;
        width: auto !important;
        min-width: 48px;
        max-width: max-content;
        padding: 5px 9px;
        font-size: 12px;
    }

    .mf-page-gallery-lightbox {
        padding: 16px;
    }

    .mf-page-gallery-lightbox__close {
        top: 12px;
        right: 12px;
        width: 42px;
        height: 42px;
    }

    .mf-page-gallery-lightbox__nav {
        width: 42px;
        height: 42px;
    }

    .mf-page-gallery-lightbox__nav--prev {
        left: 10px;
    }

    .mf-page-gallery-lightbox__nav--next {
        right: 10px;
    }
}
