/*
  Responsive: yes
 */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    line-height: 160%;
    overflow-wrap: break-word;
}

body {
    margin: 0;
    font-family: Inter, 'Noto Sans JP', sans-serif;
    font-weight: 700;
    letter-spacing: 0%;
    color: #222222;
}

#container #blog-title #blog-title-inner {
    width: 100%;
    height: fit-content;
    aspect-ratio: 1440 / 240;
    background-image: url(https://static.legalscape.jp/techblog/header.png) !important;
    background-position: center top;
    background-size: cover;
    background-repeat: no-repeat;
}

#content {
    background: #EAEFF9;

    padding: 60px 0 80px 0;
}

.page-archive:not(.page-index) #content {
    padding: 38px 0 80px 0;
}

#content-inner {
    display: grid;
    gap: 52px;
    justify-content: center;

    grid-template-columns: 368px;

    @media (min-width: 752px) {
        grid-template-columns: 368px 300px;
    }

    @media (min-width: 1152px) {
        grid-template-columns: 768px 300px;
    }
}

.archive-category-link,
.entry-category-link {
    font-size: 12px;
    line-height: 160%;
    letter-spacing: 0%;
    color: #FFFFFF;
    padding: 4px 12px;
    border-radius: 100px;
    background: #4CBBB4;
    text-decoration: none;
    white-space: nowrap;
}

.entry-title {
    a {
        color: #222222;
        text-decoration: none;
    }
}

.date {
    a {
        color: #9C9C9C;
        text-decoration: none;
    }
}

#box2 {
    #box2-inner {
        display: flex;
        flex-direction: column;
        gap: 32px;
    }

    .hatena-module-title {
        font-size: 20px;
    }

    .hatena-module {
        background: white;
        width: 100%;
        border-radius: 8px;

        padding: 20px 24px 20px 24px;
    }

    .hatena-module-custom-ads {
        width: 100%;
        height: fit-content;
        aspect-ratio: 300/380;
        background: no-repeat center top / cover url(https://static.legalscape.jp/techblog/ads_sidebar.png);
        border-radius: 8px;
        /* display: flex;
        flex-direction: column; */

        position: relative;


        p {
            text-align: center;
            font-size: 23px;
            position: absolute;
            top: 40px;
            left: 0;
            right: 0;
            margin: auto;
        }

        a {
            width: 240px;
            height: 64px;
            padding: 18px 32px;
            border-radius: 4px;
            background: #167472;

            text-align: center;
            position: absolute;
            bottom: 24px;
            left: 0;
            right: 0;
            margin: auto;

            color: #FFF;
            font-size: 16px;
            line-height: 150%;
            letter-spacing: 0.32px;

            text-decoration: none;
        }
    }


    .hatena-module-category {
        ul {
            list-style: none;
            padding: 0;
            margin: 16px 0 0 0;
        }

        li {
            font-weight: 400;
            font-size: 14px;

            padding: 12px 0;
            border-bottom: 1px solid #D9D9D9;

            &:first-child {
                padding-top: 0;
            }

            &:last-child {
                border-bottom: none;
                padding-bottom: 0;
            }

            &::before {
                content: url(https://static.legalscape.jp/techblog/ul-li.svg);
                margin-right: 8px;
                display: inline-block;
                text-align: center;
            }

            a {
                color: #222222;
                text-decoration: none;
            }
        }
    }

    .hatena-module-authors-list {
        ul {
            list-style: none;
            padding: 0;
            margin: 16px 0 0 0;
        }

        li {
            padding-top: 12px;

            &:first-child {
                padding-top: 0;
            }

            a {
                text-decoration: none;
                color: #222222;
                display: flex;
                flex-direction: row;
                align-items: center;
                gap: 12px;
            }

            .authors-user-icon {
                width: 64px;
                height: 64px;
                border-radius: 4px;
                margin: 0;
            }

            .authors-user-name {
                font-size: 14px;
            }
        }
    }
}

.footer {
    height: 100px;
    padding: 0 24px;

    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;

    background: #162974;

    .copyright {
        font-weight: 400;
        font-size: 10px;
        color: #8A8A8A;
    }

}

.page-index,
.page-archive {
    #main .archive-entries {
        display: grid;
        grid-template-columns: 1fr;

        @media (min-width: 1152px) {
            grid-template-columns: 1fr 1fr;
        }

        gap: 32px;
        align-items: center;

        .archive-entry {
            display: grid;
            grid-template-areas:
                "thumb"
                "categories"
                "header";

            .entry-thumb-link {
                grid-area: thumb;
                width: 100%;

                .entry-thumb {
                    margin: 0;
                    aspect-ratio: 1200/630;
                    width: 100%;
                    height: fit-content;
                    border-radius: 8px 8px 0px 0px;
                }
            }

            .categories {
                grid-area: categories;
                background: white;
                padding: 16px 24px 0 24px;
            }

            .archive-entry-header {
                grid-area: header;
                background: white;
                border-radius: 0px 0px 8px 8px;
                padding: 8px 24px 16px 24px;

                display: flex;
                flex-direction: column;

                .entry-title {
                    order: 1;
                    font-size: 20px;
                    height: 96px;
                }

                .entry-title-link {
                    display: -webkit-box;
                    -webkit-box-orient: vertical;
                    -webkit-line-clamp: 3;
                    overflow: hidden;
                }

                .archive-date {
                    order: 2;
                    margin-top: 12px;
                    font-size: 12px;
                }
            }

            .archive-entry-body {
                display: none;
            }
        }

        @media (min-width: 1152px) {
            .archive-entry:first-child {
                grid-column: 1 / -1;

                display: grid;
                grid-template-areas:
                    "thumb categories"
                    "thumb header";
                grid-template-columns: 435px 1fr;

                .entry-thumb-link {
                    .entry-thumb {
                        border-radius: 8px 0 0 8px;
                    }
                }

                .categories {
                    border-radius: 0 8px 0 0;
                    padding-top: 30px;
                }

                .archive-entry-header {
                    border-radius: 0 0 8px 0;
                    padding-bottom: 24px;
                }
            }
        }
    }

    .pager {
        margin-top: 40px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .pager-next,
    .pager-prev {

        a {
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 20px;
            text-decoration: none;
            color: #162974;
            font-size: 15px;
        }

        .pager-arrow {
            display: none;
        }
    }

    .pager-prev {
        grid-column: 1;

        a::before {
            display: inline-block;
            content: '';
            background: no-repeat center/contain url(https://static.legalscape.jp/techblog/left-arrow.svg);
            width: 7px;
            height: 11px;
        }
    }

    .pager-next {
        grid-column: 2;

        a::after {
            display: inline-block;
            content: '';
            background: no-repeat center/contain url(https://static.legalscape.jp/techblog/right-arrow.svg);
            width: 7px;
            height: 11px;
        }
    }
}

#top-box {
    background: #EAEFF9;
    display: flex;
    justify-content: center;
    padding-top: 32px;

    .breadcrumb {
        width: 368px;

        @media (min-width: 752px) {
            width: 720px;
        }

        @media (min-width: 1152px) {
            width: 1120px;
        }

        a,
        span {
            font-size: 14px;
            line-height: 150%;
        }

        .breadcrumb-link {
            color: #222;

            &::after {
                display: inline-block;
                content: '';
                background: no-repeat center/cover url(https://static.legalscape.jp/techblog/breadcrumb-separator.svg);
                width: 3.5px;
                height: 14px;
                margin: 0 16px;
                vertical-align: middle;
            }
        }

        .breadcrumb-gt {
            display: none;
        }

        .breadcrumb-child {
            color: #767676;
        }
    }
}.page-entry {
    #main .entry {

        background: white;
        padding: 48px;

        @media (max-width: 751px) {
            padding: 24px;
        }

        border-radius: 8px;


        .entry-header {
            display: flex;
            flex-direction: column;
            gap: 16px;

            padding-bottom: 32px;
            border: none;
            border-bottom: 1px solid #D9D9D9;
            margin-bottom: 32px;

            .entry-categories {
                order: 1;
            }

            .entry-title {
                order: 2;

                font-size: 28px;
            }

            .entry-date {
                order: 3;

                font-size: 16px;
            }
        }

        .entry-content {
            letter-spacing: 2%;

            /* TODO: h4が小さすぎてしまう関係でデザインに反して一時的に見出しレベルを繰り上げているため、デザインから調整する */
            h2 {
                font-size: 24px;
                margin-top: 32px;
            }

            h3 {
                font-size: 20px;
                margin-top: 32px;
            }

            h4 {
                font-size: 16px;
                margin-top: 12px;
            }

            p {
                font-size: 16px;
                margin: 8px 0;
                font-weight: 400;
                line-height: 210%;
            }

            ul,
            ol,
            pre.code,
            blockquote,
            table {
                /* リストで入れ子になる可能性があるためコンテナ直下のみ */
                .entry-content > & {
                    margin-top: 24px;
                    margin-bottom: 24px;
                }
            }

            .code {
                /* TODO: solarizedで一旦 */
                background-color: #fdf6e3;
                padding: 16px;
                border-radius: 8px;
            }

            ul,
            ol {
                font-size: 16px;
                font-weight: 400;
                line-height: 210%;
                margin-left: 24px;
            }

            table {
                display: block;
                overflow-x: scroll;
                white-space: nowrap;
                border-collapse: collapse;
            }

            tr {
                border: 1px solid #D9D9D9;
            }

            td,
            th {
                font-weight: 400;
                padding: 8px 8px;
                text-align: left;
            }

            hr {
                border: none;
                border-top: 1px solid #D9D9D9;
                margin: 12px 0;
            }

            a {
                color: #162974;
            }

            figcaption {
                font-size: 12px;
                font-weight: 400;
                color: #9C9C9C;
                text-align: center;
            }
        }

        .entry-footer {
            hr {
                display: none;
            }

            display: flex;
            flex-direction: column;

            /* TODO: デザイン確認 */
            margin-top: 64px;

            .social-buttons {
                order: 1;
            }

            .entry-tags-wrapper {
                order: 2;
                margin-top: 12px;
            }

            .entry-footer-modules {
                order: 3;
                margin-top: 32px;
            }

            .entry-footer-section {
                display: none;
            }
        }
    }

    .pager {
        margin-top: 32px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;

    }

    .pager-next,
    .pager-prev {
        padding: 24px 16px;
        background-color: white;
        border-radius: 8px;

        display: flex;
        flex-direction: row;
        align-items: center;

        a {
            text-decoration: none;
            color: #222222;
            flex-grow: 1;
        }

        .pager-arrow {
            display: none;
        }


    }

    .pager-prev {
        grid-column: 1;


        &::before {
            margin-right: 26px;
            content: '';
            background: no-repeat center/contain url(https://static.legalscape.jp/techblog/left-arrow.svg);
            width: 10px;
            height: 16px;
        }
    }

    .pager-next {
        grid-column: 2;


        &::after {
            margin-left: 22px;
            content: '';
            background: no-repeat center/contain url(https://static.legalscape.jp/techblog/right-arrow.svg);
            width: 10px;
            height: 16px;
        }
    }

    .details_ads .banner {
        display: flex;
        flex-direction: row;
        border-radius: 8px;
        overflow: hidden;
        height: 242px;

        /* plus-darkerを実現するためにいろいろやっている */
        .banner_left {
            flex-grow: 1;
            isolation: isolate;
            filter: invert(1);

            &::before,
            &::after {
                content: "";
                position: absolute;
                inset: 0;
                filter: invert(1);
            }

            &::before {
                background: #167472;
                z-index: 0;
            }

            &::after {
                background-image: url(https://static.legalscape.jp/techblog/ads_detail_bg.png);
                mix-blend-mode: plus-lighter;
                z-index: 1;
            }

            >* {
                position: relative;
                z-index: 2;
                filter: invert(1);
            }

            p {
                margin: 35px 0 0 50px;
                color: #FFF;
                font-size: 23px;
            }

            a {
                margin: 18px 0 0 50px;

                width: 154px;
                height: 44px;

                display: flex;
                justify-content: center;
                align-items: center;

                border-radius: 3.2px;
                background: #FFF;
                color: #167472;

                text-decoration: none;
            }
        }


        .banner_right {
            width: 388px;
            background: url(https://static.legalscape.jp/techblog/ads_detail.png);

            display: none;

            @media (min-width: 1152px) {
                display: block;
            }
        }

    }

    .details_ads .catchphrase {
        margin-top: 16px;
        font-size: 16px;
        font-weight: 400;
        line-height: 210%;
        letter-spacing: 0.32px;
    }
}
