/* ============================================
   EC業務効率化支援 ブログ 共通CSS
   blog/index.html & 各記事ページ共通
   ============================================ */

:root {
  --bg: #f8fbff;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #0f172a;
  --muted: #475569;
  --muted-2: #64748b;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --primary: #5F9EA0;
  --primary-2: #4a8587;
  --secondary: #5F9EA0;
  --primary-soft: #e0f0f1;
  --secondary-soft: #e0f0f1;
  --shadow-sm: 0 8px 24px rgba(15,23,42,.05);
  --shadow-md: 0 20px 60px rgba(15,23,42,.10);
  --shadow-lg: 0 28px 90px rgba(95,158,160,.18);
  --radius-xs: 12px;
  --radius-sm: 16px;
  --radius-md: 22px;
  --radius-lg: 32px;
  --container: 1180px;
  --transition: .25s ease;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
  color: var(--text);
  background: #ffffff;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { margin: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }

.page-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background:
    radial-gradient(circle at 12% 8%, rgba(95,158,160,.10), transparent 22%),
    radial-gradient(circle at 90% 15%, rgba(95,158,160,.08), transparent 20%),
    radial-gradient(circle at 86% 85%, rgba(95,158,160,.06), transparent 18%);
}

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

/* ── Header ── */
.header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(14px);
  background: rgba(255,255,255,.74);
  border-bottom: 1px solid rgba(226,232,240,.9);
  box-shadow: 0 10px 30px rgba(15,23,42,.04);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 78px; }
.logo { display: flex; align-items: center; gap: 12px; font-weight: 800; color: var(--text); }
.logo-mark {
  width: 42px; height: 42px; border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff; display: grid; place-items: center; font-size: .9rem;
  box-shadow: var(--shadow-sm);
}
.logo-text { font-size: 1rem; letter-spacing: .01em; }
.header-nav { display: flex; align-items: center; gap: 8px; }
.nav-link {
  display: block; padding: 10px 14px; border-radius: 999px;
  color: var(--muted); font-size: .94rem; font-weight: 600;
  transition: all var(--transition);
}
.nav-link:hover { background: #fff; color: var(--text); box-shadow: var(--shadow-sm); }
.nav-cta {
  padding: 12px 18px; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: var(--shadow-sm); border-radius: 999px;
}
.nav-cta:hover { color: #fff; transform: translateY(-1px); }

/* ── Footer ── */
.footer { padding: 36px 0 48px; background: #0f172a; color: #cbd5e1; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-copy { font-size: .92rem; font-weight: 700; }
.footer-sub { margin-top: 6px; font-size: .9rem; color: #94a3b8; }
.footer-nav { display: flex; gap: 18px; flex-wrap: wrap; list-style: none; }
.footer-nav a { color: #cbd5e1; }
.footer-nav a:hover { color: #fff; }

/* ── Blog Index: Hero ── */
.blog-hero { padding: 64px 0 40px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .82rem; font-weight: 700; letter-spacing: .10em;
  text-transform: uppercase; color: var(--primary); margin-bottom: 14px;
}
.eyebrow::before {
  content: ""; width: 10px; height: 10px; border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 0 0 6px rgba(37,99,235,.08);
}
.blog-title { font-size: clamp(1.8rem, 3vw, 2.7rem); line-height: 1.28; letter-spacing: -.02em; }
.blog-lead { margin-top: 12px; color: var(--muted); font-size: 1rem; max-width: 600px; }

/* ── Blog Index: Card Grid ── */
.blog-list-section { padding: 0 0 96px; }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }

.blog-card {
  background: rgba(255,255,255,.92); border: 1px solid var(--line);
  border-radius: 24px; box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex; flex-direction: column;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(95,158,160,.25); }

.blog-card-thumb {
  background: linear-gradient(135deg, rgba(95,158,160,.10), rgba(95,158,160,.06));
  padding: 32px 28px; display: flex; align-items: center; justify-content: center; min-height: 160px;
}
.blog-card-body { padding: 24px 24px 28px; display: flex; flex-direction: column; flex: 1; }
.blog-card-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.blog-card-tag {
  display: inline-flex; align-items: center; padding: 5px 11px; border-radius: 999px;
  background: linear-gradient(135deg, var(--primary-soft), var(--secondary-soft));
  color: var(--primary); font-size: .78rem; font-weight: 700; letter-spacing: .04em;
}
.blog-card-date { font-size: .82rem; color: var(--muted-2); }
.blog-card h2 { font-size: 1.08rem; line-height: 1.5; letter-spacing: -.01em; }
.blog-card p { margin-top: 10px; color: var(--muted); font-size: .92rem; line-height: 1.7; flex: 1; }
.blog-card-link {
  margin-top: 18px; display: inline-flex; align-items: center; gap: 6px;
  color: var(--primary); font-size: .9rem; font-weight: 700; transition: gap var(--transition);
}
.blog-card-link:hover { gap: 10px; }
.blog-card-link::after { content: "\2192"; }

/* ── Article: Hero ── */
.article-hero { padding: 64px 0 40px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--muted-2); margin-bottom: 20px; flex-wrap: wrap; }
.breadcrumb a { color: var(--primary); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--line-2); }
.article-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.article-tag {
  display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 999px;
  background: linear-gradient(135deg, var(--primary-soft), var(--secondary-soft));
  color: var(--primary); font-size: .8rem; font-weight: 700; letter-spacing: .05em;
}
.article-date { font-size: .86rem; color: var(--muted-2); }
.article-title { font-size: clamp(1.7rem, 3.5vw, 2.8rem); line-height: 1.25; letter-spacing: -.03em; }
.article-intro {
  margin-top: 20px; max-width: 800px; font-size: 1.04rem; color: var(--muted); line-height: 1.85;
  padding: 24px 28px;
  background: linear-gradient(135deg, rgba(95,158,160,.08), rgba(95,158,160,.04));
  border: 1px solid rgba(95,158,160,.15); border-radius: 20px;
}

/* ── Article: TOC ── */
.toc-section { padding: 0 0 16px; }
.toc-box {
  background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 20px;
  padding: 28px 32px; box-shadow: var(--shadow-sm);
}
.toc-label { font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 14px; }
.toc-list { list-style: none; padding: 0; }
.toc-list li { margin-bottom: 8px; }
.toc-list a {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 12px;
  font-size: .92rem; color: var(--muted); font-weight: 600; transition: all var(--transition);
}
.toc-list a:hover { background: var(--primary-soft); color: var(--primary); }
.toc-num { font-weight: 800; color: var(--primary); font-size: .86rem; min-width: 22px; }

/* ── Article: Body ── */
.article-section { padding: 8px 0 80px; }
.article-body { max-width: 820px; }

.article-body h2 {
  font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.35;
  margin-top: 56px; margin-bottom: 20px; padding-bottom: 14px;
  border-bottom: 2px solid var(--line);
  display: flex; align-items: center; gap: 12px;
}
.article-body h2 .section-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff; font-weight: 800; font-size: .88rem;
}

.article-body h3 {
  font-size: 1.12rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.4;
  margin-top: 36px; margin-bottom: 14px; color: var(--text);
  padding-left: 16px; border-left: 3px solid var(--primary);
}

.article-body p { font-size: 1rem; line-height: 1.9; color: var(--muted); margin-bottom: 18px; }
.article-body strong { color: var(--text); }
.article-body ul, .article-body ol { padding-left: 24px; margin-bottom: 18px; }
.article-body li { font-size: 1rem; line-height: 1.9; color: var(--muted); margin-bottom: 6px; list-style: disc; }
.article-body ol li { list-style: decimal; }

/* ── Highlight Box ── */
.highlight-box {
  padding: 24px 28px; margin: 24px 0 28px; border-radius: 18px;
  background: linear-gradient(135deg, rgba(95,158,160,.08), rgba(95,158,160,.04));
  border: 1px solid rgba(95,158,160,.18);
}
.highlight-box h4 {
  font-size: .95rem; font-weight: 700; color: var(--primary-2); margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.highlight-box ul { padding-left: 20px; margin: 0; }
.highlight-box li { font-size: .94rem; line-height: 1.8; color: var(--muted); margin-bottom: 4px; list-style: disc; }

/* ── Warning Box ── */
.warning-box {
  padding: 24px 28px; margin: 24px 0 28px; border-radius: 18px;
  background: linear-gradient(135deg, rgba(234,88,12,.06), rgba(234,88,12,.03));
  border: 1px solid rgba(234,88,12,.18);
}
.warning-box h4 {
  font-size: .95rem; font-weight: 700; color: #c2410c; margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.warning-box ul { padding-left: 20px; margin: 0; }
.warning-box li { font-size: .94rem; line-height: 1.8; color: var(--muted); margin-bottom: 4px; list-style: disc; }

/* ── Comparison Table ── */
.compare-table {
  width: 100%; border-collapse: collapse; margin: 24px 0 28px;
  background: rgba(255,255,255,.92); border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.compare-table th {
  padding: 14px 18px; font-size: .88rem; font-weight: 700;
  background: linear-gradient(135deg, var(--primary-soft), var(--secondary-soft));
  color: var(--primary-2); text-align: left; border-bottom: 2px solid var(--line);
}
.compare-table td {
  padding: 12px 18px; font-size: .92rem; color: var(--muted); border-bottom: 1px solid var(--line);
  line-height: 1.7;
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table code {
  background: rgba(95,158,160,.1); padding: 2px 8px; border-radius: 6px;
  font-size: .86rem; font-family: "SF Mono", "Consolas", "Monaco", monospace;
  color: var(--primary-2);
}

/* ── Code Block ── */
.code-block {
  margin: 20px 0 24px; padding: 20px 24px; border-radius: 14px;
  background: #1e293b; color: #e2e8f0; font-size: .88rem;
  font-family: "SF Mono", "Consolas", "Monaco", monospace;
  line-height: 1.8; overflow-x: auto;
}
.code-block .comment { color: #64748b; }
.code-block .string { color: #86efac; }
.code-block .keyword { color: #93c5fd; }

/* ── Flow Diagram ── */
.flow-diagram {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 32px 20px; margin: 28px 0;
  background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow-sm); flex-wrap: wrap;
}
.flow-step {
  display: flex; align-items: center; justify-content: center;
  padding: 14px 22px; border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-soft), var(--secondary-soft));
  color: var(--primary-2); font-size: .9rem; font-weight: 700; text-align: center;
  min-width: 120px;
}
.flow-step-bad {
  background: linear-gradient(135deg, rgba(234,88,12,.1), rgba(234,88,12,.05));
  color: #c2410c;
}
.flow-arrow { color: var(--line-2); font-size: 1.2rem; font-weight: 700; }

/* ── CTA Section ── */
.cta-section { padding: 0 0 96px; }
.cta-box {
  text-align: center; padding: 48px 36px;
  background: linear-gradient(135deg, rgba(95,158,160,.12), rgba(95,158,160,.06));
  border: 1px solid rgba(95,158,160,.22); border-radius: 32px; box-shadow: var(--shadow-md);
}
.cta-box h2 { font-size: clamp(1.3rem, 2.5vw, 1.9rem); letter-spacing: -.02em; line-height: 1.35; color: #2d6b6d; }
.cta-box p { margin-top: 12px; color: var(--muted); font-size: 1rem; }
.cta-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; margin-top: 28px; min-height: 56px; padding: 0 36px;
  border-radius: 18px; font-weight: 700; font-size: 1rem; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: var(--shadow-lg); transition: all var(--transition);
}
.cta-btn:hover { transform: translateY(-2px); color: #fff; }

/* ── Share Section ── */
.share-section { padding: 0 0 48px; }
.share-box {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 24px 28px;
  background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow-sm);
}
.share-label { font-size: .88rem; font-weight: 700; color: var(--muted-2); }
.share-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 999px;
  font-size: .86rem; font-weight: 700;
  transition: all var(--transition); cursor: pointer;
  border: none; text-decoration: none;
}
.share-btn-x {
  background: #0f1419; color: #fff;
}
.share-btn-x:hover { background: #1d9bf0; color: #fff; transform: translateY(-1px); }
.share-btn-copy {
  background: var(--primary-soft); color: var(--primary-2);
}
.share-btn-copy:hover { background: var(--primary); color: #fff; transform: translateY(-1px); }

/* ── Prev / Next Navigation ── */
.prevnext-section { padding: 0 0 48px; }
.prevnext-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.prevnext-link {
  display: flex; flex-direction: column; gap: 6px;
  padding: 20px 24px; border-radius: var(--radius-xs);
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color var(--transition), box-shadow var(--transition);
  text-decoration: none; color: inherit;
}
.prevnext-link:hover {
  border-color: var(--primary); box-shadow: var(--shadow-sm);
}
.prevnext-empty { visibility: hidden; }
.prevnext-label {
  font-size: .8rem; font-weight: 700; color: var(--primary);
  letter-spacing: .02em;
}
.prevnext-next { text-align: right; }
.prevnext-title {
  font-size: .95rem; font-weight: 600; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Related Articles ── */
.related-section { padding: 0 0 64px; }
.related-heading {
  font-size: 1.2rem; font-weight: 800; letter-spacing: -.01em; margin-bottom: 24px;
  display: flex; align-items: center; gap: 10px;
}
.related-heading::before {
  content: ""; width: 4px; height: 24px; border-radius: 2px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

/* ── Responsive ── */
@media (max-width: 1080px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .header-inner { height: 70px; }
  .blog-hero { padding: 40px 0 28px; }
  .article-hero { padding: 40px 0 28px; }
  .blog-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .prevnext-grid { grid-template-columns: 1fr; }
  .prevnext-next { text-align: left; }
  .prevnext-empty { display: none; }
  .flow-diagram { flex-direction: column; }
  .flow-arrow { transform: rotate(90deg); }
  .compare-table { font-size: .85rem; }
  .compare-table th, .compare-table td { padding: 10px 12px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .share-box { justify-content: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .logo-text { font-size: .92rem; }
}
