/* Photo Grid Layout */
.photo-grid-demo {
    padding: 30px 0 40px;
    background-color: #f2f0ed;
}

.photo-grid-demo.photo-grid-demo--white {
    background-color: #ffffff;
}



.photo-grid-text {
    margin-bottom: 40px;
    line-height: 2.2;
    color: #333;
    font-size: 1.1vw;
    letter-spacing: 0.2em;
}

.photo-grid-container {
    display: flex;
    flex-wrap: wrap;
}

.photo-grid-item {
    display: block;
    width: 28%;
    margin-bottom: 40px;
    margin-right: 8%;
}

.photo-grid-item:nth-of-type(3n) {
    margin-right: 0;
}

.photo-grid-img-wrapper {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    cursor: pointer;
    margin-bottom: 10px;
    transition: opacity 0.3s;
}

.photo-grid-img-wrapper:hover {
    opacity: 0.8;
}

.photo-grid-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-grid-caption {
    font-size: 14px;
    color: #666;
    width: 100%;
}

/* Responsive: 2 columns on SP */
@media screen and (max-width: 768px) {
    .photo-grid-text {
        font-size: 3.1vw;
    }

    .photo-grid-item {
        width: 48%;
        margin-right: 0;
    }

    .photo-grid-item:nth-of-type(2n) {
        margin-left: 4%;
    }
}

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

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    display: block;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    font-family: sans-serif;
}