/* ===== BLOG 共通スタイル ===== */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  background: #f0f4f9;
  color: #1a1a2e;
  line-height: 1.85;
}

a { color: #1565c0; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== ナビゲーションヘッダー ===== */
.blog-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 58px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.06);
}

.blog-nav__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #1565c0;
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: -.02em;
}
.blog-nav__brand:hover { text-decoration: none; opacity: .85; }
.blog-nav__brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: contain;
}

.blog-nav__links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.blog-nav__links a {
  font-size: .88rem;
  color: #555;
  font-weight: 500;
}
.blog-nav__cta-btn {
  padding: 8px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1565c0, #1976d2);
  color: #fff !important;
  font-weight: 700 !important;
  font-size: .85rem;
  text-decoration: none !important;
  box-shadow: 0 2px 8px rgba(21,101,192,.3);
  transition: opacity .15s;
}
.blog-nav__cta-btn:hover { opacity: .88; text-decoration: none !important; }

/* ===== レイアウト ===== */
.wrap { max-width: 820px; margin: 0 auto; padding: 24px 16px 80px; }

/* ===== パンくず ===== */
.crumb { font-size: .88rem; color: #888; margin: 0 0 16px; }
.crumb a { color: #888; }
.crumb a:hover { color: #1565c0; text-decoration: none; }

/* ===== 記事カード ===== */
.card {
  background: #fff;
  border-radius: 20px;
  padding: 0;
  box-shadow: 0 4px 24px rgba(20,40,80,.09), 0 1px 4px rgba(20,40,80,.05);
  color: #1a1a2e;
  overflow: hidden;
}
.card p, .card li, .card h1, .card h2, .card h3, .card ol, .card ul { color: #1a1a2e; }

/* 記事本文エリア */
.card > header ~ *,
.card > p,
.card > h2,
.card > h3,
.card > ul,
.card > ol,
.card > div,
.card > section,
.card > a.cta,
.card > .cta-sub {
  padding-left: 28px;
  padding-right: 28px;
}
.card > *:last-child { padding-bottom: 32px; }

/* ===== 記事ヘッダー ===== */
.card > header {
  background: linear-gradient(135deg, #1a237e 0%, #1565c0 60%, #1976d2 100%);
  padding: 36px 28px 28px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.card > header::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 180px; height: 180px;
  background: rgba(255,255,255,.06);
  border-radius: 50%;
}
.card > header::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -20px;
  width: 220px; height: 220px;
  background: rgba(255,255,255,.04);
  border-radius: 50%;
}

/* ===== 見出し ===== */
h1 {
  font-size: 1.75rem;
  font-weight: 900;
  margin: 0 0 10px;
  line-height: 1.3;
  color: #fff !important;
  letter-spacing: -.02em;
  position: relative;
  z-index: 1;
}
.meta {
  font-size: .85rem;
  color: rgba(255,255,255,.75) !important;
  margin-bottom: 0;
  position: relative;
  z-index: 1;
}

h2 {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 36px 28px 12px;
  padding: 10px 14px;
  background: #f0f5ff;
  border-left: 4px solid #1565c0;
  border-radius: 0 10px 10px 0;
  color: #1a237e !important;
}
h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 22px 0 8px;
  color: #1a1a2e;
  padding-bottom: 4px;
  border-bottom: 1px solid #e8edf5;
}

/* h2はpadding-leftを上書きしてるので調整 */
.card > h2 {
  padding-left: 14px;
  padding-right: 14px;
  margin-left: 28px;
  margin-right: 28px;
}

/* ===== 目次 ===== */
.toc {
  background: #f5f8ff;
  border: 1px solid #c5d8f5;
  border-radius: 14px;
  padding: 16px 20px;
  margin: 8px 0 20px;
}
.toc strong { display: block; margin-bottom: 8px; font-size: .95rem; color: #1565c0; }
.toc ul { margin: 0; padding-left: 18px; }
.toc ul li { margin-bottom: 4px; font-size: .93rem; }

/* ===== 記事上部CTA ===== */
.article-intro-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, #fff8e1, #fff3cd);
  border: 1px solid #ffd54f;
  border-radius: 12px;
  padding: 12px 16px;
  margin: 0 0 20px;
  font-size: .92rem;
  color: #5d4037 !important;
}
.article-intro-cta::before { content: '💡'; flex-shrink: 0; }
.article-intro-cta a { font-weight: 700; color: #e65100; }

/* ===== コールアウト ===== */
.note {
  background: #e8f4fd;
  border-left: 4px solid #1976d2;
  padding: 14px 16px;
  border-radius: 0 12px 12px 0;
  margin: 20px 0;
  position: relative;
}
.note::before { content: 'ℹ️'; position: absolute; top: 14px; left: -2px; font-size: 1rem; display: none; }

.warn {
  background: #fff8f0;
  border-left: 4px solid #f57c00;
  padding: 14px 16px;
  border-radius: 0 12px 12px 0;
  margin: 20px 0;
}
.ok {
  background: #f0faf2;
  border-left: 4px solid #388e3c;
  padding: 14px 16px;
  border-radius: 0 12px 12px 0;
  margin: 20px 0;
}
.example {
  background: #f8f9fa;
  border-left: 4px solid #90a4ae;
  padding: 14px 16px;
  border-radius: 0 12px 12px 0;
  margin: 20px 0;
}

blockquote {
  background: #f5f5f5;
  border-left: 3px solid #bdbdbd;
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  margin: 16px 0;
  color: #555 !important;
  font-style: italic;
}

/* ===== バッジ・ボックス ===== */
.badge {
  display: inline-block;
  font-size: .82rem;
  padding: .15em .7em;
  border-radius: 999px;
  background: #e8eaf6;
  color: #3949ab;
  font-weight: 700;
}
.box {
  border: 1px solid #e0e7f3;
  border-radius: 14px;
  padding: 16px;
  background: #fafbff;
}
.box strong { display: block; margin-bottom: 6px; color: #1565c0; }
.mini { color: #666; font-size: .9rem; }

/* ===== CTAボタン ===== */
.cta {
  display: block;
  text-align: center;
  margin: 28px 0 10px;
  padding: 16px 20px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff5722, #ff9800);
  color: #fff !important;
  font-weight: 900;
  font-size: 1.05rem;
  text-decoration: none !important;
  box-shadow: 0 4px 16px rgba(255,87,34,.3);
  transition: transform .15s, box-shadow .15s;
  letter-spacing: .01em;
}
.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,87,34,.4);
  text-decoration: none !important;
}
.cta-sub {
  display: block;
  text-align: center;
  color: #888;
  font-size: .88rem;
  margin-bottom: 8px;
}

/* ===== 関連記事 ===== */
.related {
  margin: 28px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid #eef0f5;
}
.related h3 {
  font-size: .95rem;
  font-weight: 800;
  color: #555 !important;
  margin: 0 0 12px;
  border: none !important;
  padding: 0 !important;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.related ul { margin: 0; padding: 0; list-style: none; }
.related ul li {
  margin-bottom: 8px;
  padding-left: 16px;
  position: relative;
}
.related ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: #1565c0;
  font-size: .85rem;
}
.related ul li a { font-size: .93rem; font-weight: 500; }

/* ===== フッター ===== */
footer {
  margin-top: 28px;
  color: #aaa;
  text-align: center;
  font-size: .88rem;
}
footer a { color: #aaa; }
footer a:hover { color: #1565c0; text-decoration: none; }

/* ===== レスポンシブ ===== */
@media (max-width: 640px) {
  .card > header { padding: 28px 18px 22px; }
  .card > h2 { margin-left: 18px; margin-right: 18px; }
  .card > header ~ *,
  .card > p,
  .card > h3,
  .card > ul,
  .card > ol,
  .card > div,
  .card > section,
  .card > a.cta,
  .card > .cta-sub { padding-left: 18px; padding-right: 18px; }
  h1 { font-size: 1.45rem; }
  h2 { font-size: 1.08rem; }
  .blog-nav { padding: 0 14px; }
  .blog-nav__brand span { display: none; }
}
