/* ==========================================================================
   TerraScope Blog 固有スタイル
   ヘッダー/フッター/ナビは ../styles.css を使用（ここには書かない）
   ========================================================================== */

/* --------------------------------------------------------------------------
   ブログ一覧
   -------------------------------------------------------------------------- */
.blog-hero {
  background: var(--navy-900);
  border-bottom: 2px solid var(--terra-500);
  padding: 3rem 1.2rem;
  background-image:
    repeating-radial-gradient(circle at 110% -30%, transparent 0, transparent 54px, rgba(217, 126, 84, 0.12) 55px, transparent 57px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: auto, 64px 64px;
}

.blog-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.blog-hero .hero-coord {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.25em;
  color: var(--terra-400);
  margin-bottom: 0.8rem;
}

.blog-hero h1 {
  color: var(--white);
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  letter-spacing: 0.05em;
  margin-bottom: 0.7rem;
}

.blog-hero p {
  color: #c3cedd;
  max-width: 720px;
  font-size: 0.95rem;
}

.blog-list-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem;
}

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

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--terra-400);
}

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

.blog-content {
  padding: 1.2rem 1.4rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-content h2 {
  font-size: 1.1rem;
  line-height: 1.55;
  margin-bottom: 0.4rem;
}

.blog-content h2 a {
  color: var(--navy-800);
}

.blog-content h2 a:hover {
  color: var(--terra-500);
}

.blog-content time {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--olive-600);
  display: block;
  margin-bottom: 0.6rem;
}

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

.read-more {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--terra-500);
  align-self: flex-start;
  border-bottom: 1px solid currentColor;
}

/* --------------------------------------------------------------------------
   記事ページ
   -------------------------------------------------------------------------- */
.article-header {
  margin-bottom: 1.6rem;
  border-bottom: 2px solid var(--navy-800);
  padding-bottom: 1.2rem;
}

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

.article-date,
.article-readtime {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--olive-600);
}

.article-category {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--white);
  background: var(--terra-500);
  padding: 0.15rem 0.6rem;
  border-radius: 2px;
}

.article-header h1 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  color: var(--navy-800);
  line-height: 1.5;
  letter-spacing: 0.03em;
}

/* --------------------------------------------------------------------------
   シェア・戻る導線
   -------------------------------------------------------------------------- */
.share-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin: 2.4rem 0 1.4rem;
  padding: 1.1rem 1.2rem;
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.share-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy-800);
}

.share-btn {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 4px;
  color: var(--white);
}

.share-btn:hover {
  opacity: 0.85;
  color: var(--white);
}

.share-x {
  background: var(--navy-800);
}

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

.back-to-list {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy-700);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.55rem 1.1rem;
  background: var(--paper);
}

.back-to-list:hover {
  border-color: var(--terra-500);
  color: var(--terra-500);
}

/* --------------------------------------------------------------------------
   レスポンシブ
   -------------------------------------------------------------------------- */
@media (max-width: 760px) {
  .blog-list-grid {
    grid-template-columns: 1fr;
  }
}


/* News commentary quality guard: mobile-safe media and sidebar layout */
.blog-page header .header-inner { flex-direction: row; align-items: center; width: 100%; }
.blog-page header nav { margin-left: auto; }
.blog-main, .article-main, .blog-article, .article-content, .blog-article-content { min-width: 0; max-width: 100%; }
.article-header { display: block; min-width: 0; }
body.blog-page { overflow-x: hidden; }
.blog-article-hero, .article-hero-image, .article-header figure { max-width: 100%; overflow: hidden; }
.blog-article-hero img, .article-hero-image, .article-header figure img { display: block; width: 100%; max-width: 100%; height: auto; object-fit: cover; }
.blog-article-content img, .article-content img, .blog-main img { max-width: 100%; height: auto; }
.related-articles ul, .related-posts ul, .toc ul, .sidebar-widget ul { margin: 0; padding-left: 1.2rem; }
.related-articles li, .related-posts li, .toc li, .sidebar-widget li { margin: .45rem 0; line-height: 1.55; }
.sitenavi-slot { display: none !important; }
@media (max-width: 768px) {
  .blog-layout, .article-layout { grid-template-columns: minmax(0, 1fr) !important; width: min(calc(100% - 24px), 1120px); }
  .blog-sidebar { position: static !important; width: 100%; }
  .blog-main, .article-main { width: 100%; }
  .blog-article-hero { margin-left: 0; margin-right: 0; }
  .blog-article-hero img, .article-hero-image { width: 100% !important; max-width: 100% !important; }
}

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