/* ==========================================================================
   ヘッダー・ナビゲーション構成
   ========================================================================== */

/* --- ヘッダーコンテナ --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.header-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
}

.header-logo img {
    height: 40px;
    width: auto;
    display: block;
}

/* --- ハンバーガーボタン --- */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    z-index: 1100;
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }
}

.hamburger-bar {
    display: block;
    width: 25px;
    height: 3px;
    background: #333;
    margin: 5px 0;
    transition: 0.3s;
}

/* ボタンアクティブ時（三本線→×） */
.hamburger.is-active .hamburger-bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.is-active .hamburger-bar:nth-child(2) { opacity: 0; }
.hamburger.is-active .hamburger-bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* --- 共通：リストスタイルリセット --- */
.nav-list,
.nav-list li,
.submenu,
.submenu li {
    list-style: none !important;
    margin: 0;
    padding: 0;
    text-indent: 0;
}

/* --- PC版ナビゲーション (769px以上) --- */
@media (min-width: 769px) {
    .main-nav .nav-list {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .main-nav .nav-list > li {
        position: relative;
        padding: 10px 5px;
    }

    .main-nav .nav-list > li > a {
        text-decoration: none;
        color: #333;
        font-weight: 400;
        font-size: 0.95rem;
        transition: color 0.3s;
    }

    .main-nav .nav-list > li > a:hover {
        color: #2c5e2e;
    }

    /* PC版ドロップダウン */
    .submenu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        background: #fff;
        width: 220px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.1);
        padding: 10px 0;
        border-radius: 8px;
        border: 1px solid #eee;
    }

    .has-submenu:hover > .submenu {
        display: block;
        animation: fadeIn 0.3s ease;
    }

    .submenu li a {
        display: block;
        padding: 10px 20px;
        color: #333;
        text-decoration: none;
        font-size: 0.85rem;
        transition: background 0.2s;
    }

    .submenu li a:hover {
        background: #f5fbf5;
        color: #2c5e2e;
    }
}

/* --- スマホ版ナビゲーション (768px以下) --- */
@media (max-width: 768px) {
    .main-nav {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: #fff;
        padding: 80px 20px 40px; /* 上部に余白 */
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform 0.4s ease;
        z-index: 1050;
    }

    .main-nav.is-active {
        transform: translateX(0);
    }

    .nav-list {
        flex-direction: column;
        width: 100%;
    }

    .nav-list > li {
        width: 100%;
    }

    .nav-list > li > a {
        display: block;
        padding: 18px 0;
        font-size: 1.1rem;
        color: #333;
        text-decoration: none;
        font-weight: 600;
    }

    /* スマホ版アコーディオン（サブメニュー） */
    .submenu {
        display: none;
        position: static;
        width: 100%;
         padding: 0;
    }

    .submenu.is-open {
        display: block !important;
    }

    .submenu li a {
        display: block;
        padding: 12px 25px;
        color: #555;
        text-decoration: none;
        font-size: 0.95rem;
        border-top: 1px solid #fff;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}