@charset "UTF-8";

/*---------- 共通部分 ----------*/
html {
    font-size: 100%;
}
body {
    background-color: hsl(0, 0%, 100%);
    line-height: 1.6;
    color: #333;
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
}

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

/* メインレイアウト（基本はスマホ向けの縦並び） */
.main {
    max-width: 1120px;
    margin: auto;
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column; /* スマホでは縦並び */
    gap: 2rem;
}

/*---------- ヘッダー ----------*/
header {
    text-align: center;
    padding: 2rem 1rem;
    color: rgb(53, 197, 197);
}
h1 {
    color: #94B8A7;
    margin-bottom: 0.5rem;
}

/*---------- サイドバー ----------*/
.sidebar {
   padding: 5px;
    margin-bottom: 1rem;
    text-align: center;
}
.sidebartitle {
    padding: 5px;
    margin-bottom: 1rem;
    text-align: center;
   
}
.side-menu {
    list-style: none;
    padding: 0;
}
.side-menu li {
    margin-bottom: 0.5rem;
}

/*---------- メインエリア（記事部分） ----------*/
.post {
    width: 100%;
}
.section-title {
    border-bottom: 3px solid #94B8A7;
    margin: 2rem 0 1rem 0;
    padding-bottom: 5px;
}
h3.shinkan {
    border-bottom: 1px solid #94B8A7;
    margin: 1.5rem 0 1rem 0;
    padding: 5px;
    
}

/* 画像とテキストの横並び設定 */
.container {
    display: flex;
    flex-wrap: wrap; /* 幅が狭いときは折り返す */
    margin: 1rem 0;
    gap: 1rem;
    align-items: center;
}
.iconpic img {
    width: 80px; /* アイコンサイズ */
    border-radius: 50%;
}
.coverpic img {
    width: 150px; /* 本の表紙サイズ */
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
}
.item-title {
    font-weight: bold;
    font-size: 1.1rem;
}



/*---------- デスクトップ版（800px以上） ----------*/
@media(min-width: 800px) {
    .main {
        flex-direction: row; /* 横並びに変更 */
        justify-content: space-between;
    }
    .post {
        width: 70%;
        order: 2; /* 記事を右に */
    }
    .sidebar {
        width: 25%;
        order: 1; /* メニューを左に */
        text-align: left;
    }
}

/*---------- スマホ版（799pxまで） 
@media(max-width: 799px) {
    .main {
        flex-direction: column;  
        justify-content: space-between;
    }
    .post {
        width: 100%;
        order: 2;
    }
    .sidebar {
        
        width: 100%;
        order: 1; 
        text-align: center;
    }
}
 ----------*/

/*---------- スマホ版（799px以下） ----------*/
@media(max-width: 799px) {
    .main {
        flex-direction: column;
        justify-content: space-between;
    }
    .post{
        order: 2; 
    }
    .sidebar {
        width: 100%;
        order: 1; /* メニューを一番上に */
        /* background-color: #f9f9f9; 軽く背景色をつけてエリアを明確に */
        padding: 0;
        border-radius: 8px;
        margin-bottom: 0;
    }
    .side-menu {
        display: flex; /* 横並びにする */
        flex-wrap: wrap; /* 折り返しを許可 */
        justify-content: center; /* 中央寄せ */
        gap: 1px; /* ボタン同士の隙間 */
    }
    .side-menu li {
        margin-bottom: 0; /* 下の余白をリセット */
    }
    .side-menu a {
        display: inline-block;
        padding: 1px 3px;
        /* background-color: #fff;
        border: 1px solid #94B8A7;
        border-radius: 20px; 丸みのあるボタンに */
        text-decoration: none;
        color: #94B8A7;
        font-size: 0.9rem;
    }
}


/*---------- フッター ----------*/
.page-footer {
    max-width: 1120px;
    margin: 2rem auto 0;
    padding: 2rem 1.5rem;
    text-align: center;
    border-top: 1px solid #94B8A7;
}