/* GB Hover Cycle Gallery */

.wp-block-gallery.gb-hover-cycle {
    position: relative;
    display: block !important;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 4 / 3;
    background: #f4f4f4;
    isolation: isolate;
}

.wp-block-gallery.gb-hover-cycle > figure.wp-block-image,
.wp-block-gallery.gb-hover-cycle > .wp-block-image {
    position: absolute !important;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity .4s ease;
    pointer-events: none;
}

.wp-block-gallery.gb-hover-cycle > figure.wp-block-image.gbhcg-active,
.wp-block-gallery.gb-hover-cycle > .wp-block-image.gbhcg-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.wp-block-gallery.gb-hover-cycle img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
}

.wp-block-gallery.gb-hover-cycle figcaption {
    display: none;
}

.gbhcg-dots {
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    display: flex;
    gap: 7px;
    z-index: 5;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(0,0,0,.20);
    pointer-events: none;
}

.gbhcg-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.55);
    box-shadow: 0 0 0 1px rgba(0,0,0,.08);
}

.gbhcg-dot.gbhcg-dot-active {
    background: #fff;
}

/* Equal-height card helper.
   Add "gbhcg-card" to each Column block if you want the galleries aligned. */
.wp-block-column.gbhcg-card {
    display: flex;
    flex-direction: column;
}

.wp-block-column.gbhcg-card > .wp-block-gallery.gb-hover-cycle {
    margin-top: auto;
}

/* Lightbox */
.gbhcg-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.88);
    padding: 24px;
}

.gbhcg-lightbox.gbhcg-open {
    display: flex;
}

.gbhcg-lightbox-stage {
    position: relative;
    max-width: min(1200px, 94vw);
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gbhcg-lightbox img {
    max-width: 100%;
    max-height: 88vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 12px 40px rgba(0,0,0,.35);
}

.gbhcg-close,
.gbhcg-prev,
.gbhcg-next {
    position: fixed;
    border: 0;
    background: rgba(0,0,0,.45);
    color: #fff;
    cursor: pointer;
    z-index: 1000000;
    line-height: 1;
}

.gbhcg-close {
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 30px;
}

.gbhcg-prev,
.gbhcg-next {
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 58px;
    border-radius: 8px;
    font-size: 34px;
}

.gbhcg-prev { left: 16px; }
.gbhcg-next { right: 16px; }

.gbhcg-close:hover,
.gbhcg-prev:hover,
.gbhcg-next:hover {
    background: rgba(255,255,255,.22);
}

body.gbhcg-no-scroll {
    overflow: hidden;
}

@media (max-width: 781px) {
    .wp-block-gallery.gb-hover-cycle {
        aspect-ratio: 4 / 3;
    }

    .gbhcg-prev,
    .gbhcg-next {
        width: 40px;
        height: 50px;
        font-size: 30px;
    }
}
