/* ======================================= */
/* 以下single-blog.php用のCSS - 開始 - */
/* ======================================= */

body {
    background-color: #f5f5f5;    
}

div#blog-single {
    @media(max-width: 480px) {
        padding: 0 12px;
    }

    .blog-page-wrapper {
        display: flex;
        gap: 24px;
        margin-bottom: 160px;

        /* @media (max-width: 768px) { */
        @media (max-width: 1030px) {
            flex-direction: column;
        }
    }
    
    .blog-main {
        background-color: white;
        padding: 24px;
        margin-top: 40px;
        border-radius: 4px;

        @media(max-width: 480px) {
            padding: 16px;
        }
    }

    nav.single-blog-pankuzu {
        display: flex;
        gap: 4px;
        margin-top: 8px;

        p {
            opacity: 0.5;
        }

        @media(max-width: 432px) {
            font-size: 0.8rem;
        }
        @media(max-width: 450px) {
            font-size: 0.7rem;
        }
        a {
            color: var(--color-primary);
        }

        a.pankuzu-content {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-left: 8px;

            &::before {
                content: "";
                flex-shrink: 0;
                width: 8px;
                height: 8px;
                background: url(../image/arrow-blue.svg) center center / contain no-repeat;
            }
        }
    }
    
    .blog-title {
        margin-top: 24px;
        font-weight: bold;
        font-size: 24px;

        @media(max-width: 480px) {
            font-size: 1.25rem;
        }
    }

    div.date {
        display: flex;
        gap: 16px;
        margin-top: 16px;

        p.single-blog-postdate,
        p.single-blog-updatedate {
            display: flex;
            align-items: center;
            gap: 8px;
            color: var(--color-darkgray);
            font-size: 0.875rem;

            &::before {
                content: "";
                flex-shrink: 0;
                height: 16px;
                width: 16px;
            }
        }

        p.single-blog-postdate {
            &::before {
                background: url(../image/icon-postdate.svg) center center / contain no-repeat;
            }
        }

        p.single-blog-updatedate {
            &::before {
                background: url(../image/icon-update.svg) center center / contain no-repeat;
            }
        }
    }

    div.sidebar-box {
        ul {
            border: solid 0 transparent;
        }
    }
    
    .blog-info-block {
        a {
            display: inline;
            text-decoration: initial;
            color: var(--color-primary);
        }

        p {
            margin-top: 40px;
            font-size: 1rem;
    
            @media(max-width: 768px) {
                margin-top: 24px;
            }
        }

        img {
            width: 100%;
            height: auto;
            display: block;
        }

        table {
            width: 100%;
            border-collapse: collapse;
            margin: 1em 0;
            font-size: 16px;
            line-height: 1.5;
            th,
            td {
                border: 1px solid var(--color-darkgray);
                padding: 10px;;
                font-weight: bold;
            }
        }

        ol {
            border: 2px solid var(--color-gray);
            padding: 32px;
            padding-left: 40px;
            list-style: decimal;

            ul {
                border: none;
                padding: 0;
                list-style: none;
            }

            & > li:first-child > p {
                margin-top: 0px;
            }
        }

        ul {
            border: 2px solid var(--color-gray);
            /* padding: 0 32px 32px; */
            padding: 32px;
            list-style: initial;
            margin-top: 32px;

            li:first-child p {
                margin-top: 0;
            }

            ul {
                border: none;
            }

            & > li > h4 {
                margin-top: 0;
            }
        }

        hr {
            margin-top: 64px;
            border: solid 3px #dadada;
            border-width: 2px 0 0 0;
        }

        h2 {
            font-size: 1.5rem;
            font-weight: bold;
            margin-top: 32px;

            @media(max-width: 768px) {
                margin-top: 24px;
            }

            & + p {
                margin-top: 16px;
            }

            @media(max-width: 480px) {
                font-size: 1.25rem;
            }
        }
    
        h3 {
            margin-top: 40px;
            margin-bottom: 16px;
            padding: 8px 24px;
            box-sizing: border-box;
            line-height: 1.2;
            font-size: 1.5rem;
            font-weight: bold;
            border-left: var(--color-primary) 4px solid;
    
            @media(max-width: 768px) {
                height: auto;
                padding: 6px 16px;
                font-size: 1.25rem;
            }

            &.wp-block-heading {
                color: black;
                border-radius: 0;
                background: white;
            }
        }

        h4 + p {
            margin-top: 0px;
        }
    
        h4 {
            min-height: 32px;
            margin-top: 40px;
            padding: 2px 0px 16px;
            box-sizing: border-box;
            line-height: 1.2;
            font-size: 1.25rem;
            font-weight: bold;
            text-align: left;
            color: black;

            &.wp-block-heading {
                border: none;
            }
            &.wp-block-heading::before {
                content: none;
            }

            @media(max-width: 768px) {
                height: auto;
                font-size: 1.125rem;
        
                &::before {
                    width: 8px;
                }
            }

            + ul {
                margin-top: 12px;
                @media(max-width: 480px) {
                    margin-top: 0;
                }
            }
        }

        blockquote {
            border: var(--color-black) 2px solid;
            padding: 24px;
            margin-top: 24px;

            p {
                margin-top: 0;
            }
        }

        pre {
            padding: 16px;
            background: var(--color-gray);
            table {
                td,
                th {
                    border: var(--color-black) 1px solid;
                }
            }

            p {
                margin-top: 0px;
            }

            .gray-box {
                padding: 0 24px;
                font-size: 1.1rem;
                border: var(--color-darkgray) 1px solid;
            }
        }
    }

    .single-blog-pre-next-navigation {
        display: flex;
        justify-content: space-between;
        margin-top: 48px;
        gap: 16px;

        .next-article,
        .prev-article {
            flex: 1 1 50%;
        }

        div.next-article {
            p.nav-label {
                display: flex;
                align-items: center;
                gap: 8px;

                &::before {
                    flex-shrink: 0;
                    content: "";
                    width: 8px;
                    height: 8px;
                    background: url(../image/arrow-blue.svg) center center / contain no-repeat;
                    transform: rotate(180deg);
                }
            }
        }

        div.prev-article {
            p.nav-label {
                display: flex;
                justify-content: end;
                align-items: center;
                gap: 8px;

                &::after {
                    flex-shrink: 0;
                    content: "";
                    width: 8px;
                    height: 8px;
                    background: url(../image/arrow-blue.svg) center center / contain no-repeat;
                }
            }
        }


        a {
            p,
            .nav-content {
                flex: 1 1 50%;
            }
        }

        .nav-content {
            display: flex;
            gap: 8px;
            background: var(--color-gray);
            padding: 8px;
        }

        img {
            width: 80px;
            height: 80px;
            object-fit: cover;
            flex-shrink: 0;
        }

        @media (max-width: 768px) {
            flex-direction: column;
        }
    }

    .related-articles h3 {
        font-size: 1.5rem;
        font-weight: bold;
        margin-bottom: 16px;
    }

    .related-articles {
        margin: 80px 0;

        @media (max-width: 768px) {
            margin: 40px 0;
        }
    }
    
    .related-articles-list {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .related-article-item {
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 4px;
        overflow: hidden;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        /* width の指定は不要になるので削除 👇 */
        width: auto;
    }
    
    .related-article-item img {
        width: 100%;
        display: block;
        height: 200px;
        object-fit: cover;
    }
    
    .related-title {
        padding: 8px;
        font-size: 14px;
        font-weight: normal;
        line-height: 1.4;
    }
    
    /* レスポンシブ対応 */
    @media (max-width: 768px) {
        .related-articles-list {
            grid-template-columns: repeat(2, 1fr);
        }
    }
    
    @media (max-width: 480px) {
        .related-articles-list {
            grid-template-columns: 1fr;
        }
    }
    /* blog-mainの装飾-終了- */

    /* ======================================================== */
    /* blogの末尾にショートコードで追加した内容のスタイリング -開始- */
    /* ======================================================== */
    /* 営業日のテーブルを表示するショートコードのスタイリング開始 */
    table.shortcode-blog-workday-table {
        width: 100%;
        border-collapse: collapse;
        margin: 1em 0;
        font-size: 16px;
        line-height: 1.5;
        th,
        td {
            border: 1px solid var(--color-gray);
            padding: 10px;
            text-align: center;
            font-weight: bold;
        }
    
    }

    /* [sc]というショートコード用のスタイリング開始 */
    .blog-shortcode-footer {
        table {
            width: 100%;
            border-collapse: collapse;
            margin: 1em 0;
            font-size: 16px;
            line-height: 1.5;
            th,
            td {
                border: 1px solid var(--color-gray);
                padding: 10px;
                text-align: center;
                font-weight: bold;
            }
    
        }

        ul {
            list-style: none;
            border: none;
            padding: 0;
            margin-top: 0;
        }

        span.blog-text-bold-1 {
            display: inline;
            font-weight: bold;
        }
        span.blog-text-bold-2 {
            font-size: 1.125rem;
            font-weight: bold;
            @media(max-width: 480px) {
                font-size: 1.1rem;
            }
        }
        .blog-text-bold-3 {
            display: block;
            font-size: 1.5rem;
            font-weight: bold;
            border-left: var(--color-primary) 4px solid;
            padding: 8px;
            margin-top: 40px;

            @media(max-width: 480px) {
                font-size: 1.2rem;
            }

        }

        .blog-shortcode-button {
            display: flex;
            align-items: center;
            gap: 16px;
            /* display: inline-block; */
            width: fit-content;
            background-color: var(--color-accent);
            color: white;
            padding: 8px 20px;
            text-decoration: none;
            border: solid 2px var(--color-accent);
            border-radius: 4px;
            font-weight: bold;
            margin-top: 10px;
            box-shadow: 2px 2px 2px rgba(52, 52, 52, 0.2);
            transition: 0.2s;

            &::after {
                flex-shrink: 0;
                content: "";
                width: 12px;
                height: 12px;
                background: url(../image/arrow.svg) center center / contain no-repeat;
            }

            &:hover {
                background-color: #fff;
                color: var(--color-accent);
                box-shadow: 2px 2px 2px rgba(52, 52, 52, 0.4);

                &::after {
                    background: url(../image/more-arrow.svg) center center / contain no-repeat;
                }
            }

            &:active {
                background-color: #fff;
                color: var(--color-accent);
                box-shadow: 0 0 0 rgba(52, 52, 52, 0.4);

                &::after {
                    background: url(../image/more-arrow.svg) center center / contain no-repeat;
                }
            }
        }
        
        .blog-shortcode-button:hover {
            opacity: 0.8;
        }
        
        .recruit-detail {
            margin-top: 10px;
            color: #555;
            font-size: 14px;
        }

        .gray-box {
            border: 3px solid var(--color-darkgray);
            padding: 24px;
            line-height: 1.6;
            margin-top: 24px;
            li + li {
                margin-top: 24px;
            }         
        }

        .blog-shortcode-treatment-menu {
            li {
                margin-top: 16px;
                background: var(--color-gray);
                line-height: 2;
            }
        }
    }
    /* blogの末尾にショートコードで追加した内容のスタイリング -終了- */
        
    /* =================================== */
    /* single-blog.php用のCSS - 終了 - */
    /* =================================== */
}