@charset "UTF-8";

#links {
    position: relative;
    z-index: 2;
    margin-top: 106px;
    margin-bottom: 186px;

    @media screen and (max-width: 767px) {
        margin-top: 50px;
        margin-bottom: 50px;
    }

    & ul {
        display: flex;
        flex-wrap: wrap;
        width: 100%;

        @media screen and (max-width: 1080px) {
            margin: 0 auto;
            max-width: 767px;
        }

        @media screen and (max-width: 530px){
            max-width: 375px;
        }

        & li {
            width: calc((100% - (30px * 2)) / 3);

            @media screen and (max-width: 1080px) {
                width: calc((100% - (30px)) / 2);
            }

            @media screen and (max-width: 767px) {
                width: calc((100% - (15px)) / 2);
            }

            @media screen and (max-width: 530px) {
                width: 100%;
            }

            &:nth-child(n + 4) {
                margin-top: 60px;
            }

            &:not(:nth-child(3n + 1)) {
                margin-left: 30px;
            }

            @media screen and (max-width: 1080px) {
                &:nth-child(n + 3) {
                    margin-top: 60px;
                }

                &:not(:nth-child(3n + 1)) {
                    margin-left: 0;
                }

                &:not(:nth-child(2n + 1)) {
                    margin-left: 30px;
                }
            }

            @media screen and (max-width: 767px) {
                &:nth-child(n + 3) {
                    margin-top: 40px;
                }

                &:not(:nth-child(2n + 1)) {
                    margin-left: 15px;
                }
            }

            @media screen and (max-width: 530px){
                &:not(:first-child){
                    margin-left: 0;
                    margin-top: 30px;
                }
            }

            & a {
                width: 100%;

                .img {
                    overflow: hidden;
                    width: 100%;

                    & img {
                        width: 100%;
                        transition: transform 0.4s ease;
                    }
                }

                .text {
                    display: flex;
                    align-items: center;
                    margin-top: 14px;

                    @media screen and (max-width: 767px){
                        margin-top: 10px;
                    }

                    .main {
                        margin-right: 16px;
                        font-family: "Noto Sans JP";
                        font-weight: bold;
                        font-size: 24px;
                        letter-spacing: 0.05em;
                        line-height: 28px;
                        text-align: left;
                        color: #000;

                        @media screen and (max-width: 767px) {
                            margin-right: 10px;
                            font-size: 18px;
                            line-height: 28px;
                        }
                    }

                    .mark {
                        display: flex;
                        flex-shrink: 0;
                        align-items: center;
                        justify-content: center;
                        width: 25px;
                        height: 25px;
                        background-color: #198EC5;
                        border-radius: 50%;

                        @media screen and (max-width: 767px) {
                            width: 20px;
                            height: 20px;
                        }

                        &::before {
                            content: "";
                            width: 6px;
                            height: 6px;
                            border-top: 2px solid #fff;
                            border-right: 2px solid #fff;
                            transform: rotate(45deg);
                        }
                    }
                }
            }

            @media (hover: hover) and (pointer: fine) {
                & a:hover .img img {
                    transform: scale(1.1, 1.1);
                    transition: transform 0.4s ease;
                }
            }
        }
    }
}