
/* ===========================
   CSS Variables
=========================== */
:root {
  --primary: #0d47a1;
  --primary-dark: #0a3380;
  --primary-light: #1565c0;
  --accent: #ff6d00;
  --accent-dark: #e65100;
  --text: #333333;
  --text-light: #666666;
  --text-muted: #999999;
  --bg: #f5f7fa;
  --bg-white: #ffffff;
  --border: #e0e0e0;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-sm: 4px;
  --font: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'メイリオ', sans-serif;
}

/* ===========================
   Reset & Base
=========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.8; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { padding-left: 1.5em; }

/* ===========================
   Layout
=========================== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.content-wrapper { display: flex; gap: 40px; margin-top: 24px; }
.main-content { flex: 1; min-width: 0; }
.sidebar { width: 300px; flex-shrink: 0; }

/* ===========================
   Header
=========================== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  height: 60px;
}
.header-spacer { height: 60px; }
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; height: 60px; gap: 24px;
}
.site-logo a { display: flex; align-items: center; }
.logo-text { color: #fff; font-size: 20px; font-weight: 700; white-space: nowrap; }
.global-nav { margin-left: auto; }
.nav-list { display: flex; list-style: none; padding: 0; margin: 0; gap: 4px; }
.nav-list a { color: rgba(255,255,255,0.9); padding: 8px 14px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; transition: background 0.2s; }
.nav-list a:hover { background: rgba(255,255,255,0.15); color: #fff; }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; margin-left: auto; }
.hamburger span { display: block; width: 24px; height: 2px; background: #fff; transition: 0.3s; border-radius: 2px; }

/* ===========================
   Breadcrumb
=========================== */
.breadcrumb { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }

/* ===========================
   Page Title
=========================== */
.page-title { font-size: 24px; font-weight: 700; color: var(--text); margin-bottom: 24px; padding-bottom: 12px; border-bottom: 3px solid var(--primary); }

/* ===========================
   Article Grid
=========================== */
.article-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-bottom: 40px; }
.article-grid--small { grid-template-columns: repeat(3, 1fr); gap: 16px; }

.article-card { background: var(--bg-white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: box-shadow 0.2s, transform 0.2s; }
.article-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.card-thumb-link img { width: 100%; height: 180px; object-fit: cover; }
.no-thumb { width: 100%; height: 180px; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); }
.card-body { padding: 16px; }
.card-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.cat-badge { background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 3px; }
.card-date { font-size: 12px; color: var(--text-muted); }
.card-title { font-size: 15px; font-weight: 700; line-height: 1.5; margin-bottom: 8px; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--primary); }
.card-title--sm { font-size: 13px; }
.card-excerpt { font-size: 13px; color: var(--text-light); line-height: 1.6; }

/* ===========================
   Single Article
=========================== */
.single-article { background: var(--bg-white); border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow); margin-bottom: 40px; }
.article-header { margin-bottom: 24px; }
.article-meta-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.article-date { font-size: 13px; color: var(--text-muted); }
.article-title { font-size: 28px; font-weight: 700; line-height: 1.5; color: var(--text); }
.article-thumb { margin-bottom: 32px; border-radius: var(--radius); overflow: hidden; }
.article-thumb img { width: 100%; height: auto; display: block; }

/* Article Body */
.article-body { font-size: 16px; line-height: 1.9; }
.article-body h2 { font-size: 22px; font-weight: 700; color: var(--bg-white); background: var(--primary); padding: 12px 20px; border-radius: var(--radius-sm); margin: 40px 0 20px; }
.article-body h3 { font-size: 18px; font-weight: 700; color: var(--primary); border-left: 4px solid var(--primary); padding-left: 12px; margin: 32px 0 16px; }
.article-body h4 { font-size: 16px; font-weight: 700; margin: 24px 0 12px; padding-bottom: 4px; border-bottom: 2px solid var(--border); }
.article-body p { margin-bottom: 20px; }
.article-body ul, .article-body ol { margin-bottom: 20px; }
.article-body li { margin-bottom: 6px; }
.article-body blockquote { background: #f0f4ff; border-left: 4px solid var(--primary); padding: 16px 20px; margin: 24px 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text-light); }
.article-body table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 14px; }
.article-body th { background: var(--primary); color: #fff; padding: 12px 16px; text-align: left; }
.article-body td { padding: 10px 16px; border-bottom: 1px solid var(--border); }
.article-body tr:nth-child(even) td { background: #f8f9fa; }
.article-body img { border-radius: var(--radius-sm); margin: 20px 0; }

/* ===========================
   Affiliate Button
=========================== */
.btn-affiliate {
  display: inline-block; background: var(--accent); color: #fff !important;
  font-weight: 700; padding: 14px 32px; border-radius: 40px;
  font-size: 16px; text-align: center; letter-spacing: 0.05em;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(255,109,0,0.3);
}
.btn-affiliate:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(255,109,0,0.4); }
.btn-sm { padding: 8px 20px; font-size: 14px; }

/* Comparison Table */
.hikaku-table { width: 100%; border-collapse: collapse; margin: 32px 0; }
.hikaku-table th { background: var(--primary); color: #fff; padding: 14px 16px; text-align: center; font-size: 14px; }
.hikaku-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); text-align: center; font-size: 14px; }
.hikaku-table tr:nth-child(even) td { background: #f8f9fa; }
.hikaku-table .rank-1 td { background: #fffde7; }
.hikaku-table .check { color: #4caf50; font-weight: 700; }
.hikaku-table .cross { color: #f44336; }

/* ===========================
   TOC
=========================== */
.toc-box { background: #f0f4ff; border: 1px solid #c5d4f0; border-radius: var(--radius); padding: 20px 24px; margin: 32px 0; }
.toc-title { font-size: 15px; font-weight: 700; color: var(--primary); margin-bottom: 12px; }
.toc-list { list-style: none; padding: 0; margin: 0; }
.toc-list li { padding: 4px 0; font-size: 14px; }
.toc-list li a { color: var(--primary); }
.toc-list li a:hover { text-decoration: underline; }
.toc-list .toc-h3 { padding-left: 16px; font-size: 13px; }

/* ===========================
   Related Posts
=========================== */
.related-posts { margin-bottom: 40px; }
.related-title { font-size: 18px; font-weight: 700; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 2px solid var(--primary); }

/* ===========================
   Article Tags
=========================== */
.article-tags { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-light); }

/* ===========================
   Pagination
=========================== */
.pagination { display: flex; justify-content: center; gap: 8px; margin: 40px 0; }
.pagination .page-numbers { display: inline-block; padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-size: 14px; transition: 0.2s; }
.pagination .page-numbers.current { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .page-numbers:hover { background: var(--bg); }

/* ===========================
   Sidebar
=========================== */
.widget-box { background: var(--bg-white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 24px; }
.widget-title { font-size: 15px; font-weight: 700; color: var(--bg-white); background: var(--primary); padding: 8px 14px; border-radius: var(--radius-sm); margin: -20px -20px 16px; }

.popular-list { list-style: none; padding: 0; margin: 0; }
.popular-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.popular-item:last-child { border-bottom: none; }
.popular-thumb img { width: 64px; height: 48px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.popular-title { font-size: 13px; color: var(--text); line-height: 1.5; }
.popular-title:hover { color: var(--primary); }

.category-list { list-style: none; padding: 0; margin: 0; }
.category-list li { border-bottom: 1px solid var(--border); }
.category-list a { display: flex; justify-content: space-between; padding: 10px 0; font-size: 14px; color: var(--text); }
.category-list a:hover { color: var(--primary); }

/* ===========================
   Fixed CTA
=========================== */
.fixed-cta {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 999;
  background: rgba(13,71,161,0.97); padding: 12px 20px;
  transform: translateY(100%); transition: transform 0.3s;
}
.fixed-cta.show { transform: translateY(0); }
.fixed-cta-inner { max-width: 800px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.fixed-cta-text { color: #fff; font-size: 14px; font-weight: 500; }

/* ===========================
   Footer
=========================== */
.site-footer { background: #1a1a2e; color: rgba(255,255,255,0.7); padding: 48px 0 24px; margin-top: 60px; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; text-align: center; }
.footer-logo a { color: #fff; font-size: 20px; font-weight: 700; display: block; margin-bottom: 20px; }
.footer-nav { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; margin-bottom: 20px; }
.footer-nav a { color: rgba(255,255,255,0.7); font-size: 13px; }
.footer-nav a:hover { color: #fff; }
.disclaimer-text { font-size: 12px; color: rgba(255,255,255,0.4); max-width: 600px; margin: 0 auto 16px; }
.copyright { font-size: 12px; color: rgba(255,255,255,0.4); }

/* ===========================
   404
=========================== */
.error-404 { text-align: center; padding: 80px 20px; }
.error-title { font-size: 120px; font-weight: 700; color: var(--primary); line-height: 1; margin-bottom: 16px; }

/* ===========================
   Responsive
=========================== */
@media (max-width: 1024px) {
  .sidebar { width: 260px; }
}

@media (max-width: 768px) {
  .content-wrapper { flex-direction: column; }
  .sidebar { width: 100%; }
  .article-grid { grid-template-columns: 1fr; }
  .article-grid--small { grid-template-columns: repeat(2, 1fr); }
  .article-title { font-size: 22px; }
  .single-article { padding: 24px 20px; }
  .hamburger { display: flex; }
  .global-nav {
    display: none; position: absolute; top: 60px; left: 0; right: 0;
    background: var(--primary-dark); padding: 16px;
  }
  .global-nav.open { display: block; }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-list a { display: block; padding: 12px 16px; }
  .fixed-cta-text { font-size: 12px; }
  .article-body h2 { font-size: 18px; }
  .article-body h3 { font-size: 16px; }
}

@media (max-width: 480px) {
  .article-grid--small { grid-template-columns: 1fr; }
  .error-title { font-size: 80px; }
}

/* ===========================
   Contact Form
=========================== */
.contact-form { max-width: 640px; }
.form-group { margin-bottom: 24px; }
.form-label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.required { color: var(--accent); margin-left: 4px; }
.form-input, .form-textarea { width: 100%; padding: 12px 16px; border: 2px solid var(--border); border-radius: var(--radius-sm); font-size: 15px; font-family: var(--font); transition: border-color 0.2s; }
.form-input:focus, .form-textarea:focus { outline: none; border-color: var(--primary); }
.form-textarea { resize: vertical; min-height: 160px; }
.form-submit { margin-top: 8px; }
.form-success { background: #e8f5e9; border: 1px solid #4caf50; border-radius: var(--radius); padding: 20px 24px; color: #2e7d32; font-weight: 500; }
.form-errors { background: #ffebee; border: 1px solid #f44336; border-radius: var(--radius); padding: 16px 20px; margin-bottom: 20px; }
.form-errors ul { margin: 0; padding-left: 1.2em; color: #c62828; font-size: 14px; }
