.gallery {
    display: grid;
    max-width: 1200px;
    margin: 0 auto;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    padding: 10px;

}

.gallery img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 0.3rem 0.9rem rgba(0, 0, 0, 0.12);
    transition: transform var(--duration-base) var(--ease-smooth), box-shadow var(--duration-base) var(--ease-smooth), filter var(--duration-base) var(--ease-smooth);
    aspect-ratio: 1/1;
    object-fit: cover;
}

.thumbnail:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 0.8rem 1.8rem rgba(0, 0, 0, 0.2);
    filter: saturate(1.08);
}

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.lightbox img {

    max-width: 90vw;
    /* Use viewport width for scaling */
    max-height: 90vh;
    /* Use viewport height for scaling */
    /* width: auto; */
    /* Maintain the natural aspect ratio */
    /* height: auto; */
    /* Maintain the natural aspect ratio */
    object-fit: contain;
    /* Ensure the whole image fits without cropping */

    /* Optional: adds a subtle shadow */
}

.lightbox:target {
    display: flex;
}

.close {
    position: absolute;
    top: 10px;
    right: 20px;
    color: white;
    font-size: 4rem;
    text-decoration: none;
}



.mini-gallery {
    display: grid;
    /* max-width: 1200px; */
    margin: 0 auto;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 1fr;
    overflow: hidden;


}


@media screen and (max-width: 1200px) {
    .mini-gallery {
        grid-template-columns: repeat(3, 1fr);
    }

}

.mini-gallery img {
    width: 100%;
    height: auto;


    transition: transform var(--duration-base) var(--ease-smooth), filter var(--duration-base) var(--ease-smooth);
    aspect-ratio: 1/1;
    object-fit: cover;
    filter: contrast(0.9);
}

.mini-gallery .thumbnail:hover {
    transform: scale(1.015);
    filter: contrast(1) saturate(1.04);
}