@charset "utf-8";

html {
    overflow-x: hidden;
}

/* --- 共通スタイル --- */
body {
    margin: 0;
    font-family: "Meiryo", "メイリオ", "Hiragino Kaku Gothic ProN", sans-serif;
}

.nav-list > li > a {
    display: flex;
    align-items: center; 
    height: 100%; 
    padding: 10px 15px;
}

.nav-item-social a {
    gap: 8px;
}
        
.social-icon {
    width: 20px;
    height: 20px;
}

.header {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 0 20px;
    /* 【修正】YouTubeなどの上に確実に表示させるため数値を大きくしました */
    z-index: 10000;
    transition: transform 0.3s ease-in-out;
}


.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 90px;
    width: 100%;
    margin: 0 auto;
}

.header-logo-area {
    display: flex;
    align-items: center;
}

.header-logo-link img {
    width: 80px;
    height: 80px;
    display: block;
}

.header-title {
    color: green;
    font-size: 22px;
    font-weight: bold;
    line-height: 1.3;
    margin-left: 15px;
}

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

.nav-item a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    padding: 10px 15px;
    position: relative;
    transition: color 0.3s;
}

.nav-item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: forestgreen;
    transition: width 0.3s ease-in-out;
}

.nav-item a:hover {
    color: forestgreen;
}

.nav-item a:hover::after {
    width: 100%;
}

/* ヘッダーの表示・非表示アニメーション */
.header {
    transition: transform 0.3s ease-in-out;
}

/* ヘッダーを非表示にするためのクラス */
body.scrolling-down .header {
    transform: translateY(-100%);
}

/* --- モバイル表示 (768px以下) --- */
@media (max-width: 768px) {
    .header-nav {
        position: fixed;
        top: 90px; /* ヘッダーの高さ分下げる */
        left: 0;
        width: 100%;
        height: calc(100vh - 90px);
        background-color: rgba(255, 255, 255, 0.95);
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        overflow-y: auto;
        /* 【追加】メニュー自体も最前面レイヤーに配置 */
        z-index: 10000;
    }

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

    .nav-list {
        flex-direction: column;
        padding-top: 20px;
    }

    .nav-item {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #eee;
    }

    .nav-item a {
        display: block;
        padding: 20px;
    }
    
    .nav-item a::after {
        display: none; /* ホバー時の下線はモバイルでは不要 */
    }

    /* ハンバーガーメニューボタン */
    .hamburger-menu {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 40px;
        height: 30px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        /* 【修正】メニュー背景よりさらに手前にボタンを表示 */
        z-index: 10001;
    }

    .hamburger-bar {
        width: 100%;
        height: 3px;
        background-color: green;
        border-radius: 2px;
        transition: all 0.3s ease-in-out;
    }
    
    /* ハンバーガーメニューがアクティブな時のスタイル（「×」印に変化） */
    .hamburger-menu.is-active .hamburger-bar:nth-child(1) {
        transform: translateY(13.5px) rotate(45deg);
    }
    .hamburger-menu.is-active .hamburger-bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger-menu.is-active .hamburger-bar:nth-child(3) {
        transform: translateY(-13.5px) rotate(-45deg);
    }
}

/* --- PC表示 (769px以上) --- */
@media (min-width: 769px) {
    .hamburger-menu {
        display: none; /* PCではハンバーガーメニューを非表示 */
    }

    .header {
        position: sticky;
        top: 0;
    }
}