/**
* Front Page CSS
* TOPページのスタイル
*/
main {
    & .site-container {
        .contents-container {
            padding: 0;
            max-width: 1100px;

            .flickity-page-dots {
                bottom: -33px;
                line-height: 1;
                margin-bottom: 0;
            }
        }
    }
}

#top {
    .tab-container {
        max-width: initial;
    }

    .tab-list {
        grid-template-columns: repeat(3, 1fr);
        margin: 0 auto;
        padding: 0 clamp(0.938rem, 0.375rem + 2.4vw, 1.875rem);
        max-width: 1000px;

        .tab-list__item {
            display: block;
            border-radius: 9999px;
            height: clamp(3.75rem, 3.563rem + 0.8vw, 4.063rem);
            width: 100%;

            button {
                display: block;
                width: 100%;
            }
        }
    } /* //.tab-list */

    .tab-contents {
        .tab-contents__pane {
            margin-top: 0;
            padding: 30px 15px;

            &.tab-contents__pane--before {
                background: var(--color-main);
                li { a { &:after { color: var(--color-main); }}}
            }
            &.tab-contents__pane--accepted {
                background: var(--color-sub-green);
                li { a { &:after { color: var(--color-sub-green); }}}
            }
            &.tab-contents__pane--enrolled {
                background: var(--color-sub-pink);
                li { a { &:after { color: var(--color-sub-pink); }}}
            }

            .tab-contents__section-title {
                color: var(--color-sub-yellow);
                font-size: 1.1875rem;
                display: flex;
                align-items: center;
                margin-left: auto;
                margin-right: auto;
                max-width: 550px;

                &:before,
                &:after {
                    content: "";
                    height: 1px;
                    flex-grow: 1;
                    background-color: var(--color-sub-yellow);
                }

                &:before {
                    margin-right: 1rem;
                }

                &:after {
                    margin-left: 1rem;
                }
            }
        }
    } /* //.tab-contents */

    .list-boxed {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(clamp(18.125rem, 13.125rem + 25vw, 29.375rem), 1fr));
        gap: 15px 70px;

        li {
            a {
                background: #FFF;
                border-radius: 40px;
                font-size: clamp(1.5rem, 1.275rem + 0.96vw, 1.875rem);
                line-height: 1.2;
                grid-template-columns: 55px auto 9.7px;
                gap: 8px;
                height: 80px;
                padding: 0 20px 0 15px;
                letter-spacing: -0.5px;

                small {
                    font-size: clamp(1rem, 0.925rem + 0.32vw, 1.125rem);
                }

                &:after {
                    font-size: 1.1rem;
                }
            }
        }
    } /* //.list-boxed */

    .top__preparation-heading {
        text-align: center;
        padding: 0 clamp(0.938rem, 0.375rem + 2.4vw, 1.875rem) clamp(0.938rem, 0.375rem + 2.4vw, 1.875rem);
        max-width: calc(548px + ((clamp(0.938rem, 0.375rem + 2.4vw, 1.875rem)) * 2));
        margin: 0 auto;
    }

    .top-info {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
        gap: clamp(1.5rem, -0.338rem + 7.54vw, 4.375rem);
        align-items: start;
        margin: clamp(0.5rem, 0.2rem + 1.28vw, 1rem) auto 48px;
        padding: 0 15px;
        max-width: 1000px;
    }

    .top-info__univgo {
        margin: auto;
    }

    .top-info__news {
        padding: 0 15px;

        .top-info__news-title {
            border-bottom: 1px solid var(--color-main);
            color: var(--color-main);
            font-size: clamp(1.5rem, 1.38rem + 0.49vw, 1.688rem);
            display: flex;
            justify-content: space-between;

            .top-info__news-link {
                color: var(--color-primary);
                font-size: var(--font-size-base);
                display: grid;
                grid-template-columns: auto clamp(0.438rem, 0.398rem + 0.16vw, 0.5rem);
                align-items: center;
                gap: 8px;
                width: fit-content;

                &:after {
                    content: "\f0da";
                    color: var(--color-main);
                    font-family: "Font Awesome 6 Free";
                    font-weight: 900;
                }
            } /* //.top-info__news-link */
        } /* //.top-info__news-title */

        .top-info__news-list {
            display: block;
            height: clamp(8.438rem, 7.638rem + 3.28vw, 9.688rem);
            padding-left: 16px 0 0 clamp(1.25rem, 1.09rem + 0.66vw, 1.5rem);
            overflow: scroll;

            &::-webkit-scrollbar {
                background: #B2D9F0;
                width: 2px;
                height: 0;
            }
            &::-webkit-scrollbar-thumb {
                background: var(--color-main);
            }

            .top-info__news-item {
                .top-info__news-date {
                    display: block;
                    font-size: clamp(0.75rem, 0.67rem + 0.33vw, 0.875rem);
                }

                .top-info__news-text {
                    border-bottom: 1px solid var(--color-primary);
                    display: block;
                    font-size: var(--font-size-base);
                    font-weight: 700;
                    margin-bottom: 8px;
                    width: 95%;
                }
            } /* //.top-info__news-item */
        } /* //.top-info__news-list */
    } /* //.top-info__news */

    .top-contact {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: clamp(0.875rem, -1.363rem + 9.18vw, 4.375rem);
        align-items: start;
        margin: 0 auto clamp(3.125rem, 2.126rem + 4.1vw, 4.688rem);
        padding: 0 clamp(0.938rem, 0.375rem + 2.4vw, 1.875rem);
        max-width: 1000px;

        .top-contact__item {
            border: 2px solid var(--color-main);
            border-radius: 15px;
            padding: clamp(0.938rem, 0.538rem + 1.64vw, 1.563rem) clamp(0.625rem, 0.026rem + 2.46vw, 1.563rem) calc(clamp(0.938rem, 0.538rem + 1.64vw, 1.563rem) + clamp(2.188rem, 1.788rem + 1.64vw, 2.813rem));
            display: grid;
            grid-template-rows: subgrid;
            grid-row: span 3;
            position: relative;

            .top-contact__title {
                font-size: clamp(1.25rem, 0.85rem + 1.64vw, 1.875rem);
                display: grid;
                grid-template-rows: subgrid;
                grid-row: span 2;
                align-items: center;
                gap: clamp(1.063rem, 0.743rem + 1.31vw, 1.563rem);
                margin: 0 auto;
                text-align: center;
                width: fit-content;

                img {
                    margin: auto;
                }
            } /* //.top-contact__title */

            .top-contact__action {
                background: var(--color-main);
                border-radius: 0 0 12px 12px;
                position: absolute;
                left: 0;
                bottom: 0;
                width: 100%;

                .btn {
                    font-size: clamp(0.875rem, 0.715rem + 0.66vw, 1.125rem);
                    height: clamp(2.188rem, 1.788rem + 1.64vw, 2.813rem);
                    padding: 0;
                    width: 100%;

                    &:active {
                        border: none;
                        color: #FFF;
                    }
                }
            } /* //.top-contact__action */

            .top-contact__description {
                line-height: 1.5;
            }
        } /* //.top-contact__item */
    } /* //.top-contact */

    .top-faq {
        margin: 0 auto;
        padding: 0 clamp(0.938rem, 0.375rem + 2.4vw, 1.875rem);

        &.mb-6 {
            margin-bottom: 4rem;
        }

        .top-faq__button {
            position: relative;

            &:before {
                content: '';
                background: url(../images/icon_qa.svg) no-repeat center center;
                background-size: contain;
                position: absolute;
                top: -14px;
                left: calc(50% - 110px);
                transform: translateX(-50%);
                width: clamp(4.375rem, 3.176rem + 4.92vw, 6.25rem);
                height: clamp(3.813rem, 2.654rem + 4.75vw, 5.625rem);
            }

            .top-faq__link {
                background: var(--color-main);
                border-radius: 15px;
                color: #FFF;
                display: block;
                margin: auto;
                padding: clamp(1.25rem, 1.05rem + 0.82vw, 1.563rem) clamp(0.625rem, 0.026rem + 2.46vw, 1.563rem);

                text-align: center;
                max-width: 360px;

                .top-faq__title {
                    display: block;
                    font-size: clamp(1.25rem, 0.85rem + 1.64vw, 1.875rem);
                    margin: auto;
                    width: fit-content;
                }

                .top-faq__description {
                    font-size: clamp(0.875rem, 0.755rem + 0.49vw, 1.063rem);
                    letter-spacing: -0.6px;
                }
            } /* //.top-faq__link */
        } /* //.top-faq__button */
    } /* //.top-faq */

    .top-blog {
        --container-height: 605px;

        height: var(--container-height);
        position: relative;

        .top-blog__contents {
            position: absolute;
            width: 100%;
            z-index: 100;

            .top-blog__greeting {
                padding-top: clamp(4.688rem, 3.489rem + 4.92vw, 6.563rem);
                padding-bottom: 32px;
                text-align: center;

                .top-blog__heading {
                    font-size: clamp(1.5rem, 1.02rem + 1.97vw, 2.25rem);
                }
                .top-blog__text {
                    font-size: var(--font-size-base);
                }
            }
        } /* //.top-blog__contents */

        .top-blog__bg {
            background-color: var(--color-sub-yellow);
            margin-top: clamp(6.938rem, 4.1rem + 11.64vw, 11.375rem);
            position: relative;
            height: var(--container-height);
            width: 100%;

            &:before {
                content: "";
                position: absolute;
                top: calc(clamp(7.625rem, 5.667rem + 8.03vw, 10.688rem) - (clamp(7.625rem, 5.667rem + 8.03vw, 10.688rem) * 1.5));
                left: 50%;
                transform: translateX(-50%);
                background: url(../images/icon_lead.svg) center center no-repeat;
                background-size: cover;
                width: clamp(7.625rem, 5.667rem + 8.03vw, 10.688rem);
                height: clamp(8.313rem, 6.235rem + 8.52vw, 11.563rem);
            }
        } /* //.top-blog__bg */

        .blog-tag {
            display: flex;
            flex-wrap: nowrap;
            overflow-x: auto;
            gap: 10px;
            padding: 20px 0 10px;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: thin;

            /* スクロールバーを非表示にする場合（オプション） */
            -ms-overflow-style: none; /* IE/Edge */
            scrollbar-width: none; /* Firefox */
            &::-webkit-scrollbar {
                display: none; /* Chrome/Safari */
            }

            .blog-tag__item {
                display: inline-block;
                border: 1px solid var(--color-primary);
                border-radius: 15px;
                font-size: 13px;
                padding: 4px 24px;
                white-space: nowrap;
            }
        } /* //.blog-tag */

        .top-blog__more-link {
            display: block;
            font-size: var(--font-size-base);
            font-weight: 700;
            margin: 15px 20px 0 auto;
            width: fit-content;

            &:after {
                content: "\f0da";
                color: var(--color-main);
                font-family: "Font Awesome 6 Free";
                font-weight: 900;
                margin-left: 8px;
            }
        } /* //.top-blog__more-link */
    } /* //.top-blog */

    /* ---------- カルーセル ---------- */
    .carousel {
        margin-left: auto;
        margin-right: auto;
        padding: 0 15px;
        max-width: 1000px;

        .carousel-cell {
            width: 100%;
        }

        .flickity-page-dots .dot {
            background: var(--color-main);
        }
    }


    .blog-carousel {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 21px;
        padding: 0 15px 20px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;

        /* スクロールバーを非表示にする場合（オプション） */
        -ms-overflow-style: none; /* IE/Edge */
        scrollbar-width: none; /* Firefox */

        &::-webkit-scrollbar {
            display: none; /* Chrome/Safari */
        }

        .carousel-cell {
            flex: 0 0 auto;
            width: 240px; /* 固定幅 */

            img {
                height: 180px;
                width: 240px;
                object-fit: cover;
                border-radius: 15px;
            }

            a {
                display: block;
                width: 240px;

                p {
                    font-size: clamp(0.875rem, 0.795rem + 0.33vw, 1rem);
                    font-weight: 500;
                    line-height: 1.4;
                    letter-spacing: 0;
                    margin-top: 20px;
                    margin-bottom: 0;
                    text-align: center;

                    span {
                        display: block;
                        font-size: 10px;
                        margin-top: 10px;
                    }
                } /* //.carousel-cell p */
            } /* //.carousel-cell a */
        } /* //.carousel-cell */
    } /* //.blog-carousel */
}




/**
* Media Queries
*/
@media (min-width: 768px) {
    main {
        & .site-container {
            .contents-container {
                padding: 0 clamp(0.938rem, 0.375rem + 2.4vw, 1.875rem);
            }
        }
    }

    #top {
        .tab-list {
            margin-bottom: 8px;
            padding: 0;
        }

        .tab-contents {
            .tab-contents__pane {
                border-radius: 30px;
            }
        }

        .list-boxed {
            li {
                a {
                    gap: 14px;
                    letter-spacing: normal;
                }
            }
        }

        .top-info { padding: 0; }
        .top-info__news { padding: 0; }
        .carousel { padding: 0; }

        .top-contact {
            .top-contact__item {
                grid-row: span 2;
                gap: 20px;

                .top-contact__title {
                    grid-template-rows: initial;
                    grid-row: initial;
                    &.top-contact__title--document {
                        grid-template-columns: clamp(6.563rem, 6.363rem + 0.82vw, 6.875rem) auto;
                    }

                    &.top-contact__title--line {
                        grid-template-columns: clamp(4.688rem, 4.488rem + 0.82vw, 5rem) auto;
                    }
                } /* //.top-contact__title */

                .top-contact__description {
                    line-height: 1.8;
                }
            } /* //.top-contact__item */
        } /* //.top-contact */

        .top-faq {
            .top-faq__button {
                &:before {
                    top: -36px;
                    left: calc(50% - 280px);
                    transform: translateX(-50%);
                }

                .top-faq__link {
                    max-width: 700px;
                }
            }
        } /* //.top-faq__button */

        .top-blog {
            --container-height: 695px;

            background-color: initial;
            position: relative;
            width: 100%;

            .top-blog__bg {
                background-color: var(--color-sub-yellow);
                mix-blend-mode: multiply;
                display: block;
                position: relative;
                top: 0;
                left: 50%;
                transform: translateX(-50%);
                width: 100vw;
            }
        } /* //.top-blog */
    }
}

@media (min-width: 1040px) {
    #top {
        .blog-carousel {
            position: relative;
            right: 0;
            width: calc(100vw - (100vw - 1040px) / 2);
            padding-left: 0;

            .carousel-cell {
                &:last-child {
                    margin-right: 35px;
                }
            }

            /* PCサイズではスクロールバーを表示（オプション） */
            /* &::-webkit-scrollbar {
                display: block;
                height: 4px;
            }

            &::-webkit-scrollbar-track {
                background: #f1f1f1;
                border-radius: 2px;
            }

            &::-webkit-scrollbar-thumb {
                background: #888;
                border-radius: 2px;
            }

            &::-webkit-scrollbar-thumb:hover {
                background: #555;
            } */
        }

        .blog-tag {
            position: relative;
            right: 0;
            overflow: scroll;
            width: calc(100vw - (100vw - 1040px) / 2);

            .blog-tag__item {
                &:last-child {
                    margin-right: 56px;
                }
            }
        }

        .top-blog__more-link {
            margin: 15px 0 0 auto;
        } /* //.top-blog__more-link */
    }
}