/* ============================================================
   デジタル終活ナビ blog.css
   2カラムレイアウト + 記事装飾のみ
   （ヘッダー/フッター/ナビは ../styles.css を使用。ここには書かない）
   カラートークンは ../styles.css の :root を継承
   ============================================================ */

/* ============ 2カラムレイアウト ============ */
.blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2.6rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.6rem 1.2rem 4rem;
  align-items: start;
}

/* ============ 記事本体カード ============ */
.blog-article {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.4rem 2.6rem 2.8rem;
  box-shadow: var(--shadow);
  min-width: 0;
}

.article-header {
  margin-bottom: 1.6rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  align-items: center;
  margin-bottom: 0.9rem;
  font-size: 0.8rem;
  color: var(--text-soft);
}

.article-date {
  font-family: 'Shippori Mincho', serif;
  font-weight: 700;
  color: var(--ink);
}

.article-category {
  background: var(--ink);
  color: var(--gold-light);
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
}

.article-readtime {
  border: 1px solid var(--line);
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
}

.article-header h1 {
  font-size: 1.85rem;
  line-height: 1.5;
  color: var(--ink);
}

/* ============ アイキャッチ ============ */
.article-eyecatch {
  margin-bottom: 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

.article-eyecatch img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

/* ============ 本文タイポグラフィ ============ */
.article-body {
  min-width: 0;
}

.article-body .lead {
  font-size: 1.02rem;
  color: var(--ink-2);
  border-left: 4px solid var(--gold);
  background: var(--paper);
  padding: 1rem 1.3rem;
  border-radius: 0 8px 8px 0;
  margin-bottom: 2rem;
}

.article-body h2 {
  font-size: 1.42rem;
  margin: 2.6rem 0 1.1rem;
  padding-bottom: 0.55rem;
  border-bottom: 2px solid var(--ink);
  position: relative;
}

.article-body h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 72px;
  height: 2px;
  background: var(--gold);
}

.article-body h3 {
  font-size: 1.1rem;
  margin: 1.8rem 0 0.8rem;
  padding-left: 0.8rem;
  border-left: 4px solid var(--gold);
}

.article-body p {
  margin-bottom: 1.15rem;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.3rem 1.4rem;
}

.article-body li {
  margin-bottom: 0.45rem;
}

.article-body a {
  color: var(--gold-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-body a:hover {
  color: var(--ink);
}

.article-body strong {
  color: var(--ink);
  font-weight: 700;
}

/* 注記ボックス */
.note-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--ink);
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.3rem;
  margin: 1.6rem 0 2rem;
  font-size: 0.92rem;
}

/* ============ 図解（インラインSVG） ============ */
.chart-figure {
  margin: 1.8rem 0 2.4rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.3rem 1rem;
}

.chart-figure svg {
  width: 100%;
  height: auto;
  display: block;
}

.chart-figure figcaption {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-soft);
  margin-top: 0.8rem;
}

/* SVG共通ラベル */
.svg-title {
  font-family: 'Shippori Mincho', serif;
  font-weight: 700;
  fill: var(--ink);
}

.svg-label {
  fill: var(--text);
}

.svg-sub {
  fill: var(--text-soft);
}

/* ============ 記事内広告 ============ */
.amazon-banner {
  margin: 0 0 1rem;
}

.amazon-banner:last-child {
  margin-bottom: 0;
}

.amazon-banner a {
  display: block;
  border: 1px dashed var(--gold);
  background: #fdfbf4;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  color: var(--gold-deep);
  text-align: center;
  font-weight: 600;
}

.amazon-banner a:hover {
  background: var(--paper-2);
}

.inline-ad {
  margin: 1.8rem 0 2rem;
  text-align: center;
  overflow-x: auto;
}

.inline-ad img {
  max-width: 100%;
  height: auto;
}

/* ============ シェア ============ */
.share-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin-top: 2.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}

.share-label {
  font-weight: 700;
  color: var(--ink);
  font-size: 0.9rem;
}

.share-btn {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #fff;
}

.share-x {
  background: #14171a;
}

.share-facebook {
  background: #1877f2;
}

.share-btn:hover {
  opacity: 0.88;
  color: #fff;
}

.back-to-list {
  display: inline-block;
  margin-top: 1.8rem;
  font-weight: 700;
  color: var(--ink);
  font-size: 0.9rem;
}

.back-to-list:hover {
  color: var(--gold-deep);
}

/* ============ サイドバー ============ */
.blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  min-width: 0;
}

.blog-side-box {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  box-shadow: var(--shadow);
}

.blog-side-box .side-title {
  font-size: 1rem;
  letter-spacing: 0.08em;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 0.5rem;
  margin-bottom: 0.9rem;
  color: var(--ink);
}

.blog-ad {
  text-align: center;
  overflow: hidden;
}

.blog-ad img {
  max-width: 100%;
  height: auto;
}

.ad-note {
  display: block;
  font-size: 0.66rem;
  color: var(--text-soft);
  letter-spacing: 0.16em;
  margin-bottom: 0.6rem;
  text-align: center;
}

/* 目次 */
.blog-toc {
  list-style: none;
  counter-reset: toc;
  padding: 0;
  margin: 0;
}

.blog-toc li {
  margin-bottom: 0.3rem;
}

.blog-toc a {
  display: block;
  position: relative;
  font-size: 0.86rem;
  padding: 0.32rem 0 0.32rem 1.9rem;
  border-bottom: 1px dashed var(--line);
  color: var(--text);
}

.blog-toc a::before {
  counter-increment: toc;
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  left: 0;
  font-family: 'Shippori Mincho', serif;
  font-weight: 700;
  color: var(--gold-deep);
}

.blog-toc a:hover {
  color: var(--gold-deep);
}

/* 関連ページ */
.blog-related {
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-related li {
  margin-bottom: 0.4rem;
}

.blog-related a {
  display: block;
  font-size: 0.86rem;
  padding: 0.5rem 0.7rem;
  background: var(--paper);
  border-left: 3px solid var(--ink);
  border-radius: 0 6px 6px 0;
  color: var(--text);
}

.blog-related a:hover {
  background: var(--paper-2);
  border-left-color: var(--gold);
  color: var(--ink);
}

/* ============ ブログ一覧（index.html） ============ */
.blog-index-head {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.6rem 1.2rem 0.6rem;
}

.blog-index-head h1 {
  font-size: 1.9rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.blog-index-head .blog-index-sub {
  color: var(--text-soft);
  font-size: 0.95rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.blog-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(28, 35, 64, 0.2);
}

.blog-thumbnail {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.blog-card-body {
  padding: 1.1rem 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card-body time {
  font-size: 0.78rem;
  color: var(--gold-deep);
  font-family: 'Shippori Mincho', serif;
  font-weight: 700;
}

.blog-card-body h2 {
  font-size: 1.08rem;
  margin: 0.4rem 0 0.6rem;
  line-height: 1.5;
}

.blog-card-body h2 a {
  color: var(--ink);
}

.blog-card-body h2 a:hover {
  color: var(--gold-deep);
}

.blog-card-body .article-summary {
  font-size: 0.85rem;
  color: var(--text-soft);
  line-height: 1.7;
  flex: 1;
}

.read-more {
  margin-top: 0.9rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold-deep);
  align-self: flex-start;
}

.read-more:hover {
  color: var(--ink);
}

/* ============ レスポンシブ ============ */
@media (max-width: 1024px) {
  .blog-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 1.8rem;
  }

  .blog-article {
    padding: 1.8rem 1.8rem 2.2rem;
  }

  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .blog-layout {
    grid-template-columns: 1fr;
  }

  .article-header h1 {
    font-size: 1.5rem;
  }
}

@media (max-width: 600px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-article {
    padding: 1.4rem 1.1rem 1.8rem;
  }

  .article-body h2 {
    font-size: 1.25rem;
  }

  .share-box {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Mobile news-commentary readability baseline (shared site-local rule). */
@media (max-width: 768px) {
  .blog-main, .blog-container, .two-col-layout { min-width: 0; }
  .article-detail, .blog-article, .article-body { min-width: 0; }
  .article-detail .article-body, .blog-article { padding-inline: 16px; }
  .article-content {
    font-size: 1rem;
    line-height: 1.85;
    overflow-wrap: anywhere;
  }
  .article-content h2 { font-size: clamp(1.25rem, 6vw, 1.45rem); line-height: 1.4; }
  .article-content h3 { font-size: clamp(1.12rem, 5vw, 1.25rem); line-height: 1.45; }
  .article-content :is(img, iframe, video) { max-width: 100%; height: auto; }
  .article-content table { display: block; max-width: 100%; overflow-x: auto; }
  .sidebar, .blog-sidebar { position: static; order: 2; }
}
/* Mobile article reading width: keep outer page gutters, remove duplicated inner gutters. */
@media (max-width: 768px) {
  .article-content,
  .article-detail .article-body,
  .blog-article,
  .main-content > article.main-content {
    padding-left: 0;
    padding-right: 0;
  }
  /* Cap article-panel padding without removing deliberate card framing. */
  .article-panel,
  .article-main,
  .post-content,
  .article-detail {
    padding-left: min(16px, 4vw);
    padding-right: min(16px, 4vw);
  }
  .article-body { padding-left: 0; padding-right: 0; }
}
