.person-gallery {
    width: 100%;
    overflow: hidden;
}

.person-gallery .swiper-slide {
    display: flex;
    flex-direction: column;
    height: auto;
}

.person-gallery__open {
    display: block;
    width: 100%;
    height: clamp(240px, 32vw, 460px);
    padding: 0;
    border: 0;
    background: #fff;
    cursor: zoom-in;
    overflow: hidden;
}

.person-gallery__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.person-gallery__caption {
    width: 100%;
    padding: 10px 12px 0;
    color: #1a1a1a;
    background: transparent;
    font-size: 14px;
    line-height: 1.45;
    text-align: center;
    box-sizing: border-box;
}

.person-gallery .swiper-button-prev,
.person-gallery .swiper-button-next {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border: none;

    ::slotted(svg),
    svg {
        height: 24px;
    }
}

.person-gallery .swiper-button-prev::after,
.person-gallery .swiper-button-next::after {
    font-size: 18px;
    font-weight: 700;
}

.person-gallery .swiper-pagination-bullet-active {
    background: currentColor;
}

.swiper-pagination {
    position: initial;
    margin-top: 16px;
    justify-content: center !important;
}

small {
    margin: 16px 0;
    display: block;
}

.person-gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: grid;
    grid-template-columns: minmax(48px, 8vw) minmax(0, 1fr) minmax(48px, 8vw);
    align-items: center;
    width: 100%;
    height: 100dvh;
    padding: 16px;
    background: rgba(0, 0, 0, 0.94);
    box-sizing: border-box;
}

.person-gallery-modal[hidden] {
    display: none;
}

.person-gallery-modal__content {
    display: flex;
    touch-action: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: calc(100dvh - 32px);
}

.person-gallery-modal__figure {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    max-height: calc(100dvh - 80px);
}

.person-gallery-modal__image {
    display: block;
    max-width: 100%;
    max-height: calc(100dvh - 80px);
    width: auto;
    height: auto;
    object-fit: contain;
    user-select: none;
}

.person-gallery-modal__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px 16px;
    color: #fff;
    background: rgba(0, 0, 0, 0.82);
    font-size: 15px;
    line-height: 1.45;
    text-align: center;
    box-sizing: border-box;
}

.person-gallery-modal__caption[hidden] {
    display: none;
}

.person-gallery-modal__counter {
    min-height: 24px;
    margin-top: 8px;
    color: #fff;
    font-size: 14px;
    text-align: center;
}

.person-gallery-modal__close,
.person-gallery-modal__prev,
.person-gallery-modal__next {
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    transition: background 0.2s ease;
}

.person-gallery-modal__close:hover,
.person-gallery-modal__prev:hover,
.person-gallery-modal__next:hover {
    background: rgba(255, 255, 255, 0.24);
}

.person-gallery-modal__close {
    position: absolute;
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    z-index: 2;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 34px;
    line-height: 1;
}

.person-gallery-modal__prev,
.person-gallery-modal__next {
    width: 48px;
    height: 64px;
    border-radius: 8px;
    font-size: 30px;
}

.person-gallery-modal__prev {
    justify-self: start;
}

.person-gallery-modal__next {
    justify-self: end;
}

body.person-gallery-modal-open {
    overflow: hidden;
}

@media (max-width: 767px) {
    .person-gallery__open {
        height: min(58vh, 420px);
    }

    .person-gallery__caption {
        padding-top: 8px;
        font-size: 13px;
    }

    .person-gallery-modal {
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        padding: 8px;
    }

    .person-gallery-modal__content {
        height: calc(100dvh - 16px);
    }

    .person-gallery-modal__image {
        max-height: calc(100dvh - 72px);
    }

    .person-gallery-modal__prev,
    .person-gallery-modal__next {
        width: 40px;
        height: 56px;
        font-size: 24px;
    }

    .fusion-slider {
        margin-bottom: 24px;
    }

    .mobile-col-reverse {
        display: flex !important;
        flex-direction: column-reverse !important;
    }
}
