/* JP Engine V4 gallery pagination and controls */
.page-home .gallery-wrap.has-gallery-pagination{
    padding-bottom:0;
}

.page-home .gallery-wrap.has-gallery-pagination::after,
.page-home .gallery-wrap.is-single-gallery::after{
    display:none;
}

.page-home .gallery-pagination{
    display:flex;
    align-items:center;
    justify-content:flex-start;
    gap:7px;
    width:max-content;
    max-width:min(280px,calc(100% - 32px));
    margin:18px auto 0;
    padding:4px 2px;
    overflow-x:auto;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
}

.page-home .gallery-pagination::-webkit-scrollbar{
    display:none;
}

.page-home .gallery-pagination-bullet{
    flex:0 0 auto;
    width:7px;
    height:7px;
    padding:0;
    border:0;
    border-radius:999px;
    background:rgba(25,49,78,.24);
    cursor:pointer;
    scroll-snap-align:center;
    transition:
        width .24s cubic-bezier(.22,1,.36,1),
        background-color .2s ease,
        opacity .2s ease;
}

.page-home .gallery-pagination-bullet:hover{
    background:rgba(25,49,78,.52);
}

.page-home .gallery-pagination-bullet.is-active{
    width:26px;
    background:#214f7f;
}

.page-home .gallery-pagination-bullet:focus-visible{
    outline:2px solid #214f7f;
    outline-offset:3px;
}

/* Multiple images: keep the controls in dedicated side gutters. */
.page-home .gallery-wrap.is-multi-gallery{
    padding-inline:68px!important;
}

.page-home .gallery-wrap.is-multi-gallery .gallery-list{
    width:100%;
    max-width:100%;
    scroll-padding-inline:0;
}

.page-home .gallery-wrap.is-multi-gallery .gallery-item,
.page-home .gallery-wrap.is-multi-gallery .gallery-item:nth-child(3n+2),
.page-home .gallery-wrap.is-multi-gallery .gallery-item:nth-child(3n+3){
    flex:0 0 100%;
    width:100%;
    max-width:100%;
    margin-top:0;
}

.page-home .gallery-wrap.is-multi-gallery .gallery-arrow{
    top:50%!important;
    width:52px!important;
    height:74px!important;
    color:#14263d!important;
    opacity:.92;
    mix-blend-mode:normal!important;
}

.page-home .gallery-wrap.is-multi-gallery .gallery-arrow svg{
    width:32px;
    height:32px;
    stroke-width:1.8;
    filter:none;
}

.page-home .gallery-wrap.is-multi-gallery .gallery-prev{
    left:6px!important;
}

.page-home .gallery-wrap.is-multi-gallery .gallery-next{
    right:6px!important;
}

.page-home .gallery-wrap.is-multi-gallery .gallery-prev:hover{
    transform:translate(-3px,-50%)!important;
}

.page-home .gallery-wrap.is-multi-gallery .gallery-next:hover{
    transform:translate(3px,-50%)!important;
}

/* One image: use the available width and remove slider-only UI. */
.page-home .gallery-wrap.is-single-gallery{
    padding-inline:0!important;
}

.page-home .gallery-wrap.is-single-gallery .gallery-list{
    justify-content:center;
    width:100%;
    max-width:100%;
    overflow:visible;
    padding-bottom:0;
}

.page-home .gallery-wrap.is-single-gallery .gallery-item,
.page-home .gallery-wrap.is-single-gallery .gallery-item:nth-child(3n+2),
.page-home .gallery-wrap.is-single-gallery .gallery-item:nth-child(3n+3){
    flex:1 1 100%;
    width:100%;
    max-width:1180px;
    margin:0 auto;
}

.page-home .gallery-wrap.is-single-gallery .gallery-arrow,
.page-home .gallery-wrap.is-single-gallery .gallery-pagination,
.page-home .gallery-wrap.is-single-gallery .gallery-story-index{
    display:none!important;
}

.page-home .gallery-story .gallery-wrap.is-single-gallery .gallery-item img{
    aspect-ratio:16 / 9;
}

@media(max-width:991px){
    .page-home .gallery-wrap.is-multi-gallery{
        padding-inline:44px!important;
    }

    .page-home .gallery-wrap.is-multi-gallery .gallery-arrow{
        width:38px!important;
        height:60px!important;
    }

    .page-home .gallery-wrap.is-multi-gallery .gallery-arrow svg{
        width:26px;
        height:26px;
        stroke-width:1.9;
    }

    .page-home .gallery-wrap.is-multi-gallery .gallery-prev{
        left:2px!important;
    }

    .page-home .gallery-wrap.is-multi-gallery .gallery-next{
        right:2px!important;
    }

    .page-home .gallery-wrap.is-single-gallery .gallery-item,
    .page-home .gallery-wrap.is-single-gallery .gallery-item:nth-child(3n+2),
    .page-home .gallery-wrap.is-single-gallery .gallery-item:nth-child(3n+3){
        max-width:100%;
    }
}

@media(max-width:560px){
    .page-home .gallery-pagination{
        gap:6px;
        max-width:calc(100% - 24px);
        margin-top:14px;
    }

    .page-home .gallery-pagination-bullet{
        width:6px;
        height:6px;
    }

    .page-home .gallery-pagination-bullet.is-active{
        width:22px;
    }

    .page-home .gallery-wrap.is-multi-gallery{
        padding-inline:38px!important;
    }

    .page-home .gallery-wrap.is-multi-gallery .gallery-arrow{
        width:34px!important;
        height:54px!important;
    }

    .page-home .gallery-wrap.is-multi-gallery .gallery-arrow svg{
        width:24px;
        height:24px;
    }
}

@media(prefers-reduced-motion:reduce){
    .page-home .gallery-pagination-bullet,
    .page-home .gallery-wrap.is-multi-gallery .gallery-arrow{
        transition:none!important;
    }
}
