.ps-gallery-page
{
    padding-top: 20px;
    padding-bottom: 40px;
}

.ps-gallery-switch
{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.ps-gallery-switch__link
{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border: 1px solid #d8cab7;
    border-radius: 20px;
    background: #ffffff;
    color: #002873;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.2;
    transition: all 0.2s ease;
}

.ps-gallery-switch__link.is-active
{
    background: #002873;
    border-color: #002873;
    color: #ffffff;
}

.ps-gallery-detail
{
    margin-top: 10px;
}

.ps-gallery-thumbs
{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.ps-gallery-thumb
{
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    overflow: hidden;
}

.ps-gallery-thumb__image
{
    display: block;
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
}

.ps-gallery-empty
{
    padding: 30px 0;
    color: #002873;
    font-size: 16px;
    line-height: 1.4;
}

.ps-gallery-modal
{
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}

.ps-gallery-modal.is-open
{
    display: block;
}

.ps-gallery-modal__backdrop
{
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
}

.ps-gallery-modal__dialog
{
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

.ps-gallery-modal__content
{
    position: relative;
    max-width: min(1100px, 100%);
    max-height: calc(100vh - 40px);
    padding: 24px 70px 20px;
    border-radius: 16px;
    background: #ffffff;
    box-sizing: border-box;
    overflow: auto;
}

.ps-gallery-modal__stage
{
    position: relative;
}

.ps-gallery-modal__image
{
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 180px);
    width: auto;
    height: auto;
    margin: 0 auto;
    border-radius: 12px;
}

.ps-gallery-modal__caption
{
    margin-top: 14px;
    color: #002873;
    font-size: 16px;
    line-height: 1.4;
    text-align: center;
}

.ps-gallery-modal__close
{
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 40, 115, 0.9);
    cursor: pointer;
}

.ps-gallery-modal__close::before,
.ps-gallery-modal__close::after
{
    content: "";
    position: absolute;
    top: 18px;
    left: 9px;
    width: 20px;
    height: 2px;
    background: #ffffff;
}

.ps-gallery-modal__close::before
{
    transform: rotate(45deg);
}

.ps-gallery-modal__close::after
{
    transform: rotate(-45deg);
}

.ps-gallery-modal__nav
{
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 40, 115, 0.9);
    cursor: pointer;
}

.ps-gallery-modal__nav::before
{
    content: "";
    position: absolute;
    top: 15px;
    left: 17px;
    width: 10px;
    height: 10px;
    border-top: 2px solid #ffffff;
    border-right: 2px solid #ffffff;
}

.ps-gallery-modal__nav_prev
{
    left: 12px;
}

.ps-gallery-modal__nav_prev::before
{
    transform: rotate(-135deg);
}

.ps-gallery-modal__nav_next
{
    right: 12px;
}

.ps-gallery-modal__nav_next::before
{
    transform: rotate(45deg);
}

.ps-gallery-modal__nav.is-disabled
{
    opacity: 0.4;
    cursor: default;
}

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

@media (max-width: 767px)
{
    .ps-gallery-thumbs
    {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ps-gallery-thumb__image
    {
        height: 140px;
    }

    .ps-gallery-modal__dialog
    {
        padding: 10px;
    }

    .ps-gallery-modal__content
    {
        padding: 52px 44px 16px;
        border-radius: 12px;
    }

    .ps-gallery-modal__image
    {
        max-height: calc(100vh - 170px);
    }

    .ps-gallery-modal__caption
    {
        font-size: 14px;
    }

    .ps-gallery-modal__nav
    {
        width: 38px;
        height: 38px;
        margin-top: -19px;
    }

    .ps-gallery-modal__nav::before
    {
        top: 13px;
        left: 14px;
        width: 9px;
        height: 9px;
    }

    .ps-gallery-modal__nav_prev
    {
        left: 6px;
    }

    .ps-gallery-modal__nav_next
    {
        right: 6px;
    }
}