.template-9845,
.template-9845__item,
.template-9845__profile,
.template-9845__content {
    min-width: 0;
    max-width: 100%;
}

.template-9845__profile {
    flex-wrap: wrap;
}

.template-9845__profile > * {
    min-width: 0;
    max-width: 100%;
}

@media (max-width: 767.92px) {
    .template-9845__profile.img-text-wrap > :first-child {
        width: 46% !important;
    }
}

.template-9845__gallery[hidden] {
    display: none !important;
}

.template-9845__buttons {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px;
}

.template-9845__gallery-btn {
    cursor: pointer;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 138px !important;
    height: 31px !important;
    flex: 0 0 138px !important;
    max-width: 138px !important;
    overflow: hidden;
    border-radius: 30px !important;
    border: 2px solid transparent !important;
    border-image: none !important;
    background-color: var(--color-2);
    background-image:
        linear-gradient(var(--color-2), var(--color-2)),
        linear-gradient(var(--color-10), var(--color-10));
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.template-9845__gallery-btn:hover,
.template-9845__gallery-btn.is-active {
    background-image:
        linear-gradient(var(--color-2), var(--color-2)),
        var(--color-9);
}

.template-9845__gallery-btn img {
    height: 31px;
    width: auto;
    max-width: 138px;
    display: block;
    object-fit: contain;
}

.template-9845__gallery-link {
    display: block;
    height: 100%;
    position: relative;
}

.template-9845__gallery-link .image__links {
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 2;
}

.template-9845__gallery-link .image__wrapper {
    position: relative;
    overflow: hidden;
    border-radius: inherit;
    height: 100%;
}

.template-9845__gallery-link .image__wrapper::before {
    content: '';
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    position: absolute;
    z-index: 1;
    transition: opacity 0.3s;
    background:
        linear-gradient(
            130deg,
            color-mix(in srgb, var(--color-3) 70%, transparent),
            color-mix(in srgb, var(--color-4) 70%, transparent)
        );
}

.template-9845__gallery-link .image__slug {
    transition: background 0.3s;
}

.template-9845__gallery-link .image__slug:hover,
.template-9845__gallery-link .image__slug:focus {
    background: var(--color-3);
}

@media (min-width: 991.92px) {
    .template-9845__gallery-link:hover .image__wrapper::before,
    .template-9845__gallery-link:hover .image__links {
        opacity: 1;
    }
}

@media (max-width: 767.92px) {
    .template-9845__gallery .row > :last-child,
    .template-9845__gallery .row > :nth-child(odd):nth-last-child(-n+2),
    .template-9845__gallery .row > :nth-child(odd):nth-last-child(-n+2) ~ * {
        margin-bottom: 0 !important;
    }
}

@media (min-width: 767.92px) {
    .template-9845__gallery .row > :last-child,
    .template-9845__gallery .row > :nth-child(4n+1):nth-last-child(-n+4),
    .template-9845__gallery .row > :nth-child(4n+1):nth-last-child(-n+4) ~ * {
        margin-bottom: 0 !important;
    }
}

.template-9845__gallery.popup-gallery .row {
    margin-right: 0 !important;
    margin-left: 0 !important;
}
