/* ==========================================================================
   VectorCore AI — ブログ記事共通スタイル
   design-system.css のトークン・コンポーネントを前提とする。
   記事本文の読み幅は 860px。
   ========================================================================== */

.blog-wrapper {
  padding-top: var(--header-h);
}

.blog-body .container,
.blog-hero-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --------------------------------------------------------------------------
   記事ヒーロー — 紺の暗幕＋斜線の地紋
   -------------------------------------------------------------------------- */
.blog-hero {
  position: relative;
  background: var(--navy-deep);
  padding: 72px 0 60px;
  color: #fff;
  overflow: hidden;
}

.blog-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M0 60L60 0M-10 10L10-10M50 70L70 50' stroke='rgba(255,255,255,0.03)' stroke-width='1' fill='none'/%3E%3C/svg%3E");
  background-size: 60px 60px;
  pointer-events: none;
}

.blog-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--orange) 0%, rgba(192, 96, 58, 0) 65%);
}

.blog-hero-inner {
  position: relative;
  z-index: 1;
}

.blog-category {
  display: inline-block;
  border: 1px solid rgba(232, 132, 92, 0.6);
  color: var(--orange-soft);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  padding: 5px 14px;
  border-radius: var(--radius-xs);
  margin-bottom: 22px;
}

.blog-h1 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.5vw, 40px);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.03em;
  margin-bottom: 20px;
}

.blog-meta {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.6);
}

/* --------------------------------------------------------------------------
   目次
   -------------------------------------------------------------------------- */
.blog-toc {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 28px 32px;
  margin: 48px 0 40px;
}

.blog-toc-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--navy-dark);
  margin-bottom: 16px;
}

.blog-toc-title::after {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--orange);
}

.blog-toc ol {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.blog-toc li {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.blog-toc li::marker {
  font-family: var(--font-display);
  color: var(--orange);
}

.blog-toc li a {
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: rgba(44, 74, 110, 0.3);
  text-underline-offset: 3px;
  transition: color 0.2s, text-decoration-color 0.2s;
}

.blog-toc li a:hover {
  color: var(--orange);
  text-decoration-color: var(--orange);
}

/* --------------------------------------------------------------------------
   記事本文
   -------------------------------------------------------------------------- */
.blog-body {
  padding: 0 0 80px;
}

.blog-content {
  font-size: 16px;
  line-height: 2;
  color: var(--text-primary);
}

.blog-content p {
  margin-bottom: 24px;
}

.blog-content h2 {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 700;
  color: var(--navy-dark);
  line-height: 1.5;
  letter-spacing: 0.03em;
  margin: 56px 0 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.blog-content h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 48px;
  height: 1px;
  background: var(--orange);
}

.blog-content h2:first-child {
  margin-top: 0;
}

.blog-content h3 {
  font-family: var(--font-display);
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 700;
  color: var(--navy-dark);
  line-height: 1.55;
  letter-spacing: 0.02em;
  margin: 36px 0 14px;
  padding-left: 14px;
  border-left: 2px solid var(--orange);
}

.blog-content strong {
  font-weight: 700;
  color: var(--text-primary);
}

.blog-content ul,
.blog-content ol {
  margin: 0 0 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.blog-content li {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text-secondary);
}

.blog-content blockquote,
.blog-content .note-box {
  background: var(--cream);
  border-left: 2px solid var(--navy);
  padding: 18px 22px;
  margin: 24px 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.9;
}

.blog-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}

/* コード（記事間で明暗が混在していたため紺の暗幕に統一） */
.blog-content code {
  font-family: 'SFMono-Regular', Consolas, Menlo, monospace;
  font-size: 0.92em;
}

.blog-content pre,
.blog-code-box {
  background: var(--navy-deep);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin: 24px 0;
  overflow-x: auto;
}

.blog-content pre,
.blog-content pre code,
.blog-code-box pre {
  font-family: 'SFMono-Regular', Consolas, Menlo, monospace;
  font-size: 13px;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.92);
  white-space: pre-wrap;
  word-break: break-word;
}

.blog-code-box pre {
  margin: 0;
}

/* --------------------------------------------------------------------------
   表組み
   -------------------------------------------------------------------------- */
.blog-table-wrap,
.summary-table-wrap {
  overflow-x: auto;
  margin: 24px 0;
}

.blog-table,
.summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: #fff;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.blog-table thead th,
.summary-table thead th {
  background: var(--navy-dark);
  color: #fff;
  padding: 13px 16px;
  text-align: left;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}

.blog-table tbody td,
.summary-table tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: top;
  font-size: 13px;
}

.blog-table tbody tr:last-child td,
.summary-table tbody tr:last-child td {
  border-bottom: none;
}

.blog-table tbody tr:nth-child(even) {
  background: rgba(242, 240, 236, 0.4);
}

.summary-table td:first-child {
  font-weight: 600;
  color: var(--navy);
  min-width: 120px;
}

/* --------------------------------------------------------------------------
   関連サービスリンク
   -------------------------------------------------------------------------- */
.internal-link-haken {
  margin: 40px 0;
  padding: 22px 26px;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 2px solid var(--orange);
  border-radius: var(--radius-xs);
}

.internal-link-haken p:first-child {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.internal-link-haken p {
  line-height: 1.7;
}

.internal-link-haken a {
  color: var(--orange);
  font-weight: 600;
  transition: color 0.2s;
}

.internal-link-haken a:hover {
  color: var(--orange-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   記事内CTA
   -------------------------------------------------------------------------- */
.blog-cta-box {
  position: relative;
  background: var(--navy-deep);
  border-radius: var(--radius-sm);
  padding: 44px 40px;
  margin: 48px 0;
  text-align: center;
  color: #fff;
  overflow: hidden;
}

.blog-cta-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M0 60L60 0M-10 10L10-10M50 70L70 50' stroke='rgba(255,255,255,0.035)' stroke-width='1' fill='none'/%3E%3C/svg%3E");
  background-size: 60px 60px;
  pointer-events: none;
}

.blog-cta-box > * {
  position: relative;
  z-index: 1;
}

.blog-cta-box-title {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.55;
  margin-bottom: 12px;
}

.blog-cta-box-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 24px;
  line-height: 1.9;
}

.blog-cta-checks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 24px;
  margin-bottom: 28px;
}

.blog-cta-check-item {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  gap: 6px;
}

.blog-cta-check-item::before {
  content: '';
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23E8845C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* --------------------------------------------------------------------------
   記事末尾の関連記事リスト（クラスタ内の内部リンク）
   -------------------------------------------------------------------------- */
.blog-related {
  margin: 56px 0 8px;
  padding: 32px 34px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.blog-related-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--navy-dark);
  margin-bottom: 18px;
}

.blog-related-title::after {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--orange);
}

.blog-related-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
}

.blog-related-list li {
  margin: 0;
}

.blog-related-list a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  line-height: 1.7;
  color: var(--navy);
  transition: color 0.2s, padding-left 0.2s var(--ease-out);
}

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

.blog-related-list a::before {
  content: '›';
  flex-shrink: 0;
  color: var(--orange);
  font-weight: 700;
}

.blog-related-list a:hover {
  color: var(--orange);
  padding-left: 4px;
}

/* --------------------------------------------------------------------------
   ブログ一覧ページ（/blog/）
   -------------------------------------------------------------------------- */
.blog-index-body {
  padding: 0 0 88px;
}

.blog-index-body .container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.blog-cluster {
  margin-top: 56px;
}

.blog-cluster:first-child {
  margin-top: 48px;
}

.blog-cluster-head {
  margin-bottom: 28px;
}

.blog-cluster-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--navy-dark);
  line-height: 1.5;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.blog-cluster-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 48px;
  height: 1px;
  background: var(--orange);
}

.blog-cluster-sub {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-top: 14px;
}

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

.blog-index-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: box-shadow 0.25s, transform 0.25s var(--ease-out);
}

.blog-index-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.blog-index-card-tag {
  display: inline-block;
  align-self: flex-start;
  border: 1px solid var(--navy);
  color: var(--navy);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  padding: 4px 12px;
  border-radius: var(--radius-xs);
  margin-bottom: 16px;
}

.blog-index-card-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--navy-dark);
  line-height: 1.6;
  margin-bottom: 12px;
}

.blog-index-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.85;
  flex: 1;
  margin-bottom: 18px;
}

.blog-index-card-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 0.04em;
}

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

@media (max-width: 768px) {
  .blog-hero {
    padding: 52px 0 44px;
  }

  .blog-toc {
    padding: 20px;
  }

  .blog-cta-box {
    padding: 28px 20px;
  }

  .blog-related {
    padding: 24px 22px;
  }

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

@media (max-width: 480px) {
  .blog-hero-inner,
  .blog-body .container {
    padding: 0 16px;
  }
}
