/* ============================================
   ソーラーサイクル・ジャパン ブログ固有スタイル
   2カラムレイアウト・記事装飾のみ
   （ヘッダー/フッター/ナビは ../styles.css を使用）
   ============================================ */

/* ---------- ブログ2カラム ---------- */
.blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2.2rem;
  padding: 2.5rem 0 3.5rem;
  align-items: start;
}

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

.article-header {
  border-bottom: 2px solid var(--line);
  padding-bottom: 1.2rem;
  margin-bottom: 1.4rem;
}

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

.article-date {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--amber-dark);
  font-size: 0.85rem;
}

.article-category {
  background: var(--teal-light);
  color: var(--forest);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
}

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

.article-header h1 {
  font-size: clamp(1.5rem, 3.6vw, 2.1rem);
  font-weight: 900;
  color: var(--deep-green);
  line-height: 1.4;
}

/* ---------- アイキャッチ ---------- */
.article-eyecatch {
  margin-bottom: 1.8rem;
  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 h2 {
  font-size: 1.4rem;
  font-weight: 700;
  border-left: 8px solid var(--amber);
  border-bottom: 2px solid var(--line);
  padding: 0.2rem 0 0.4rem 0.8rem;
  margin: 2.2rem 0 1.1rem;
  scroll-margin-top: 110px;
}

.article-body h2:first-child {
  margin-top: 0.5rem;
}

.article-body h3 {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--forest);
  margin: 1.6rem 0 0.6rem;
  padding-left: 0.7rem;
  border-left: 4px solid var(--teal);
}

.article-body p {
  margin-bottom: 1.1rem;
  text-align: justify;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.2rem 1.6rem;
}

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

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

.article-body a {
  color: var(--teal);
  text-decoration: underline;
}

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

.lead-paragraph {
  background: var(--teal-light);
  border-left: 5px solid var(--teal);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  margin-bottom: 1.8rem;
  font-size: 0.98rem;
}

.lead-paragraph p {
  margin-bottom: 0;
}

/* ---------- 図解キャプション ---------- */
.figure-caption {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 0.7rem;
  text-align: center;
}

/* ---------- 記事内SVG図解 ---------- */
.diagram {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem;
  margin: 1.6rem 0 1.9rem;
  box-shadow: var(--shadow);
  overflow-x: auto;
}

.diagram svg {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}

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

/* ---------- シェアボックス ---------- */
.share-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin: 2.4rem 0 1.4rem;
  padding-top: 1.4rem;
  border-top: 2px solid var(--line);
}

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

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

.share-x {
  background: #1a1a1a;
}

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

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

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

/* ---------- 一覧へ戻る ---------- */
.back-to-list {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--forest);
  border: 2px solid var(--teal);
  border-radius: 8px;
  padding: 0.55rem 1.3rem;
  transition: var(--transition);
}

.back-to-list:hover {
  background: var(--teal);
  color: #fff;
}

/* ---------- サイドバー広告枠 ---------- */
.sidebar-ad {
  text-align: center;
  overflow: hidden;
}

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

.ad-tag {
  display: block;
  font-size: 0.66rem;
  color: #9aa8a0;
  letter-spacing: 0.15em;
  text-align: center;
  margin-bottom: 0.4rem;
}

/* ---------- ブログ一覧ヘッダー ---------- */
.blog-index-head {
  background: linear-gradient(120deg, var(--deep-green), var(--teal));
  color: #fff;
  padding: 2.6rem 0;
  text-align: center;
}

.blog-index-head h1 {
  color: #fff8e8;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 900;
  margin-bottom: 0.5rem;
}

.blog-index-head p {
  color: #e3f0ea;
  font-size: 0.95rem;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1.2rem;
}

/* ---------- ブログ記事カードグリッド ---------- */
.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(-4px);
  box-shadow: 0 12px 28px rgba(14, 59, 46, 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 h2 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

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

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

.blog-card-body time {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--amber-dark);
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.article-summary {
  font-size: 0.86rem;
  color: var(--ink-soft);
  flex: 1;
  margin-bottom: 0.9rem;
}

.read-more {
  align-self: flex-start;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--forest);
  border-bottom: 2px solid var(--amber);
  padding-bottom: 1px;
}

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

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

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

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

@media (max-width: 600px) {
  .article-content {
    padding: 1.4rem 1.2rem 1.8rem;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }
}

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