/* =========================
   ヘッダー共通
   ========================= */
.site-header {
    border-bottom: 1px solid #eee;
    background-color: #fff;
}

.header-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* ブランドロゴ */
.site-branding img {
    display: block;
    height: auto;
}

/* =========================
   モバイル標準（〜768px）
   ========================= */

/* モバイルではハンバーガーを表示 */
.nav-toggle {
    display: inline-block;
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    margin: 5px 0;
    background-color: #333;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* メニューは折りたたみ：デフォルトは非表示 */
.global-nav {
    display: none;
    width: 100%;
    margin-top: 0.5rem;
}

/* JS で is-open が付いたときだけ表示 */
.global-nav.is-open {
    display: block;
}

/* メニュー項目は縦並び */
.nav-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-list li {
    list-style: none;
}

.nav-list a {
    display: block;
    width: 100%;
    padding: 0.5rem 0;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
}

/* ハンバーガーアイコン変形（お好み） */
.nav-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
}
.nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* =========================
   PC（769px〜）
   ========================= */
@media (min-width: 769px) {

    /* PCではハンバーガーを隠す */
    .nav-toggle {
        display: none;
    }

    /* PCではナビを横並びで常時表示 */
    .global-nav {
        display: flex;
        align-items: center;
        width: auto;
        margin-top: 0;
    }

    .nav-list {
        flex-direction: row;
        gap: 1.5rem;
    }

    .nav-list a {
        border-bottom: none;
    }
}

/* =======================================
   ハンバーガー／グローバルナビの最終上書き
   （他のCSSに負けないよう !important を付ける）
   ======================================= */

/* モバイル（〜768px） */
@media (max-width: 768px) {

    /* ハンバーガーはモバイルで必ず表示 */
    .nav-toggle {
        display: inline-block !important;
        background: none;
        border: none;
        padding: 0.25rem;
        cursor: pointer;
    }

    .nav-toggle span {
        display: block;
        width: 24px;
        height: 2px;
        margin: 5px 0;
        background-color: #333;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    /* メニューは折りたたみ（デフォルト非表示） */
    .global-nav {
        display: none !important;
        width: 100%;
        margin-top: 0.5rem;
    }

    /* クリック時だけ表示 */
    .global-nav.is-open {
        display: block !important;
    }

    /* メニュー項目は縦並びにする */
    .nav-list {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .nav-list a {
        display: block;
        width: 100%;
        padding: 0.5rem 0;
        text-decoration: none;
        color: #333;
        border-bottom: 1px solid #eee;
        font-size: 0.95rem;
    }
}

/* PC（769px〜） */
@media (min-width: 769px) {

    /* PCではハンバーガーを確実に隠す */
    .nav-toggle {
        display: none !important;
    }

    /* PCではナビを横並びで表示 */
    .global-nav {
        display: flex !important;
        align-items: center;
        width: auto;
        margin-top: 0;
    }

    .nav-list {
        display: flex !important;
        flex-direction: row !important;
        gap: 1.5rem;
    }

    .nav-list a {
        border-bottom: none;
    }
}


/* =======================================
   ハンバーガー／グローバルナビの最終上書き
   （他のCSSに負けないよう !important 付き）
   ======================================= */

/* モバイル（〜768px） */
@media (max-width: 768px) {

    /* モバイルでは必ずハンバーガーを表示 */
    .nav-toggle {
        display: inline-block !important;
        background: none;
        border: none;
        padding: 0.25rem;
        cursor: pointer;
    }

    .nav-toggle span {
        display: block;
        width: 24px;
        height: 2px;
        margin: 5px 0;
        background-color: #333;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    /* メニューは折りたたみ（デフォルト非表示） */
    .global-nav {
        display: none !important;
        width: 100%;
        margin-top: 0.5rem;
    }

    /* .is-open が付いたときだけ表示 */
    .global-nav.is-open {
        display: block !important;
    }

    /* メニュー項目は縦並び */
    .nav-list {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .nav-list a {
        display: block;
        width: 100%;
        padding: 0.5rem 0;
        text-decoration: none;
        color: #333;
        border-bottom: 1px solid #eee;
        font-size: 0.95rem;
    }
}

/* PC（769px〜） */
@media (min-width: 769px) {

    /* PCではハンバーガーを確実に隠す */
    .nav-toggle {
        display: none !important;
    }

    /* PCではナビを横並びで表示 */
    .global-nav {
        display: flex !important;
        align-items: center;
        width: auto;
        margin-top: 0;
    }

    .nav-list {
        display: flex !important;
        flex-direction: row !important;
        gap: 1.5rem;
    }

    .nav-list a {
        border-bottom: none;
    }
}
