/* ============================================================
   警備DXナビ - Blog Styles
   親サイト styles.css に追加で読み込む固有スタイル。
   ヘッダー/フッター/ナビのスタイルは styles.css に依存し、ここには書かない。
   2カラムレイアウトと記事装飾のみを定義する。
   ============================================================ */

/* ---------- 記事ヘッダー ---------- */
.article-header {
  margin-bottom: 1.6rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
}

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

.article-date {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--accent-deep);
}

.article-category {
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffffff;
  background: var(--accent);
  border-radius: 4px;
  padding: 0.14rem 0.7rem;
  letter-spacing: 0.04em;
}

.article-readtime {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: #eef4f7;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.12rem 0.7rem;
}

.article-header h1 {
  font-family: var(--font-head);
  font-size: 1.72rem;
  font-weight: 900;
  color: var(--bg-dark);
  line-height: 1.5;
}

/* ---------- アイキャッチ ---------- */
.article-eyecatch {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

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

/* ---------- 記事内の図解キャプション補助 ---------- */
.article .lead-note {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

/* ---------- シェアボタン ---------- */
.share-box {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 2.4rem 0 0.5rem;
  padding: 1.1rem 1.3rem;
  background: #eef6f9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

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

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

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

.share-btn.share-x:hover {
  background: #333333;
  color: #ffffff;
}

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

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

/* ---------- 記事下ナビ ---------- */
.back-to-list {
  display: inline-block;
  margin-top: 1.4rem;
  font-weight: 700;
  color: var(--accent-deep);
}

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

/* ---------- サイドバー広告（a8バナー） ---------- */
.sidebar .ad-a8 {
  text-align: center;
  margin-bottom: 1.4rem;
}

.sidebar .ad-a8 img {
  display: inline-block;
  max-width: 100%;
  height: auto;
}

.sidebar .amazon-banner {
  margin: 0 0 1.4rem;
}

/* ============================================================
   ブログ一覧（index.html）
   ============================================================ */
.blog-list-hero {
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-panel) 100%);
  border-bottom: 2px solid var(--accent);
  padding: 2.6rem 1.5rem;
}

.blog-list-hero .container {
  padding: 0;
}

.blog-list-hero .page-label {
  display: inline-block;
  background: var(--accent-amber);
  color: #20242a;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.14rem 0.8rem;
  border-radius: 4px;
  margin-bottom: 0.7rem;
  letter-spacing: 0.08em;
}

.blog-list-hero h1 {
  font-family: var(--font-head);
  font-size: 1.9rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.45;
}

.blog-list-hero p {
  margin-top: 0.6rem;
  color: #b7cbd9;
  font-size: 0.95rem;
  max-width: 760px;
}

/* 一覧の2カラム（左=カードグリッド / 右=サイドバー） */
.blog-index-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 2.4rem;
  padding: 2rem 0 3.5rem;
  align-items: start;
}

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

.blog-card {
  background: var(--bg-card);
  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(-5px);
  box-shadow: 0 12px 30px rgba(12, 22, 34, 0.2);
}

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

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

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

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

.blog-card-meta time {
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-deep);
}

.blog-card-meta .card-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: #ffffff;
  background: var(--accent);
  border-radius: 4px;
  padding: 0.1rem 0.6rem;
}

.blog-card h2 {
  font-family: var(--font-head);
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.5;
  margin-bottom: 0.6rem;
}

.blog-card h2 a {
  color: var(--bg-dark);
}

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

.blog-card p {
  font-size: 0.84rem;
  color: var(--ink-soft);
  flex: 1;
  margin-bottom: 0.9rem;
  text-align: justify;
}

.blog-card .card-link {
  align-self: flex-start;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--accent-deep);
}

.blog-card .card-link::after {
  content: " →";
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .blog-index-layout {
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 1.6rem;
  }

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

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

  .blog-list-hero h1 {
    font-size: 1.5rem;
  }
}

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

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


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

/* Blog index card grid fallback: scoped to index-only markup. */
.blog-index-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

.blog-index-main { min-width: 0; }

.blog-index-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.blog-index-grid .blog-card { display: flex; flex-direction: column; }

.blog-index-grid .blog-card > a {
  color: inherit;
  text-decoration: none;
}

.blog-index-grid .card-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

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

.blog-index-grid .card-body { padding: 24px; }

@media (max-width: 1200px) {
  .blog-index-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .blog-index-layout { grid-template-columns: 1fr; }
  .blog-index-grid { grid-template-columns: 1fr; }
}
/* 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; }
}
