
#second-works.works-section {
    display: flex;
    justify-content: center;
    padding: 0 10vw;
}
#second-works .second-wrapper {
    padding-bottom: 0;
}

.tags-container {
    display: grid;
    grid-template-columns: repeat(4, 14.375rem);
    grid-template-rows: repeat(2, 2.8125rem);
    gap: .94rem .81rem;
    justify-content: center;
    margin-top: 2.75rem ;
    max-width: 60rem;
    justify-items: center;
}


.tax-news_cat .tags-container,
.tax-column_cat .tags-container{
        grid-template-columns: repeat(6, 9.375rem);
        grid-template-rows: repeat(2, auto);
        margin-left: auto;
        margin-right: auto;
}

.tax-news_cat .tag-button,
.tax-column_cat .tag-button{
    width: 100%;
    height: 2.8125rem;
    background-color: #F7F7F7;
    border-radius: 50px;
    color: #959595;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    text-align: center;
    font-family: "Noto Sans JP";
    font-size: 1.0625rem;
    font-style: normal;
    font-weight: 500;
    line-height: 1.4375rem;
    letter-spacing: 0.0425rem;
}

.tax-news_cat .tag-button.active,
.tax-column_cat .tag-button.active {
    background-color: white;
    color: #00547D;
    border: 1px solid #00547D;
}

.tag-button {
    width: 14.375rem;
    height: 2.8125rem;
}

#second-works .subtitle {
    margin-bottom: 5.37rem;
}

/* コンサルティング事例（Works） ==============================================*/

.case-studies {
    display: grid;
    max-width: 60rem;
    margin: 0 auto;
    grid-template-columns: repeat(2,1fr);
    justify-content: center;
    margin-top: 8.24rem;
    gap: 3.5rem;
    justify-items: center;
}

.case-study-content {
    display: flex;
    justify-content: center;
    flex: 1;
    position: relative;
}

.case-study-bg {
    display: flex;
    flex-direction: column;
    position: relative;
    background: rgba(0,84,125,0.8);
    border-radius: 0.75rem;
    align-items: center;
    box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.16);
    margin-left: 0;
    width: 452px;

}
.case-study {
    flex-direction: column;
    justify-content: center;
    color: white;
    padding: .91rem 1.8rem;
    width: 100%;
}
.case-study-imgwrap {
    height: 16.46188rem;
    border-radius: 0.75rem 0.75rem 0 0;
    overflow: hidden;
    width: 100%;
    background: white;
    transition: 0.3s ease;
}
.case-study-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
    transition: 0.3s ease;
}
@media (hover: hover) and (pointer: fine) {
    .case-study-bg:hover .case-study-image {
        transform: scale(1.1);
}
}

.case-study-ttl {
    color: #FFF;
    font-family: "Noto Sans JP";
    font-size: 1.25rem;
    font-style: normal;
    font-weight: 500;
    line-height: 1.6875rem; /* 135% */
    text-align: left;
    display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: 2; /* ← 表示する最大行数（ここでは2行） */
}

.case-study-tags-rapper {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    margin-top: 1.06rem;
}

.case-study-tags {
    display: flex;
    gap: 0.62rem;
    align-items: center;
}

.tag {
    width: 5rem;
    height: 1.875rem;    
    background: white;
    color: #00547D;
    border-radius: 2rem;
    text-align: center;
    font-family: "Noto Sans JP";
    font-size: 0.8125rem;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
}
.tag-con-support {
    color: #FFF;
    font-family: "Noto Sans JP";
    font-size: 1.125rem;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    text-align: start;
}
.tag-con {
    color: #FFF;
    font-family: "Noto Sans JP";
    font-size: 1.125rem;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    text-align: start;
}

.case-study-location {
    font-size: 0.875rem;
    opacity: 0.9;
}

.case-study-link::after {
    content: "→";
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.case-study-company {
    text-align: start;
    font-family: "Noto Sans JP";
    font-size: 0.8125rem;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    margin-top: .94rem;
}



@media (hover: hover) and (pointer: fine) {
.case-study-link:hover::after {
    transform: trans;
}
}

@media (max-width: 1200px) {
    .tags-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        margin: 1.75rem 0 0;
        gap: .63rem;
        max-width: 100%;
    }
    .tag-button {
        font-size: 0.9rem;
        width: auto;
        padding: 0 1.5rem;
    }

    /* お知らせタグ */
    .tax-news_cat .tag-button ,
    .tax-column_cat .tag-button {
        width: auto;
        font-size: 0.9rem;
        padding: 0 1.5rem;
        height: 2.5rem;
    }

.case-study {
    width: 100%;
    height: 50%;
    padding: .94rem 1.3rem 1.25rem;
    margin-left: 0;
}

.case-study-tags-rapper {
    gap: .31rem;
    margin-top: .94rem;
}
.case-study-bg {
    height: 25.125rem;
    margin-left: 0;
    gap: 0;
    width: auto;
}
.case-study1 {
    margin-right: 0;
}

.case-study-imgwrap {
    width: 100%;
    height: 45%;
    margin-right: 0rem;
    border-radius: 0.75rem 0.75rem 0rem 0rem;
}

.imgwrap1 {
    margin-left: 0;
}

.case-study-image {
    width: 100%;
    margin: auto;
    border-radius: 0.75rem 0.75rem 0rem 0rem;
}

.case-study-bg1 {
    margin-right: 0;
}

.case-study-company {
    font-size: 0.875rem;
}

.pagination {
    margin-top: 3.13rem;
    margin-bottom: 6.25rem;
}
.case-study-ttl {
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1.6875rem; /* 150% */
}
.tag-con-support {
    font-size: 0.875rem;
}
.tag-con {
    font-size: 0.875rem;
}
}
@media (max-width: 768px) {
    .tag-button {
        width: auto;
        font-size: 0.9rem;
        padding: 0 1.5rem;
        height: 2.5rem;
    }
    .works-section {
        padding: 0 5vw;
        margin: 0 auto;
    }
    .case-study-content {
        max-width: 100%;
    }
    .case-studies {
        grid-template-columns: repeat(1,1fr);
        justify-content: center;
        margin-top: 3.7rem;
    }
    #second-works .subtitle {
        margin-bottom: 3.75rem;
    }
    .tags-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        margin: 1.75rem 0 0;
        gap: .63rem;
        max-width: 100%;
    }
    
    .case-study-location {
        font-size: 0.875rem;
        opacity: 0.9;
    }
}