/* --- 2. ヘッダー & ナビゲーションメニュー --- */
.site-header {
    background: linear-gradient(to top, var(--accent-blue) 0%, rgba(26, 241, 177, 1) 100%);
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10000;
    transition: background-color 0.5s ease;
}

.site-header.is-active {
    /* メニュー展開時も透明にせず、元のプレミアムなグラデーション（不透過）を維持 */
    background: linear-gradient(to top, var(--accent-blue) 0%, rgba(26, 241, 177, 1) 100%) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.admin-bar .site-header {
    top: 32px;
}

.header-inner {
    position: relative;
    height: 100%;
    width: 100%;
}

.logo {
    position: absolute;
    left: 80px;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-mincho);
    font-size: 36px;
    font-weight: 700;
    letter-spacing: 0.18em;
    transition: opacity 0.5s ease;
}

.site-header.is-active .logo {
    opacity: 1; /* 透過させずにはっきり見せる */
}

.logo a {
    color: #fff;
    text-decoration: none;
}

/* ボタン関係 */
.menu-btn {
    position: absolute;
    top: 50%;
    right: 30px;
    /* バツ印と位置を揃える */
    transform: translateY(-50%);
    width: 40px;
    height: 22px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.menu-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #fff;
}

.site-header.is-active .menu-btn {
    opacity: 0;
    pointer-events: none;
}

.menu-close-btn {
    position: absolute;
    top: calc(var(--header-height) / 2 - 13px);
    right: 30px;
    /* ハンバーガーと同じ右位置に揃える */
    left: auto;
    width: 40px;
    height: 26px;
    cursor: pointer;
    z-index: 200000;
}

.menu-close-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #fff;
    position: absolute;
    top: 11px;
}

.menu-close-btn span:nth-child(1) {
    transform: rotate(45deg);
}

.menu-close-btn span:nth-child(2) {
    transform: rotate(-45deg);
}

/* ナビゲーションメニュー (最前面独立設定) */
.nav-menu {
    position: fixed;
    top: 0;
    bottom: 0;
    right: -300px;
    width: 300px;
    height: 100dvh !important;
    /* Safari対応の動的Viewport */
    background-color: #1f80c9 !important;
    /* トップページと同じ青 */
    z-index: 99999 !important;
    transition: right 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
    visibility: visible !important;
    display: block !important;
    overflow: hidden;
}

.nav-menu.is-active {
    right: 0;
}

.admin-bar .nav-menu {
    top: 32px;
    height: calc(100vh - 32px);
    height: calc(100dvh - 32px);
}

.nav-scroll-area {
    padding-top: var(--header-height);
    /* Safariの下部バーに被らないよう、safe-area分だけ余白を追加 */
    padding-bottom: env(safe-area-inset-bottom, 30px);
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

.nav-list {
    list-style: none;
    padding: 20px 0;
    text-align: center;
    margin: 0;
}

.nav-list li {
    margin-bottom: 30px;
}

.nav-list a {
    color: #fff !important;
    text-decoration: none;
    font-size: 24px;
    font-weight: 700;
    font-family: var(--font-mincho);
    transition: 0.3s;
    display: block;
}

.nav-list a:hover {
    opacity: 0.6;
}

/* オーバーレイ（黒い影） */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7) !important;
    z-index: 50000 !important;
    opacity: 0;
    visibility: hidden;
    transition: 0.5s;
}

.menu-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

@media screen and (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .logo {
        left: 30px;
        font-size: 28px;
    }

    .menu-btn {
        right: 30px;
        /* スマホでも同じ位置を維持 */
    }

    .nav-menu {
        width: 65%;
        right: -65%;
    }

    .nav-list a {
        font-size: 20px;
    }
}