/*
single.css
記事詳細ページ用のスタイル (更新版)
*/

/* --- メインコンテンツエリア --- */
#container-single {
    flex: 1; /* 残りのスペースをすべて使用 */
    min-width: 0; /* flexアイテムの縮小を許可 */
    background-color: #fff;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* 記事タイトル */
#container-single h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem); /* レスポンシブなフォントサイズ */
    line-height: 1.4;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    text-align: left; /* style.cssのcenterを上書き */
    color: #333;
}

/* アイキャッチ画像エリア */
.main-img {
    margin-bottom: 30px;
}

#mainkizi {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block; /* 画像下の余分なスペースを削除 */
}

/* 投稿日 */
.time {
    text-align: right;
    margin-top: 10px;
    color: #777;
    font-size: 1.4rem;
}

/* --- 記事本文 --- */
.singlecontent {
    font-size: 1.6rem; /* 基本の文字サイズ */
    line-height: 1.8; /* 行間を広めにとり読みやすく */
    color: #444;
}

/* 本文内の見出しや要素のスタイル */
.singlecontent h3 {
    font-size: 2.2rem;
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e5e5;
}

.singlecontent h4 {
    font-size: 1.8rem;
    margin: 30px 0 15px;
    padding-left: 10px;
    border-left: 4px solid #de3cc3; /* アクセントカラー */
}

.singlecontent p {
    margin-bottom: 1.5em;
}

.singlecontent a {
    color: #de3cc3;
    text-decoration: underline;
}

.singlecontent a:hover {
    text-decoration: none;
}

.singlecontent img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 20px 0;
}

.singlecontent ul,
.singlecontent ol {
    margin: 0 0 1.5em 1.5em;
    padding-left: 1.5em;
}

.singlecontent li {
    margin-bottom: 0.5em;
}

/* 前後の記事へのリンク */
.backimg {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.backimg a {
    color: #5d2266;
    font-weight: bold;
    text-decoration: none;
}

.backimg a:hover {
    text-decoration: underline;
}

/* --- サイドバー --- */
/* WordPressのデフォルトのIDやクラスを想定 */
#secondary, .sidebar {
    width: 300px; /* サイドバーの幅を固定 */
    flex-shrink: 0; /* 幅が縮まないようにする */
}

/* 装飾用の列（非表示） */
.center-line {
    display: none;
}


/* --- レスポンシブ対応 (幅900px以下) --- */
@media (max-width: 900px) {
    main {
        flex-direction: column; /* 縦並びに変更 */
        padding: 0 15px;
    }

    #container-single {
        padding: 20px;
    }

    /* サイドバーの幅を100%にしてメインコンテンツの下に配置 */
    #secondary, .sidebar {
        width: 100%;
        margin-top: 30px;
    }
}
