* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;

    --bc-green: #B7E2AE;
    --bc-orange: #FFC400;
    --bc-blue: #9BD3FF;
    --bc-red: #FF9BBD;
}

body {
    padding-top: 8vh; /* ナビゲーションバーの高さ分だけトップにパディングを追加 */
    font-family: "Helvetica Neue",
        Arial,
        "Hiragino Kaku Gothic ProN",
        "Hiragino Sans",
        Meiryo,
        sans-serif;
    overflow-x: hidden;
}

nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 72px; /* min-height を height に変更 */
    background-color: white;
    position: fixed; /* 位置を固定 */
    width: 100%; /* 幅を全体に */
    top: 0; /* 上端に配置 */
    left: 0; /* 左端に配置 */
    z-index: 10; /* ナビゲーションバーを最前面に配置 */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* ナビバーに影を追加 */
}

.logo {
    color: black;
    font-weight: bold;
    font-size: 24px;
    margin-right: 38%;
    padding-left: 10px;
}

.nav-links {
    display: flex;
    justify-content: space-around;
    width: 38%;
}

.nav-links li {
    list-style: none;
    position: relative;
    transition: 0.3s;
}

.nav-links li a::before{
    content: "";
    display: block;
    position: absolute;
    left: -2rem;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 100%;
    border: solid gray 0.4rem;
    transition: 0.3s;
}

.nav-links li a::after{
    content: "";
    display: block;
    position: absolute;
    width: calc(100% + 2.1rem);
    height: 100%;
    border-top: solid gray 4.9px;
    left: -1.5rem;
    top: 1.2rem;
    transition: 0.3s;
}

#nav-watashitachi:hover::before,
#nav-watashitachi:hover::after{
    border-color: var(--bc-blue);
}

#nav-rinen:hover::before,
#nav-rinen:hover::after{
    border-color: var(--bc-green);
}

#nav-otoiawase:hover::before,
#nav-otoiawase:hover::after{
    border-color: var(--bc-orange);
}

#nav-katsudounaiyou:hover::before,
#nav-katsudounaiyou:hover::after{
    border-color: var(--bc-red);
}


.nav-links a {
    text-decoration: none;
    color: black;
    font-weight: bold;
    transition: 0.2s;
}

.nav-links a:hover {
    color: rgb(75, 75, 75);
}

.burger {
    display: none;
    cursor: pointer;
    color: black;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: black;
    margin: 5px;
    transition: 0.5s ease;
}

.nav-active {
    transform: translateX(0%) !important;
}

.header {
    position: relative;
    text-align: center;
    color: white;
    z-index: 1;
    /* ナビゲーションバーよりも背面に配置 */
}

.header .header-pic {
    width: 100%;
    height: auto;
    display: block;
    filter: brightness(50%);
    height: 90vh;
    object-fit: cover;
    /* 画像をカバーする */
    object-position: center;
    /* 画像の中央を表示 */
}

.header .logo {
    position: absolute;
    width: 40%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    margin-left: 16px;
    font-size: 2.5rem;
}

.container {
    padding: 20px;
    margin: 0 0 4%;
}

.philosophy {
    width: 80%;
    margin: 8% auto 8%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.philosophy img {
    width: 110%;
}

.philosophy h2 {
    font-size: 2.4rem;
    font-weight: 600;
    margin: 3%;
    margin-left: 6%;
}

.philosophy p {
    margin: 6% 10%;
    line-height: 1.6;
}

.activities {
    padding: 20px;
    margin: 4% 0;
    padding: 6% 0;
    background-color: #EDF1FF;
}

.activities .section-title {
    text-align: center;
    font-size: 3.0rem;
    margin-bottom: 32px;
    font-weight: bold;
}

.activities-wrapper {
    display: flex;
    overflow-x: auto;
    padding: 20px 0px;
    scroll-snap-type: x mandatory;
    gap: 20px;
}

.activity-card {
    flex: 0 0 auto;
    width: 300px;
    background: #fff;
    border-radius: 32px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    /* scroll-snap-align: start; */
    overflow: hidden;
    transition: transform 0.3s ease;
    margin: 10px 20px;
}

.activity-card:hover {
    transform: scale(1.04);
}

.activity-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.activity-card h3 {
    font-size: 1.5rem;
    margin: 15px;
    font-weight: 700;
}

.activity-card p {
    font-size: 1rem;
    margin: 0 15px 15px;
    line-height: 1.6;
}

.activity-card .activity-link {
    color: #6d6d6d;
    display: block; /* ブロック要素として扱う */
    text-align: center; /* 中央寄せ */
    padding: 8px 20px;
    margin: 16px 0; /* 上部のマージン */
    text-decoration: none; /* 初期状態で下線を無効化 */
    text-underline-offset: 2px; /* 下線とテキストの間にスペースを開ける */
}

.activity-card .activity-link:hover {
    color: #000000;
    text-decoration: underline; /* hover時に下線を表示 */
}

.contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin:6% 0 10%;
}

.contact h2 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 24px;
}

.contact-button-container {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    filter:drop-shadow(0px 0px 2px #898989);
}

.contact-button {
    display: inline-block;
    padding: 16px 26px;
    background-color: #1489FF;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    border-radius: 50px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.contact-button:hover {
    background-color: #1489FF;
    transform: scale(1.04);
}

.footer {
    background-color: #FFF5ED;
}

.footer-container {
    padding: 8% 8% 10%; 
}

.footer-section {
    display: flex;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    transition: 0.2s;
}

.footer-section a:hover {
    color: rgb(75, 75, 75);
}

.footer-section .insta {
    margin-left: 18%;
}

.footer-bottom {
    flex: 1; /* 追加 */
    text-align: right; /* 追加 */
    margin-top: 40px;
}

.footer-bottom h2 {
    font-size: 1.4rem;
    font-weight: 500;
    padding-right: 0;
}

.container #私たちについて {
    background-color: var(--bc-orange);
}

#私たちについて {
    position: relative;
    background-color: #FFF5ED;
    padding: 140px 8% 50px;

    .container-title{
        font-size: 3.8rem;
        font-weight: bold;
        margin-left: 10%;
        margin-bottom: 3%;
        color: #1489FF;
    }

    .unit {
        position: relative;
        display: flex;
        margin: 0% 10% 5% 10%;
        align-items: center; 

        .shape {
            text-align: center;
            width: 20vw;
            height: 20vw;
            background-color: white;
            margin: 10px;
            display: grid;
            place-items: center;
            flex-shrink: 0;
            color: white;
            font-size: 15vw;
        }

        .unit-card {
            background-color: white;
            flex: 1; 
            padding: 10px; 
            min-height: 20vw;
            margin-left: 80px;
            border-radius: 50px;
            padding: 50px;

            p,
            h3{
                position: relative;
                z-index: 2;
            }
            
            h3 {
                margin-bottom: 30px;
                font-size: 2.5rem;
                font-weight: bold;
            }

            p {
                font-size: 1.3rem;
            }
        }

        #shape00{
            border-radius: 100%;
            background-color: var(--bc-green);
        }

        #shape01{
            clip-path: polygon(0 100%, 50% 0, 100% 100%);
            background-color: var(--bc-blue);
            position: relative;

            p{
                position: relative;
                bottom: -2vw;
            }
        }

        #shape02{
            border-radius: 10%;
            background-color: var(--bc-orange);
        }
    }

    #unit2{
        flex-direction: row-reverse;
        .unit-card{
            margin-left: 0px;
            margin-right: 80px;
        }
    }

    .decoretion-shape{
        position: absolute;
    }

    #decoration00{
        width: 12vw;
        height: 12vw;
        border-radius: 100%;
        background-color: var(--bc-orange);
        right: 27%;
        top: 30%;
    }

    #decoration01{
        width: 8vw;
        height: 8vw;
        border-radius: 100%;
        background-color: var(--bc-red);
        left: 30%;
        top: 60%;
        z-index: 1;
    }
}



@media screen and (max-width: 1024px) {
    .nav-links {
        width: 44%;
    }

    .philosophy {
        width: 90%;
    }

    .philosophy h2 {
        font-size: 2.2rem;
    }

    #私たちについて{
        .container-title{
            font-size: 3.2rem;
        }

        .unit,
        #unit2{
            flex-direction: column;
            align-items: start;

            .shape{
                width: 11vw;
                height: 11vw;
                font-size: 8vw;
            }

            .unit-card{
                margin: 0px;
                padding: 40px;
                
                h3{
                    font-size: 2.5rem;
                }

                p{
                    font-size: 1.3rem;
                }
            }
        }

        #unit2{
            align-items: end;
        }

        #decoration00{
            top: 32%;
        }

        #decoration01{
            top: 65%;
            left: 33%;
        }
    }
}

@media screen and (max-width: 768px) {
    html, body {
        width: 100%;
        overflow-x: hidden;
    }

    /* body {
        overflow-x: hidden;
    } */

    .nav-links {
        /* display: flex; */
        position: absolute;
        right: 0;
        height: 92vh;
        top: 8vh;
        background-color: white;
        flex-direction: column;
        align-items: center;
        width: 50%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
    }

    .nav-links li {
        opacity: 0;
    }

    .burger {
        display: block;
    }

    #burger-chk:checked ~ label .burger{
        .line1 {
            transform: rotate(-45deg) translate(-5px, 6px);
        }
        
        .line2 {
            opacity: 0;
        }
        
        .line3 {
            transform: rotate(405deg) translate(-5px, -6px);
        }
    }

    #burger-chk:checked ~ .nav-links{
        transform: translateX(0%) !important;

        li{
            animation: 0.5s ease 0.4s 1 normal forwards running navLinksFade;
        }
    }

    .header .header-pic {
        width: 100%;
        height: 70vh;
        object-fit: cover;
        /* 画像をカバーする */
        object-position: center;
        /* 画像の中央を表示 */
    }

    .header .logo {
        width: 64%;
    }

    .philosophy {
        flex-direction: column;
        position: relative;
        display: flex;
        align-items: flex-end; /* 親要素の子要素を下揃えに配置 */
    }

    .philosophy img {
        width: 60%;
        height: auto;
        margin-bottom: -80px; /* 画像の下部分を上に持ち上げて重なるように設定 */
    }

    .philosophy-text {
        position: relative;
        z-index: 1; /* テキストを画像の前面に配置 */
    }

    .philosophy-title {
        padding: 8px 4px 8px;
        background-color: rgb(250, 250, 250);
        margin-left: 16%;
        margin-top: 40px;
    }

    .philosophy h2 {
        font-size: 1.6rem;
        margin: 0;
        color: black;
    }

    .philosophy p {
        margin-top: 14%;
        margin-bottom: 50px; /* 画像の持ち上げ部分と同じ値を設定 */
    }


    #私たちについて{
        padding: 50px 0 50px;

        .container-title{
            font-size: 2.4rem;
        }

        .unit,
        #unit2{
            .unit-card{
                margin: 0px;
                padding: 40px;
                
                h3{
                    font-size: 2.0rem;
                }

                p{
                    font-size: 1.0rem;
                }
            }
        }
    }

    .activities h2 {
        font-size: 1.4rem;
    }

    .contact h2 {
        font-size: 1.6rem;
    }

    .contact-button {
        font-size: 1rem;
        padding: 16px 22px;
    }

    .footer-section {
        flex-direction: column;
    }

    .footer-section .insta {
        margin-left: 0;
        margin-top: 4%;
    }
}

@media screen and (max-width: 500px) {
    
    .activities {
        padding: 14% 0;
    }

    .activities .section-title {
        font-size: 2.0rem;
    }

    .activity-card {
        width: 250px;
        margin: 0 auto;
    }

    .activities-wrapper {
        /* flex-direction: column; */
        gap: 20px;
    }

    .activity-card h3 {
        font-size: 1.2rem;
    }

    .activity-card p {
        font-size: 0.9rem;
    }
}

@keyframes navLinksFade {
    0% {
        opacity: 0;
        transform: translateX(50px);
    }

    100% {
        opacity: 1;
        transform: translateX(0px);
    }
}

.toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.toggle .line2 {
    opacity: 0;
}

.toggle .line3 {
    transform: rotate(405deg) translate(-5px, -6px);
}