/* ============================
   GRID GALLERY
   ============================ */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 35px;
    padding: 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.grid-item img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.grid-item img:hover {
    opacity: 0.9;
}

.grid-item figcaption {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}
.grid-item.portrait {
    grid-row: span 2;
}


/* ============================
   LIGHTBOX (dialog)
   ============================ */

dialog {
    padding: 0;
    border: none;
    background: transparent;
    max-width: 90vw;
    max-height: 90vh;
    margin: auto;
    justify-content: center;
    align-items: center;
}

dialog[open] {
    display: flex;
}

dialog img {
    display: block;
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
}

dialog::backdrop {
    background: rgba(0, 0, 0, 0.9);
}


/* ============================
   RESPONSIVENESS
   ============================ */

@media (max-width: 768px) {

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

}

@media (max-width: 480px) {

    .gallery-grid {
        grid-template-columns: 1fr;
    }

}