/* =========================================
   NextWorks 営業用カタログ（catalog.html）
   印刷 / PDF保存を前提としたA4ページ構成
   ========================================= */

.catalog-page {
  --cat-navy: #0b1740;
  --cat-navy-deep: #060d28;
  --cat-yellow: #ffd400;
  --cat-yellow-deep: #f5b700;
  --cat-ink: #16213e;
  --cat-muted: #5b6478;
  font-family: 'Noto Sans JP', sans-serif;
  background: #eef1f7;
  color: var(--cat-ink);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  color-adjust: exact;
}
.catalog-page * {
  box-sizing: border-box;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  color-adjust: exact;
}
.catalog-page img { max-width: 100%; display: block; }
.catalog-page .container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* ===== 画面表示用の操作バー（印刷時は非表示） ===== */
.cat-toolbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--cat-navy-deep);
  padding: 14px 0;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
}
.cat-toolbar .container {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.cat-toolbar-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; }
.cat-toolbar-brand img { width: 26px; height: 26px; }
.cat-toolbar-note { color: #b9c2e0; font-size: 12.5px; }
.cat-toolbar-actions { display: flex; align-items: center; gap: 10px; }
.cat-print-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--cat-yellow); color: var(--cat-navy-deep);
  font-weight: 700; font-size: 14px; padding: 10px 20px; border-radius: 30px;
  border: none; cursor: pointer; transition: background .2s ease, transform .15s ease;
}
.cat-print-btn:hover { background: var(--cat-yellow-deep); transform: translateY(-1px); }
.cat-back-btn {
  color: #cfd6ec; font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px;
}
.cat-back-btn:hover { color: #fff; }

/* ===== ページ全体の配置（画面表示時） ===== */
.cat-sheets {
  padding: 36px 0 80px;
  display: flex; flex-direction: column; align-items: center; gap: 28px;
}

/* A4 相当のシート（1ページ = 210mm x 297mm） */
.cat-page {
  width: 210mm;
  height: 297mm;
  background: #fff;
  box-shadow: 0 6px 30px rgba(10,20,50,.16);
  position: relative;
  overflow: hidden;
  padding: 16mm 16mm 14mm;
  display: flex;
  flex-direction: column;
  flex: none;
}
.cat-page-body { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.cat-page-foot {
  flex: none;
  margin-top: 6mm;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 9.5px; color: #9aa2bb;
  border-top: 1px solid #e7eaf3; padding-top: 6px;
}
.cat-page-foot .cpf-brand { display: flex; align-items: center; gap: 6px; }
.cat-page-foot .cpf-brand img { width: 14px; height: 14px; }

/* ===== 表紙 ===== */
.cat-cover {
  padding: 0; display: flex; flex-direction: column; justify-content: flex-end;
  background: var(--cat-navy-deep);
  color: #fff;
}
.cat-cover-visual {
  position: absolute; inset: 0;
  background-image: url('../images/catalog-cover-visual.png');
  background-size: cover; background-position: center 30%;
}
.cat-cover-visual::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6,10,28,.15) 0%, rgba(6,10,28,.55) 55%, rgba(6,10,28,.94) 100%);
}
.cat-cover-body { position: relative; z-index: 1; padding: 0 14mm 16mm; }
.cat-cover-top { position: relative; z-index: 1; padding: 12mm 14mm 0; display: flex; justify-content: space-between; align-items: center; }
.cat-cover-brand { display: flex; align-items: center; gap: 10px; }
.cat-cover-brand img { width: 30px; height: 30px; }
.cat-cover-brand span { font-family: 'Inter', sans-serif; font-weight: 800; font-size: 16px; letter-spacing: .02em; }
.cat-cover-tag {
  background: var(--cat-yellow); color: var(--cat-navy-deep);
  font-weight: 700; font-size: 12px; padding: 6px 14px; border-radius: 20px;
}
.cat-cover-eyebrow { font-size: 13px; letter-spacing: .12em; color: var(--cat-yellow); font-weight: 700; margin-bottom: 10px; }
.cat-cover-title {
  font-size: 34px; font-weight: 900; line-height: 1.35; margin: 0 0 14px;
  text-shadow: 0 4px 20px rgba(0,0,0,.4);
}
.cat-cover-title em { color: var(--cat-yellow); font-style: normal; }
.cat-cover-sub { font-size: 14px; color: #d7dcef; line-height: 1.8; margin: 0 0 20px; max-width: 120mm; }
.cat-cover-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.cat-cover-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
  font-size: 11.5px; padding: 6px 12px; border-radius: 20px;
}
.cat-cover-foot {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11.5px; color: #aab2ce; border-top: 1px solid rgba(255,255,255,.18); padding-top: 10px;
}

/* ===== 共通：中面見出し ===== */
.cat-page-head { margin-bottom: 8mm; }
.cat-page-head.is-sub { margin-top: 4mm; margin-bottom: 5mm; }
.cat-page-no { font-family: 'Inter', sans-serif; font-weight: 800; font-size: 11px; color: var(--cat-yellow-deep); letter-spacing: .08em; margin-bottom: 4px; }
.cat-page-head h2 { font-size: 24px; font-weight: 900; color: var(--cat-navy); margin: 0 0 6px; }
.cat-page-head p { font-size: 12.5px; color: var(--cat-muted); margin: 0; line-height: 1.7; }

/* ===== サービス概要ページ ===== */
.cat-overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; margin-bottom: 4mm; }
.cat-overview-item {
  background: #f6f8fc; border: 1px solid #e7eaf3; border-radius: 10px; padding: 3mm 4.5mm;
}
.cat-overview-item i { color: var(--cat-navy); font-size: 16px; margin-bottom: 4px; }
.cat-overview-item h3 { font-size: 12.5px; font-weight: 700; color: var(--cat-navy); margin: 3px 0 4px; }
.cat-overview-item p { font-size: 10.5px; color: var(--cat-muted); line-height: 1.6; margin: 0; }

.cat-prob-list { display: grid; grid-template-columns: 1fr 1fr; gap: 3mm 8mm; }
.cat-prob-row { display: flex; align-items: flex-start; gap: 7px; }
.cat-prob-row i { color: #d64545; font-size: 11px; margin-top: 2px; }
.cat-prob-row span { font-size: 10.5px; line-height: 1.45; }

.cat-solution-strip {
  margin-top: 4mm; background: var(--cat-navy); border-radius: 10px; padding: 4mm; color: #fff;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4mm;
}
.cat-sol-step { text-align: center; }
.cat-sol-step .css-no { font-family: 'Inter', sans-serif; font-weight: 900; font-size: 18px; color: var(--cat-yellow); }
.cat-sol-step h4 { font-size: 11.5px; margin: 2px 0 2px; }
.cat-sol-step p { font-size: 9.5px; color: #cfd6ec; margin: 0; line-height: 1.4; }

/* ===== 機能一覧ページ ===== */
.cat-feat-groups { display: flex; flex-direction: column; gap: 3.5mm; }
.cat-feat-group {
  background: #f6f8fc; border: 1px solid #e7eaf3; border-radius: 10px; padding: 4mm 5mm;
}
.cat-feat-group h3 {
  font-size: 12px; font-weight: 800; color: var(--cat-navy); margin: 0 0 2.5mm;
  display: flex; align-items: center; gap: 6px;
}
.cat-feat-group h3 i { color: var(--cat-yellow-deep); font-size: 12px; }
.cat-feat-mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5mm 6mm; }
.cat-feat-mini strong { display: block; font-size: 11px; color: var(--cat-ink); margin-bottom: 1.5px; }
.cat-feat-mini p { font-size: 9.5px; color: var(--cat-muted); margin: 0; line-height: 1.5; }
.cat-feat-more-note {
  margin-top: 4mm; background: #fff8e0; border: 1px dashed var(--cat-yellow-deep); border-radius: 10px;
  padding: 5mm; font-size: 10.5px; color: #7a5b00; line-height: 1.6;
}

/* ===== 活用例ページ ===== */
.cat-usecase-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 5mm; margin-bottom: 6mm; }
.cat-usecase-card { border-radius: 10px; overflow: hidden; border: 1px solid #e7eaf3; }
.cat-usecase-card img { height: 26mm; object-fit: cover; width: 100%; }
.cat-usecase-body { padding: 3mm; }
.cat-usecase-body h4 { font-size: 11.5px; color: var(--cat-navy); margin: 0 0 3px; }
.cat-usecase-body p { font-size: 9.5px; color: var(--cat-muted); margin: 0; line-height: 1.5; }

.cat-quote {
  background: var(--cat-navy); color: #fff; border-radius: 10px; padding: 6mm; margin-bottom: 6mm;
  display: flex; gap: 5mm; align-items: center;
}
.cat-quote img { width: 22mm; height: 22mm; border-radius: 8px; object-fit: cover; flex: none; }
.cat-quote-body p { font-size: 11.5px; line-height: 1.6; margin: 0 0 3px; }
.cat-quote-body span { font-size: 10px; color: #cfd6ec; }

.cat-dev-box {
  border: 1px solid #e7eaf3; border-radius: 10px; padding: 5mm; background: #f6f8fc;
}
.cat-dev-box h3 { font-size: 13.5px; color: var(--cat-navy); margin: 0 0 6px; }
.cat-dev-box p { font-size: 11.5px; color: var(--cat-muted); margin: 0 0 6px; line-height: 1.7; }
.cat-dev-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.cat-dev-tags span {
  font-size: 10px; background: #fff; border: 1px solid #d8ddec; color: var(--cat-navy);
  padding: 4px 10px; border-radius: 20px;
}

/* ===== 料金ページ（4プラン比較テーブル） ===== */
.cat-price-table-wrap { margin-bottom: 6mm; border: 1px solid #e7eaf3; border-radius: 10px; overflow: hidden; }
.cat-price-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cat-price-table th, .cat-price-table td { text-align: center; padding: 2.8mm 2mm; font-size: 10px; }
.cat-price-table thead th {
  background: #fff; color: var(--cat-navy); font-size: 11px; font-weight: 800;
  border-bottom: 2px solid #e7eaf3; padding-top: 3.5mm;
}
.cat-price-table thead th.hl { background: var(--cat-navy); color: #fff; }
.cat-price-table tbody td { border-bottom: 1px solid #eef0f7; color: var(--cat-ink); }
.cat-price-table tbody tr:last-child td { border-bottom: none; }
.cat-price-table td.lbl { text-align: left; font-weight: 700; color: var(--cat-navy); font-size: 9.5px; padding-left: 4mm; }
.cat-price-table td.hl { background: #fff8e0; font-weight: 700; }
.cat-price-table td.price-cell { font-family: 'Inter', sans-serif; font-weight: 900; font-size: 13px; }

/* ===== 裏表紙・会社概要ページ ===== */
.cat-back {
  background: var(--cat-navy-deep); color: #fff; display: flex; flex-direction: column; justify-content: space-between;
}
.cat-back-top { display: flex; align-items: center; gap: 12px; }
.cat-back-top img { width: 34px; height: 34px; }
.cat-back-top span { font-family: 'Inter', sans-serif; font-weight: 800; font-size: 18px; }
.cat-back-mid h2 { font-size: 24px; font-weight: 900; margin: 0 0 10mm; }
.cat-back-info { display: grid; grid-template-columns: 1fr 1fr; gap: 8mm 10mm; margin-bottom: 10mm; }
.cat-back-info-item { display: flex; gap: 8px; align-items: flex-start; }
.cat-back-info-item i { color: var(--cat-yellow); margin-top: 2px; }
.cat-back-info-item strong { display: block; font-size: 12px; margin-bottom: 2px; }
.cat-back-info-item p, .cat-back-info-item a { font-size: 11.5px; color: #cfd6ec; margin: 0; }
.cat-back-cta {
  background: var(--cat-yellow); color: var(--cat-navy-deep); border-radius: 10px; padding: 8mm;
  display: flex; align-items: center; justify-content: space-between; gap: 6mm;
}
.cat-back-cta strong { font-size: 14px; }
.cat-back-cta p { font-size: 11px; margin: 3px 0 0; }
.cat-back-cta .cbc-arrow { font-size: 20px; }
.cat-back-foot { font-size: 10.5px; color: #8b92ac; border-top: 1px solid rgba(255,255,255,.15); padding-top: 6mm; }

/* =========================================
   印刷用（PDF保存）レイアウト
   ========================================= */
@media print {
  .cat-toolbar { display: none !important; }
  .cat-sheets { padding: 0; gap: 0; }
  .cat-page {
    box-shadow: none;
    margin: 0;
    width: 210mm; height: 297mm;
    page-break-after: always;
    page-break-inside: avoid;
  }
  .cat-page:last-child { page-break-after: auto; }
  body { background: #fff; }
}

@page {
  size: A4;
  margin: 0;
}

/* ===== レスポンシブ（画面プレビュー時のスケール対応。印刷/PDF保存時には適用しない） ===== */
@media screen and (max-width: 900px) {
  .cat-page { width: 100%; min-height: auto; padding: 8mm; transform: none; }
  .cat-overview-grid { grid-template-columns: 1fr; }
  .cat-prob-list { grid-template-columns: 1fr; }
  .cat-solution-strip { grid-template-columns: 1fr; }
  .cat-usecase-grid { grid-template-columns: 1fr; }
  .cat-back-info { grid-template-columns: 1fr; }
  .cat-feat-mini-grid { grid-template-columns: 1fr; }
  .cat-price-table-wrap { overflow-x: auto; }
  .cat-price-table { min-width: 560px; }
  .cat-cover-title { font-size: 26px; }
  .cat-toolbar-note { display: none; }
  .cat-quote { flex-direction: column; align-items: flex-start; }
  .cat-back-cta { flex-direction: column; align-items: flex-start; gap: 3mm; }
}
