/* setup-cad.com ブログ用スタイル
   トップページ(index.html)のデザイントークンに合わせてある。
   トップのCSSはインラインのため、ここに必要分だけ複製している。 */

:root {
  --navy:       #0d1f4e;
  --blue:       #1a56db;
  --blue-mid:   #2563eb;
  --blue-light: #3b82f6;
  --sky:        #eff6ff;
  --white:      #ffffff;
  --gray:       #f1f5f9;
  --text:       #1e293b;
  --muted:      #64748b;
  --accent:     #0ea5e9;
  --accent-dark:#0284c7;
  --border:     #e2e8f0;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 960px; margin: 0 auto; padding: 0 24px; }

/* ── ヘッダー（トップと同一） ── */
header {
  position: sticky; top: 0; z-index: 100;
  background: var(--navy);
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark {
  width: 36px; height: 36px; background: var(--blue); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 900; color: #fff;
}
.logo-text { color: #fff; font-size: 15px; font-weight: 700; line-height: 1.3; }
.logo-text span { font-size: 11px; font-weight: 400; opacity: .75; display: block; }
nav { display: flex; gap: 4px; flex-wrap: wrap; }
nav a {
  color: rgba(255,255,255,.8); text-decoration: none; font-size: 13px;
  padding: 6px 12px; border-radius: 6px; transition: background .2s;
}
nav a:hover { background: rgba(255,255,255,.15); color: #fff; }
nav a.current { background: rgba(255,255,255,.15); color: #fff; font-weight: 700; }
.btn-cta-sm {
  background: var(--accent); color: #fff !important; font-weight: 700;
  padding: 8px 16px !important;
}
.btn-cta-sm:hover { background: var(--accent-dark) !important; }

/* ── ページ見出し ── */
.page-head {
  background: linear-gradient(135deg, var(--navy) 0%, #16307a 100%);
  color: #fff; padding: 56px 24px 48px; text-align: center;
}
.page-head h1 { font-size: clamp(24px, 4vw, 34px); font-weight: 900; margin-bottom: 10px; }
.page-head p { font-size: 14px; color: rgba(255,255,255,.75); max-width: 640px; margin: 0 auto; }

/* ── パンくず ── */
.breadcrumb { background: var(--gray); padding: 10px 0; font-size: 12px; color: var(--muted); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.breadcrumb li + li::before { content: "›"; margin-right: 8px; color: #cbd5e1; }
.breadcrumb a { color: var(--blue); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ── カテゴリタブ ── */
.cat-tabs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 32px 0 8px; }
.cat-tabs a {
  font-size: 13px; font-weight: 700; text-decoration: none;
  padding: 8px 18px; border-radius: 999px;
  background: var(--gray); color: var(--muted); border: 1px solid var(--border);
  transition: all .2s;
}
.cat-tabs a:hover { background: var(--sky); color: var(--blue); border-color: var(--blue-light); }
.cat-tabs a.active { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ── 記事一覧 ── */
.post-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px; margin: 32px 0 64px;
}
.post-card {
  display: block; text-decoration: none; color: inherit;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; transition: transform .2s, box-shadow .2s;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 8px 32px rgba(0,0,0,.1); }
.post-card-img { position: relative; aspect-ratio: 3 / 2; background: var(--gray); }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; }
.post-cat {
  position: absolute; left: 10px; top: 10px;
  background: var(--blue); color: #fff; font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
}
.post-card-body { padding: 16px 18px 20px; }
.post-date { font-size: 12px; color: var(--muted); }
.post-card-body h2 { font-size: 16px; font-weight: 700; line-height: 1.5; margin: 6px 0 8px; }
.post-excerpt { font-size: 13px; color: var(--muted); line-height: 1.7; }
.post-more { display: inline-block; margin-top: 12px; font-size: 13px; font-weight: 700; color: var(--blue); }
.no-post { text-align: center; color: var(--muted); padding: 48px 0 64px; }

/* ── 記事本文 ── */
.post-hero { background: var(--navy); color: #fff; padding: 48px 24px 40px; }
.post-hero .post-label {
  display: inline-block; background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 700; padding: 4px 14px; border-radius: 999px; margin-bottom: 14px;
}
.post-hero h1 { font-size: clamp(21px, 3.4vw, 31px); font-weight: 900; line-height: 1.45; }
.post-hero .post-meta { margin-top: 12px; font-size: 13px; color: rgba(255,255,255,.7); }

.post-layout { display: grid; grid-template-columns: 1fr 280px; gap: 40px; margin: 40px auto 64px; }
.post-body { min-width: 0; }
.post-body > * + * { margin-top: 16px; }
.post-body p { font-size: 15px; line-height: 1.95; }
.post-body h2 {
  font-size: 20px; font-weight: 700; margin-top: 40px; padding: 6px 0 6px 14px;
  border-left: 5px solid var(--blue); line-height: 1.5;
}
.post-body h3 { font-size: 16px; font-weight: 700; margin-top: 28px; color: var(--navy); }
.post-body ul, .post-body ol { padding-left: 24px; }
.post-body li { font-size: 15px; line-height: 1.9; margin-bottom: 6px; }
.post-body a { color: var(--blue); }
.post-body img { border-radius: 10px; border: 1px solid var(--border); }
.post-body figure { margin: 28px 0; }
.post-body figcaption { font-size: 12px; color: var(--muted); margin-top: 8px; text-align: center; }
.post-body table { width: 100%; border-collapse: collapse; font-size: 14px; }
.post-body th, .post-body td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; }
.post-body th { background: var(--sky); font-weight: 700; }
.table-scroll { overflow-x: auto; }
.lead-box {
  background: var(--sky); border-left: 4px solid var(--blue);
  padding: 18px 20px; border-radius: 0 8px 8px 0;
}
.lead-box p { font-size: 14.5px; }

/* ── サイドバー ── */
.post-side > * + * { margin-top: 28px; }
.side-title { font-size: 14px; font-weight: 700; margin-bottom: 12px; padding-left: 10px; border-left: 4px solid var(--blue); }
.side-list { list-style: none; }
.side-list li + li { margin-top: 12px; }
.side-list a { display: flex; gap: 10px; align-items: center; text-decoration: none; color: inherit; }
.side-list img { width: 68px; height: 46px; object-fit: cover; border-radius: 6px; flex: none; }
.side-list span { font-size: 12.5px; line-height: 1.5; }
.side-list a:hover span { color: var(--blue); }
.side-cta {
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  color: #fff; border-radius: 12px; padding: 22px 20px; text-align: center;
}
.side-cta h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.side-cta p { font-size: 12.5px; color: rgba(255,255,255,.85); margin-bottom: 14px; }
.side-cta a {
  display: block; background: #fff; color: var(--blue); font-weight: 700;
  text-decoration: none; padding: 10px; border-radius: 8px; font-size: 13px;
}

/* ── 記事下CTA ── */
.post-cta { background: var(--gray); padding: 48px 24px; text-align: center; }
.post-cta h2 { font-size: 20px; font-weight: 900; margin-bottom: 10px; }
.post-cta p { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.btn-main {
  display: inline-block; background: var(--accent); color: #fff; font-weight: 700;
  text-decoration: none; padding: 14px 36px; border-radius: 8px; font-size: 15px;
}
.btn-main:hover { background: var(--accent-dark); }
.back-link { text-align: center; padding: 8px 24px 40px; }
.back-link a { color: var(--blue); text-decoration: none; font-weight: 700; font-size: 14px; }

/* ── フッター（トップと同一） ── */
footer { background: var(--navy); color: rgba(255,255,255,.6); padding: 40px 24px 24px; text-align: center; }
.footer-logo { font-size: 20px; font-weight: 900; color: #fff; margin-bottom: 8px; }
.footer-links { display: flex; gap: 20px; justify-content: center; margin: 16px 0; flex-wrap: wrap; }
.footer-links a { color: rgba(255,255,255,.6); text-decoration: none; font-size: 13px; }
.footer-links a:hover { color: #fff; }
.footer-copy { font-size: 12px; margin-top: 24px; }

@media (max-width: 860px) {
  .post-layout { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 640px) {
  header { height: auto; flex-direction: column; padding: 10px 16px 12px; gap: 8px; }
  nav { justify-content: center; }
  .container { padding: 0 16px; }
}
