/* ========== シングル投稿ページ ========== */

.single-post {
  padding: 4rem 0;
  background-color: #fff;
  color: #333;
  line-height: 1.8;
}

/* ========== レイアウト全体 ========== */

.post-body {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

@media (min-width: 960px) {
  .post-body {
    flex-direction: row;
  }
}

/* ========== メインエリア ========== */

.post-main {
  flex: 1;
}

/* パンくずリスト */
.breadcrumb {
  font-size: 0.85rem;
  color: #999;
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: #0073aa;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* タイトル・メタ情報 */
.post-title {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.post-meta {
  font-size: 0.875rem;
  color: #777;
  margin-bottom: 2rem;
}

.post-meta .category-badge {
  display: inline-block;
  background-color: #f0f0f0;
  color: #555;
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
  margin-left: 0.5rem;
  border-radius: 9999px;
  text-decoration: none;
}

.post-meta .category-badge:hover {
  background-color: #ddd;
  color: #000;
}

/* アイキャッチ画像 */
.post-thumbnail {
  margin-bottom: 2rem;
}

.post-thumbnail img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* 記事本文 */
.post-content {
  font-size: 1rem;
  color: #333;
}

.post-content p {
  margin-bottom: 1.5rem;
}

.post-content ul,
.post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.post-content a {
  color: #0073aa;
  text-decoration: underline;
}

.post-content a:hover {
  text-decoration: none;
}

/* h2 */
.post-content h2 {
  font-size: 1.5rem;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  font-weight: bold;
  border-left: 6px solid #00B5E2;
  padding-left: 0.75rem;
  color: #222;
}

/* h3 */
.post-content h3 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: bold;
  position: relative;
  padding-left: 1.25rem;
  color: #333;
}

.post-content h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 8px;
  height: 8px;
  background-color: #00B5E2;
  border-radius: 50%;
}

/* ========== サイドバー ========== */

.post-sidebar {
  width: 100%;
}

@media (min-width: 960px) {
  .post-sidebar {
    width: 300px;
  }
}

.sticky-box {
  position: sticky;
  top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-box {
  background-color: #f9f9f9;
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.sidebar-title {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.sidebar-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: #0073aa;
  color: #fff;
  text-decoration: none;
  border-radius: 9999px;
  font-weight: bold;
  transition: background-color 0.3s;
}

.sidebar-button:hover {
  background-color: #005f8d;
}

/* ========== 関連リンクカード ========== */

.internal-link-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  margin: 2rem 0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.link-card-inner {
  display: flex;
  text-decoration: none;
  color: inherit;
}

.link-card-inner:hover {
  background-color: #f5faff;
}

.link-card-image img {
  width: 150px;
  height: 100%;
  object-fit: cover;
  display: block;
}

.link-card-content {
  padding: 1rem;
  flex: 1;
}

.link-card-title {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.link-card-excerpt {
  font-size: 0.9rem;
  color: #555;
}

.breadcrumb {
  font-size: 0.85rem;
  color: #999;
  background-color: #fff; /* ← 追加 */
  padding: 0.5rem 1rem;    /* ← 読みやすさ向上のために推奨 */
  border-radius: 4px;      /* ← 任意：角丸にして自然に */
  margin-bottom: 1rem;
}

.post-meta .category-badge {
  display: inline-block;
  background-color: #00B5E2; /* テーマカラー */
  color: #fff;
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
  margin-left: 0.5rem;
  border-radius: 9999px;
  text-decoration: none;
  transition: background-color 0.3s;
}

.post-meta .category-badge:hover {
  background-color: #009cc6; /* hover時に少し濃く */
  color: #fff;
}

/* ========== サイドバー sticky 調整（追従ヘッダー対応） ========== */

.sticky-box {
  position: sticky;
  top: 158px;         /* ヘッダー高さ分をオフセット */
  display: flex;
  flex-direction: column;
  gap: 2rem;
  z-index: 10;       /* ヘッダーより下に表示 */
}

/* SP対応：下に回り込む場合 */
@media (max-width: 959px) {
  .sticky-box {
    position: relative;
    top: auto;
  }
}

/* 内部リンクスクロール補正（anchorリンク用） */
html {
  scroll-padding-top: 68px; /* ヘッダー高さと揃える */
}

