/* --- 基本設定 --- */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    /* ヘッダー固定分の余白を上にあける */
    padding-top: 0px; 
}

.site-haader-main{
    align-items: center;
    padding: 25px 15px;
    background-color: #ffd86a;
    border-bottom: 1px solid #e0e0e0;
}
/* --- ヘッダー --- */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* ヘッダーを画面上部に固定 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box; /* paddingを含めて幅100%にする */
    z-index: 1000;
}

.site-header .logo img {
    height: 50px; /* ロゴの高さを調整 */
    display: block;
}

/* --- ハンバーガーメニューボタン --- */
.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1002; /* サイドバーより手前に表示 */
}

.menu-toggle .icon-bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #9e9e9e;
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

/* --- サイドバー本体 --- */
.sidebar-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px; /* サイドバーの幅 */
    height: 100vh;
    background-color: #2c2c2c;
    padding-top: 80px; /* ヘッダーの高さより少し多めにあける */
    
    /* 初期状態は画面右外に隠す */
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1001;
    box-shadow: -5px 0 15px rgba(0,0,0,0.2);
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li a {
    display: block;
    padding: 16px 30px;
    color: white;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: 500;
}

.sidebar-nav li a:hover {
    background-color: #444;
}

/* --- 背景オーバーレイ --- */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    
    /* 初期状態は非表示 */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}


/* --- ▼ JSで制御するクラス (サイドバー表示中) ▼ --- */

body.sidebar-open .sidebar-nav {
    transform: translateX(0); /* サイドバーをスライドイン */
}

body.sidebar-open .overlay {
    opacity: 1;
    visibility: visible;
}

/* アイコンを「×」印に変更するアニメーション */
body.sidebar-open .menu-toggle .icon-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
body.sidebar-open .menu-toggle .icon-bar:nth-child(2) {
    opacity: 0;
}
body.sidebar-open .menu-toggle .icon-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}



/*
========================================
 フッター
========================================
*/

.site-footer-main {
    background-color: #f8f9fa; /* 背景色: 明るいグレー */
    border-top: 1px solid #e0e0e0; /* 上部に境界線 */
    color: #6c757d; /* テキスト色: やや暗いグレー */
    padding: 30px 15px;
    margin-top: 40px; /* mainコンテンツとの間に余白 */
    text-align: center;
}

/* PC表示（992px以上）で main や header と幅を合わせるためのインナーコンテナ */
.footer-content {
    width: 100%;
}

.footer-nav {
    margin-bottom: 15px;
}

.footer-nav a {
    color: #495057; /* リンクの色 */
    text-decoration: none;
    margin: 0 10px;
    font-size: 0.9em;
}

.footer-nav a:hover {
    text-decoration: underline;
}

.copyright {
    font-size: 0.85em;
    margin: 0;
}

/*
========================================
 フッター (PC用の調整)
========================================
*/

@media (min-width: 992px) {
    /* フッターの内容も中央に寄せる */
    .site-haader-main{

        align-items: center;
        padding: 25px 15px;
        background-color: #ffd86a;
        border-bottom: 1px solid #e0e0e0;
    }
    .footer-content {
        max-width: 940px;
        margin-left: auto;
        margin-right: auto;
        padding-left: 24px;
        padding-right: 24px;
        
        /* PC表示ではリンクとコピーライトを横並びにする */
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }

    .footer-nav {
        margin-bottom: 0;
        order: 1; /* リンクを左側に */
    }

    .copyright {
        order: 2; /* コピーライトを右側に */
    }
}


/*
========================================
 PC (ラージスクリーン) 用の調整
========================================
*/

/* 画面幅が 992px 以上の場合に適用 */
@media (min-width: 992px) {

    /* --- メインコンテンツのレイアウト --- */
    main {
        max-width: 940px; 
        margin-left: auto;
        margin-right: auto;
        padding-left: 24px;
        padding-right: 24px;
    }

    /* --- ヘッダーのレイアウト --- */
    .site-header {
        max-width: 940px;
        left: 50%;
        transform: translateX(-50%);
        
        /* ロゴとナビが並ぶように */
        align-items: center; 
    }
    
    /* --- ▼ここからがPC用ナビゲーションのスタイル▼ --- */

    /* 1. ハンバーガーボタンを非表示に */
    .menu-toggle {
        display: none;
    }

    /* 2. オーバーレイも非表示に */
    .overlay {
        display: none;
    }
    
    /* 3. サイドバーのスタイルをリセットし、タブ（横並び）用に変更 */
    .sidebar-nav {
        /* position: fixed や transform をリセット */
        position: static;
        transform: none;
        
        /* 幅と高さを自動にし、背景を透明に */
        width: auto;
        height: auto;
        background-color: transparent;
        padding-top: 0;
        box-shadow: none;
        z-index: auto;
        
        /* ロゴとの間に余白を設ける */
        margin-left: auto; 
    }

    /* 4. リスト (ul) を横並び (flex) に */
    .sidebar-nav ul {
        display: flex;
        align-items: center;
        gap: 8px; /* 各タブ間の余白 */
    }

    /* 5. 各タブ (a) のデザインを調整 */
    .sidebar-nav li a {
        color: #333; /* 文字色を黒系に */
        font-size: 0.95em; /* 少し小さく */
        font-weight: 500;
        padding: 8px 14px;
        border-radius: 6px;
        transition: background-color 0.2s ease;
    }

    /* 6. タブのホバー（マウスが乗った時）のスタイル */
    .sidebar-nav li a:hover {
        background-color: #f0f0f0; /* 薄いグレーの背景色 */
        color: #000;
    }

    /* 7. サイドバーにあった仕切り線はPCでは不要なため非表示に */
    .sidebar-nav hr {
        display: none;
    }
}