/**
 * blog.css - ブログ記事用スタイル
 * 結い言（ゆいごん）カラーパレットに準拠
 *
 * 読み込み条件: is_single() || is_archive() || is_category()
 * functions.php で条件付きエンキュー
 */

/* ===== 記事本文 (.entry-content) ===== */
.entry-content {
  font-size: 1rem;
  line-height: 1.9;
  color: #374151;
}

.entry-content > * + * {
  margin-top: 1.5rem;
}

/* --- 見出し --- */
.entry-content h2 {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--yuigon-navy, #2c3e50);
  border-left: 4px solid var(--yuigon-gold, #C0A062);
  background: linear-gradient(to right, rgba(192,160,98,.06), transparent);
  padding: .75rem 1rem;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
}

.entry-content h3 {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--yuigon-navy, #2c3e50);
  border-bottom: 2px solid var(--yuigon-gold, #C0A062);
  padding-bottom: .5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.entry-content h4 {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--yuigon-navy, #2c3e50);
  margin-top: 1.75rem;
  margin-bottom: .75rem;
}

.entry-content h5,
.entry-content h6 {
  font-family: 'Noto Serif JP', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--yuigon-navy, #2c3e50);
  margin-top: 1.5rem;
  margin-bottom: .5rem;
}

/* --- 段落 --- */
.entry-content p {
  line-height: 1.9;
}

/* --- 太字 --- */
.entry-content strong,
.entry-content b {
  color: var(--yuigon-navy, #2c3e50);
  font-weight: 700;
}

/* --- リンク --- */
.entry-content a {
  color: var(--yuigon-gold, #C0A062);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity .2s ease;
}

.entry-content a:hover {
  opacity: .75;
}

/* --- リスト --- */
.entry-content ul {
  list-style: none;
  padding-left: 1.5rem;
}

.entry-content ul li {
  position: relative;
  padding-left: .25rem;
  margin-bottom: .5rem;
}

.entry-content ul li::before {
  content: '';
  position: absolute;
  left: -1.25rem;
  top: .65em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--yuigon-gold, #C0A062);
}

.entry-content ol {
  list-style: decimal;
  padding-left: 1.5rem;
}

.entry-content ol li {
  margin-bottom: .5rem;
  padding-left: .25rem;
}

.entry-content ol li::marker {
  color: var(--yuigon-gold, #C0A062);
  font-weight: 700;
}

/* --- 引用 --- */
.entry-content blockquote {
  background: #FDFBF8;
  border-left: 4px solid var(--yuigon-gold, #C0A062);
  border-radius: 0 .5rem .5rem 0;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  color: #4b5563;
  font-style: normal;
}

.entry-content blockquote p {
  margin: 0;
}

.entry-content blockquote cite {
  display: block;
  margin-top: .75rem;
  font-size: .875rem;
  color: #9ca3af;
}

/* --- テーブル --- */
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: .95rem;
}

.entry-content table th {
  background: var(--yuigon-navy, #2c3e50);
  color: #fff;
  font-weight: 700;
  padding: .75rem 1rem;
  text-align: left;
}

.entry-content table td {
  padding: .75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.entry-content table tr:nth-child(even) td {
  background: #fafafa;
}

/* --- 画像 --- */
.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: .5rem;
}

.entry-content figure {
  margin: 1.5rem 0;
}

.entry-content figcaption {
  text-align: center;
  font-size: .875rem;
  color: #9ca3af;
  margin-top: .5rem;
}

/* --- 水平線 --- */
.entry-content hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 2rem 0;
}

/* --- コード --- */
.entry-content code {
  background: #f3f4f6;
  padding: .15rem .4rem;
  border-radius: .25rem;
  font-size: .9em;
  color: var(--yuigon-navy, #2c3e50);
}

.entry-content pre {
  background: #1e293b;
  color: #e2e8f0;
  border-radius: .5rem;
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: .9rem;
  line-height: 1.6;
}

.entry-content pre code {
  background: transparent;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

/* ===== ページネーション（archive.php用） ===== */
.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 .5rem;
  margin: 0 .2rem;
  border-radius: 9999px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--yuigon-navy, #2c3e50);
  background: #fff;
  border: 1px solid #e5e7eb;
  transition: all .2s ease;
  text-decoration: none;
}

.page-numbers:hover {
  border-color: var(--yuigon-gold, #C0A062);
  color: var(--yuigon-gold, #C0A062);
}

.page-numbers.current {
  background: var(--yuigon-gold, #C0A062);
  color: #fff;
  border-color: var(--yuigon-gold, #C0A062);
}

.page-numbers.dots {
  border: none;
  background: transparent;
  cursor: default;
}

.page-numbers.prev,
.page-numbers.next {
  gap: .25rem;
}

/* ===== line-clamp ユーティリティ（Tailwind CDN にない場合の保険） ===== */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== レスポンシブ ===== */
@media (max-width: 768px) {
  .entry-content h2 {
    font-size: 1.25rem;
  }
  .entry-content h3 {
    font-size: 1.125rem;
  }
  .entry-content table {
    font-size: .85rem;
  }
  .entry-content table th,
  .entry-content table td {
    padding: .5rem .75rem;
  }
}
