/* --- 基本設定 --- */
body {
    margin: 0;
    font-family: 'Noto Sans JP', sans-serif;
    background-color: #f9f9f9;
}

/* --- コンテンツエリアの調整 --- */
.page-content {
    /* ヒーローイメージを配置するためのスタイル */
    background-color: #ddd; /* デフォルトの背景色 */
}
.hero-image {
    background-image: url('https://images.unsplash.com/photo-1519681393784-d120267933ba?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80');
    background-size: cover;
    background-position: center;
    height: 100vh; /* 画面の高さ一杯に表示 */
    display: flex;
    justify-content: center;
    align-items: center;
    color: transparent;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* --- ヘッダー全体 (★大幅修正) --- */
.site-header {
    /* 初期状態は透明 */
    background-color: transparent;
    padding: 20px 0; /* 少し余白を広げる */
    width: 100%;
    position: fixed; /* ★absoluteからfixedに変更して常に画面上部に固定 */
    top: 0;
    z-index: 100;
    /* 背景色や影の変化を滑らかにするアニメーション */
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

/* ★スクロール時にJSで付与されるクラス */
.site-header.scrolled {
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 15px 0; /* スクロール後は少し詰める */
}
.site-header.scrolled .site-logo,
.site-header.scrolled .main-nav a {
    color: #333333; /* スクロール後は文字を黒に */
}
.site-header.scrolled .main-nav a:hover {
    color: #007bff; /* ホバー色は青 */
}


.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px; /* PCでの左右余白を広げる */
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* --- サイトロゴ (★修正) --- */
.site-logo {
    font-size: 26px;
    font-weight: 700;
    color: transparent; /* 初期状態は白文字 */
    text-decoration: none;
    position: relative;
    z-index: 20;
    transition: color 0.4s ease; /* 色の変化を滑らかに */
}

/* --- ナビゲーションメニュー (★修正) --- */
.main-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 40px; /* メニュー間の隙間を広げる */
}

.main-nav a {
    text-decoration: none;
    color: transparent; /* 初期状態は白文字 */
    font-size: 16px;
    font-weight: 500;
    padding-bottom: 8px; /* 下線との隙間を確保 */
    position: relative;
    transition: color 0.4s ease;
}

/* ホバーエフェクトを少しリッチに */
.main-nav a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: #ffffff; /* 初期状態の下線は白 */
    left: 0;
    bottom: 0;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.4s ease-out;
}
.site-header.scrolled .main-nav a::after {
    background: #007bff; /* スクロール後は下線を青に */
}

.main-nav a:hover::after {
    transform: scaleX(1);
}

.main-nav a.active {
    font-weight: 700;
}
.site-header:not(.scrolled) .main-nav a.active {
     border-bottom: 2px solid #ffffff; /* 透明時のアクティブ表現 */
}
.site-header.scrolled .main-nav a.active {
     color: #007bff; /* スクロール後のアクティブ表現 */
}







/* --- ハンバーガーボタンのスタイル --- */
.nav-toggle {
    display: none; /* PCでは非表示 */
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    position: relative;
    z-index: 20;
}

.nav-toggle-bar {
    display: block;
    width: 28px;
    height: 3px;
    background-color: #333;
    margin: 6px auto;
    transition: all 0.3s ease-in-out;
}

/* ハンバーガーボタンがアクティブ（is-active）になった時のスタイル（バツ印にする） */
.nav-toggle.is-active .nav-toggle-bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.nav-toggle.is-active .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}
.nav-toggle.is-active .nav-toggle-bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}


/* --- 画面幅が768px以下の場合に適用されるスタイル --- */
@media (max-width: 768px) {
    /* ハンバーガーボタンを表示 */
    .nav-toggle {
        display: block;
    }

    /* PC用のナビゲーションメニューを非表示に */
    .main-nav {
        /* 画面外に配置 */
        position: fixed;
        top: 0;
        left: -100%; /* 初期状態では画面の左外に隠す */
        width: 100%;
        height: 100vh; /* 画面全体の高さ */
        background-color: rgba(255, 255, 255, 0.95);
        transition: left 0.4s ease;
        z-index: 10;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .main-nav a {
        color: #333333;
    }

    /* メニューがアクティブ（is-active）になった時に画面内に表示 */
    .main-nav.is-active {
        left: 0;
    }

    /* メニュー項目を縦並びに変更 */
    .main-nav ul {
        flex-direction: column;
        text-align: center;
        gap: 0;
    }
    
    .main-nav a {
        display: block;
        padding: 20px 0;
        font-size: 24px;
    }
    .main-nav a::after {
        display: none; /* PC用の下線アニメーションは非表示に */
    }
}
