@import url("https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@7.2.0/css/all.min.css");

:root{
    --color-txt: #444;
    --color-link: #2d6eb3;
    --color-accent: #0FA36A;;
}

/*frame*/
.contents_wrap{
    padding-top:0;
}
body.single-column .column_detail.contents{
    padding-top: 100px !important;
}

body.single-column .column_detail.contents > .items > article.item > .wrap > .box > h1.title span{
    font-size: 36px;
    line-height: 1.2;
    font-weight: bold;
}
body.single-column .column_detail.contents > .items > article.item > .wrap > .box > .tag{
    background:#999;
}
body.single-column .column_detail.contents > .items > article.item > .wrap > .box > .value > .col_text{
    counter-reset: chapter;
    h2{
        counter-increment: chapter;
        counter-reset: section subsection;
        &::before{
            content: "Chapter" counter(chapter) " ";
            font-weight: normal;
            font-size: 60%;
            display: block;
            margin-bottom: 2px;
        }
        background: #666;
        line-height: 1.2 !important;
        color: #fff;
        font-size: 24px;
        padding: 14px;
        margin: 80px auto 30px;
        span{
            font-weight: bold;
        }
    }
    h3{
        counter-increment: section;
        counter-reset: subsection;
        &::before{
            content: "chapter" counter(chapter) "-" counter(section) " ";
            font-weight: normal;
            font-size: 60%;
            display: block;
            margin-bottom: 2px;
        }
        font-size: 24px;
        line-height: 1.2 !important;
        border-bottom: 2px solid #333;
        padding-bottom: 10px;
        margin: 60px auto 20px;
        letter-spacing: 0;
        span{
            font-weight: bold;
        }
    }
    h4{
        counter-increment: subsection;
        &::before{
            content: "chapter" counter(chapter) "-" counter(section) "-" counter(subsection) " ";
            font-weight: normal;
            font-size: 60%;
            display: block;
            margin-bottom: -6px;
        }
        font-size: 20px;
        font-weight: 700;
        line-height: 1.4;
        margin: 40px auto 16px;
        span{
            font-weight: bold;
        }
    }
    p {
        font-size: 18px !important;
        line-height: 2.0 !important;
    }
    p b{
        font-weight: bold;
    }
    a{
        color:var(--color-link);
    }
    a:hover{
        text-decoration: none !important;
    }
    a.blank::after{
        content: "\f2d2";
        font-family: "Font Awesome 7 Free";
        font-weight: 900;
    }
    p small{
        font-size: 14px !important;
    }

    table.c-chart{
        width: 100%;
        border-collapse: collapse;
        border: 1px solid #999;
        th, td{
            border: 1px solid #999;
        }
    }
    table.c-chart thead th{
        background: #ddd;
        font-weight: bold;
    }
    table.c-chart th,
    table.c-chart td{
        padding: 10px;
        text-align: left;
    }
    table.c-chart tbody th{
        white-space: nowrap;
    }
    ul.listing{
        list-style: disc;
        padding-left: 10px;
        margin-left: 4px !important;
        margin-top:0 !important;
        li{
            font-size: 18px;
            margin-bottom: 10px !important;
            line-height: 1.6 !important;
            position: relative;
            padding-left: 22px;
        }
        li:last-child{
            margin-bottom: 0;
        }
        li::before{
            position: absolute;
            left: 0;
            top: -15px;
            content: "•";
            font-size:200%;
            margin-right: -2px;
            color: var(--color-txt);
        }
    }
    ol.inner-index{
        border: 2px solid #999;
        padding:20px;
        li{
            font-size: 16px;
            line-height: 1.2 !important;
            margin-bottom: 6px !important;
            list-style: decimal;
            color:var(--color-txt);
            margin-left: 20px;
        }
        li:last-child{
            margin-bottom: 0;
        }
        li a{
            text-decoration: none !important;
            color:var(--color-txt);
        }
        li a:hover{
            text-decoration: none !important;
            color:#2d6eb3;
            text-decoration: underline;
        }
    }
    #toc_container{
        margin: 0 auto 30px;
        & p.toc_title{
            margin-bottom: 0 !important;
        }
        ul.toc_list > li{
            margin-bottom: 4px !important;
        }
        ul.toc_list > li ul{
            margin-bottom: 10px !important;
        }
        ul.toc_list > li > ul > li{
            margin-bottom: 0px !important;
        }
        ul.toc_list > li > ul > li >ul > li{
            margin-bottom: 0px !important;
        }
        .toc_list a{
            font-size: 16px;
            line-height: 1.4;
            color: var(--color-txt);
            text-decoration: none !important;
            &:hover{
                color: var(--color-link);
                text-decoration: underline !important;
            }
        }
    }
    .c-iframe-content {
        position: relative;
        width: 100%;
        height: 0;
        padding-bottom: 56.25%;
    }
    .c-iframe-content iframe {
        position: absolute;
        width: 100%;
        height: 100%;
    }
    
    .c-iframe-youtube {
        position: relative;
        width: 100%;
        height: 0;
        padding-bottom: 56.25%;
    }
    .c-iframe-youtube iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100% !important;
        height: 100% !important;
        border: 0;
        max-width: 100% !important;
        margin:0 !important;
    }
    .c-feature-container section{
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
        padding: 1px 20px 10px;
        border-radius: 10px;
        margin-bottom: 20px;
        & h3{
            font-size: 20px;
            font-weight: 700;
            line-height: 1.4;
            margin-top:20px !important;
        }
    }
    figure img{
        max-width: 100% !important;
    }
    div.cta-kenchonavi{
        --cta-brochure-img: url("https://dsi.works/kenchonavi/images/feature_03.webp");
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        padding: 10px 5vw 20px;
        background-color: var(--color-accent);
        border-radius: 10px;

        & > div:first-child{
            flex: 0 0 auto;
            display: flex;
            align-items: center;
            justify-content: center;
            & > div{
                position: relative;
                width: min(280px, 72vw);
                margin-inline: auto;
                padding-bottom: 0.2rem;
                &::before{
                    content: "";
                    position: absolute;
                    top:-10px;
                    width: 86%;
                    max-width: 160px;
                    aspect-ratio: 1 / 1;
                    background: var(--cta-brochure-img) center / contain no-repeat;
                    transform: translate(-2%, 0) rotate(-5deg);
                }
                & > img{
                    position: relative;
                    display: block !important;
                    width: 86% !important;
                    max-width: 160px !important;
                    height: auto !important;
                    margin: 10px 0 0 80px !important;
                    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
                    transform: translate(2%, 0) rotate(4deg);
                    z-index: 1;
                }
            }
        }
        & > div:nth-child(2){
            flex: 1 1 220px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: clamp(12px, 2.5vw, 16px);
            min-width: min(100%, 260px);
            & p{
                margin: 0 !important;
                color: #fff;
                font-size: clamp(1rem, 2.5vw, 1.2rem) !important;
                line-height: 1.35 !important;
            }
            & p span{
                display: inline-block;
            }
        }
        & a{
            display: inline-block;
            box-sizing: border-box;
            max-width: 100%;
            padding: 15px clamp(32px, 8vw, 60px);
            border-radius: 999px;
            background: #fff;
            color: var(--color-accent) !important;
            font-size: 16px;
            font-weight: 700;
            line-height: 1.3;
            text-decoration: none !important;
            box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
            transition: transform 0.15s ease, box-shadow 0.15s ease;
            &:hover{
                color: var(--color-accent) !important;
                background: #fff !important;
                transform: translateY(-1px);
                box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
            }
            &:focus-visible{
                outline: 3px solid #fff;
                outline-offset: 3px;
            }
        }
    }
    
    aside.related-article{
        display: block;
        width: 100%;
        margin: 28px 0 24px;
        box-sizing: border-box;

        &::before{
            content: "関連記事";
            display: block;
            margin-bottom: 8px;
            font-size: 14px;
            font-weight: 700;
            color: #666;
            line-height: 1.4;
        }

        & a{
            width: 100%;
            color: var(--color-txt);
            text-decoration: none !important;
            border: 1px solid #ccc;
            border-radius: 8px;
            overflow: hidden;
            background: #fafafa;
            transition: border-color 0.15s ease, box-shadow 0.15s ease;
            display: flex;
            align-items: center;

            &:hover{
                border-color: var(--color-link);
                box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
            }

            &:hover figcaption{
                color: var(--color-link);
            }

            &:focus-visible{
                outline: 3px solid var(--color-link);
                outline-offset: 2px;
            }
        }

        & figure{
            margin: 0;
        }

        & img{
            display: block;
            width: 260px !important;
            height: auto !important;
            margin: 0 !important;
        }

        & figcaption{
            padding: 12px 14px;
            font-size: 16px !important;
            line-height: 1.5 !important;
            font-weight: 700;
            color: var(--color-txt);
            transition: color 0.15s ease;
        }
    }
    aside.related-article + aside.related-article{
        margin-top:-8px;
    }
    aside.related-article + aside.related-article::before{
        content:none;
    }
}

.column_detail {
    padding-top: 240px;
}
.column_detail .items {
    background-color: transparent !important;
}
.post-type-archive-column .items_min.article-list {
    padding-top: 8px !important;
}




@media screen and (min-width: 768px) and (max-width: 1024px) {
    body.archive.post-type-archive-column {
        padding-top: 80px !important;
    }
    .column_detail {
        padding-top: 92px;
    }

    body.single-column .column_detail.contents {
        padding-top: 0 !important;
    }

    .column-template-default .contents_wrap {
        padding-top: 80px !important;
    }
}



@media screen and (max-width: 767px) {
    body.single-column .column_detail.contents > .items{
        width: 96% !important;
    }
    body.single-column .column_detail.contents > .items > article.item > .wrap > .box{
        padding: 10px !important;
    }
    body.single-column .column_detail.contents > .items > article.item > .wrap > .box > h1.title span{
        font-size: 26px;
    }

    .column_detail {
        padding-top: 188px !important;
    }
    body.single-column .column_detail.contents {
        padding-top: 168px !important;
    }
    .column.contents.related {
        padding-top: 24px;
    }
    .column_detail.contents .titles {
        margin-bottom: 0 !important;
    }
    
    body.single-column .column_detail.contents > .items > article.item > .wrap > .box > .value > .col_text{

        table.c-chart thead{
            display:none;
        }
        table.c-chart tbody tr {
            display:flex;
            flex-direction: column;
        }
        table.c-chart tbody tr th{
            border-bottom:none;
            font-weight: bold;
            background:#ddd;
            font-size: 16px;
        }
        table.c-chart tbody tr td{
            border-top:none;
        }
    }

    body.single-column .column_detail.contents > .items > article.item > .wrap > .box > .value > .col_text{

        div.cta-kenchonavi{
            padding: 10px 5vw 20px;
            & > div:first-child{
                & > div{
                    width: 100%;
                    margin-bottom: 20px;
                }
            }
            & > div:nth-child(2){
                & p span{
                    margin-bottom:-10px;
                    display: block;
                }
            }
            
        }
    }

    body.single-column .column_detail.contents > .items > article.item > .wrap > .box > .value > .col_text aside.related-article{
        margin:12px 0;
        &::before{
            margin-bottom: 1px;
            font-size: 12px;
        }
        & img{
            width: 130px !important;
            margin-left:4px;
        }
        & figcaption{
            padding: 6px;
            font-size: 14px !important;
            line-height: 1.5 !important;
        }
    }
}