/* ===== ベース ===== */
/* header全体 */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: transparent;
    z-index: 1100;
    padding: 0.8rem 1rem;
    transition: background-color 0.3s ease;
    height: 0;
    padding: 0;
    background: none;
    box-shadow: none;
}

/* バーガーメニューが開いているときの背景色 */
header.menu-open {
    background-color: #f9fff6;
}

/* コンテナ */
.header-container {
    display: flex;
    justify-content: flex-end;
    /* ← ここを変更 */
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1rem;
    height: 0;
    padding: 0;
    background: none;
    box-shadow: none;
}

/* ロゴ */
.header-logo {
    width: 140px;
    height: auto;
    transition: filter 0.3s ease;
}

@supports (backdrop-filter: blur(10px)) {
    @media (min-width: 768px) {
        header {
            background: rgba(255, 255, 255, 0.7);
            backdrop-filter: blur(10px);
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
            border-bottom: 1px solid rgba(255, 255, 255, 0.5);
            position: sticky;
            top: 0;
            z-index: 100;
            transition: background 0.3s ease;
            height: auto;
        }

        .header-container {
            display: flex;
            justify-content: space-between;
            align-items: center;
            max-width: 960px;
            margin: 0 auto;
            padding: 0.4rem 1rem;
            height: auto;
        }
    }
}



/* ===== ハンバーガーボタン：共通（SP） ===== */
.btn-trigger {
    width: 45px;
    height: 45px;
    background-color: #030303;
    border-radius: 5px;
    outline-offset: -5px;
    position: fixed;
    top: 15px;
    /* 画面上からの距離 */
    right: 15px;
    /* 画面右からの距離 */
    z-index: 1200;
    /* ヘッダーより上 */
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    /* 右側にスペース */
    box-sizing: border-box;
}

.btn-trigger span {
    position: absolute;
    left: 20%;
    width: 60%;
    height: 3px;
    background-color: #fff;
    border-radius: 4px;
    transition: all 0.4s ease;
}

.btn-trigger span:nth-of-type(1) {
    top: 10px;
}

.btn-trigger span:nth-of-type(2) {
    top: 50%;
    transform: translateY(-50%);
}

.btn-trigger span:nth-of-type(3) {
    bottom: 10px;
}

/* 開閉アニメーション */
#btn02.active span:nth-of-type(1) {
    transform: translateY(11px) rotate(45deg);
}

#btn02.active span:nth-of-type(2) {
    opacity: 0;
}

#btn02.active span:nth-of-type(3) {
    transform: translateY(-11px) rotate(-45deg);
}

/* ===== PC以上のサイズ調整 ===== */
@media (min-width: 768px) {
    .btn-trigger {
        display: none;
    }

}

/* ==============================
   グローバルナビ（モバイルファースト）
   ============================== */

/* --- 基本構造 --- */
#global-nav {
    display: none;
    /* デフォルトは非表示（btn-triggerで開閉） */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    /* 薄い白背景で全画面 */
    z-index: 1050;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: opacity 0.3s ease;
}

/* openクラスで表示 */
#global-nav.open {
    display: flex;
}

/* --- nav-list（縦並び・中央揃え）--- */
.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
}

.nav-list li {
    text-align: center;
    position: relative;
    padding: 0.4rem 0;
}

/* --- 区切り線 --- */
.nav-list li:not(:last-child)::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: #545454;
    /* 優しい緑のライン */
    margin: 0.8rem auto 0;
    opacity: 0.7;
}

/* --- ナビリンク --- */
.nav-list a,
.logout-btn {
    color: #000;
    font-size: 1.2rem !important;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-list a:hover,
.logout-btn:hover {
    color: #1a4e20;
}

/* ==============================
   PC（768px以上）スタイル
   ============================== */
@media (min-width: 768px) {
    #global-nav {
        display: flex !important;
        position: static;
        background: transparent;
        height: auto;
        justify-content: center;
        align-items: center;
        flex-direction: row;
        margin: 0.5rem auto;
    }

    .nav-list {
        display: flex;
        flex-direction: row;
        gap: 0;
        list-style: none;
        padding: 0;
        margin: 0;
    }

    /* --- liの間に縦線を入れる --- */
    .nav-list li {
        position: relative;
        padding: 0 1rem;
        /* 少し余白を入れると見やすい */
    }

    .nav-list li:not(:last-child)::after {
        content: "";
        position: absolute;
        right: 0;
        top: 0%;
        transform: translateY(-50%);
        width: 1px;
        height: 1.2em;
        /* 文字の高さに合わせる */
        background-color: #7e7e7e;
        /* 線の色 */
    }

    /* PCでは通常のメニュー色 */
    .nav-list a,
    .logout-btn {
        color: #333;
        font-size: 1rem !important;
        font-weight: 500 !important;
    }

    .nav-list a:hover,
    .logout-btn:hover {
        color: #1a4e20;
    }
}