.ebp-exhibition-gallery {
    --ebp-gallery-columns: 4;
    --ebp-gallery-columns-tablet: 2;
    --ebp-gallery-columns-mobile: 1;
    --ebp-gallery-gap: 24px;
    box-sizing: border-box;
    max-width: 100%;
    color: #fdfdfd;
    font-family: "Yekan Bakh", "Vazirmatn", Tahoma, Arial, sans-serif;
}

.ebp-exhibition-gallery *,
.ebp-exhibition-gallery *::before,
.ebp-exhibition-gallery *::after {
    box-sizing: border-box;
}

.ebp-exhibition-gallery__header {
    display: flex;
    flex-direction: column;
    margin-bottom: 24px;
}

.ebp-exhibition-gallery__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(201, 162, 75, 0.12);
    color: #c9a24b;
    font-size: 12px;
    font-weight: 600;
    width: fit-content;
}

.ebp-exhibition-gallery__badge i,
.ebp-exhibition-gallery__badge svg { width: 1em; height: 1em; flex: 0 0 auto; }

.ebp-exhibition-gallery__title-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
    min-width: 0;
}

.ebp-exhibition-gallery__title {
    margin: 0;
    color: #fdfdfd;
    font-size: 40px;
    line-height: 1.25;
}

.ebp-exhibition-gallery__description,
.ebp-exhibition-gallery__description p {
    margin-top: 0;
    color: #a9b2c9;
}

.ebp-exhibition-gallery__description p:last-child {
    margin-bottom: 0;
}

.ebp-exhibition-gallery__filters {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    justify-content: flex-start;
    justify-content: safe var(--ebp-categories-justify, flex-start);
    margin-bottom: 0;
    direction: ltr;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.ebp-exhibition-gallery__filters::-webkit-scrollbar { display: none; }

.ebp-exhibition-gallery__filter {
    appearance: none;
    max-width: 100%;
    padding: 8px 16px;
    border: 1px solid #26304f;
    border-radius: 999px;
    background: transparent;
    color: #a9b2c9;
    font: inherit;
    cursor: pointer;
    flex: 0 0 auto;
    transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.ebp-exhibition-gallery__filter:hover {
    border-color: #c9a24b;
    color: #fdfdfd;
}

.ebp-exhibition-gallery__filter[aria-pressed="true"] {
    border-color: #c9a24b;
    background: #c9a24b;
    color: #0a1124;
}

.ebp-exhibition-gallery__viewport {
    width: 100%;
    overflow: hidden;
    touch-action: pan-y;
}

.ebp-exhibition-gallery__grid {
    display: flex;
    gap: var(--ebp-gallery-gap);
    transform: translate3d(0, 0, 0);
    transition: transform 300ms ease;
    will-change: transform;
}

.ebp-exhibition-gallery__card {
    display: flex;
    width: 25%;
    min-width: 25%;
    max-width: 25%;
    flex: 0 0 25%;
    flex-direction: column;
    gap: 14px;
    direction: inherit;
    touch-action: pan-y;
}

.ebp-exhibition-gallery--dragging {
    cursor: grabbing;
}

.ebp-exhibition-gallery--dragging .ebp-exhibition-gallery__card {
    user-select: none;
    -webkit-user-select: none;
}

.ebp-exhibition-gallery--dragging .ebp-exhibition-gallery__grid {
    transition: none;
}

.ebp-exhibition-gallery__card--staggered {
    margin-top: 64px;
}

.ebp-exhibition-gallery__media {
    width: 100%;
}

.ebp-exhibition-gallery__image-button {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 16px;
    background: transparent;
    cursor: zoom-in;
}

.ebp-exhibition-gallery__image-button:focus-visible {
    outline: 2px solid #c9a24b;
    outline-offset: 4px;
}

.ebp-exhibition-gallery__image {
    display: block;
    width: 100%;
    height: 280px;
    border-radius: 16px;
    object-fit: cover;
    -webkit-user-drag: none;
}

.ebp-exhibition-gallery__card-title {
    margin: 0;
    color: #fdfdfd;
    font-size: 18px;
    line-height: 1.5;
}

.ebp-exhibition-gallery__card-description {
    margin: 4px 0 0;
    color: #a9b2c9;
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-line;
}

.ebp-exhibition-gallery__card[hidden] {
    display: none !important;
}

.ebp-exhibition-gallery__navigation {
    display: flex;
    width: 100%;
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
    margin-top: 24px;
    direction: ltr;
}

.ebp-exhibition-gallery__navigation[hidden] {
    display: none !important;
}

.ebp-exhibition-gallery__navigation-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #26304f;
    border-radius: 50%;
    background: transparent;
    color: #fdfdfd;
    font: inherit;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
    max-width: 100%;
    transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.ebp-exhibition-gallery__navigation-button i,
.ebp-exhibition-gallery__navigation-button svg {
    display: block;
    pointer-events: none;
}

.ebp-exhibition-gallery__navigation-button svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
}

.ebp-exhibition-gallery__navigation-button:focus-visible {
    outline: 2px solid #c9a24b;
    outline-offset: 3px;
}

.ebp-exhibition-gallery__navigation-button:disabled {
    cursor: default;
    opacity: 0.35;
}

.ebp-exhibition-gallery__lightbox[hidden] {
    display: none !important;
}

.ebp-exhibition-gallery__lightbox {
    position: fixed;
    z-index: 999999;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
}

.ebp-exhibition-gallery__lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 8, 18, 0.92);
}

.ebp-exhibition-gallery__lightbox-dialog {
    position: relative;
    z-index: 1;
    display: block;
    width: min(1180px, 100%);
    max-height: calc(100vh - 48px);
    outline: none;
}

.ebp-exhibition-gallery__lightbox-figure {
    min-width: 0;
    margin: 0;
    text-align: center;
}

.ebp-exhibition-gallery__lightbox-figure {
    touch-action: pan-y;
}

.ebp-exhibition-gallery__lightbox-image {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 120px);
    margin: 0 auto;
    border-radius: 8px;
    object-fit: contain;
    -webkit-user-drag: none;
}

.ebp-exhibition-gallery__lightbox-image {
    touch-action: pan-y;
}

.ebp-exhibition-gallery__lightbox-caption {
    margin-top: 12px;
    color: #fdfdfd;
    font-size: 16px;
    line-height: 1.5;
}

.ebp-exhibition-gallery__lightbox-close,
.ebp-exhibition-gallery__lightbox-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    background: rgba(10, 17, 36, 0.88);
    color: #fdfdfd;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.ebp-exhibition-gallery__lightbox-close svg,
.ebp-exhibition-gallery__lightbox-nav svg {
    display: block;
    width: 1em;
    height: 1em;
    fill: currentColor;
}

.ebp-exhibition-gallery__lightbox-close:focus-visible,
.ebp-exhibition-gallery__lightbox-nav:focus-visible {
    outline: 2px solid #c9a24b;
    outline-offset: 3px;
}

.ebp-exhibition-gallery__lightbox-close {
    position: absolute;
    z-index: 3;
    inset-block-start: 8px;
    inset-inline-end: 8px;
}

.ebp-exhibition-gallery__lightbox-nav {
    position: absolute;
    z-index: 2;
    inset-block-start: 50%;
    transform: translateY(-50%);
}

.ebp-exhibition-gallery__lightbox-nav--previous {
    inset-inline-start: 8px;
}

.ebp-exhibition-gallery__lightbox-nav--next {
    inset-inline-end: 8px;
}

.ebp-exhibition-gallery__lightbox-nav:disabled {
    cursor: default;
    opacity: 0.35;
}

@media (max-width: 1024px) {
    .ebp-exhibition-gallery {
        --ebp-gallery-columns: var(--ebp-gallery-columns-tablet);
    }

    .ebp-exhibition-gallery__card {
        width: 50%;
        min-width: 50%;
        max-width: 50%;
        flex-basis: 50%;
    }

    .ebp-exhibition-gallery__card--staggered {
        margin-top: 48px;
    }
}

@media (max-width: 767px) {
    .ebp-exhibition-gallery {
        --ebp-gallery-columns: var(--ebp-gallery-columns-mobile);
    }

    .ebp-exhibition-gallery__card {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        flex-basis: 100%;
    }

    .ebp-exhibition-gallery__title {
        font-size: 30px;
    }

    .ebp-exhibition-gallery__title-filters { flex-direction: column; align-items: stretch; gap: 12px; }
    .ebp-exhibition-gallery__filters { width: 100%; }

    .ebp-exhibition-gallery__card--staggered {
        margin-top: 0;
    }

    .ebp-exhibition-gallery__image {
        height: 240px;
    }

    .ebp-exhibition-gallery__lightbox {
        padding: 16px;
    }

    .ebp-exhibition-gallery__lightbox-dialog {
        max-height: calc(100vh - 32px);
    }

    .ebp-exhibition-gallery__lightbox-image {
        max-height: calc(100vh - 96px);
    }

    .ebp-exhibition-gallery__lightbox-close,
    .ebp-exhibition-gallery__lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 26px;
    }

}
