#wrapper {
    background-color: #eeece8;
}

#sub_contents {
    padding-top: 13.8vw;
    background-color: #eeece8;
}

.ttl.works {
    width: 36%;
    max-width: 259px;
    margin: 12.3vw auto 7.5vw;
}

.ttl_category {
    margin: 0 0 18.7%;
    font-size: min(5vw, 37px);
    font-weight: 600;
    text-align: center;
    position: relative;
}

.ttl_category:before {
    content: "";
    width: 10%;
    max-width: 64px;
    height: 5px;
    background-color: #000000;
    position: absolute;
    bottom: -55%;
    left: 50%;
    transform: translateX(-50%);
}


.img-gallery {
    display: flex;
    gap: 3.22%;
    flex-wrap: wrap;
    max-width: 620px;
    width: 86.2%;
    margin: 0 auto 17%;
}

.gallery-item {
    width: calc(50% - 1.61%);
    max-width: 300px;
    cursor: pointer;
    transition: transform 0.2s;
    margin-bottom: 2.9%;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.lightbox {
    display: none;
    position: fixed;
    z-index: 10;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.lightbox-content {
    position: relative;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
    max-width: 650px;
    width: 90%;
    margin: auto;
}

#lightbox-image {
    display: block;
    max-width: 100%;
    max-height: 80vh;
    margin: 0 auto;
}

.close-btn {
    position: absolute;
    top: -13.8%;
    right: 0%;
    color: #999999;
    font-size: min(6vw, 40px);
    transition: 0.3s;
    cursor: pointer;
    z-index: 11;
    background: #000;
    width: 8%;
    height: 12.05%;
    line-height: 40px;
    text-align: center;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover,
.close-btn:focus {
    color: #bbb;
    text-decoration: none;
}

.prev-btn,
.next-btn {
    cursor: pointer;
    position: absolute;
    transform: translateY(-50%);
}

.prev-btn {
    display: inline-block;
    width: 7%;
    height: 8%;
    cursor: pointer;
    border: none;
    background: none;
    background-image: url('../img/works/prev-arrow.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
    font-size: 0;
    line-height: 0;
    top: 50%;
    left: 3%;
}


.next-btn {
    display: inline-block;
    width: 7%;
    height: 8%;
    cursor: pointer;
    border: none;
    background: none;
    background-image: url('../img/works/next-arrow.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
    font-size: 0;
    line-height: 0;
    top: 50%;
    right: 3%;
}


.modal-open-pc {
    overflow: hidden !important;
}







@media (min-width: 721px) and (max-width: 990px) {

    #sub_contents {
        padding-top: 99px;
    }

    .ttl.works {
        margin: 89px auto 54px;
    }

    .ttl_category {
        margin: 0 0 130px;
        font-size: 36px;
    }


}



/*PC時　スマホ固定化*/

@media (min-width: 991px) {

    div#wrapper {
        background-color: #eeece8;
    }

    #sub_contents {
        padding-top: 1px;
        z-index: 1;
        position: relative;
    }

    .ttl.works {
        margin: 66px auto 40px;
    }

    .ttl_category {
        margin: 0 0 96px;
        font-size: 27px;
    }

    section.works {
        position: relative;
    }

    .lightbox {
        position: fixed;
        width: 534px;
        left: 47.1%;
    }

    .lightbox.open {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .lightbox-content {
        width: 534px;
        max-width: 90%;
        top: auto;
        transform: none;
    }

    #lightbox-image {
        max-width: 100%;
        height: auto;
    }

    .modal-open-pc {
        overflow: hidden !important;
        padding-right: var(--scroll-bar-width, 17px) !important;
    }






}