/*--------------------
　施工事例
--------------------*/
.worksList__posts {
    display: flex;
    column-gap: 20px;

    @media screen and (max-width: 999px) {
        flex-direction: column;
        row-gap: 16px;
    }

    .wp-block-post {
        width: calc((100% - 40px) / 3);
        align-items: center;
        padding-block-end: 12px;
        margin: 0;
        border: 1px solid var(--wp--preset--color--gray-2);
        border-radius: 12px;

        @media screen and (max-width: 999px) {
            width: 100%;
        }
    }

    .worksList__eyecatch {
        width: 100%;
        display: flex;
        column-gap: 2px;

        .gallery-item {
            margin: 0;
        }

        img {
            aspect-ratio: 1/1;
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
    }

    .worksList__before {
        width: 100%;
        position: relative;

        &::before {
            content: "BEFORE";
            color: var(--wp--preset--color--white);
            font-size: 12px;
            font-family: var(--wp--preset--font-family--outfit);
            position: absolute;
            top: 4px;
            left: 4px;
            padding-inline: 6px;
            background-color: var(--wp--preset--color--gray-2);
            border-radius: 3px;
        }

        img {
            border-radius: 11px 0 0 0;
        }
    }

    .worksList__after {
        width: 100%;
        position: relative;

        &::before {
            content: "AFTER";
            color: var(--wp--preset--color--gray-2);
            font-size: 12px;
            font-family: var(--wp--preset--font-family--outfit);
            position: absolute;
            top: 4px;
            left: 4px;
            padding-inline: 6px;
            background-color: var(--wp--preset--color--white);
            border-radius: 3px;
        }

        img {
            border-radius: 0 11px 0 0;
        }
    }

    .worksList__text {
        padding-inline: 12px;
        row-gap: 0;
    }

    .worksList__details {
        margin-block-start: 12px;

        a {
            color: var(--wp--preset--color--charcoal-gray);
            padding-inline: 6px;
            background-color: var(--wp--preset--color--light-orange);
        }

    }

    .wp-block-post-title {
        margin-block-start: 8px;
        margin-block-end: 0;
    }

    .wp-block-post-excerpt {
        width: 100%;
        padding-block-end: 12px;
        margin-block-start: 4px;
        margin-block-end: 8px;
        border-block-end: 1px solid var(--wp--preset--color--gray-2);
    }

    .worksList__more {
        color: var(--wp--preset--color--charcoal-gray);
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }
}

/*---------- 施工事例詳細 ----------*/
.worksPage {
    width: 83%;
    max-width: 1200px;
    padding-block-start: 160px;
    padding-block-end: 120px;
    margin-inline: auto;
    align-items: flex-start;
    column-gap: 100px;

    @media screen and (max-width: 999px) {
        width: 100%;
        padding-block-start: 120px;
        padding-block-end: 100px;
        padding-inline: 20px;
        flex-direction: column;
        row-gap: 60px;
    }

    /*left side*/
    .worksPage__leftSide {
        width: 35%;
        margin: 0;
        position: sticky;
        top: 160px;
        height: max-content;

        @media screen and (max-width: 999px) {
            width: 100%;
            position: inherit;
        }
    }

    .worksPage__excerpt {
        font-weight: 600;
        padding-inline-start: 24px;
        display: flex;
        align-items: center;
        position: relative;

        &::before {
            content: "";
            width: 16px;
            height: 16px;
            border-radius: 8px;
            background-color: var(--wp--preset--color--orange);
            position: absolute;
            left: 0;
        }
    }


    /*基本情報*/
    .worksPage__info {
        margin-block-start: 40px;

        @media screen and (max-width: 999px) {
            width: 94%;
        }
    }

    .worksPage__infoItems {
        padding-block-start: 8px;
        display: flex;
        flex-direction: column;
        row-gap: 8px;
        border-block-start: 1px solid var(--wp--preset--color--gray);
    }

    .worksPage__infoItem {
        width: 100%;
        padding-block-end: 8px;
        padding-inline: 8px;
        margin: 0;
        display: flex;
        align-items: center;
        box-sizing: border-box;
        border-block-end: 1px solid var(--wp--preset--color--gray);

        @media screen and (max-width: 999px) {
            padding-inline: 0;
        }

        &::before {
            text-align: center;
            width: 115px;
            min-width: 115px;
            margin-inline-end: 8px;
            display: inline-block;
            border-inline-end: 1px solid var(--wp--preset--color--gray);

            @media screen and (max-width: 999px) {
                width: 100px;
                min-width: 100px;
            }
        }

        &.works-info-area {
            &::before {
                content: "面積";
            }
        }

        &.works-info-floor-plan {
            &::before {
                content: "間取り";
            }
        }

        &.works-info-building-type {
            &::before {
                content: "建物";
            }
        }

        &.works-info-age {
            &::before {
                content: "完工時築年数";
            }
        }

        &.works-info-family {
            &::before {
                content: "家族構成";
            }
        }
    }


    /*施工の特徴*/
    .worksPage__detailsWrapper {
        padding-block: 12px;
        padding-inline: 12px;
        margin-block-start: 32px;
        border-block: 1px dashed var(--wp--preset--color--gray);

        @media screen and (max-width: 999px) {
            width: 94%;
        }
    }

    .worksPage__details {
        margin-block-start: 12px;

        a {
            padding-inline: 6px;
            background-color: var(--wp--preset--color--light-orange);
        }

    }

    /*right side*/
    .worksPage__rightSide {
        width: 65%;
        margin: 0;

        @media screen and (max-width: 999px) {
            width: 100%;
        }
    }

    .worksPage__afterPhotos {
        width: 100%;
        overflow: hidden;
        padding-block-end: 80px;
        position: relative;

        .gallery {
            display: flex;
            gap: 16px;
            overflow-x: auto;
            scroll-snap-type: x mandatory;
            scroll-behavior: smooth;
            scrollbar-width: none;
            -webkit-overflow-scrolling: touch;
            /* position: relative; */

            &::-webkit-scrollbar {
                display: none;
            }
        }

        .gallery-item {
            flex: 0 0 100%;
            scroll-snap-align: start;


            img {
                display: block;
                width: 100%;
                height: auto;
                object-fit: contain;
            }
        }

        /* 前へ・次へボタン */
        .galleryNav {
            color: var(--wp--preset--color--black);
            text-decoration: none;
            position: absolute;
            bottom: 15px;
            width: 50px;
            height: 50px;
            padding: 0;
            border: none;
            border-radius: 50%;
            cursor: pointer;

            @media screen and (max-width: 999px) {
                width: 48px;
                height: 48px;
            }

            &.galleryNav--prev {
                left: 4px;
            }

            &.galleryNav--next {
                right: 4px;
            }

            &:disabled {
                opacity: 0.4;
                cursor: default;
            }
        }
    }

    /*本文*/
    .wp-block-post-content {
        padding-block-start: 24px;
        border-block-start: 1px solid var(--wp--preset--color--gray);

        img {
            width: 100%;
        }
    }
}