@charset "utf-8";


/* ------------------works-------------- */
.works{
    padding: 104px 0 136px;
}

.works__title{
    margin-bottom: 40px;
}

.works__text{
    font-size: 16px;
    font-weight: 400;
    line-height: 1.8;
    color: var(--color-text-primary);
}



/* ===== タブ ===== */

.tabs {
    margin: 88px 0;
}

.tab-btn {
    padding: 16px 40px;
    margin-right: 32px;
    cursor: pointer;
    border: 1px solid var(--color-text-primary);
    transition: 0.3s;
    font-family: "Josefin Sans", sans-serif;
    font-size: 18px;
    font-weight: 500;
}

.tab-btn:last-child{
    margin-right: 0;
}

.tab-btn.is-active {
    background: var(--color-text-primary);
    color: var(--white);
}

.tab-btn.is-active:hover{
    opacity: 1;
}

/* ===== ギャラリー ===== */

.gallery {
    display: none;
}

.gallery.is-active {
    display: flex;
    gap: 64px;
    flex-wrap: wrap;
}

.gallery-item {
    width: calc((100% - 64px * 2) / 3);
    cursor: pointer;
}

.thumb-wrapper {
    width: 100%;
    aspect-ratio: 384 / 264;
    overflow: hidden;
    background-color: var(--color-text-primary);
    transition: transform .3s ease;
}

.thumb-wrapper picture {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

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

.caption {
    display: flex;
    margin-top: 24px;
    justify-content: space-between;
    align-items: center;
}

.caption__inner{
    width: fit-content;
}

.caption__category{
    width: fit-content;
    margin-bottom: 10px;
    padding: 2px 14px;
    border-radius: 24px;
    border: 1px solid var(--primary);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.8;
    color: var(--primary);
}

.caption__title{
    font-size: 16px;
    font-weight: 400;
    line-height: 1.8;
    color: var(--color-text-primary);
}



  /* ===== モーダル ===== */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(20, 20, 20,.8);
    overflow: auto;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
    z-index: 1000000000000;
}

.modal.is-active {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    width: 1280px;
    max-height: 90vh;
    margin: 0 auto;
    padding: 80px 120px;
    flex: 0 0 auto;
    background: var(--white);
    overflow: auto;
    position: relative;
}

.modal-picture {
    display: block;
    width: 100%;
    object-fit: contain;
    margin: 0 auto;
}

.modal-caption {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border_gray);
}

.modal-close {
    width: 34px;
    position: absolute;
    top: 40px;
    right: 80px;
    cursor: pointer;
}

.modal-close img{
    display: block;
    width: 100%;
}

.modal-category{
    width: fit-content;
    margin-bottom: 8px;
    padding: 2px 14px;
    border-radius: 24px;
    border: 1px solid var(--primary);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.8;
    color: var(--primary);
}

.modal-title{
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.8;
    color: var(--color-text-primary);
}

.modal-note{
    font-size: 16px;
    font-weight: 400;
    line-height: 1.8;
    color: var(--color-text-primary);
    white-space: pre-wrap;
}




@media screen and (max-width:750px) {

    /* ------------------works-------------- */
    .works{
        padding: calc((100 / 390) * 56 * 1vw) 0 calc((100 / 390) * 72 * 1vw);
    }

    .works__title{
        margin-bottom: calc((100 / 390) * 32 * 1vw);
    }

    .works__text{
        font-size: calc((100 / 390) * 15 * 1vw);
    }



    /* ===== タブ ===== */

    .tabs {
        margin: calc((100 / 390) * 48 * 1vw) 0;
    }

    .tab-btn {
        padding: calc((100 / 390) * 14 * 1vw) calc((100 / 390) * 35 * 1vw);
        margin-right: calc((100 / 390) * 14.5 * 1vw);
        border: calc((100 / 390) * 1 * 1vw) solid var(--color-text-primary);
        font-size: calc((100 / 390) * 16 * 1vw);
    }



    /* ===== ギャラリー ===== */


    .gallery.is-active {
        display: block;
    }

    .gallery-item {
        width: 100%;
        margin-bottom: calc((100 / 390) * 40 * 1vw);
    }

    .gallery-item:last-child{
        margin-bottom: 0;
    }

    .thumb-wrapper {
        width: 100%;
        aspect-ratio: 358 / 224;
    }


    .caption {
        margin-top: calc((100 / 390) * 20 * 1vw);
    }

    .caption__category{
        margin-bottom: calc((100 / 390) * 8 * 1vw);
        padding: calc((100 / 390) * 2 * 1vw) calc((100 / 390) * 14 * 1vw);
        border-radius: calc((100 / 390) * 24 * 1vw);
        border: calc((100 / 390) * 1 * 1vw) solid var(--primary);
        font-size: calc((100 / 390) * 11 * 1vw);
    }

    .caption__title{
        font-size: calc((100 / 390) * 15 * 1vw);
    }




    /* ===== モーダル ===== */


    .modal-box {
        width: calc((100 / 390) * 358 * 1vw);
        padding: calc((100 / 390) * 71 * 1vw) calc((100 / 390) * 24 * 1vw) calc((100 / 390) * 24 * 1vw);
    }

    .modal-caption {
        margin-top: calc((100 / 390) * 40 * 1vw);
        padding-top: calc((100 / 390) * 24 * 1vw);
        border-top: calc((100 / 390) * 1 * 1vw) solid var(--border_gray);
    }

    .modal-close {
        width: calc((100 / 390) * 23 * 1vw);
        top: calc((100 / 390) * 24 * 1vw);
        right: calc((100 / 390) * 24 * 1vw);
    }

    .modal-category{
        margin-bottom: calc((100 / 390) * 8 * 1vw);
        padding: calc((100 / 390) * 2 * 1vw) calc((100 / 390) * 14 * 1vw);
        border-radius: calc((100 / 390) * 24 * 1vw);
        border: calc((100 / 390) * 1 * 1vw) solid var(--primary);
        font-size: calc((100 / 390) * 11 * 1vw);
    }

    .modal-title{
        margin-bottom: calc((100 / 390) * 16 * 1vw);
        font-size: calc((100 / 390) * 18 * 1vw);
        white-space: pre-wrap;
    }

    .modal-note{
        font-size: calc((100 / 390) * 15 * 1vw);
    }







}
