/* Click-to-expand for .ihe-desktop-gallery and .article-desktop-gallery images */

.ihe-lightbox-img {
    cursor: zoom-in;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.ihe-lightbox-img:hover,
.ihe-lightbox-img:focus {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.55);
}

.ihe-lightbox-img:focus {
    outline: none;
}

.hs-lightbox[hidden] {
    display: none !important;
}

.hs-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

.hs-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    cursor: pointer;
}

.hs-lightbox__content {
    position: relative;
    z-index: 1;
    max-width: min(96vw, 2000px);
    max-height: 92vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 2.75rem;
    box-sizing: border-box;
}

.hs-lightbox__close {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(20, 20, 32, 0.95);
    color: #f1f5f9;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.4rem;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.hs-lightbox__close:hover,
.hs-lightbox__close:focus-visible {
    background: rgba(40, 40, 60, 0.98);
    border-color: rgba(59, 130, 246, 0.6);
    outline: none;
}

.hs-lightbox__image {
    max-width: 100%;
    max-height: calc(92vh - 3.25rem);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0.35rem;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
    cursor: zoom-out;
    position: relative;
    z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
    .ihe-lightbox-img {
        transition: none;
    }
}
