/* works.html */
body.works #mainVisual img{
    object-position: 80%;
}

/* works_total.html, works_other.html */
#works-mainVisual{
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    min-height: 500px;
    max-height: 768px;
    padding: 50px 0;
    width: 100%;
    overflow: hidden;
}
#works-mainVisual .cntImg{
    position: relative;
    width: 700px;
    height: 457px;
    max-height: 100%;
}
#works-mainVisual .cntImg::before{
    content: "";
    position: absolute;
    top: 41.7%;
    left: -173px;
    width: 493px;
    height: 103px;
}
#works-mainVisual .cntImg img{
    object-position: left;
}
#works-mainVisual .cntBox{
    position: absolute;
    top: 48%;
    left: 50%;
    width: 100%;
    max-width: 954px;
    padding-left: 13px;
    transform: translateX(-50%);
}
#works-mainVisual .cntTitle{
    display: inline-block;
    width: 430px;
}
#works-mainVisual .cntTitle > div:first-child{
    font-size: 2.6rem;
}
#works-mainVisual .cntTitle > div:last-child{
    margin-top: 7px;
    margin-left: 80px;
    font-size: 2rem;
    letter-spacing: 3px;
}

body.works_total #mainBox,
body.works_other #mainBox{
    padding-top: 70px;
}

.worksBox{
    max-width: 962px;
    margin: 100px auto 0;
    padding: 0 20px;
}
.worksBox:first-of-type{
    margin-top: 200px;
}
.worksBox:last-of-type{
    margin-bottom: 210px;
}
.worksBox .cntInner{
    display: flex;
    justify-content: flex-start;
}
.worksBox:nth-of-type(2n) .cntInner{
    flex-direction: row-reverse;
}
.worksBox .cntImg{
    position: relative;
    flex-shrink: 0;
    flex-grow: 0;
    width: 319px;
    height: 331px;
}
.worksBox .cntImg::before{
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid #FEE710;
}
.worksBox .cntImg img{
    position: absolute;
    bottom: -20px;
    width: 100%;
    max-width: 1000px;
}
.worksBox:nth-of-type(2n-1) .cntImg::before{
    -webkit-clip-path: polygon(0 0, 0 100%, 100% 100%, 100% 260px, 90% 260px, 90% 100px, 100% 100px, 100% 0);
    clip-path: polygon(0 0, 0 100%, 100% 100%, 100% 260px, 90% 260px, 90% 100px, 100% 100px, 100% 0);
}
.worksBox:nth-of-type(2n) .cntImg::before{
    -webkit-clip-path: polygon(0 0, 0 100px, 10% 100px, 10% 260px, 0 260px, 0 100%, 100% 100%, 100% 0);
    clip-path: polygon(0 0, 0 100px, 10% 100px, 10% 260px, 0 260px, 0 100%, 100% 100%, 100% 0);
}
.worksBox .cntText{
    max-width: 680px;
    padding-top: 50px;
    z-index: 2;
}
.worksBox:nth-of-type(2n-1) .cntText{
    margin-left: -30px;
}
.worksBox:nth-of-type(2n) .cntText{
    margin-right: -30px;
}
.worksBox .cntTitle{
    /*margin-bottom: 18px;*/
}
.worksBox .cntTitle .commonText{
    letter-spacing: 2px;
}

/* Work values */
#work-values{
    margin: 35px 0 125px;
    padding-top: 100px;
}
#work-values .cntInner{
    display: grid;
    grid-template-columns: 383px 1fr;
    max-width: 1026px;
    margin: 0 auto;
}
#work-values .cntImg{
    position: relative;
    height: 372px;
}
#work-values .cntImg img:nth-of-type(2){
    position: absolute;
    bottom: 28px;
    right: -110px;
    width: 261px;
}
#work-values .cntTitle{
    margin-top: 77px;
    padding: 10px 0 10px 80px;
    border-top: 1px solid #707070;
    border-bottom: 1px solid #707070;
}
#work-values .cntText{
    margin-top: 54px;
    margin-left: 110px;
    padding: 0 5px 0 27px;
}

/* Works */
#works{
    margin-bottom: 158px;
    padding-top: 100px;
}
#works .cntInner{
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 5px;
}
#works .cntTitle{
    margin-bottom: 88px;
}
#works .cntBox{
    /* display: flex;
    justify-content: space-around; */
    display: grid;
    /* grid-template-columns: repeat(3, 1fr); */
    grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
    justify-items: center;
    /*gap: 20px;*/
}
#works .cntItem{
    display: flex;
    flex-direction: column;
    align-items: center;
    align-self: flex-start;
    width: 100%;
    max-width: 297px;
}

#works .cntItem-02{
    margin-top: 45px;
}
#works .cntItem-03{
    margin-top: 90px;
}
#works .cntImg{
    width: 100%;
    max-width: 224px;
    height: 315px;
    background: #2f2f2f;
	background: -moz-linear-gradient(to bottom, #333, #222);
	background: -webkit-linear-gradient(to bottom, #333, #222);
	background: linear-gradient(to bottom, #333, #222); 
    /* overflow: hidden; */
}
/* #works .cntImg img{
    transition: transform .5s;
}
#works .cntItem:hover .cntImg img{
    transform: scale(1.02);
} */
#works .cntText{
    position: relative;
    width: 100%;
    padding: 25px 20px;
}
#works .cntText::before{
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: -1;
    transition: all .5s;
}
#works .cntItem:hover .cntText::before{
    transform: scale(1.02);
}
#works .cntBtn{
    justify-content: center;
}

/*追記*/
.worksBox .cntText .cnt{
    display: flex;
    height: 143px;
    flex-flow: column;
    justify-content: center;
}

/*TAB*/
@media screen and (max-width:899px){
    /* works_total.html, works_other.html */
    #works-mainVisual{
        justify-content: flex-start;
        /* padding-left: 58px; */
        padding-left: 13vw;
    }
    #works-mainVisual .cntImg{
        flex-shrink: 0;
    }
    #works-mainVisual .cntBox{
        padding-left: 5vw;
    }
    #works-mainVisual .cntTitle > div:last-child{
        margin-left: 0;
    }

    .worksBox:first-of-type {
        margin-top: 77px;
    }
    .worksBox .cntInner{
        align-items: center;
    }
    .worksBox .cntImg{
        width: 40vw;
        height: 40vw;
    }
    .worksBox:nth-of-type(2n-1) .cntImg::before {
        -webkit-clip-path: polygon(0 0, 0 100%, 98% 100%, 98% 30px, 100% 30px, 100% 0);
        clip-path: polygon(0 0, 0 100%, 98% 100%, 98% 30px, 100% 30px, 100% 0);
    }
    .worksBox:nth-of-type(2n) .cntImg::before {
        -webkit-clip-path: polygon(0 0, 0 30px, 2% 30px, 2% 100%, 100% 100%, 100% 0);
        clip-path: polygon(0 0, 0 30px, 2% 30px, 2% 100%, 100% 100%, 100% 0);
    }
    .worksBox .cntText{
        max-width: 280px;
    }
    .worksBox .cntTitle{
        margin-bottom: 23px;
    }

    /* Work values */
    #work-values{
        margin-top: 0;
    }
    #work-values .cntInner{
        grid-template-columns: 1fr;
    }
    #work-values .cntImg{
        width: 76.3297%;
    }
    #work-values .cntTitle{
        margin-top: 22px;
        padding-left: 0;
        text-align: center;
    }
    #work-values .cntText{
        margin-left: 0;
        padding: 0 22px;
    }
    /* Works */
    #works .cntTitle{
        margin-bottom: 55px;
    }
    #works .cntBox{
        /* grid-template-columns: repeat(auto-fit, minmax(250px,1fr)); */
        grid-template-columns: repeat(2, 1fr);
        gap: 4vw 2.5vw;
        padding-top: 180px;
    }
    #works .cntItem{
        margin-top: 0 !important;
    }
    /* #works .cntItem:nth-of-type(2n){
        margin-top: 25px;
    } */
    #works .cntItem:nth-of-type(2n-1){
        transform: translateY(-180px);
    }
    #works .cntImg{
        width: calc(100% - 25px);
        max-height: 54vw;
    }
    #works .cntText{
        margin-top: -50px;
        z-index: 2;
    }
    .worksBox .cntText .cnt{
        height: auto;
    }
}
/*SP*/
@media screen and (max-width:480px){
    body.works_total #mainBox{
        padding-top: 0;
        width: 100%;
        overflow-x: hidden;
    }
    body.works_other #mainBox{
        padding-top: 30px;
    }
    /* works_total.html, works_other.html */
    #works-mainVisual .cntBox{
        padding-left: 13px;
    }
    #works-mainVisual .cntTitle{
        width: 100%;
    }
    #works-mainVisual .cntTitle > div:last-child{
        font-size: 1.4rem;
    }

    .worksBox{
        margin-top: 48px;
    }
    .worksBox:last-of-type{
        margin-bottom: 150px;
    }
    .worksBox .cntInner{
        flex-direction: column !important;
        padding-bottom: 54px;
    }
    .worksBox .accordionTitle{
        position: relative;
        margin-bottom: 0;
        padding-bottom: 8px;
        z-index: 2;
        cursor: pointer;
    }
    .worksBox .accordionTitle::before{
        content: "";
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 40px;
        height: 1px;
        background: #707070;
        transform: translateX(-50%);
        transition: all .3s;
    }
    .worksBox .accordionTitle.active::before{
        width: 100%;
        height: 1px;
    }
    .worksBox .cntInner{
        padding-top: 32px;
    }
    .worksBox .cntImg{
        width: 100%;
        height: auto;
    }
    .worksBox .cntImg img{
        position: static;
        display: block;
        width: 100%;
        max-width: 100%;
    }
    .worksBox .cntImg::before{
        content: none !important;
    }
    .worksBox .cntText{
        width: calc(100% - 20px);
        max-width: 295px;
        margin: 0 auto !important;
        padding-top: 35px;
    }

    /* Work values */
    #work-values{
        margin-bottom: 90px;
    }
    #work-values .cntImg{
        width: 100%;
        /* height: 74.2021vw; */
        height: auto;
        padding: 0 14px;
    }
    #work-values .cntImg img:nth-of-type(1){
        width: 76.3297vw;
        height: auto;
        object-fit: contain;
    }
    #work-values .cntImg img:nth-of-type(2){
        bottom: 21px;
        right: 14px;
        width: 51.8617vw;
    }
    #work-values .cntText{
        margin-top: 23px;
    }

    /* Works */
    #works .cntBox{
        grid-template-columns: 1fr;
        padding-top: 0;
    }
    #works .cntItem + .cntItem{
        margin-top: 60px !important;
    }
    #works .cntItem:nth-of-type(2n-1){
        transform: translateY(0);
    }
    #works .cntImg{
        max-height: 100%;
    }
}