/* ============================================
   Blog Detail Gallery & Lightbox
   ============================================ */

.detail-gallery {
    margin-top: var(--margin-xl);
}

.detail-gallery h2 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--margin-md);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--gap-md);
}

.gallery-grid figure {
    margin: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: box-shadow 0.2s ease;
    cursor: pointer;
}

.gallery-grid figure:hover {
    box-shadow: var(--shadow-lg);
}

.gallery-grid img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 16 / 10;
}

.lightbox {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.lightbox[aria-hidden="false"] {
    display: flex;
}

.lightbox-close {
    position: absolute;
    top: var(--gap-lg);
    right: var(--gap-lg);
    background: none;
    border: none;
    font-size: 2.5rem;
    color: white;
    cursor: pointer;
    z-index: 10000;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: var(--shadow-xl);
}