/*
 * Header
 * -----------------------------------------------------------
 */
.site-header {
    padding: 1em 2em;
    border-bottom: 1px solid #eee;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: end;
}
.site-branding {
    width: 194px;
    margin: 0;
}

.site-title {
    margin: 0;
    font-size: 1.5em;
}

.site-title a {
    text-decoration: none;
    color: #333;
}

.site-description {
    margin: 0;
    font-size: 0.9em;
    color: #777;
}

/*
 * Navigation
 * -----------------------------------------------------------
 */
.main-navigation ul {
    display: flex;
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
}

.main-navigation li {
    margin: 0 0 0 1.5em;
}

.main-navigation a {
    text-decoration: none;
    color: #333;
}

.main-navigation a:hover {
    text-decoration: underline;
}

/* Hide menu if not set */
.main-navigation .menu-item-object-custom > a[href="#"] {
    display: none;
}

@media (min-width: 1024px) {
.site-branding {
    width: 300px;
    margin: 0;
}
}

/* ハンバーガーメニュー ------------------------------------- */
/* --- ハンバーガーボタン（スマホ用） --- */
.hamburger {
    display: block; /* 初期状態（スマホ）は表示 */
    position: relative;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001; /* メニューより上に配置してタップ可能に */
    outline: none;
}

.hamburger span {
    display: block;
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: var(--text-dark);
    border-radius: 2px;
    left: 10px;
    transition: transform 0.3s ease-in-out, top 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

/* 3本線の初期位置 */
.hamburger span:nth-child(1) { top: 13px; }
.hamburger span:nth-child(2) { top: 21px; }
.hamburger span:nth-child(3) { top: 29px; }

/* ボタンがクリックされた時（×印に変化） */
.hamburger.is-active span:nth-child(1) {
    top: 21px;
    transform: rotate(45deg);
}
.hamburger.is-active span:nth-child(2) {
    opacity: 0; /* 真ん中の線を消す */
}
.hamburger.is-active span:nth-child(3) {
    top: 21px;
    transform: rotate(-45deg);
}

/* --- モバイル用スライドメニュー --- */
.main-navigation {
    position: fixed;
    top: 0;
    right: -100%; /* 初期状態は画面外（右側）に隠す */
    width: 280px; /* メニューの幅 */
    height: 100vh;
    background-color: rgba(251, 251, 251, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: -2px 0 15px rgba(0,0,0,0.1);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1); /* 滑らかなスライド */
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-navigation.is-active {
    right: 0; /* 画面内にスライドイン */
}

/* スマホ用メニュー内のリスト */
.nav-links {
    display: flex;
    flex-direction: column; /* 縦並び */
    gap: 2.5rem;
    font-size: 1.125rem;
    font-weight: bold;
    text-align: center;
}

/* 背景を暗くするオーバーレイ */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 999;
}
.menu-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

/* --- レスポンシブ対応 (PC用: ブレイクポイント768px) --- */
@media (min-width: 768px) {
    .hamburger {
        display: none; /* PCではハンバーガーを隠す */
    }

    .main-navigation {
        position: static; /* 固定配置を解除 */
        width: auto;
        height: auto;
        background-color: transparent;
        box-shadow: none;
        backdrop-filter: none;
        right: auto;
        display: block;
    }

    .nav-links {
        flex-direction: row; /* 横並びに戻す */
        font-size: 1rem;
        gap: 2rem;
    }
}
