/* 共通ナビゲーションメニュー */

/* ナビゲーションメニュー - WordPress風 */
.stats-navigation {
    background-color: #f2b157;
    padding: 0;
    margin: 0;
}

.stats-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.stats-menu li {
    margin: 0;
    padding: 0;
    position: relative;
}

.stats-menu li a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 15px 20px;
    font-size: 14px;
    font-weight: bold;
    position: relative;
}

/* サブメニュー - WordPress風 */
.stats-menu .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #555555;
    list-style: none;
    margin: 0;
    padding: 0;
    min-width: 200px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.stats-menu .has-submenu:hover .submenu {
    display: block;
}

.stats-menu .submenu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-menu .submenu li:last-child {
    border-bottom: none;
}

.stats-menu .submenu li a {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: bold;
    color: white;
}

/* デスクトップのサブメニューホバー（暗い背景用） */
.stats-menu .submenu li a:hover {
    background-color: #666666;
}

.stats-menu .submenu li a::after {
    display: none;
}

.stats-menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: white;
    transition: width 0.3s ease;
}

.stats-menu li a:hover::after {
    width: 100%;
}

.stats-menu li a:hover {
    text-decoration: none;
}

.stats-menu li a:visited {
    color: white;
}

/* ハンバーガーメニューボタン（デスクトップでは非表示） */
.hamburger-menu {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
}

/* メニューオーバーレイ */
.menu-overlay {
    display: none;
}

/* モバイルメニューヘッダー（デスクトップでは非表示） */
.mobile-menu-header {
    display: none;
}

/* レスポンシブ対応：スマホ */
@media (max-width: 768px) {
    /* ヘッダーを相対位置に（ハンバーガーボタンの配置用） */
    .header {
        position: relative;
    }

    /* ハンバーガーメニューボタン */
    .hamburger-menu {
        display: block;
        position: absolute;
        top: 50%;
        left: 5px;
        transform: translateY(-50%);
        z-index: 100;
        background: none;
        color: white;
        border: none;
        padding: 15px 15px;
        font-size: 24px;
        cursor: pointer;
    }

    /* モバイル時のロゴ位置調整 */
    .header-logo {
        margin-left: 50px;
    }

    /* メニューオーバーレイ */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .menu-overlay.active {
        display: block;
    }

    /* スマホ用スライドメニュー */
    .stats-navigation {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100%;
        background-color: white;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
        padding-top: 0;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
    }

    .stats-navigation.active {
        transform: translateX(0);
    }

    /* モバイルメニューヘッダー */
    .mobile-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        background-color: #f2b157;
        padding: 15px 20px;
        border-bottom: 1px solid #ddd;
    }

    .mobile-menu-title {
        font-size: 16px;
        font-weight: bold;
        color: white;
    }

    .mobile-menu-close {
        background: none;
        border: none;
        color: white;
        font-size: 24px;
        cursor: pointer;
        padding: 0;
        line-height: 1;
    }

    /* スマホメニューのスタイル */
    .stats-menu {
        flex-direction: column;
        padding: 0;
    }

    .stats-menu li {
        border-bottom: 1px solid #eee;
    }

    .stats-menu li:last-child {
        border-bottom: none;
    }

    .stats-menu li a {
        padding: 15px 20px;
        color: #333;
        font-weight: bold;
    }

    .stats-menu li a::after {
        display: none;
    }

    .stats-menu li a:visited {
        color: #333;
    }

    /* サブメニューをスマホでは常に表示 */
    .stats-menu .submenu {
        display: block;
        position: static;
        background-color: #f9f9f9;
        box-shadow: none;
        min-width: auto;
    }

    .stats-menu .submenu li {
        border-bottom: 1px solid #eee;
    }

    .stats-menu .submenu li:last-child {
        border-bottom: none;
    }

    .stats-menu .submenu li a {
        padding-left: 30px;
        font-size: 14px;
        font-weight: normal;
        color: #555;
        position: relative;
    }

    .stats-menu .submenu li a::before {
        content: '>';
        position: absolute;
        left: 15px;
    }

    .stats-menu .submenu li a:visited {
        color: #555;
    }

    /* モバイルのサブメニューホバー（薄い背景用） */
    .stats-menu .submenu li a:hover {
        background-color: #e0e0e0;
    }
}
