@import url('https://fonts.googleapis.com/css2?family=Homemade+Apple&display=swap');

#open-campus {
    font-family: "Hiragino Mincho ProN W3";
    width: 100%;
    display: flex;
    flex-direction: column;
    background: white;
    flex: 1;

    h2 {
        font-family: 'Bayon', sans-serif;
        font-size: 24px;
        font-weight: 600;
        margin-bottom: 30px;
        line-height: 1.5;
        margin-right: auto;
    }

    #sec-title {
        position: relative;
        width: 100%;
        height: 680px;
        display: flex;
        align-items: center;
        overflow: hidden;

        .background-video {
            position: absolute;
            right: 0;
            width: 70%;
            height: 100%;
            overflow: hidden;

            .youtube-wrapper {
                width: 100%;
                height: 100%;

                .youtube-overlay {
                    position: absolute;
                    z-index: 2;
                    top: 0;
                    left: 0;
                    width: 100%;
                    height: 100%;
                    background-color: rgba(0, 0, 0, 0);
                }

                .youtube-container {
                    position: absolute;
                    z-index: 1;
                    top: 0;
                    left: 0;
                    overflow: hidden;
                    aspect-ratio: 16 / 9;
                    width: 100%;
                    height: 100%;
                    min-width: 100%;
                    min-height: 100%;
                    margin: 0 auto;

                    iframe {
                        position: absolute;
                        top: 50%;
                        left: 50%;
                        height: 56.25vw; /* 16:9 ratio */
                        min-height: 100%;
                        min-width: 177.77vh; /* 16:9 ratio */
                        transform: translate(-50%, -50%);
                    }
                }
            }
        }

        .title-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 5;
            display: flex;
            flex-direction: column;

            .title-text {
                margin: auto 0;
                margin-left: 20px;
                padding-top: 60px;
                color: black;

                h1 {
                    width: fit-content;
                    font-size: 60px;
                    padding-bottom: 5px;
                    border-bottom: 10px solid black;
                    margin-bottom: 30px;
                    margin-right: 40px;
                    text-shadow: 2px 2px 10px white;
                    font-family: 'Bayon', sans-serif;
                }

                p {
                    font-size: 24px;
                    font-weight: 600;
                    line-height: 1.5;
                    text-shadow: 1px 1px 5px white;
                }
            }

            .overlay-cards {
                /* position: absolute; */
                /* bottom: 10px; */
                width: 100%;
                /* right: 20px; */
                padding-right: 20px;
                padding-bottom: 20px;
                /* margin-bottom: 10px; */
                /* z-index: 10; */
                display: flex;
                justify-content: flex-end;
                gap: 20px;

                .overlay-card {
                    border-top: 10px solid #B4FFFE;
                    background: rgba(255, 255, 255, 0.95);
                    border-radius: 10px;
                    padding: 15px;
                    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
                    backdrop-filter: blur(10px);
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                    gap: 10px;

                    .card-top {
                        display: flex;
                        flex-direction: row;
                        align-items: flex-end;

                        .year-month {
                            display: flex;
                            flex-direction: column;
                            align-items: flex-start;

                            .year {
                                font-size: 14px;
                                font-weight: 600;
                            }

                            .month {
                                font-size: 24px;
                                font-weight: 800;
                                margin-right: 5px;
                                margin-bottom: 5px;

                                .slash {
                                    font-weight: 800;
                                    margin-left: 2px;
                                }
                            }
                        }

                        .date-container {
                            display: flex;
                            flex-direction: column;
                            align-items: flex-end;

                            .date {
                                font-size: 36px;
                            }
                        }
                    }

                    .card-bottom {
                        display: flex;
                        flex-direction: column;
                        align-items: center;
                        gap: 10px;

                        .time {
                            font-size: 18px;
                        }

                        .place {
                            font-size: 12px;
                        }
                    }
                }
            }
        }


    }

    #sec-events {
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 20px 80px;

        & p {
            font-family: "ヒラギノ明朝 ProN W3", "HiraMinProN-W3", "HG明朝E", "ＭＳ Ｐ明朝", "MS PMincho", "MS 明朝", serif;
            font-size: 18px;
            line-height: 1.5;
            margin-bottom: 40px;

            .logo {
                width: 26px;
                height: 26px;
                margin: 0 3px;
                padding-top: 6px;
            }
        }

        .event-card {
            width: 100%;
            max-width: 950px;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            padding: 20px 0;
            border-radius: 10px;
            box-shadow: 2px 2px 10px 0 rgba(0, 0, 0, 0.2);
            border-left: 10px solid #B4FFFE;

            .event-card-left {
                display: flex;
                flex-direction: column;
                padding-left: 20px;
                min-width: 200px;

                /* border-right: 1px solid black; */
                .date-containers {
                    display: flex;
                    flex-direction: row;
                    margin-bottom: 5px;
                    align-items: flex-end;

                    .year-month {
                        display: flex;
                        flex-direction: column;
                        align-items: flex-start;

                        .year {
                            font-size: 14px;
                            font-weight: 600;
                        }

                        .month {
                            font-size: 24px;
                            font-weight: 800;
                            margin-right: 5px;
                            margin-bottom: 5px;

                            .slash {
                                font-weight: 800;
                                margin-left: 2px;
                            }
                        }
                    }

                    .date-container {
                        display: flex;
                        flex-direction: column;
                        align-items: flex-end;
                    }

                    .date,
                    .separator {
                        font-size: 36px;
                        font-weight: 600;
                    }
                }

                .time {
                    font-size: 18px;
                    font-weight: 400;
                }
            }

            .event-card-right {
                padding: 10px 20px;
                width: 100%;
                font-size: 18px;
                font-weight: 600;

                .title {
                    min-height: 40px;
                    padding-bottom: 10px;
                    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
                    margin-bottom: 15px;
                    display: flex;
                    align-items: center;
                    gap: 10px;

                    .logo {
                        width: 25px;
                        height: 25px;
                        margin-bottom: 3px;
                    }
                }

                .place {
                    display: flex;
                    align-items: center;
                    gap: 10px;
                }
            }
        }
    }

    #sec-about {
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 20px 80px;

        .blocks {
            width: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 0 20px;
            gap: 40px;

            .block {
                width: 100%;
                display: flex;
                flex-direction: row;
                align-items: center;
                gap: 50px;
                text-align: center;

                img {
                    width: 55%;
                    object-fit: cover;
                    border-radius: 10px;
                    aspect-ratio: 16 / 9;
                    margin: 20px 0;
                }

                .block-text {
                    position: relative;
                    margin: 0 auto;

                    .label {
                        font-family: "Homemade Apple", cursive;
                        position: absolute;
                        top: -20px;
                        left: -20px;
                        transform: rotate(-20deg) translate(-30%, -100%);
                        transform-origin: center;
                        font-size: 18px;
                        text-shadow: 1px 1px 5px white, 2px 2px 15px white;
                    }

                    h3 {
                        font-size: 22px;
                        font-weight: 600;
                        margin-bottom: 25px;
                    }

                    p {
                        font-size: 16px;
                        font-weight: 400;
                        white-space: nowrap;
                        line-height: 1.5;
                        margin-bottom: 15px;
                    }

                    .button {
                        padding: 15px 70px;
                        margin: 20px auto;
                        background-color: #B4FFFE;
                        border-radius: calc(infinity * 1px);
                        font-size: 18px;
                        font-weight: 400;
                        cursor: pointer;
                        transition: all 0.3s ease;
                        width: fit-content;
                    }

                    .button.disabled {
                        background-color: #ccc;
                        cursor: not-allowed;
                        opacity: 0.6;
                    }

                    .button:hover:not(.disabled) {
                        background-color: #B4FFFE;
                        transform: scale(1.05);
                        box-shadow: 5px 5px 10px 0 rgba(0, 0, 0, 0.2);
                    }
                }
            }
        }
    }

    #sec-videos {
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 20px 80px;

        .video-container {
            width: 100%;
            display: flex;
            flex-direction: row;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;

            .video-card {
                width: 48%;
                max-width: 950px;
                margin-bottom: 30px;
                display: flex;
                flex-direction: column;
                align-items: center;
                padding: 30px 20px;
                box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    
                .youtube-container {
                    position: relative;
                    width: 100%;
                    aspect-ratio: 16 / 9;
                    overflow: hidden;
    
                    & iframe {
                        width: 100%;
                        height: 100%;
                        object-fit: cover;
                    }

                    & img {
                        width: 100%;
                        height: 100%;
                        object-fit: cover;
                    }

                    & p {
                        position: absolute;
                        font-family: "Hiragino Mincho ProN W6";
                        font-size: 18px;
                        top: 50%;
                        left: 50%;
                        transform: translate(-50%, -50%);
                        z-index: 10;
                    }
                }

                .video-title {
                    font-family: "Hiragino Mincho ProN W6";
                    font-size: 16px;
                    font-weight: 600;
                    margin: 20px 0 15px 0;
                }

                .video-description {
                    font-size: 14px;
                    line-height: 1.5;
                }
            }
        }
    }

    #sec-contact {
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 20px 80px;
        margin-bottom: 40px;
        gap: 15px;

        .contact-item {
            width: 100%;
            max-width: 500px;
            font-size: 18px;
            font-weight: 400;
            padding: 15px 20px;
            border: 1px solid black;
            border-radius: 5px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            cursor: pointer;

            svg {
                margin-bottom: 3px;
            }
        }

        .contact-item.main {
            background-color: #B4FFFE;
            border: 0;
        }
    }
}


/* Mobile Responsive CSS */

@media (max-width: 768px) {
    #open-campus {
        h2 {
            font-size: 20px;
            margin-bottom: 20px;
        }

        #sec-title {
            height: 650px;

            .background-video {
                right: 0;

                .youtube-wrapper {
                    width: 100%;
                    height: 100%;

                    .youtube-container {
                        position: absolute;
                        top: 0;
                        left: 0;
                        width: 100%;
                        height: 100%;
                        min-width: 100%;
                        min-height: 100%;
                        transform: none;

                        iframe {
                            position: absolute;
                            top: 50%;
                            left: 50%;
                            width: 100vw;
                            height: 56.25vw; /* 16:9 ratio */
                            min-height: 100%;
                            min-width: 177.77vh; /* 16:9 ratio */
                            transform: translate(-50%, -50%);
                        }
                    }
                }
            }

            .title-overlay {
                .title-text {
                    padding-top: 20px;
                    top: 15%;

                    p {
                        font-size: 18px;
                    }
                }

                .overlay-cards {
                    padding-left: 20px;
                    padding-bottom: 20px;
                    /* margin-bottom: 10px; */
                    justify-content: flex-start;
                    overflow-x: auto;

                    .overlay-card {
                        flex-direction: row;
                        justify-content: space-between;
                        gap: 15px;

                        .card-bottom {
                            white-space: nowrap;
                            align-items: flex-start;
                        }
                    }
                }
            }
        }

        #sec-events {
            padding: 15px 20px;

            .event-card {
                flex-direction: column;
                align-items: flex-start;
                padding: 15px;

                .event-card-left {
                    flex-direction: row;
                    align-items: flex-end;
                    padding-left: 0;
                    margin-bottom: 10px;
                    min-width: auto;
                    gap: 10px;

                    .date-containers {
                        /* font-size: 20px; */
                        margin: 0;

                        .year-month {
                            display: flex;
                            flex-direction: column;
                            align-items: flex-start;

                            .year {
                                font-size: 12px;
                                font-weight: 600;
                            }

                            .month {
                                font-size: 20px;
                            }
                        }

                        .date,
                        .separator {
                            font-size: 32px;
                        }
                    }

                    .time {
                        font-size: 20px;
                        margin-bottom: 2px;
                    }
                }

                .event-card-right {
                    padding: 0;
                    font-size: 12px;

                    .title {
                        min-height: 30px;
                        font-size: 14px;
                        padding-bottom: 6px;
                        margin-bottom: 10px;
                        line-height: 1.5;
                    }
                }
            }
        }

        #sec-about {
            padding: 15px 20px;

            .blocks {
                padding: 0 10px;
                margin-top: 40px;
                gap: 80px;

                .block {
                    flex-direction: column;
                    gap: 10px;

                    img {
                        width: 100%;
                        margin: 0;
                    }

                    .block-text {
                        h3 {
                            font-size: 20px;
                            margin-bottom: 15px;
                        }

                        p {
                            font-size: 14px;
                            white-space: normal;
                        }

                        .button {
                            padding: 12px 40px;
                            font-size: 16px;
                        }

                        .label {
                            font-size: 16px;
                            left: -10px;
                        }
                    }
                }
            }

            .block.block-reverse {
                flex-direction: column-reverse;
            }
        }

        #sec-videos {
            padding: 15px 20px;

            .video-container {
                .video-card {
                    width: 100%;
                }
            }
        }

        #sec-contact {
            padding: 15px 20px;

            .contact-item {
                font-size: 14px;
                padding: 12px 15px;
            }
        }
    }
}