/*
 * Header Styles (style-header.css)
 * -------------------------------------------------- */

/* --- ヘッダー全体 --- */
.site-header {
    background-color: #fff;
    border-bottom: 1px solid #e5e7eb; /* 薄いグレーの境界線 */
}

/* ヘッダー内のコンテンツ幅を制限するコンテナ */
.site-header__inner {
    max-width: 1100px; /* サイトの最大幅 */
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* --- (1) 上部のアフィリエイト告知バー --- */
.site-header__top-bar {
    background-color: #f0f9ff; /* スクリーンショットの薄い水色 */
    font-size: 12px;
    color: #0c5460;
}
.site-header__top-bar .site-header__inner {
    padding-top: 5px;
    padding-bottom: 5px;
    text-align: right;
}
.site-header__top-bar p {
    margin: 0;
}

/* --- (2) メインヘッダー (ロゴとナビゲーション) --- */
.site-header__main .site-header__inner {
    display: flex;
    justify-content: space-between; /* 両端に配置 */
    align-items: center;
    height: 80px; /* ヘッダーの高さ */
}

/* --- ロゴエリア --- */
.site-branding .custom-logo {
    display: block;
    max-height: 40px; /* ロゴの高さを指定 */
    width: auto;
}
/* ロゴが設定されていない場合のサイト名 */
.site-branding .site-title {
    margin: 0;
    font-size: 24px;
}
.site-branding .site-title a {
    color: #111827;
    text-decoration: none;
}


/* --- ナビゲーションメニュー --- */
.main-navigation { /* underscores標準のクラス名 */
    font-size: 15px;
}
.main-navigation ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 25px; /* メニュー項目の間隔 */
}
.main-navigation a {
    color: #1f2937; /* テキストの色 */
    font-weight: bold;
    text-decoration: none;
    transition: color 0.2s ease;
}

/* ホバー時と現在のページ */
.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    color: #3b82f6; /* 青色 */
}

/* underscoresのモバイルメニューボタンを非表示（PC表示時） */
.menu-toggle {
    display: none;
}

/* --- スマホ表示（768px以下） --- */
@media (max-width: 768px) {
    .site-header__main .site-header__inner {
        height: auto;
        min-height: 60px;
        position: relative;
    }

    /* underscoresテーマのモバイルメニューボタンを表示 */
    .menu-toggle {
        display: inline-block;
        font-size: 16px;
        padding: 10px;
        background: #3b82f6;
        color: #fff;
        border: none;
        border-radius: 5px;
        position: absolute;
        top: 50%;
        right: 20px;
        transform: translateY(-50%);
    }

    /* デスクトップ用メニューを非表示に */
    .main-navigation ul {
        display: none;
    }

    /* モバイルメニューが表示された時のスタイル（underscoresのJSが .toggled クラスを付与する） */
    .main-navigation.toggled ul {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        border-top: 1px solid #e5e7eb;
        padding: 10px 0;
        z-index: 100;
    }
    .main-navigation.toggled li {
        text-align: center;
    }
    .main-navigation.toggled a {
        display: block;
        padding: 10px 20px;
    }
}