#facilities_box {
    display: grid;
    grid-template-columns: 800px auto;
    gap: 4em;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: start;

    @media (width < 1100px) {
        grid-template-columns: 1fr;
    }
}


#facilities_nav {
    background-color: #fff;
    border: 1px solid var(--border-color);
    padding: 2em 1em;
    border-radius: 4px;

    .area-item {
        grid-template-columns: 1fr;
    }
}

.facility_content {
    background-color: #fff;
    padding: 2em 2em 4em;
    border: 1px solid var(--border-color);
    width: 100%;
    border-radius: 4px;
    margin-bottom: 4em;

    @media (width < 600px) {
        padding: 2em 1em 4em;
    }

    .post_header {
        margin-bottom: 1em;

        h1#facility_title {
            font-size: 1.6em;
            font-weight: 600;
            line-height: 1.5;

            @media (width < 600px) {
                font-size: 1.5em;
            }

        }

        p {
            margin: .5em 0;
        }

        .categories {

            a {
                display: inline-block;
                background-color: var(--yellow-color);
                padding: .2em .5em .3em;
                border-radius: 2px;
                margin-right: .5em;
                text-decoration: none;
                font-size: .9em;
                font-weight: 500;
                line-height: 1;
                color: var(--font-color);
                -webkit-transition: background-color .2s;
                transition: background-color .2s;

                &:hover {
                    background-color: color-mix(in srgb, var(--yellow-color) 60%, #fff);
                }

                &[class^="cat-area-"] {
                    background-color: var(--green-color);

                    &:hover {
                        background-color: color-mix(in srgb, var(--green-color) 60%, #fff);
                    }
                }
            }
        }

        .time {
            border-bottom: 2px dotted var(--border-color);

        }


        h2.facility_title {
            font-size: 1.6em;
            margin: 3em 0 1em;
            position: relative;
            border: 0;
            padding: 0;
            text-align: left;
            word-break: break-word;

            &::before {
                position: relative;
                content: "";
                background-color: var(--orange-color);
                width: 20px;
                height: 4px;
                display: inline-block;
                margin-right: .5em;
                top: -.25em;
            }

            &:first-child {
                margin-top: 0;
            }

            &.facility_title::before {
                -webkit-mask-image: url(../images/icons/arrow.svg);
                mask-image: url(../images/icons/arrow.svg);
                width: 1.2em;
                height: 1.2em;
                -webkit-mask-repeat: no-repeat;
                mask-repeat: no-repeat;
                -webkit-mask-size: contain;
                mask-size: contain;
                display: inline-block;
                top: .25em;
            }

            @media (width < 600px) {
                font-size: 1.5em;
            }
        }
    }

    h2 {
        margin: 4em 0 1em;
        border: 0;
        padding: 0;
        font-size: 1.2em;
        text-align: left;

        &::after {
            content: none;
        }

        &::before {
            content: "";
            position: relative;
            display: inline-block;
            width: 1em;
            height: 4px;
            background-color: var(--orange-color);
            margin-right: .5em;
            bottom: .25em;
        }

        &:first-child {
            margin-top: 1em;
        }
    }

    ul, ol {
        line-height: 1.75;
        padding-left: 1.5em;

        li {
            margin-bottom: 1em;
        }
    }

    .search-header & {
        ul, ol {
            li {
                margin-bottom: .5em;
            }
        }
    }

    table {
        border-collapse: collapse;
        width: 100%;
        line-height: 1.75;
        border-top: 1px solid var(--border-color);
        margin-bottom: 2em;

        &:last-child {
            margin-bottom: 0;
        }

        th, td {
            padding: .8em 0 .8em;
            border-bottom: 1px solid var(--border-color);
            vertical-align: top;
        }

        th {
            text-align: left;
            padding: .8em .8em .8em 0;
            width: 9em;
        }

        @media (width < 600px) {

            th, td {
                display: list-item;
                list-style: none;
                border-bottom: 0;
                width: 100%;

            }

            th {
                padding: .5em 0 0;

                br {
                    display: none;
                }

            }

            td {
                padding: 0;
                position: relative;

                &:last-child {
                    padding: 0 0 .5em;
                }

                a {
                    margin-right: .5em;
                }
            }


            tr {
                border-bottom: 1px solid var(--border-color);

                &:has([rowspan]) {
                    border-bottom: 0;
                }
            }
        }
    }

}

/* table */
table.page_table {
    border-collapse: collapse;
    width: 100%;
    line-height: 1.75;

    th, td {
        padding: .8em 0 .8em;
        vertical-align: top;
        border: 1px solid var(--border-color);
        padding: .8em;
    }

    th {
        text-align: center;
        width: 9em;
        background-color: var(--yellow-color);

    }

    @media (width < 600px) {
        thead {
            display: none;
        }

        th, td {
            display: list-item;
            list-style: none;
            width: 100%;

        }


        td {
            position: relative;
            border-bottom: 0;

            &[aria-label]::before {
                position: relative;
                content: attr(aria-label)":";
                margin-right: .5em;
                min-width: 2em;
                display: inline-block;
            }

            &:first-child {
                font-weight: 600;
                background-color: var(--yellow-color);
                text-align: center;
            }

            &:last-child {
                border-bottom: 1px solid var(--border-color);
            }

            a {
                margin-right: .5em;
            }

            br {
                display: none;
            }
        }


        tr {
            display: block;
            margin-bottom: 2em;

            &:has([rowspan]) {
                margin-bottom: 0;
            }
        }
    }
}


/* archive */
.facility_content .archive_table {
    th {
        width: 5em;
    }
}

/* sidebar */
#facilities_nav {
    .category-children:not([hidden]) {
        display: block;
    }

    .tag-item {
        display: block;
    }
}

/* pagination */
.pagination {
    margin: 2em auto 4em;
    width: 100%;
    font-weight: 600;

    a {
        color: var(--accent-color);
    }

    .nav-links {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
        gap: .5em;
    }

    .page-numbers {
        display: inline-block;
        padding: .65em 1em;
        text-align: center;
        text-decoration: none;
        border: 1px solid var(--accent-color);
        -webkit-transition: all .2s;
        transition: all .2s;
        background-color: #fff;

        &.dots {
            background-color: #fff;
            color: var(--accent-color);
        }
    }

    span.page-numbers, a:hover {
        background-color: var(--accent-color);
        color: #fff;
    }

    @media (width < 600px) {
        a.page-numbers:not(.prev):not(.next), span.page-numbers.dots {
            display: none;
        }
    }
}

/* gallery */
.gallery {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 1em;

    dl {
        margin: 0;
    }

    img {
        border: 0;
        border-radius: 4px;
        outline: 4px solid transparent;
        outline-offset: -4px;
        -webkit-transition: all .2s;
        transition: all .2s;
    }

    a {
        &:hover img {
            outline-color: var(--orange-color);
            opacity: .8;
        }
    }

    br {
        display: none;
    }

    @media (width < 500px) {
        display: grid;
        grid-template-columns: 1fr 1fr;

        img {
            max-width: 100%;
            height: auto;
        }

    }

}