/* =========================================================
   Adaptive Fashion Insight — Blog 固有スタイル (blog.css)
   2カラムレイアウト / 記事装飾のみ。
   ヘッダー / フッター / ナビのスタイルは ../styles.css に委譲。
   ========================================================= */

/* ---------------- ブログ共通ラッパー ---------------- */

.blog-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.6rem 1.2rem 4rem;
}

.blog-breadcrumb {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1.4rem;
}

.blog-breadcrumb a {
  color: var(--primary);
}

.blog-breadcrumb span {
  color: var(--muted);
}

/* ---------------- 2カラムグリッド ---------------- */

.blog-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2.6rem;
  align-items: start;
}

.blog-article {
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.2rem 2.2rem 2.6rem;
}

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

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

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

.article-meta .meta-cat {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
}

.article-meta .meta-date,
.article-meta .meta-time {
  display: inline-flex;
  align-items: center;
}

.article-head h1 {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  font-weight: 800;
  line-height: 1.5;
  color: var(--primary-dark);
}

.eyecatch {
  margin: 0 0 1.8rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

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

.blog-lead {
  background: var(--primary-soft);
  border-left: 5px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.2rem 1.4rem;
  margin-bottom: 2.2rem;
  font-size: 0.98rem;
  color: var(--ink);
}

/* ---------------- 本文 ---------------- */

.blog-body h2 {
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 2.3vw, 1.6rem);
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.5;
  padding-bottom: 0.6rem;
  margin: 2.8rem 0 1.2rem;
  border-bottom: 2px solid var(--line);
  position: relative;
}

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

.blog-body h3 {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--primary);
  margin: 1.8rem 0 0.8rem;
  padding-left: 0.7rem;
  border-left: 4px solid var(--accent);
  line-height: 1.6;
}

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

.blog-body ul,
.blog-body ol {
  margin: 0 0 1.3rem 0;
  padding-left: 1.5em;
}

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

.blog-body a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.blog-body a:hover {
  color: var(--accent);
}

.blog-body strong {
  color: var(--primary-dark);
}

/* ---------------- 図解・チャート ---------------- */

.blog-figure {
  background: #fbf8f2;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.2rem 1.1rem;
  margin: 1.8rem 0 2rem;
}

.blog-figure-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.9rem;
}

.blog-figure-cap {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.7rem;
  line-height: 1.7;
}

.blog-chart {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

/* ---------------- シェア・戻る ---------------- */

.blog-share {
  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-size: 0.88rem;
  font-weight: 700;
  color: var(--primary-dark);
}

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

.share-btn--x {
  background: #111418;
}

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

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

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

.blog-back::before {
  content: "← ";
  color: var(--accent);
}

/* ---------------- サイドバー ---------------- */

.blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

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

.side-title {
  font-family: var(--font-head);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--primary-dark);
  padding-bottom: 0.5rem;
  margin-bottom: 0.9rem;
  border-bottom: 2px solid var(--accent);
}

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

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

.side-card .amazon-banner {
  margin: 0;
}

.blog-toc {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.88rem;
}

.blog-toc li {
  border-bottom: 1px dashed var(--line);
}

.blog-toc li:last-child {
  border-bottom: none;
}

.blog-toc a {
  display: block;
  padding: 0.5rem 0.2rem;
  color: var(--ink);
}

.blog-toc a::before {
  content: "▸ ";
  color: var(--accent);
}

.blog-toc a:hover {
  color: var(--primary);
  padding-left: 0.4rem;
}

.blog-related {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.88rem;
}

.blog-related li {
  border-bottom: 1px dashed var(--line);
}

.blog-related li:last-child {
  border-bottom: none;
}

.blog-related a {
  display: block;
  padding: 0.5rem 0.2rem;
  color: var(--ink);
}

.blog-related a::before {
  content: "→ ";
  color: var(--primary);
}

.blog-related a:hover {
  color: var(--accent);
  padding-left: 0.4rem;
}

/* ---------------- ブログ一覧ページ ---------------- */

.blog-page-head {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.6rem 1.2rem 0;
}

.blog-page-head h1 {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.4;
  padding-left: 0.9rem;
  border-left: 5px solid var(--accent);
}

.blog-page-head p {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 780px;
}

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

.blog-card {
  background: var(--card);
  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 30px rgba(44, 42, 39, 0.16);
}

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

.blog-card-thumb img,
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-thumb img,
.blog-card:hover .card-thumb img {
  transform: scale(1.05);
}

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

.blog-card-date,
.card-body time {
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 500;
}

.blog-card-body h2,
.card-body h3 {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.5;
}

.blog-card-body h2 a,
.card-body h3 {
  color: var(--primary-dark);
}

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

.blog-card-sum,
.card-body p {
  font-size: 0.83rem;
  color: var(--muted);
  flex: 1;
}

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

.blog-card-more:hover {
  color: var(--primary);
}

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

@media (max-width: 1024px) {
  .blog-grid {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 1.8rem;
  }

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

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

  .blog-article {
    padding: 1.6rem 1.3rem 2rem;
  }
}

@media (max-width: 560px) {
  .card-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; }
}
