/* GLightbox — centered overlay, above theme header */
.glightbox-container {
    z-index: 999999 !important;
}

.goverlay {
    background: rgba(0, 0, 0, 0.92) !important;
}

.gslide-media {
    box-shadow: none !important;
}

.gslide-image img,
.gslide-video {
    max-height: 85vh !important;
    margin: 0 auto !important;
}

.gbtn {
    opacity: 1 !important;
}

/* Layout */
.aria-gallery-wrapper {
    --aria-cols-desktop: 4;
    --aria-cols-mobile: 2;
    --aria-cols-active: var(--aria-cols-desktop);
    --aria-sidebar-width: 260px;
    --aria-gap: 30px;
    --aria-sticky-top: 100px;

    display: flex;
    flex-wrap: nowrap;
    gap: var(--aria-gap);
    align-items: flex-start;
    position: relative;
}

/* Required so position:sticky works inside Elementor sections */
.elementor-widget-aria_gallery,
.elementor-widget-aria_gallery > .elementor-widget-container,
.elementor-element:has(.aria-gallery-wrapper),
.e-con:has(.aria-gallery-wrapper) {
    overflow: visible !important;
}

.aria-gallery-main {
    flex: 1;
    min-width: 0;
}

.aria-gallery-content {
    width: 100%;
}

/* Hidden scrollbar but still scrollable */
.aria-scroll-hide {
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.aria-scroll-hide::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
    background: transparent;
}

/* Sidebar column */
.aria-gallery-sidebar-col {
    flex: 0 0 var(--aria-sidebar-width);
    width: var(--aria-sidebar-width);
    max-width: var(--aria-sidebar-width);
    flex-shrink: 0;
    min-width: 0;
}

.aria-gallery-sidebar {
    width: 100%;
    height: 100%;
}

.aria-sidebar-inner {
    padding-right: 8px;
}

.aria-filter-heading {
    margin: 0 0 12px;
    font-size: 1.1rem;
}

.aria-filter-heading + .aria-filter-group {
    margin-bottom: 24px;
}

.aria-filter-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.aria-filter-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1.4;
}

.aria-filter-label input {
    flex-shrink: 0;
}

.aria-filter-apply,
.aria-filter-close,
.aria-filter-cta,
.aria-filter-backdrop {
    display: none;
}

/* Masonry columns */
.aria-gallery-grid {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
}

.aria-masonry-column {
    flex: 1 1 0;
    min-width: 0;
}

.aria-gallery-wrapper.is-loading .aria-gallery-grid {
    opacity: 0.55;
    pointer-events: none;
}

.aria-gallery-item {
    display: block;
    width: 100%;
    margin: 0 0 20px;
}

.aria-gallery-thumb {
    display: block;
    width: 100%;
    text-decoration: none;
    cursor: zoom-in;
    border-radius: 18px;
    overflow: hidden;
    line-height: 0;
    position: relative;
    z-index: 1;
}

.aria-gallery-item--video .aria-gallery-thumb {
    cursor: pointer;
}

.aria-gallery-video-thumb {
    width: 100%;
    height: auto;
    min-height: 220px;
    display: block;
    border-radius: 18px;
    background: #111;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    pointer-events: none;
}

.aria-gallery-item--video .aria-gallery-thumb img {
    width: 100%;
    height: auto;
    min-height: 180px;
    object-fit: cover;
}

.aria-gallery-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 56px;
    height: 56px;
    margin: -28px 0 0 -28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    pointer-events: none;
    z-index: 2;
}

.aria-gallery-play::after {
    content: "";
    position: absolute;
    left: 22px;
    top: 16px;
    border-style: solid;
    border-width: 12px 0 12px 20px;
    border-color: transparent transparent transparent #fff;
}

.aria-gallery-thumb img {
    pointer-events: none;
}

.aria-gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 18px;
    transition: transform 0.3s ease;
}

.aria-gallery-thumb:hover img,
.aria-gallery-thumb:focus-visible img {
    transform: scale(1.03);
}

.aria-gallery-empty {
    margin: 0;
    padding: 24px;
    text-align: center;
    color: #666;
    flex: 1 1 100%;
    width: 100%;
}

.aria-gallery-sentinel {
    width: 100%;
    height: 1px;
    margin: 0;
    padding: 0;
    visibility: hidden;
}

.aria-load-more {
    display: block;
    margin: 30px auto 0;
    background: #ff69b4;
    color: #fff;
    border: none;
    padding: 14px 30px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    transition: opacity 0.2s ease;
}

.aria-load-more[hidden] {
    display: none !important;
}

.aria-load-more:hover,
.aria-load-more:focus-visible {
    opacity: 0.9;
}

.aria-load-more:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Mobile */
@media (max-width: 768px) {
    .aria-gallery-wrapper {
        --aria-cols-active: var(--aria-cols-mobile);
        flex-direction: column;
        gap: 0;
        height: auto;
        max-height: none;
        overflow: visible;
        padding-bottom: 72px;
    }

    .aria-gallery-sidebar-col {
        flex: 0 0 0;
        width: 0;
        max-width: 0;
        min-width: 0;
        overflow: visible;
    }

    .aria-gallery-sidebar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: min(78vh, 520px);
        z-index: 100002;
        background: #fff;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.18);
        transform: translateY(110%);
        transition: transform 0.32s ease;
        overflow: hidden;
    }

    .aria-gallery-wrapper.is-filters-open .aria-gallery-sidebar {
        transform: translateY(0);
    }

    .aria-sidebar-inner {
        padding: 20px 20px 28px;
        max-height: min(78vh, 520px);
        overflow-y: auto;
    }

    .aria-gallery-main {
        height: auto;
        overflow: visible;
    }

    .aria-filter-close {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 12px;
        right: 14px;
        width: 36px;
        height: 36px;
        border: none;
        border-radius: 50%;
        background: #f2f2f2;
        font-size: 22px;
        line-height: 1;
        cursor: pointer;
        z-index: 2;
    }

    .aria-filter-apply {
        display: block;
        width: 100%;
        margin-top: 16px;
        padding: 14px 20px;
        border: none;
        border-radius: 30px;
        background: #ff69b4;
        color: #fff;
        font-size: 16px;
        cursor: pointer;
    }

    .aria-filter-cta {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 100003;
        padding: 14px 28px;
        border: none;
        border-radius: 999px;
        background: #ff69b4;
        color: #fff;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
        box-shadow: 0 6px 24px rgba(255, 105, 180, 0.45);
        min-width: 140px;
    }

    .aria-filter-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 100001;
        background: rgba(0, 0, 0, 0.45);
    }

    .aria-filter-backdrop[hidden] {
        display: none !important;
    }

    body.aria-gallery-filters-open {
        overflow: hidden;
    }

    .aria-gallery-wrapper.is-filters-open .aria-filter-cta .aria-filter-cta-label::after {
        content: ' ✕';
    }
}

/* Desktop: sticky filters + gallery grows with page scroll */
@media (min-width: 769px) {
    .aria-gallery-wrapper {
        --aria-cols-active: var(--aria-cols-desktop);
        overflow: visible;
    }

    .aria-gallery-sidebar-col {
        align-self: flex-start;
    }

    /* Sticks while user scrolls the page through the gallery section */
    .aria-gallery-sidebar {
        position: sticky;
        top: var(--aria-sticky-top);
        z-index: 20;
        max-height: calc(100vh - var(--aria-sticky-top) - 24px);
        max-height: calc(100dvh - var(--aria-sticky-top) - 24px);
    }

    /* Long filter lists scroll inside sidebar — scrollbar hidden */
    .aria-gallery-sidebar.aria-scroll-hide {
        overflow-y: auto;
        overflow-x: hidden;
    }

    .aria-gallery-main {
        flex: 1 1 auto;
        min-width: 0;
        overflow: visible;
    }

    .aria-gallery-content {
        padding-bottom: 40px;
    }
}
