main {
    display: flex;
    flex-direction: column;
    gap: 4rem;

    & .flex-column-01,
    & .flex-column-02 {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    & .flex-column-01 {
        gap: 2rem;
    }

    & h2 {
        font-size: 1.375rem;
        font-weight: bold;
    }

    & .centering {
        display: flex;
        justify-content: center;
    }

    & .list-link {
        display: flex;
        justify-content: flex-end;
    }

    & .list-link a {
        padding-block: 0.25rem;
        padding-inline: 0.75rem 1rem;
        background-color: var(--color-1);
        border-radius: 9999px;
    }

    & .bg-light-blue {
        padding: 4rem 0;
    }
}

#top-timeline-header {
    align-items: flex-start;
    margin-bottom: -2rem;

    & .breadcrumb {
        overflow-x: auto;
        overflow-y: hidden;
        display: flex;
        align-items: center;
        line-height: 1;
        white-space: nowrap;
    }

    & img {
        width: 100%;
        max-height: 2.625rem;
    }
}

#topics {
    & > .splide {
        display: flex;
        flex-direction: column;
        gap: 2rem;

        & > .splide__track {
            overflow: hidden;

            & > .splide__list {
                display: flex;

                & > .splide__slide {
                    position: relative;
                    flex-shrink: 0;
                    width: calc((100% - 8rem) / 4);
                    margin-right: 2rem;
                    background-color: var(--color-1);
                    border-radius: calc(var(--border-radius) * 4);
                    overflow: hidden;

                    &:not(.is-active)::before {
                        pointer-events: none;
                        position: absolute;
                        content: "";
                        top: 0;
                        left: 0;
                        z-index: 2;
                        height: 100%;
                        width: 100%;
                        background-color: rgb(255 255 255 / 50%);
                    }

                    & > .category {
                        position: absolute;
                        top: 1rem;
                        left: 50%;
                        transform: translateX(-50%);
                        display: flex;
                        justify-content: center;
                        min-width: 70%;
                        padding: 0.5rem 1rem;
                        background-color: var(--color-1);
                        border-radius: 9999px;
                        line-height: 1;
                    }

                    & > .img > img {
                        width: 100%;
                        aspect-ratio: 3 / 2;
                        object-fit: cover;
                    }

                    & > .text {
                        flex-grow: 1;
                        justify-content: space-between;
                        gap: 0.5rem;
                        padding-inline: 1rem;
                        padding-block: 1rem 1.5rem;

                        & > .main-text {
                            gap: 0.5rem;

                            & .title {
                                font-size: 1.125rem;
                                font-weight: bold;
                            }

                            & > .description {
                                overflow: hidden;
                                text-overflow: ellipsis;
                                display: -webkit-box;
                                -webkit-line-clamp: 3;
                                -webkit-box-orient: vertical;
                                font-size: 0.875rem;
                            }
                        }

                        & > .flex-end {
                            display: flex;
                            justify-content: flex-end;
                        }
                    }
                }
            }

            & > .splide__sr {
                display: none;
            }
        }

        & > .splide__arrows {
            display: flex;
            justify-content: center;
            gap: 2rem;

            & > .splide__arrow--prev,
            & > .splide__arrow--next {
                display: flex;
                justify-content: center;
                align-items: center;
                font-size: 1.5rem;
                line-height: 1;
                color: var(--color-1);
                border-radius: 50%;
                background-color: var(--text-color-2);
                width: 2rem;
                height: 2rem;
                aspect-ratio: 1;
            }

            & > .splide__arrow--prev {
                transform: rotate(180deg);
            }

            & > .splide__pagination {
                display: flex;
                justify-content: center;
                align-items: center;
                flex-wrap: wrap;
                gap: 0.75rem 1rem;
                line-height: 1;

                & button {
                    display: inline-block;
                    width: 1em;
                    height: 1em;
                    border: 0.0625rem solid var(--text-color);
                    border-radius: 50%;
                    background-color: var(--color-1);

                    &.is-active {
                        background-color: var(--text-color);
                    }
                }
            }
        }
    }
}

#articles {
    & .articles-inner {
        display: flex;
        flex-wrap: wrap;
        gap: 2rem;

        & .content-wrapper {
            position: relative;
            width: calc((100% - 2rem) / 2);
            padding-block: 1rem 1.25rem;
            padding-inline: 1rem;
            overflow: hidden;

            &::before,
            &::after {
                pointer-events: none;
                content: "";
                position: absolute;
            }

            &::before {
                top: 0;
                left: 0;
                z-index: 1;
                width: 100%;
                height: 100%;
                border: 1px solid;
                border-radius: var(--border-radius);
            }

            &::after {
                top: -2rem;
                right: -2rem;
                z-index: 2;
                width: 3.5rem;
                height: 3.5rem;
                background: var(--color-1);
                border-bottom: 1px solid;
                transform: rotate(45deg);
            }

            & .heading {
                display: flex;
                gap: 0.5rem;
                font-size: 1.375rem;
                font-weight: bold;

                &::before {
                    content: "";
                    flex-shrink: 0;
                    position: relative;
                    top: 0.25em;
                    display: inline-block;
                    width: 1em;
                    height: 1em;
                    background-color: var(--text-color);
                    border-radius: var(--border-radius);
                }

                &.community-welfare::before {
                    background-color: #9ec65d;
                }

                &.volunteer::before {
                    background-color: #da7099;
                }

                &.donation::before {
                    background-color: #4b8ac8;
                }

                &.training::before {
                    background-color: #397289;
                }

                &.human-resources::before {
                    background-color: #e8ac32;
                }

                &.loan::before {
                    background-color: #b8a1c2;
                }

                &.independence-support-and-adult-guardianship::before {
                    background-color: #dcac93;
                }

                &.column::before {
                    background-color: #b29f21;
                }

                &.rental-conference-room::before {
                    background-color: #ac7464;
                }

                &.news::before {
                    background-color: #39b9a6;
                }

                &.various-organizations::before {
                    background-color: #d8d1be;
                }
            }

            & .content {
                & li {
                    display: inline-flex;
                    gap: 0.25rem 0.5rem;

                    & .date {
                        flex-shrink: 0;
                    }

                    & .title .icon-external-link {
                        margin-left: 0.25rem;
                    }
                }
            }

            & .list-link {
                border-top: 1px dashed;
                padding-block-start: 1rem;
                margin-block-start: auto;
            }
        }
    }
}

#special-feature {
    & .content-wrapper {
        display: flex;
        gap: 2rem;

        & .content {
            gap: 0;
            width: calc((100% - 6rem) / 4);
            background-color: #fff;
            border-radius: calc(var(--border-radius) * 4);
            overflow: hidden;

            & .img img {
                width: 100%;
                aspect-ratio: 3 / 2;
                object-fit: cover;
            }

            & .text {
                flex-grow: 1;
                justify-content: space-between;
                gap: 0.5rem;
                padding-inline: 1rem;
                padding-block: 1rem 1.5rem;

                & .main-text {
                    gap: 0.5rem;

                    & .title {
                        font-size: 1.125rem;
                        font-weight: bold;
                    }

                    & .description {
                        overflow: hidden;
                        text-overflow: ellipsis;
                        display: -webkit-box;
                        -webkit-line-clamp: 1;
                        -webkit-box-orient: vertical;
                        font-size: 0.875rem;
                    }
                }
            }
        }
    }
}

#magazine {
    & .content-wrapper {
        display: flex;
        flex-wrap: wrap;
        gap: 2rem;

        & .content {
            width: calc((100% - 6rem) / 4);
            border-radius: calc(var(--border-radius) * 4);
            overflow: hidden;

            & .img img {
                width: 100%;
                aspect-ratio: 1 / 1.414;
                object-fit: cover;
            }
        }
    }
}

#sns {
    & .content-wrapper {
        & h3 {
            width: 100%;
            padding: 1rem;
            margin-block-end: -0.25rem;
            background-color: var(--background-color-1);
            border-radius: calc(var(--border-radius) * 4);
            color: var(--text-color-2);
            font-size: 1.375rem;
            font-weight: bold;

            &:not(:first-of-type) {
                margin-block-start: 1rem;
            }
        }

        & .content {
            display: flex;
            flex-direction: row;
            flex-wrap: wrap;
            gap: 2rem 3rem;
            margin: 0.5rem 1rem 0 1rem;

            & .link-box {
                display: flex;
                align-items: center;
                flex-wrap: wrap;
                gap: 1rem;

                & .img img {
                    width: auto;
                    height: 3rem;
                }

                & .text {
                    line-height: 1.5;
                }
            }
        }
    }
}

#contact h2 {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--text-color-2);
    border-radius: calc(var(--border-radius) * 4);
    color: var(--text-color-2);
}

@media only screen and (min-width: 1025px) {
    #topics {
        & > .splide {
            & > .splide__track {
                & > .splide__list {
                    & > .splide__slide {
                        &:is(.is-next, .is-prev)::before {
                            content: unset;
                        }
                    }
                }
            }
        }
    }

    #contact .content {
        margin-left: 1rem;
        margin-right: 1rem;
    }
}

@media only screen and (max-width: 1024px) {
    main {
        margin-block-start: 1rem;
    }

    #topics {
        & > .splide {
            & > .splide__track {
                & > .splide__list {
                    & > .splide__slide {
                        margin-right: 1rem;
                        width: min(25rem, calc(100% - 4rem));
                    }
                }
            }

            & > .splide__arrows {
                gap: 1rem;
            }
        }
    }

    #articles {
        & .articles-inner {
            flex-direction: column;

            & .content-wrapper {
                width: 100%;

                & .content {
                    & li {
                        flex-direction: column;
                    }
                }
            }
        }
    }

    #special-feature {
        & .content-wrapper {
            flex-direction: column;

            & .content {
                width: 100%;
            }
        }
    }

    #magazine {
        & .content-wrapper {
            gap: 1rem;

            & .content {
                width: calc((100% - 1rem) / 2);
            }
        }
    }
}
