@charset "UTF-8";

/* h2 */
.blog-detail__contents h2 {
    background-color: var(--color-main);
    color: #fff;
    font-size: 20px!important;
    font-weight: bold;
    padding: 4px 10px;
    margin-top: 30px;
    @media (max-width: 767px) {
        font-size: 16px!important;
        margin-top: 20px;
    }
}

/* h3 */
.blog-detail__contents h3 {
    position: relative;
    margin: 1.5em 0;
    font-size: 18px!important;
    font-weight: bold;
    line-height: 1.4;
    @media (max-width: 767px) {
        font-size: 15px!important;
    }
    &::before {
        content: "";
        position: absolute;
        left: 0;
        bottom: -10px;
        width: 50px;
        height: 3px;
        background-color: var(--color-main);
    }
    &::after {
        content: "";
        position: absolute;
        left: 2em;
        bottom: -10px;
        right: 0;
        height: 3px;
        background-color: #DADADA;
    }
}

/* h4 */
.cmn-article__contents h4 {
    color: var(--color-main);
    font-size: 18px!important;
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 0;
    @media (max-width: 767px) {
        font-size: 16px!important;
    }
}

/* p */
.cmn-article__contents p {
    @media (max-width: 767px) {
        margin-top: 12px;
    }
}
.cmn-article__contents h4 + p {
    margin-top: 0;
}

/* ul,ol */
.cmn-article__contents h4 + ul,
.cmn-article__contents h4 + ol {
    margin-top: 0;
}

/* wp-block-button */
.cmn-article__contents .wp-block-button a {
    background-color: var(--color-main) !important;
    border-radius: 0;
    transition: ease-in-out 0.3s;
    &:hover {
        transition: ease-in-out 0.3s;
        background-color: #000 !important;
    }
}

/* table 1 */
.cmn-article__contents .custom-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}
.cmn-article__contents .custom-table tr:first-child th,
.cmn-article__contents .custom-table tr:first-child td {
    background-color: #000;
    color: #fff;
    font-weight: bold;
    border: 1px solid #e0e0e0;
    text-align: center;
}
.cmn-article__contents .custom-table tbody td {
    background-color: #fff;
    color: #333;
    border: 1px solid #e0e0e0;
    vertical-align: middle;
}

/* code */
.cmn-article__contents pre[class*="language-"].line-numbers {
    position: relative;
    padding: 1em 1em 1em 3em !important;
    line-height: 1.5;
    white-space: pre !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    max-height: 15em;
}
.cmn-article__contents pre[class*="language-"].line-numbers code {
    white-space: inherit;
}
.cmn-article__contents pre[class*="language-"].line-numbers .line-numbers-rows {
    position: absolute;
    top: 0;
    left: -3.5em;
    width: 3em;
    text-align: right;
    pointer-events: none;
}

/* 関連記事 */
section.related-posts {
    margin-top: 60px;
        @media (max-width: 767px) {
        margin-top: 40px;
    }
}
.related-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
}
section.related-posts .blog-sec__list .box-text {
    min-height: unset;
    margin: 0;
}

/* 目次 */
.toc {
    background: #fff;
    padding: 20px;
    margin: 20px 0;
    border: 2px solid #DADADA;
    position: relative;
}
.toc p {
    margin: 0;
    font-weight: bold;
}
.toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5em;
}
.toc-close {
    background: transparent;
    border: none;
    font-size: 0.9em;
    cursor: pointer;
}
.table-of-contents {
    counter-reset: toc-h2;
    font-size: 14px;
    margin: 0;
}
.toc ul {
    margin-top: 0;
    margin-left: 2em;
}
.toc li {
    margin: 0!important;
}
.table-of-contents li.toc-h2 {
    list-style: none;
    counter-increment: toc-h2;
    margin-left: 0;
}
.table-of-contents li.toc-h2 > a::before {
    content: counter(toc-h2) " ";
    display: inline-block;
    width: 2em;
}
.table-of-contents li.toc-h3 {
    list-style: none;
    margin-left: 1.5em;
}
.table-of-contents li.toc-h3 > a::before {
    content: "";
}
.table-of-contents li.toc-h4 {
    list-style: none;
    margin-left: 3em;
}
.table-of-contents li.toc-h4 > a::before {
    content: "";
}
.table-of-contents a {
    text-decoration: none;
    color: var(--color-link);
}
.table-of-contents a:hover {
    text-decoration: underline;
}