#page_header {
    width: min(1184px, 100%);
    margin-inline: auto;
    padding: 0 10px;
    margin-bottom: 6em;
}

#page_title {
    text-align: center;
    letter-spacing: .1em;
    margin: 1em 0;
    padding: 1em 0;
    position: relative;
    background-repeat: no-repeat;
    font-size: 2.2em;
    font-weight: 500;
    line-height: 1.5;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    height: 5em;

    :where(.page_consult, .page_exclusive) & {
        background-image: url(../images/illusts/trees.png), url(../images/illusts/consult.png);
        background-position: 20px center, calc(100% - 20px) center;
        background-size: 120px, 200px;
    }

    :where(.page_know) & {
        background-image: url(../images/illusts/trees.png), url(../images/illusts/wheelchair2.png);
        background-position: 20px center, calc(100% - 20px) center;
        background-size: 120px, 130px;
    }

    :where(.page_info) & {
        background-image: url(../images/illusts/trees.png), url(../images/illusts/oldpeople.png);
        background-position: 20px center, calc(100% - 20px) center;
        background-size: 120px, 160px;
    }

    :where(.page_contact) & {
        background-image: url(../images/illusts/trees.png), url(../images/illusts/kids.png);
        background-position: 20px center, calc(100% - 20px) center;
        background-size: 120px, 120px;
    }

    :where(.page_news) & {
        background-image: url(../images/illusts/trees.png), url(../images/illusts/wheelchair.png);
        background-position: 20px center, calc(100% - 20px) center;
        background-size: 120px, 120px;
    }

    :where(.page_reading) & {
        background-image: url(../images/illusts/trees.png), url(../images/illusts/bench.png);
        background-position: 20px center, calc(100% - 20px) center;
        background-size: 120px, 120px;
    }

    @media (width < 900px) {
        background-image: none;
        font-size: 1.8em;
    }

    @media (width < 650px) {
        font-size: 1.5em;
    }
}

#breadcrumbs {
    border-top: 4px dotted var(--orange-color);
    padding: .5em 0;
    font-size: .9em;
    line-height: 1.5;
}

:where(section) {
    a {
        color: var(--accent-color);
        text-decoration: underline;
        font-weight: 600;

        &:hover {
            text-decoration: none;
        }
    }

    h2 {
        border-bottom: 2px solid var(--orange-color);
        width: -webkit-fit-content;
        width: -moz-fit-content;
        width: fit-content;
        padding: .5em;
        margin: 4em auto 1em;
        text-align: center;
        word-break: keep-all;
        overflow-wrap: anywhere;
        line-break: strict;
        line-height: 1.5;

        @supports (text-wrap:pretty) and (word-break:auto-phrase) {
            text-wrap: pretty;
            word-break: auto-phrase;
        }

        .phrase {
            display: inline-block;
        }

        @media (width < 900px) {
            font-size: 1.2em;
        }

    }

    ul, ol {
        padding-left: 1.5em;
        margin: 1em 0 2em;
        line-height: 1.75;
        font-size: 1.1em;

        li {
            margin-bottom: 1em;
        }
    }

    blockquote {
        border: 2px solid var(--orange-color);
        padding: 1.5em;
        border-radius: 4px;
        background-color: #fff;
        margin: 2em 0;

        *:first-child {
            margin-top: 0;
        }

        *:last-child {
            margin-bottom: 0;
        }

        .flex-box {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 2em;
            -webkit-box-align: center;
            -ms-flex-align: center;
            align-items: center;

            @media (width< 500px) {
                grid-template-columns: 1fr;
            }
        }
    }

}

/* block media */
.wp-block-media-text {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1em;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.wp-block-media-text>.wp-block-media-text__content.wp-block-media-text__content {
    padding: 0;
}

/* accordion */
.wp-block-accordion {
    border: 2px solid var(--border-color);
    background-color: #F5F5F5;

    &:not(:last-of-type) {
        border-bottom: 0;
    }

}

.wp-block-accordion-heading {
    padding: .5em .5em .5em 2em;
    position: relative;

}


.wp-block-accordion-item>.wp-block-accordion-heading .wp-block-accordion-heading__toggle-icon {
    position: absolute;
    left: .5em;
}

.wp-block-accordion-panel {
    padding: .5em .5em .5em 1em;
    background-color: #fff;
}

/* button */
.wp-block-button {
    .wp-block-button__link {
        background-color: var(--accent-color);
        color: #fff;
        border-radius: 4px;
        font-size: 1em;
        position: relative;
        display: -webkit-inline-box;
        display: -ms-inline-flexbox;
        display: inline-flex;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        -webkit-transition: opacity .2s;
        transition: opacity .2s;
        padding: .5em .8em;
        text-decoration: none;
        font-weight: 500;

        &[target="_blank"]::after {
            position: relative;
            content: "";
            -webkit-mask-image: url(../images/icons/window.svg);
            mask-image: url(../images/icons/window.svg);
            -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
            -webkit-mask-size: contain;
            mask-size: contain;
            width: 1.5em;
            height: 1.5em;
            display: inline-block;
            background-color: currentColor;
            margin-left: .5em;
        }

        &:hover {
            opacity: .8;
        }
    }
}

/* know */

/* 検索 */
:focus-visible {
    outline: 2px solid #00599F;
}

legend {
    margin-left: .25em;
    position: relative;

    &::before {
        content: "";
        width: 1em;
        height: 4px;
        display: inline-block;
        margin-right: .5em;
        position: relative;
        bottom: .25em;
        background-color: var(--orange-color);
        border-radius: 2px;
    }
}

/* 一覧 */
.list-field {
    .btn {
        margin: .25em 0 1em;

        a {
            margin-bottom: .5em;
        }
    }

}

/* キーワード */
.search-field {

    label {
        display: block;
        margin-bottom: .5em;
        font-size: 1.1em;
        font-weight: 600;
    }

    input {
        display: inline-block;
        padding: .5em;
        width: min(100%, 15em);
        border: 1px solid #222;
    }

}

/* カテゴリー */
fieldset {
    border: 0;
    padding: 0;
    margin-bottom: 3em;

    .search-field & {
        border-bottom: 0;
    }

    legend {
        display: block;
        font-size: 1.1em;
        font-weight: 600;
        width: 100%;
        margin-bottom: .5em;

    }

    [type="checkbox"] {
        width: 1em;
        height: 1em;
        position: relative;
        top: .1em;
    }
}

.search-help {
    margin: 0 0 .5em;
    line-height: 1.5;
}

.category-item {
    border: 2px solid var(--border-color);
    border-bottom: 0;

    &.depth-1 {
        border: 0;
        padding: .5em;
    }

    &:last-child {
        border-bottom: 2px solid var(--border-color);
    }
}

.category-parent {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    font-weight: 600;
    width: 100%;
    background-color: #F5F5F5;

    &.open {
        background-color: var(--yellow-color);
    }
}


.category-toggle {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    padding: 1em .5em;

    &+.category-name {
        cursor: pointer;
        padding: 1em .5em 1em 0;
        width: 100%;
        padding: .5em;
    }

    svg {
        width: 1.5em;
        height: 1.5em;
        -webkit-transform: rotate(90deg);
        -ms-transform: rotate(90deg);
        transform: rotate(90deg);
        position: relative;
        top: .1em;
        fill: var(--accent-color);
        -webkit-transition: all.5s;
        transition: all.5s;

        .open & {
            -webkit-transform: rotate(-90deg);
            -ms-transform: rotate(-90deg);
            transform: rotate(-90deg);
        }
    }
}

.category-children:not([hidden]) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background-color: #fff;
    padding: .5em;

    @media (width < 500px) {
        display: block;
    }
}

.category-description {
    margin: 0 0 0 1.5em;
    line-height: 1.5;
    font-size: .9em;
}

/* area */
.area-item {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 2px solid var(--border-color);
    background-color: #fff;
    padding: .5em;

    label {
        border: 0;
    }

    @media (width < 600px) {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* チェック操作しやすく */
fieldset label {
    cursor: pointer;
    padding: .5em;
    display: block;
    font-size: 1.1em;
    line-height: 1.5;
}

/* 状態を色だけに頼らない */
input[type="checkbox"]:checked+.category-parent, input[type="checkbox"]:checked+.tag-name {
    font-weight: 700;

}

/* 検索ボタン */
.search_btn {
    margin: 0 auto;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    padding: 1em 2em;
    border: 0;
    background-color: var(--accent-color);
    color: #fff;
    border-radius: 4px;
    font-size: 1.2em;
    position: relative;
    cursor: pointer;

    &::before {
        position: relative;
        content: "";
        display: inline-block;
        width: 1.2em;
        height: 1.2em;
        margin-right: .5em;
        -webkit-mask-image: url(../images/icons/search.svg);
        mask-image: url(../images/icons/search.svg);
        -webkit-mask-size: contain;
        mask-size: contain;
        -webkit-mask-repeat: no-repeat;
        mask-repeat: no-repeat;
        background-color: currentColor;
    }
}

/* 地図から探す */
.tablist {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;

    @media (width < 600px) {
        grid-template-columns: 1fr 1fr;
    }

}

.map-tabs button {
    padding: .5em;
    cursor: pointer;
    border: 0;
    width: 100%;
    border-radius: 4px 4px 0 0;
    background: #D9D9D9;
    font-size: 1.1em;
    line-height: 1.5;
    color: var(--font-color);
}

.map-tabs button[aria-selected="true"] {
    font-weight: bold;
    background-color: var(--yellow-color);
}

.tabpanels iframe {
    max-width: 100%;
    border: 0;
}

/* 福祉サービスご利用の流れ */
.service_flow {
    background-color: var(--middle-color);
    margin: 8em auto;
    padding: 1em;
    border-radius: 6px;

    h2 {
        margin-top: 1em;

    }

    ol {
        list-style-position: inside;
        font-size: 1.2rem;
        font-weight: 600;
        width: min(100%, 640px);
        margin-inline: auto;
        padding: 0;
        list-style: none;


        li {
            counter-increment: li;

            h3::before {
                content: counter(li)".";
                display: inline-block;
                position: relative;
                margin-right: .5em;
            }

            border: 2px solid var(--orange-color);
            border-radius: 6px;
            padding: 2em;
            background-color: #fff;
            font-size: 1em;
            font-weight: 400;
            position: relative;
            margin-bottom: 1em;

            @media (width: 600px) {
                padding: 1em;
            }

            h3 {
                display: inline-block;
                font-size: 1.2rem;
                font-weight: 600;
                margin: 0 0 .25em;

            }

            p {
                margin: 0;
            }

            p.btn {
                margin: 1em 0 0;
            }

            &:not(:last-child)::after {
                content: "";
                position: absolute;
                display: inline-block;
                width: 2px;
                height: 1em;
                background: var(--orange-color);
                bottom: calc(-1em - 2px);
                left: 0;
                right: 0;
                margin: 0 auto;
            }
        }
    }
}

/* reading & news*/
.page_reading, .news_content {
    h2 {
        margin: 4em 0 1em;
        border: 0;
        padding: 0;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: baseline;
        -ms-flex-align: baseline;
        align-items: baseline;
        text-align: left;
        word-break: break-word;

        &::before {
            content: "";
            width: 1em;
            height: 4px;
            display: inline-block;
            margin-right: .5em;
            position: relative;
            bottom: .25em;
            background-color: var(--orange-color);
        }
    }
}

.news_content {
    margin-bottom: 8em;
}

.posts-navigation {
    margin: 32px 0 64px;
}

.screen-reader-text {
    display: none;
}

.nav-top {
    text-align: center;

    a {
        background-color: var(--accent-color);
        color: #fff;
        border-radius: 4px;
        font-size: 1em;
        position: relative;
        display: -webkit-inline-box;
        display: -ms-inline-flexbox;
        display: inline-flex;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        -webkit-transition: opacity .2s;
        transition: opacity .2s;
        padding: .8em 1em;
        text-decoration: none;
        font-weight: 500;

        &:hover {
            opacity: .8;
        }
    }
}

/* exclusive */
.page_exclusive {
    width: min(100%, 640px);

    /* input {
        border: 1px solid #222;

        &[type="submit"] {
            margin: 0 auto;
            display: -webkit-box;
            display: -ms-flexbox;
            display: flex;
            padding: 1em 2em;
            border: 0;
            background-color: var(--accent-color);
            color: #fff;
            border-radius: 4px;
            font-size: 1.2em;
            position: relative;
            cursor: pointer;

        }
    } */

    /* .post-password-form {
        display: grid;
        grid-template-columns: 1fr 150px;
        grid-template-rows: 50px;
    } */
    label {
        display: inline;
        margin-bottom: .5em;
        font-size: 1.1em;
        font-weight: 600;
    }

    .post-password-form input[type="password"] {
        display: inline-block;
        padding: .5em;
        margin-bottom: 2em;
        width: min(100%, 15em);
        border: 1px solid #222;
    }

    .post-password-form input[type="submit"] {
        border: none;
        color: #fff;
        background: var(--accent-color);
        cursor: pointer;
        padding: .5em 1em;
        border-radius: 4px;
        -webkit-transition: opacity .2s;
        transition: opacity .2s;

        &:hover {
            opacity: .8;
        }
    }
}
