/* =========================================================
   PC用
========================================================= */

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: url("../images/sky.png");
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
    background-attachment: fixed;
    padding-top: 60px;
    box-sizing: border-box;
}

main {
    flex: 1;
}


/* =========================================================
   ヘッダー
========================================================= */

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 5px 25px;
    box-sizing: border-box;
    background-color: #2f7d4a;
    color: #fff;
}


/* =========================================================
   ロゴ
========================================================= */

#logo {
    display: flex;
    align-items: center;
    height: 100%;
    text-decoration: none;
}

#logo img {
    display: block;
    width: auto;
    max-height: 55px;
}


/* =========================================================
   PCナビ
========================================================= */

#nav-pc {
    margin-left: auto;
}

#nav-pc ul {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
    gap: 5px;
}

#nav-pc li {
    margin: 0;
    padding: 0;
}

#nav-pc a {
    display: block;
    padding: 8px 12px;
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

#nav-pc a:hover {
    background-color: rgba(255, 255, 255, 0.15);
}


/* =========================================================
   スマホ用ハンバーガーボタン
========================================================= */

#menu-sp {
    display: none;
}


/* =========================================================
   スマホナビ
========================================================= */

#nav-sp {
    display: none;
}

/* =========================================================
   スクロール位置調整
========================================================= */
section,
article {
    scroll-margin-top: 60px;
}




/* =========================================================
   スマートフォン用
========================================================= */

@media screen and (max-width: 768px) {

    body {
        padding-top: 55px;
    }


    /* =====================================================
       ヘッダー
    ===================================================== */

    header {
        height: 55px;
        padding: 5px 15px;
    }


    /* =====================================================
       ロゴ
    ===================================================== */

    #logo img {
        max-height: 40px;
    }


    /* =====================================================
       PCナビ非表示
    ===================================================== */

    #nav-pc {
        display: none;
    }


    /* =====================================================
       ハンバーガーボタン
    ===================================================== */

    #menu-sp {
        display: block;
        margin-left: auto;
        padding: 0 8px;
        border: none;
        background: transparent;
        color: #fff;
        cursor: pointer;
        font-size: 2rem;
        line-height: 1;
    }


    /* =====================================================
       スマホナビ
    ===================================================== */

    #nav-sp {
        position: fixed;
        top: 0;
        right: 0;
        left: auto;
        width: 100%;
        height: 100vh;
        z-index: 2000;
        display: flex;
        justify-content: center;
        align-items: center;
        
        /* 表示する画像の設定 */
        background-image: url("../images/nav.png");
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;

        /* 右上を起点に縮小 */
        transform: scale(0);
        transform-origin: top right;

        /* アニメーション */
        transition: transform 0.4s ease;

        /* 開いていないときは操作できない */
        pointer-events: none;
    }


    /* =====================================================
       メニュー展開時
    ===================================================== */

    #nav-sp.open {
        transform: scale(1);
        pointer-events: auto;
    }


    /* =====================================================
       閉じるボタン
    ===================================================== */

    #close {
        position: absolute;
        top: 10px;
        right: 15px;
        padding: 0;
        border: none;
        background: transparent;
        color: #fff;
        font-size: 2.5rem;
        line-height: 1;
        cursor: pointer;
    }


    /* =====================================================
       スマホナビ全体
    ===================================================== */

    #nav-sp nav {
        width: 100%;
        height: 100%;
    }

    #nav-sp ul {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 0;
        list-style: none;
        gap: 8px;
    }


    /* =====================================================
       スマホロゴ
    ===================================================== */

    #logo-sp {
        display: block;
        margin-bottom: 15px;
    }

    #logo-sp img {
        width: 130px;
        height: auto;
    }


    /* =====================================================
       スマホメニューリンク
    ===================================================== */

    #nav-sp .menu {
        display: block;
        padding: 8px 30px;
        color: #fff;
        text-decoration: none;
        font-size: 1.1rem;
        text-align: center;
        opacity: 0;
        transform: translate(-20px, 20px);
    }


    /* =====================================================
       メニュー項目のアニメーション
    ===================================================== */

    #nav-sp.open .menu {
        animation: menuItemOpen 0.35s ease forwards;
    }

    #nav-sp.open li:nth-child(2) .menu {
        animation-delay: 0.20s;
    }

    #nav-sp.open li:nth-child(3) .menu {
        animation-delay: 0.40s;
    }

    #nav-sp.open li:nth-child(4) .menu {
        animation-delay: 0.60s;
    }

    #nav-sp.open li:nth-child(5) .menu {
        animation-delay: 0.80s;
    }

    #nav-sp.open li:nth-child(6) .menu {
        animation-delay: 1.00s;
    }

    @keyframes menuItemOpen {
        from {
            opacity: 0;
            transform: translate(-20px, 20px);
        }

        to {
            opacity: 1;
            transform: translate(0, 0);
        }
    }

    #nav-sp .menu:hover {
        opacity: 0.7;
    }
}


/* =========================================================
   フッター
========================================================= */

footer {
    width: 100%;
    margin-top: 30px;
    margin-bottom: 0;
    padding: 15px 0;
    box-sizing: border-box;
    background-color: #000;
    color: #fff;
}

footer article.homepage {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
    background-color: transparent;
}

footer .h2 {
    grid-column: 1 / -1;
    margin: 0 0 15px;
    color: #fff;
    text-align: center;
    font-size: 1.6rem;
}

footer iframe {
    width: 100%;
    height: 300px;
    border: 0;
    box-sizing: border-box;
}

footer .adress {
    min-height: 300px;
    box-sizing: border-box;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

footer .adress p {
    margin: 6px 0;
    line-height: 1.5;
    font-size: 1rem;
}

footer .adress a {
    color: #fff;
    text-decoration: none;
}

footer .adress a:hover {
    text-decoration: underline;
}


/* =========================================================
   フッター・スマートフォン
========================================================= */

@media screen and (max-width: 768px) {

    footer {
        margin-top: 20px;
        padding: 15px;
    }

    footer article.homepage {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 0;
        gap: 0;
    }

    footer .h2 {
        margin-bottom: 10px;
        font-size: 1.4rem;
    }

    footer iframe {
        width: 100%;
        height: 300px;
    }

    footer .adress {
        min-height: auto;
        padding: 15px 0;
        text-align: left;
    }

    footer .adress p {
        margin: 5px 0;
        font-size: 1rem;
    }
}