/* =============================================
   処分.jp - guide.css v2
   記事詳細ページ専用（補助金ナビ品質）
   ============================================= */

/* --- CSS変数 --- */
:root {
  --header-total: 130px;
  --guide-accent: var(--color-primary, #FF9500);
  --guide-accent-rgb: 255, 149, 0;
  --guide-text: var(--color-dark, #2D3436);
  --guide-text-secondary: var(--gray-600, #666);
  --guide-text-muted: var(--gray-500, #999);
  --guide-border: var(--gray-300, #ddd);
  --guide-bg: #fff;
  --guide-bg-secondary: var(--gray-100, #f7f7f7);
  --guide-radius: var(--radius-md, 8px);
  --guide-radius-sm: var(--radius-sm, 4px);
  --guide-radius-lg: var(--radius-lg, 12px);
  --guide-shadow-sm: var(--shadow-sm, 0 2px 4px rgba(0,0,0,.08));
  --guide-shadow-md: var(--shadow-md, 0 4px 20px rgba(45,52,54,.1));
  --guide-shadow-xl: var(--shadow-xl, 0 12px 40px rgba(45,52,54,.2));
  --guide-transition: .2s ease;
}

/* =============================================
   サブヘッダー（処分サービスタブ）
   ============================================= */
.guide-sub-header {
  border-bottom: 1px solid var(--guide-border);
  background: var(--guide-bg);
}
.guide-sub-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.guide-sub-header-inner::-webkit-scrollbar { display: none; }

.guide-sub-tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--guide-text-secondary);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all var(--guide-transition);
}
.guide-sub-tab .material-icons { font-size: 16px; }
.guide-sub-tab:hover {
  color: var(--guide-accent);
  border-bottom-color: rgba(var(--guide-accent-rgb), .3);
}
.guide-sub-tab.active {
  color: var(--guide-accent);
  border-bottom-color: var(--guide-accent);
}
@media (max-width: 768px) {
  .guide-sub-tab { padding: 8px 10px; font-size: .78rem; }
  .guide-sub-tab .material-icons { font-size: 14px; }
}

/* =============================================
   レイアウト（2カラム）
   ============================================= */
.guide-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 80px;
  align-items: start;
}
@media (max-width: 1024px) {
  .guide-layout {
    grid-template-columns: 1fr;
    padding: 0 16px 60px;
  }
  .guide-sidebar { display: none; }
}
.guide-sidebar {
  align-self: stretch;
}

/* =============================================
   パンくずリスト
   ============================================= */
.guide-breadcrumb {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 20px;
  font-size: .85rem;
  color: var(--guide-text-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.guide-breadcrumb a {
  color: var(--guide-text-secondary);
  text-decoration: none;
  transition: color var(--guide-transition);
}
.guide-breadcrumb a:hover { color: var(--guide-accent); }
.guide-breadcrumb .sep {
  color: var(--guide-border);
  margin: 0 2px;
}

/* =============================================
   記事ヘッダー
   ============================================= */
.guide-header { margin-bottom: 32px; }

.guide-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: 100px;
  font-size: .8rem;
  font-weight: 700;
  background: rgba(var(--guide-accent-rgb), .08);
  color: var(--guide-accent);
  margin-bottom: 16px;
}

.guide-title {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 16px;
  color: var(--guide-text);
}

.guide-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: .85rem;
  color: var(--guide-text-muted);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--guide-border);
}
.guide-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.guide-meta-item .material-icons { font-size: 16px; }

.guide-updated {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 184, 148, .08);
  color: var(--color-secondary, #00B894);
  padding: 2px 10px;
  border-radius: var(--guide-radius-sm);
  font-weight: 600;
  font-size: .8rem;
}
.guide-updated .material-icons { font-size: 14px; }

/* =============================================
   記事本文
   ============================================= */
.guide-body {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--guide-text);
}
.guide-body h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 48px 0 16px;
  padding: 12px 16px;
  background: var(--guide-bg-secondary);
  border-radius: var(--guide-radius);
  border-left: 4px solid var(--guide-accent);
  scroll-margin-top: calc(var(--header-total) + 20px);
}
.guide-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 32px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--guide-accent);
  scroll-margin-top: calc(var(--header-total) + 20px);
}
.guide-body h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 24px 0 8px;
  scroll-margin-top: calc(var(--header-total) + 20px);
}
.guide-body p { margin-bottom: 16px; }
.guide-body ul,
.guide-body ol { margin: 16px 0; padding-left: 28px; }
.guide-body ul { list-style: disc; }
.guide-body ol { list-style: decimal; }
.guide-body li { margin-bottom: 8px; line-height: 1.7; }
.guide-body strong { font-weight: 700; }
.guide-body a {
  color: var(--guide-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.guide-body a:hover { color: var(--color-secondary, #00B894); }
.guide-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--guide-radius);
  margin: 16px 0;
}

/* テーブル */
.guide-body .table-wrap { overflow-x: auto; margin: 24px 0; }
.guide-body table {
  width: 100%;
  min-width: 500px;
  border-collapse: collapse;
  font-size: .9rem;
}
.guide-body th {
  background: var(--guide-text);
  color: #fff;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: .85rem;
}
.guide-body td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--guide-border);
  vertical-align: top;
}
.guide-body tr:nth-child(even) td { background: var(--guide-bg-secondary); }

/* ブロック引用 */
.guide-body blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--guide-bg-secondary);
  border-left: 4px solid var(--guide-accent);
  border-radius: var(--guide-radius);
  color: var(--guide-text-secondary);
  font-style: italic;
}

/* ハイライトボックス */
.highlight-box {
  padding: 20px 24px;
  border-radius: var(--guide-radius);
  margin: 24px 0;
}
.highlight-box.info { background: #eff6ff; color: #1e40af; }
.highlight-box.warning { background: #fffbeb; color: #92400e; }
.highlight-box.success { background: #f0fdf4; color: #166534; }
.highlight-box-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 注意・まとめボックス */
.guide-body .warning-box {
  margin: 24px 0;
  padding: 20px 24px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--guide-radius);
  color: #991b1b;
}
.guide-body .summary {
  margin: 24px 0;
  padding: 20px 24px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--guide-radius);
  color: #166534;
}

/* コスト比較テーブル */
.cost-table { margin: 24px 0; }
.cost-table table { min-width: 400px; }

/* あわせて読みたい */
.inline-related {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--guide-bg-secondary);
  border-radius: var(--guide-radius-lg);
}
.inline-related-title {
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.inline-related-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.inline-related-list li::before { content: "▸ "; color: var(--guide-accent); font-weight: 700; }
.inline-related-list a { color: var(--guide-text); text-decoration: none; font-size: .9rem; transition: color .2s; }
.inline-related-list a:hover { color: var(--guide-accent); }

/* =============================================
   FAQ セクション
   ============================================= */
.guide-faq { margin: 48px 0; }
.guide-faq-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.guide-faq-title .material-icons { color: var(--guide-accent); }

.guide-faq-item {
  border: 1px solid var(--guide-border);
  border-radius: var(--guide-radius);
  margin-bottom: 8px;
  overflow: hidden;
}
.guide-faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 20px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: .95rem;
  color: var(--guide-text);
  background: var(--guide-bg);
  transition: background var(--guide-transition);
  gap: 12px;
  text-align: left;
  font-family: inherit;
  line-height: 1.5;
}
.guide-faq-q:hover { background: var(--guide-bg-secondary); }
.guide-faq-q.open { background: rgba(var(--guide-accent-rgb), .04); color: var(--guide-accent); }

.guide-faq-q-text {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
}
.guide-faq-q-badge {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: var(--guide-text);
  color: var(--guide-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 700;
  margin-top: 2px;
}
.guide-faq-chevron {
  transition: transform .2s ease;
  flex-shrink: 0;
  color: var(--guide-text-muted);
}
.guide-faq-q.open .guide-faq-chevron { transform: rotate(180deg); }

.guide-faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.guide-faq-a-inner {
  padding: 16px 20px 20px;
  font-size: .9rem;
  line-height: 1.7;
  color: var(--guide-text-secondary);
  border-top: 1px solid var(--guide-border);
}

/* =============================================
   CTA セクション
   ============================================= */
.guide-cta {
  background: linear-gradient(135deg, #fff7ed 0%, #f0fdf4 100%);
  border: 1px solid rgba(var(--guide-accent-rgb), .15);
  border-radius: var(--guide-radius-lg);
  padding: 32px;
  margin: 48px 0;
  text-align: center;
}
.guide-cta-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--guide-text);
}
.guide-cta p {
  color: var(--guide-text-secondary);
  font-size: .9rem;
  margin-bottom: 16px;
}
.guide-cta .btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  background: var(--guide-accent);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: 100px;
  text-decoration: none;
  transition: all var(--guide-transition);
  box-shadow: 0 4px 12px rgba(var(--guide-accent-rgb), .3);
}
.guide-cta .btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--guide-accent-rgb), .4);
}
.guide-cta .btn-cta .material-icons { font-size: 20px; }

/* =============================================
   関連記事
   ============================================= */
.guide-related { margin: 48px 0; }
.guide-related-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.guide-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 768px) {
  .guide-related-grid { grid-template-columns: 1fr; }
}
.guide-related-card {
  display: flex;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--guide-border);
  border-radius: var(--guide-radius);
  text-decoration: none;
  transition: all var(--guide-transition);
}
.guide-related-card:hover {
  border-color: var(--guide-accent);
  box-shadow: var(--guide-shadow-sm);
  transform: translateY(-1px);
}
.guide-related-card-thumb {
  flex-shrink: 0;
  width: 80px;
  height: 60px;
  background: linear-gradient(135deg, var(--guide-bg-secondary), #e5e7eb);
  border-radius: var(--guide-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--guide-accent);
}
.guide-related-card-thumb .material-icons { font-size: 28px; }
.guide-related-card-body { flex: 1; min-width: 0; }
.guide-related-card-title {
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--guide-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.guide-related-card:hover .guide-related-card-title { color: var(--guide-accent); }

/* =============================================
   サイドバーTOC（PC：sticky追従）
   ============================================= */
.guide-sidebar-toc {
  position: sticky;
  top: calc(var(--header-total) + 20px);
  background: var(--guide-bg-secondary);
  border: 1px solid var(--guide-border);
  border-radius: var(--guide-radius);
  padding: 20px;
  max-height: calc(100vh - var(--header-total) - 60px);
  overflow-y: auto;
}
.guide-sidebar-toc-title {
  font-size: .85rem;
  font-weight: 700;
  color: var(--guide-text-secondary);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.guide-sidebar-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.guide-sidebar-toc li a {
  display: block;
  padding: 5px 8px;
  font-size: .85rem;
  color: var(--guide-text-secondary);
  text-decoration: none;
  border-radius: var(--guide-radius-sm);
  transition: all var(--guide-transition);
  line-height: 1.4;
}
.guide-sidebar-toc li a:hover,
.guide-sidebar-toc li a.active {
  color: var(--guide-accent);
  background: rgba(var(--guide-accent-rgb), .05);
}
.guide-sidebar-toc li.toc-h3 a {
  padding-left: 20px;
  font-size: .8rem;
}

/* =============================================
   SP用 TOC FAB + Drawer
   ============================================= */
.guide-toc-fab {
  display: none;
  position: fixed;
  bottom: 80px;
  right: 24px;
  z-index: 49;
  background: var(--guide-bg);
  border: 1px solid var(--guide-border);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  color: var(--guide-text-secondary);
  box-shadow: var(--guide-shadow-md);
  cursor: pointer;
}
.guide-toc-fab .material-icons { font-size: 22px; }
@media (max-width: 1024px) {
  .guide-toc-fab { display: flex; }
}

.guide-toc-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 299;
  background: rgba(0,0,0,.4);
  opacity: 0;
  transition: opacity .3s ease;
}
.guide-toc-overlay.open {
  display: block;
  opacity: 1;
}

.guide-toc-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 300;
  background: var(--guide-bg);
  border-radius: var(--guide-radius-lg) var(--guide-radius-lg) 0 0;
  padding: 24px 20px;
  max-height: 70vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform .3s ease;
  box-shadow: var(--guide-shadow-xl);
}
.guide-toc-drawer.open { transform: translateY(0); }

.guide-toc-drawer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.guide-toc-drawer li a {
  display: block;
  padding: 8px 10px;
  font-size: .9rem;
  color: var(--guide-text-secondary);
  text-decoration: none;
  border-radius: var(--guide-radius-sm);
  transition: all var(--guide-transition);
}
.guide-toc-drawer li a:hover { color: var(--guide-accent); background: rgba(var(--guide-accent-rgb), .05); }
.guide-toc-drawer li.toc-h3 a { padding-left: 24px; font-size: .85rem; }
