.gallery-card__trigger {
    background: none;
    border: none;
    padding: 0;
    text-align: inherit;
    width: 100%;
    height: 100%;
}

body.gallery-lightbox-open {
    overflow: hidden;
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.gallery-lightbox[hidden] {
    display: none !important;
}

.gallery-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(4px);
    cursor: zoom-out;
}

.gallery-lightbox__panel {
    position: relative;
    z-index: 1;
    width: min(96vw, 1100px);
    max-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox__figure {
    margin: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.gallery-lightbox__image {
    display: block;
    max-width: 100%;
    max-height: calc(92vh - 4rem);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

.gallery-lightbox__caption {
    color: #e5e7eb;
    font-size: 0.95rem;
    text-align: center;
    max-width: 42rem;
    padding: 0 2.5rem;
}

.gallery-lightbox__close,
.gallery-lightbox__nav {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 9999px;
    background: rgba(10, 10, 12, 0.75);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.gallery-lightbox__close:hover,
.gallery-lightbox__nav:hover:not(:disabled) {
    background: rgba(245, 197, 24, 0.9);
    color: #0a0a0c;
}

.gallery-lightbox__close:focus-visible,
.gallery-lightbox__nav:focus-visible {
    outline: 2px solid #F5C518;
    outline-offset: 2px;
}

.gallery-lightbox__close {
    top: -0.5rem;
    right: -0.5rem;
    width: 2.75rem;
    height: 2.75rem;
    z-index: 2;
}

.gallery-lightbox__nav {
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
}

.gallery-lightbox__nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.gallery-lightbox__prev { left: -0.25rem; }
.gallery-lightbox__next { right: -0.25rem; }

@media (max-width: 640px) {
    .gallery-lightbox__prev { left: 0.25rem; }
    .gallery-lightbox__next { right: 0.25rem; }
    .gallery-lightbox__close {
        top: 0.25rem;
        right: 0.25rem;
    }
}
