.pb-ba-gallery,
.pb-ba-gallery * {
    box-sizing: border-box;
}

.pb-ba-gallery {
    width: 100%;
}

.pb-ba-gallery--cards {
    --pb-ba-columns: 2;
    display: grid;
    grid-template-columns: repeat(var(--pb-ba-columns), minmax(0, 1fr));
    gap: 24px;
}

.pb-ba-gallery--single {
    display: block;
}

.pb-ba-gallery--thumbs {
    --pb-ba-thumb-width: 160px;
    --pb-ba-thumb-gap: 8px;
    --pb-ba-thumb-height: 100px;
    --pb-ba-thumb-radius: 2px;
    --pb-ba-thumb-active: #ffffff;
    display: block;
}

.pb-ba-gallery__stage {
    width: 100%;
}

.pb-ba-gallery__panel {
    display: none;
}

.pb-ba-gallery__panel.is-active {
    display: block;
}

.pb-ba-gallery__panel .pb-ba-card {
    margin: 0;
}

.pb-ba-gallery__thumbs {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: var(--pb-ba-thumb-gap);
    margin-top: 12px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
}

.pb-ba-gallery__thumbs::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.pb-ba-gallery__thumbs.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
    scroll-snap-type: none;
    user-select: none;
}

.pb-ba-gallery__thumbs.is-dragging .pb-ba-gallery__thumb {
    pointer-events: none;
}

.pb-ba-gallery__thumbs.has-scroll {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
}

.pb-ba-gallery__thumbs.has-scroll.is-at-start {
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 18px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 18px), transparent 100%);
}

.pb-ba-gallery__thumbs.has-scroll.is-at-end {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 100%);
}

.pb-ba-gallery__thumbs.has-scroll.is-at-start.is-at-end {
    -webkit-mask-image: none;
    mask-image: none;
}

.pb-ba-gallery__thumb,
.pb-ba-gallery__thumb:hover,
.pb-ba-gallery__thumb:focus,
.pb-ba-gallery__thumb:active {
    position: relative;
    display: block;
    flex: 0 0 var(--pb-ba-thumb-width);
    width: var(--pb-ba-thumb-width);
    min-width: var(--pb-ba-thumb-width);
    min-height: 0;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    outline: none;
    appearance: none;
    cursor: pointer;
    line-height: 0;
    scroll-snap-align: start;
}

.pb-ba-gallery__thumb-image {
    position: relative;
    display: block;
    width: 100%;
    height: var(--pb-ba-thumb-height);
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: var(--pb-ba-thumb-radius);
    background: #f2f2f2;
    isolation: isolate;
    transition: border-color .2s ease, opacity .2s ease, transform .2s ease;
}

.pb-ba-gallery__thumb:hover .pb-ba-gallery__thumb-image,
.pb-ba-gallery__thumb:focus-visible .pb-ba-gallery__thumb-image {
    opacity: .96;
    transform: translateY(-2px);
}

.pb-ba-gallery__thumb.is-active .pb-ba-gallery__thumb-image {
    border-color: var(--pb-ba-thumb-active);
}

.pb-ba-gallery__thumb img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
}

.pb-ba-gallery__thumb-before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 50%;
    overflow: hidden;
    z-index: 2;
}

.pb-ba-gallery__thumb-before img {
    width: 200%;
}

.pb-ba-gallery__thumb-line {
    position: absolute;
    z-index: 4;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    transform: translateX(-50%);
    background: #ffffff;
    box-shadow: 0 0 8px rgba(0,0,0,.25);
}

.pb-ba-gallery__thumb-button {
    position: absolute;
    z-index: 5;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 36px;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(255,255,255,.8);
    border-radius: 999px;
    background: rgba(255,255,255,.18);
    box-shadow: 0 6px 16px rgba(0,0,0,.22);
}

.pb-ba-gallery__thumb-button::before,
.pb-ba-gallery__thumb-button::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 8px;
    height: 8px;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
}

.pb-ba-gallery__thumb-button::before {
    left: 8px;
    transform: translateY(-50%) rotate(-45deg);
}

.pb-ba-gallery__thumb-button::after {
    right: 8px;
    transform: translateY(-50%) rotate(135deg);
}

.pb-ba-gallery__thumb-label {
    position: absolute;
    z-index: 6;
    left: 6px;
    bottom: 6px;
    color: #ffffff;
    font-size: 9px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-shadow: 0 1px 4px rgba(0,0,0,.45);
}

.pb-ba-card {
    overflow: hidden;
    box-sizing: border-box;
}

.pb-ba,
.pb-ba * {
    box-sizing: border-box;
}

.pb-ba {
    --pb-ba-position: 50%;
    --pb-ba-handle-color: #ffffff;
    --pb-ba-handle-icon-color: #222222;
    --pb-ba-line-size: 2px;
    --pb-ba-button-size: 44px;
    --pb-ba-fit: cover;
    position: relative;
    width: 100%;
    height: auto;
    min-height: 0;
    overflow: hidden;
    background: #f2f2f2;
    line-height: 0;
    border-radius: 0;
    isolation: isolate;
    user-select: none;
    touch-action: none;
    outline: none;
}

.pb-ba:focus-visible {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
}

.pb-ba__image {
    display: block;
    width: 100%;
    height: auto;
    max-width: none;
    object-fit: var(--pb-ba-fit);
    pointer-events: none;
    user-select: none;
}

.pb-ba__image--after {
    position: relative;
    z-index: 1;
}

.pb-ba__before-wrap .pb-ba__image {
    height: 100%;
}

.pb-ba--height-fixed {
    height: 460px;
}

.pb-ba--height-fixed .pb-ba__image {
    height: 100%;
}

.pb-ba--height-fixed .pb-ba__image--after {
    position: absolute;
    inset: 0;
}

.pb-ba__before-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.pb-ba--horizontal .pb-ba__before-wrap {
    clip-path: polygon(0 0, var(--pb-ba-position) 0, var(--pb-ba-position) 100%, 0 100%);
}

.pb-ba--vertical .pb-ba__before-wrap {
    clip-path: polygon(0 0, 100% 0, 100% var(--pb-ba-position), 0 var(--pb-ba-position));
}

.pb-ba button.pb-ba__handle,
.pb-ba button.pb-ba__handle:hover,
.pb-ba button.pb-ba__handle:focus,
.pb-ba button.pb-ba__handle:active,
.pb-ba .pb-ba__handle,
.pb-ba .pb-ba__handle:hover,
.pb-ba .pb-ba__handle:focus,
.pb-ba .pb-ba__handle:active {
    position: absolute;
    z-index: 4;
    display: block;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    color: inherit !important;
    appearance: none;
    outline: none;
    cursor: ew-resize;
    font: inherit;
    line-height: 1;
}

.pb-ba--horizontal .pb-ba__handle {
    top: 0;
    left: var(--pb-ba-position);
    width: var(--pb-ba-button-size);
    height: 100%;
    transform: translateX(-50%);
}

.pb-ba--vertical .pb-ba__handle {
    top: var(--pb-ba-position);
    left: 0;
    width: 100%;
    height: var(--pb-ba-button-size);
    transform: translateY(-50%);
    cursor: ns-resize;
}

.pb-ba__handle-line {
    position: absolute;
    display: block;
    background: var(--pb-ba-handle-color);
    box-shadow: 0 0 14px rgba(0, 0, 0, 0.2);
}

.pb-ba--horizontal .pb-ba__handle-line {
    top: 0;
    bottom: 0;
    left: 50%;
    width: var(--pb-ba-line-size);
    transform: translateX(-50%);
}

.pb-ba--vertical .pb-ba__handle-line {
    left: 0;
    right: 0;
    top: 50%;
    height: var(--pb-ba-line-size);
    transform: translateY(-50%);
}

.pb-ba__handle-button {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--pb-ba-button-size);
    height: var(--pb-ba-button-size);
    transform: translate(-50%, -50%);
    border: 2px solid rgba(255,255,255,.75);
    border-radius: 999px;
    background: var(--pb-ba-handle-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 22px rgba(0,0,0,0.22);
}

.pb-ba__handle-button span {
    position: relative;
    width: 18px;
    height: 18px;
    display: block;
}

.pb-ba--horizontal .pb-ba__handle-button span::before,
.pb-ba--horizontal .pb-ba__handle-button span::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 9px;
    height: 9px;
    border-top: 2px solid var(--pb-ba-handle-icon-color);
    border-left: 2px solid var(--pb-ba-handle-icon-color);
}

.pb-ba--horizontal .pb-ba__handle-button span::before {
    left: 1px;
    transform: translateY(-50%) rotate(-45deg);
}

.pb-ba--horizontal .pb-ba__handle-button span::after {
    right: 1px;
    transform: translateY(-50%) rotate(135deg);
}

.pb-ba--vertical .pb-ba__handle-button span::before,
.pb-ba--vertical .pb-ba__handle-button span::after {
    content: "";
    position: absolute;
    left: 50%;
    width: 9px;
    height: 9px;
    border-top: 2px solid var(--pb-ba-handle-icon-color);
    border-left: 2px solid var(--pb-ba-handle-icon-color);
}

.pb-ba--vertical .pb-ba__handle-button span::before {
    top: 1px;
    transform: translateX(-50%) rotate(45deg);
}

.pb-ba--vertical .pb-ba__handle-button span::after {
    bottom: 1px;
    transform: translateX(-50%) rotate(225deg);
}

.pb-ba__label {
    position: absolute;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 74px;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    pointer-events: none;
}

.pb-ba--labels-top .pb-ba__label {
    top: 16px;
}

.pb-ba--labels-bottom .pb-ba__label {
    bottom: 16px;
}

.pb-ba--labels-center .pb-ba__label {
    top: 50%;
    transform: translateY(-50%);
}

.pb-ba__label--before {
    left: 16px;
}

.pb-ba__label--after {
    right: 16px;
}

.pb-ba-card__title {
    margin: 16px 0 0;
    padding: 0;
    font-size: 20px;
    line-height: 1.25;
}

.pb-ba-card__description {
    margin-top: 8px;
}

.pb-ba-card__description p:last-child {
    margin-bottom: 0;
}

@media (max-width: 1024px) {
    .pb-ba-gallery--cards {
        grid-template-columns: repeat(var(--pb-ba-columns, 2), minmax(0, 1fr));
    }

    .pb-ba-gallery--thumbs {
        --pb-ba-thumb-width: 140px;
    }
}

@media (max-width: 767px) {
    .pb-ba-gallery--cards {
        grid-template-columns: 1fr;
    }

    .pb-ba--height-fixed {
        height: 320px;
    }

    .pb-ba-gallery--thumbs {
        --pb-ba-thumb-width: 112px;
        --pb-ba-thumb-height: 74px;
        --pb-ba-thumb-gap: 6px;
    }

    .pb-ba__label {
        min-width: 0;
        padding: 6px 10px;
        font-size: 10px;
    }

    .pb-ba--labels-top .pb-ba__label {
        top: 10px;
    }

    .pb-ba--labels-bottom .pb-ba__label {
        bottom: 10px;
    }

    .pb-ba__label--before {
        left: 10px;
    }

    .pb-ba__label--after {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .pb-ba-gallery--thumbs {
        --pb-ba-thumb-width: 100px;
    }

    .pb-ba-gallery__thumb-button {
        width: 28px;
        height: 28px;
    }
}
