/* =========================================================
   抹茶輸出ジャーナル | ブログ固有スタイル
   ../styles.css と併読。ヘッダー/フッター/ナビは書かない。
   2カラム(.page-layout)・サイドバー(.sidebar)・図解(.figure)は
   親 styles.css を再利用し、ここには記事装飾と一覧のみを定義する。
   ========================================================= */

/* ---------- 記事ヘッダー ---------- */

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

.article-header h1 {
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  line-height: 1.55;
  margin-top: 0.6rem;
  padding-bottom: 0.8rem;
  border-bottom: 3px solid var(--matcha);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.article-date {
  font-family: "Zen Old Mincho", serif;
  color: var(--gold);
  font-weight: 700;
  font-size: 0.92rem;
}

.article-category {
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: var(--deep-green);
  border-radius: 4px;
  padding: 0.15rem 0.7rem;
}

.article-readtime {
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.article-eyecatch {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

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

/* 記事本文の先頭リード */
.article-lead {
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--paper);
  border-left: 5px solid var(--gold);
  border-radius: 6px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.8rem;
}

/* ---------- SVG図解の凡例 ---------- */

.svg-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
  justify-content: center;
  margin-top: 0.8rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.svg-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.svg-legend i {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  display: inline-block;
}

.legend-matcha { background: #5f8d4e; }
.legend-gold { background: #b48a2f; }
.legend-soft { background: #a4c48c; }

/* ---------- シェアボタン ---------- */

.share-box {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin: 2.6rem 0 1rem;
  padding: 1.1rem 1.3rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

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

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

.share-btn.share-x {
  background: #0f1419;
}

.share-btn.share-x:hover {
  background: #333;
  color: #fff;
}

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

.share-btn.share-facebook:hover {
  background: #0f5ec7;
  color: #fff;
}

/* ---------- 記事下ナビ ---------- */

.back-to-list {
  display: inline-block;
  margin-top: 1.4rem;
  font-weight: 700;
  color: var(--forest);
}

.back-to-list::before {
  content: "← ";
}

/* ---------- ブログ一覧 ---------- */

.blog-list-header {
  text-align: center;
  padding: 2.8rem 1.2rem 0.6rem;
}

.blog-list-header h1 {
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  margin-bottom: 0.6rem;
}

.blog-list-header .blog-list-en {
  display: block;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}

.blog-list-header p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  max-width: 720px;
  margin: 0 auto;
}

.blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2.5rem;
  padding: 2.2rem 0 4rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.6rem;
  align-content: start;
}

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

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(28, 58, 42, 0.2);
}

.blog-card-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.blog-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}

.blog-card h2 {
  font-size: 1.05rem;
  line-height: 1.55;
  margin-bottom: 0.6rem;
}

.blog-card h2 a {
  color: var(--deep-green);
}

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

.blog-card p {
  font-size: 0.86rem;
  color: var(--ink-soft);
  flex: 1;
  margin-bottom: 1rem;
}

.blog-card .card-link {
  align-self: flex-start;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
  border-bottom: 1px solid var(--gold);
}

.blog-card .card-link:hover {
  color: var(--deep-green);
  border-color: var(--deep-green);
}

/* ---------- レスポンシブ ---------- */

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

  .blog-layout .sidebar {
    max-width: 640px;
  }

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

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

  .share-box {
    gap: 0.6rem;
  }
}

/* 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; }
}
