.ahura-gallery-element .gallery-item-box {
    width: 100%;
    height: 210px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    transition: ease .3s;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    overflow: hidden;
    position: relative;
}

.ahura-gallery-element .item-title {
    width: 100%;
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: #00000085;
    color: #fff;
    padding: 10px;
    text-align: center;
    transition: ease .2s;
}

.ahura-gallery-element .gallery-item-box:hover .item-title {
    opacity: 0;
}

.ahura-gallery-element .ahura-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 2rem;
}

.ahura-gallery-element .ahura-pagination.loading a,
.ahura-gallery-element .ahura-pagination.loading span {
    pointer-events: none;
    user-select: none;
}

.ahura-gallery-element .ahura-pagination.loading a:not(.current),
.ahura-gallery-element .ahura-pagination.loading span:not(.current) {
    filter: blur(1.4px) grayscale(1);
}

.ahura-gallery-element .ahura-pagination span,
.ahura-gallery-element .ahura-pagination a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 43px;
    min-height: 43px;
    margin: 5px;
    padding: 9px 15px;
    background-color: #fff;
    box-shadow: 0 2px 10px #0000003b;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 400;
    color: #000;
    transition: ease .3s;
}

.ahura-gallery-element .ahura-pagination span.current,
.ahura-gallery-element .ahura-pagination span:hover,
.ahura-gallery-element .ahura-pagination a:hover {
    background-color: #000;
    color: #fff;
}

.elementor-lightbox .elementor-lightbox-image {
    max-width: 600px;
}

@media screen and (max-width: 767px) {
    body.admin-bar.page-template .dialog-type-lightbox {
        position: fixed;
        height: 100vh;
    }
}
/* Filter bar (multiple galleries) */
.ahura-gallery-element .ahura-gallery-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0 0 24px;
}

.ahura-gallery-element .ahura-gallery-filter {
    appearance: none;
    margin: 0;
    padding: 8px 20px;
    border: 1px solid var(--ahura-gallery-filter-border, #e2e2e2);
    border-radius: 50px;
    background-color: var(--ahura-gallery-filter-bg, #fff);
    color: var(--ahura-gallery-filter-color, #333);
    font: inherit;
    font-size: 14px;
    line-height: 1.6;
    cursor: pointer;
    transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}

.ahura-gallery-element .ahura-gallery-filter:hover,
.ahura-gallery-element .ahura-gallery-filter.is-active {
    border-color: var(--ahura-gallery-filter-active-border, #000);
    background-color: var(--ahura-gallery-filter-active-bg, #000);
    color: var(--ahura-gallery-filter-active-color, #fff);
}

.ahura-gallery-element .ahura-gallery-filter:focus-visible {
    outline: 2px solid var(--ahura-gallery-filter-active-bg, #000);
    outline-offset: 2px;
}

.ahura-gallery-element .is-filtered-out {
    display: none;
}

/* Grid, masonry and justified layouts */
.ahura-gallery-modern .ahura-gallery-items {
    --ahura-gallery-columns: 4;
    --ahura-gallery-gap: 10px;
    --ahura-gallery-ratio: 3 / 2;
    --ahura-gallery-row-height: 220px;
}

.ahura-gallery-modern .ahura-gallery-item {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: 10px;
    animation: ahuraGalleryItemIn .4s ease both;
}

.ahura-gallery-modern .ahura-gallery-media {
    display: block;
    position: relative;
    height: 100%;
    overflow: hidden;
    border-radius: inherit;
    color: inherit;
}

.ahura-gallery-modern .ahura-gallery-image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    border-radius: inherit;
    transition: transform .6s ease, filter .6s ease;
}

.ahura-gallery-layout-grid .ahura-gallery-items {
    display: grid;
    grid-template-columns: repeat(var(--ahura-gallery-columns), minmax(0, 1fr));
    gap: var(--ahura-gallery-gap);
}

.ahura-gallery-layout-grid .ahura-gallery-image {
    aspect-ratio: var(--ahura-gallery-ratio);
}

.ahura-gallery-layout-masonry .ahura-gallery-items {
    column-count: var(--ahura-gallery-columns);
    column-gap: var(--ahura-gallery-gap);
}

.ahura-gallery-layout-masonry .ahura-gallery-item {
    display: block;
    break-inside: avoid;
    margin-bottom: var(--ahura-gallery-gap);
}

.ahura-gallery-layout-masonry .ahura-gallery-image {
    height: auto;
}

.ahura-gallery-layout-justified .ahura-gallery-items {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ahura-gallery-gap);
}

.ahura-gallery-layout-justified .ahura-gallery-items::after {
    content: "";
    flex-grow: 999999;
}

.ahura-gallery-layout-justified .ahura-gallery-item {
    flex-grow: calc(var(--ahura-gallery-item-ratio, 1) * 100);
    flex-basis: calc(var(--ahura-gallery-item-ratio, 1) * var(--ahura-gallery-row-height));
    height: var(--ahura-gallery-row-height);
    min-width: 0;
}

/* Overlay */
.ahura-gallery-modern .ahura-gallery-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    background-color: rgba(0, 0, 0, .45);
    color: #fff;
    text-align: center;
    opacity: 0;
    transition: opacity .35s ease;
    pointer-events: none;
}

.ahura-gallery-modern.ahura-gallery-overlay-always .ahura-gallery-overlay,
.ahura-gallery-modern.ahura-gallery-overlay-hover .ahura-gallery-item:hover .ahura-gallery-overlay,
.ahura-gallery-modern.ahura-gallery-overlay-hover .ahura-gallery-media:focus-visible .ahura-gallery-overlay {
    opacity: 1;
}

.ahura-gallery-modern .ahura-gallery-content {
    display: block;
    transition: transform .35s ease;
}

.ahura-gallery-modern.ahura-gallery-content-slide-up.ahura-gallery-overlay-hover .ahura-gallery-content {
    transform: translateY(16px);
}

.ahura-gallery-modern.ahura-gallery-content-slide-up.ahura-gallery-overlay-hover .ahura-gallery-item:hover .ahura-gallery-content,
.ahura-gallery-modern.ahura-gallery-content-slide-up.ahura-gallery-overlay-hover .ahura-gallery-media:focus-visible .ahura-gallery-content {
    transform: none;
}

.ahura-gallery-modern .ahura-gallery-title {
    display: block;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
}

.ahura-gallery-modern .ahura-gallery-title + .ahura-gallery-description {
    margin-top: 4px;
}

.ahura-gallery-modern .ahura-gallery-description {
    display: block;
    font-size: 13px;
    line-height: 1.6;
    opacity: .9;
}

/* Image hover effects */
.ahura-gallery-hover-zoom-in .ahura-gallery-item:hover .ahura-gallery-image {
    transform: scale(1.08);
}

.ahura-gallery-hover-zoom-out .ahura-gallery-image {
    transform: scale(1.08);
}

.ahura-gallery-hover-zoom-out .ahura-gallery-item:hover .ahura-gallery-image {
    transform: scale(1);
}

.ahura-gallery-hover-grayscale .ahura-gallery-image {
    filter: grayscale(1);
}

.ahura-gallery-hover-grayscale .ahura-gallery-item:hover .ahura-gallery-image {
    filter: grayscale(0);
}

.ahura-gallery-modern .ahura-gallery-media:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

@keyframes ahuraGalleryItemIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ahura-gallery-modern .ahura-gallery-item,
    .ahura-gallery-modern .ahura-gallery-image,
    .ahura-gallery-modern .ahura-gallery-overlay,
    .ahura-gallery-modern .ahura-gallery-content {
        animation: none;
        transition: none;
    }
}
