/* カードコンテンツ用 */
.acf-card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.acf-card-grid__item {
    display: block;
    text-decoration: none;
}

.acf-card-grid__image-wrap {
    position: relative;
    width: 100%;
}

.acf-card-grid__image {
    display: block;
    width: 100%;
    height: auto;
    position: relative;
    z-index: 1;
}

.acf-card-grid__category {
    position: absolute;
    top: 20%;
    right: -12px;
    z-index: 3;
    display: flex;
    flex-direction: row-reverse;
}

.acf-card-grid__category--one-item {
    right: 4px;
}

.acf-card-grid-category__ja {
    font-size: 12px;
    color: #999;
    -ms-writing-mode: tb-rl;
    writing-mode: vertical-rl;
    line-height: 1.4;
}

.acf-card-grid-category__ja--only {
    font-size: 20px;
    color: #fff
}

.acf-card-grid-category__en {
    font-size: 24px;
    color: #fff;
    -webkit-writing-mode: vertical-rl;
    -ms-writing-mode: tb-rl;
    writing-mode: vertical-rl;
    font-family: "STIX Two Text", serif;
}
.acf-card-grid__category--left {
    right: initial;
    left: 4px;
}

.acf-card-grid__image--gray {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: .3s;
    clip-path:polygon( 0 0, 100% 0, 100% 100%, 0 100% );
    filter: grayscale(1);
    z-index: 2;
}

.acf-card-grid__hover-text {
    position: absolute;
    left: 0;
    bottom: 16px;

    width: 100%;
    text-align: center;

    color: #fff;
    font-size: 14px;
    font-weight: 600;

    opacity: 0;
    transform: translateY(32px);

    transition:
        opacity .3s ease,
        transform .3s ease;
    
    z-index: 3;
}

@media (hover:hover) {
    .acf-card-grid__item:hover .acf-card-grid__image--gray {
        clip-path: polygon( 100% 100%, 100% 100%, 100% 100%, 100% 100% );
    }

    .acf-card-grid__item:hover .acf-card-grid__hover-text {
        opacity: 1;
        transform: translateY(0);
        background: rgb(0 0 0 / 0.5);
    }
}

@media (hover:none) {
    .acf-card-grid__item:active .acf-card-grid__image--gray {
        clip-path: polygon( 100% 100%, 100% 100%, 100% 100%, 100% 100% );
    }

    .acf-card-grid__item:active .acf-card-grid__hover-text {
        opacity: 1;
        transform: translateY(0);
        background: rgb(0 0 0 / 0.5);
    }
}

@media screen and (max-width:1100px) {
    .acf-card-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

@media screen and (max-width:768px) {
    .acf-card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .acf-card-grid-category__en {
        font-size: 20px;
        line-height: 1.2;
    }
    .acf-card-grid-category__ja {
        font-size: 10px;
    }
    .acf-card-grid-category__ja--only {
        font-size: 16px;
    }
    .acf-card-grid__hover-text {
        opacity: 1;
        bottom: 0;
        transform: translateY(0);
        background: rgb(0 0 0 / 0.5);
        font-size: 12px;
    }
}

@media screen and (max-width:480px) {
    .acf-card-grid-category__en {
        font-size: 18px;
    }
    .acf-card-grid-category__ja--only {
        font-size: 12px;
    }
}