/* single.css - テスト記事用のシンプルなスタイル */

/* 記事全体のコンテナ */
.single-post-container {
    max-width: 800px; /* 記事の最大幅 */
    margin: 40px auto; /* 上下左右中央寄せ */
    padding: 140px 20px 80px; /* 調整されたパディング */
    line-height: 1.7;
    color: #333;
}

/* 記事タイトル (h1) */
.single-post-container h1 {
    font-size: 2.0em;
    color: #222;
    margin-bottom: 16px;
    line-height: 1.3;
}

/* 記事本文中の見出し (h2) */
.single-post-container h2 {
    font-size: 1.5em;
    color: #222;
    margin-bottom: 16px;
    margin-top: 40px;
    line-height: 1.3;
}

/* 記事本文の段落 */
.single-post-container p {
    font-size: 1.05em;
    margin-bottom: 1.5em;
}

/* 画像のスタイル */
.single-post-container img {
    max-width: 100%; /* 親要素に合わせて画像をリサイズ */
    height: auto; /* アスペクト比を維持 */
    display: block; /* 画像の下の余白をなくす */
    margin: 30px auto; /* 上下に余白、左右中央寄せ */
    border-radius: 8px; /* 角を少し丸く */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* 軽い影 */
}

/* 箇条書きやリスト */
.single-post-container ul,
.single-post-container ol {
    margin-bottom: 1.5em;
    padding-left: 25px;
}

.single-post-container ul li,
.single-post-container ol li {
    margin-bottom: 0.5em;
}

/* ============================================== */
/* 最新記事リスト (Related Posts) のスタイル */
/* ============================================== */

/* 最新記事リスト全体 */
.related-posts {
    max-width: 800px;
    margin: 40px auto 60px; /* 記事下とフッターの間に余白 */
    padding: 0 20px;
    border-top: 1px solid #eee; /* 上部に区切り線 */
    padding-top: 30px;
}

/* 「最新記事」の見出し */
.related-posts h2 {
    font-size: 1.6em;
    color: #444;
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #5d98d2; /* 強調線 */
    display: inline-block;
    padding-bottom: 5px;
}

/* 記事リストのコンテナ */
.latest-post-list {
    list-style: none;
    padding: 0;
    display: flex; /* 横並びにする */
    gap: 20px; /* アイテム間の余白 */
    justify-content: space-between; /* 両端揃え */
    flex-wrap: wrap; /* スマホで折り返すための指定 */
}

/* 個々の記事アイテム */
.latest-post-item {
    flex: 1 1 calc(33.333% - 20px); /* 3つ並び (gapの分を調整) */
    min-width: 200px; /* 最小幅 */
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden; /* 角丸に合わせて画像を隠す */
    transition: box-shadow 0.3s;
}

.latest-post-item:hover {
    box-shadow: 0 6px 12px rgba(0,0,0,0.15); /* ホバーで影を濃く */
}

/* サムネイル画像 */
.latest-post-item .post-thumbnail-link img {
    width: 100%;
    height: auto;
    object-fit: cover;
    margin: 0; /* 記事内の画像スタイルを上書き */
    border-radius: 0;
    box-shadow: none;
}

/* タイトルと日付のラッパー */
.latest-post-item .post-content-wrap {
    padding: 15px;
}

/* 記事タイトル */
.latest-post-item h3 {
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
    line-height: 1.4;
    margin-top: 0;
    margin-bottom: 10px;
}

/* 投稿日 */
.latest-post-item .post-date {
    display: block;
    font-size: 0.8em;
    color: #999;
}

/* スマホ表示対応 (基本的なレスポンシブ) */
@media (max-width: 768px) {
    /* 記事コンテナのスマホでの調整 */
    .single-post-container {
        margin: 20px auto;
        padding: 120px 15px 40px; /* スマホでのパディングを調整 */
    }
    .single-post-container h1 {
        font-size: 1.8em;
    }
    .single-post-container p {
        font-size: 1em;
    }
}

/* スマホ表示時の最新記事リストの調整 (縦一列にする) */
@media (max-width: 600px) {
    .latest-post-list {
        flex-direction: column; /* 縦に積み重ねる */
        gap: 15px;
    }
    .latest-post-item {
        flex: 1 1 100%; /* 全幅を使用 */
        min-width: unset;
    }
}


/* ============================================== */
/* SNS共有ボタンのスタイル */
/* ============================================== */

/* ボタン全体を囲むコンテナ */
.sns-share-buttons {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    text-align: center;
    border-top: 1px dashed #ccc;
    border-bottom: 1px dashed #ccc;
}

/* シェアを促すテキスト */
.sns-share-buttons .share-text {
    display: block;
    font-size: 0.9em;
    font-weight: bold;
    color: #555;
    margin-bottom: 15px;
}

/* 共通ボタンのスタイル */
.sns-share-buttons .share-button {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 5px;
    border-radius: 5px;
    font-size: 0.9em;
    font-weight: bold;
    text-decoration: none;
    color: #fff;
    transition: opacity 0.3s;
}

.sns-share-buttons .share-button:hover {
    opacity: 0.85;
}

/* X (旧Twitter) 専用スタイル */
.sns-share-buttons .twitter {
    background-color: #000; /* Xのブランドカラー */
}

/* Facebook 専用スタイル */
.sns-share-buttons .facebook {
    background-color: #1877f2; /* Facebookのブランドカラー */
}

/* LINE 専用スタイル */
.sns-share-buttons .line {
    background-color: #00c300; /* LINEのブランドカラー */
}

/* スマホ表示対応 */
@media (max-width: 600px) {
    .sns-share-buttons {
        padding: 15px 10px;
    }
    .sns-share-buttons .share-button {
        display: block; /* ボタンを縦に並べる */
        margin: 10px auto;
        width: 80%; /* 幅を広げる */
    }
    .sns-share-buttons .share-text {
        margin-bottom: 10px;
    }
}