/* ============================================================
   海賊バルモア公式サイト 完全版 CSS
   (ヘッダー固定 / 3カラム / レスポンシブ対応 / おしらせスクロール追加)
   ============================================================ */

/* --- 1. 全体共通設定 --- */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    font-family: "Hiragino Kaku Gothic ProN", "メイリオ", sans-serif;
    background: #fff url(img/ba_kage2.png) no-repeat right center fixed;
    margin: 0;
    padding: 0;
    /* ヘッダー固定による隠れ防止：PC版 */
    padding-top: 110px; 
}

#wrapper {
    width: 960px;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.9);
    min-height: 100vh;
    padding-bottom: 50px;
}

.clearfix::after {
    content: "";
    display: block;
    clear: both;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- 2. ヘッダー (固定設定) --- */
header {
    position: fixed;     /* 画面上部に固定 */
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    z-index: 1000;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

#head {
    width: 960px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

#head nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

#head nav ul li {
    margin-left: 20px;
}

#head nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    transition: 0.3s;
}

#head nav ul li a:hover {
    color: #d32f2f;
}

/* --- 3. メインビジュアル --- */
.mv-wrap {
    width: 100%;
    margin-bottom: 30px;
}

/* --- 4. 概要セクション (中央揃え) --- */
#main2 {
    width: 100%;
    text-align: center;
    padding: 40px 20px;
}

#main2 h2 {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-size: 24px;
    margin-bottom: 20px;
}

#main2 h2 img {
    width: auto;
    height: 50px;
}

#main2 p span {
    display: block;
    margin-top: 15px;
}

/* --- 5. 絵本セクション (3カラム横並び) --- */
#picturebook {
    width: 100%;
    padding: 0 10px;
    margin-bottom: 50px;
}

#picturebook ul {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: space-between;
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

#picturebook ul li {
    width: 31%;
    flex-shrink: 0;
    text-align: center;
}

/* --- 6. 下段2カラム (バナーとお知らせ) --- */
#bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 10px 60px;
}

#left {
    width: 250px;
}

#left ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#left ul li {
    margin-bottom: 15px;
}

/* 右側のお知らせエリア（修正箇所） */
#right {
    width: 670px;
    background: #fff;
    padding: 20px; /* 余白を微調整 */
    border: 1px solid #eee;
    border-radius: 5px;
    text-align: left;
    height: 335px; /* 左のボタン4つ分に合わせた高さ */
    display: flex;
    flex-direction: column;
}

#right h3 {
    margin-top: 0;
    margin-bottom: 10px;
    border-left: 5px solid #d32f2f;
    padding-left: 10px;
    flex-shrink: 0; /* タイトルは固定 */
}

/* おしらせスクロール設定（追加箇所） */
#news {
    overflow-y: auto; /* 縦スクロールを有効に */
    flex-grow: 1;     /* 残りの高さを埋める */
    padding-right: 10px;
}

/* スクロールバーのカスタマイズ（任意） */
#news::-webkit-scrollbar {
    width: 6px;
}
#news::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 10px;
}

#news dl dt {
    font-weight: bold;
    color: #d32f2f;
    margin-top: 15px;
}

#news dl dd {
    margin: 5px 0 15px 0;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

/* --- 7. フッター --- */
footer {
    text-align: center;
    padding: 30px 0;
    background: #444;
    color: #fff;
    font-size: 12px;
}

/* --- 8. スマホ対応 (768px以下) --- */
@media screen and (max-width: 768px) {
    body {
        /* メニューが折り返されても隠れないよう数値を増やしました */
        padding-top: 250px !important; 
    }

    #wrapper, #head {
        width: 100%;
        padding: 0 15px;
    }

    #head, #picturebook ul, #bottom-content, #main2 h2 {
        display: block !important;
        text-align: center;
    }

    /* スマホでも固定を維持する場合はfixedのまま、不要ならstatic */
    header {
        position: fixed; 
        padding-bottom: 10px;
    }

    #head nav ul {
        justify-content: center;
        margin-top: 20px;
    }

    #head nav ul li {
        margin: 5px 10px;
    }

    #main2 h2 img {
        margin: 0 auto 10px;
    }

    #picturebook ul li {
        width: 100% !important;
        margin-bottom: 40px;
    }

    #left, #right {
        width: 100% !important;
    }

    /* スマホではスクロールを解除（自動的に伸びるようにする） */
    #right {
        height: auto !important;
    }
    #news {
        overflow-y: visible !important;
    }
}