.image-lightbox-trigger {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: inherit;
    color: inherit;
    background: transparent;
    cursor: zoom-in;
}

.image-lightbox-trigger:focus-visible {
    outline: 3px solid rgba(48, 86, 211, 0.45);
    outline-offset: 4px;
}

.image-lightbox-trigger img {
    display: block;
    height: auto;
}

body.image-lightbox-open {
    overflow: hidden;
}

.image-lightbox {
    position: fixed;
    z-index: 1100;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 32px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(5px);
}

.image-lightbox[hidden] {
    display: none;
}

.image-lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 92vw;
    max-height: 88vh;
    margin: 0;
}

.image-lightbox-image {
    display: block;
    width: auto;
    height: auto;
    max-width: 92vw;
    max-height: calc(88vh - 40px);
    border-radius: 12px;
    object-fit: contain;
    background: #ffffff;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

.image-lightbox-caption {
    margin-top: 12px;
    color: #ffffff;
    font-size: 15px;
    line-height: 1.5;
    text-align: center;
}

.image-lightbox-close {
    position: fixed;
    top: max(18px, env(safe-area-inset-top));
    right: max(18px, env(safe-area-inset-right));
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 50%;
    place-items: center;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.7);
    cursor: pointer;
}

.image-lightbox-close span {
    font-size: 30px;
    line-height: 1;
    transform: translateY(-1px);
}

.image-lightbox-close:hover {
    background: rgba(48, 86, 211, 0.9);
}

.image-lightbox-close:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.75);
    outline-offset: 3px;
}

@media (max-width: 767px) {
    .image-lightbox {
        padding: 68px 12px 20px;
    }

    .image-lightbox-content {
        max-width: calc(100vw - 24px);
        max-height: calc(100dvh - 88px);
    }

    .image-lightbox-image {
        max-width: calc(100vw - 24px);
        max-height: calc(100dvh - 128px);
        border-radius: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .image-lightbox,
    .image-lightbox-image {
        scroll-behavior: auto;
    }
}
