/* 公費解体・自費解体 総合ダッシュボード＆各自治体ガイド 共通スタイルシート
   hikawa-demolition.css と互換性を保ち、宇土市・宇城市・八代市・熊本市・総合まとめページに適用 */

.demolition-page {
  --r-teal: #185f55;
  --r-teal-light: #edf7f4;
  --r-teal-border: #98cdc3;
  --r-orange: #d8552f;
  --r-orange-light: #fff7ed;
  --r-blue: #1a5b93;
  --r-blue-light: #eff6ff;
  --r-yellow: #ca8a04;
  --r-yellow-light: #fefce8;
  --r-ink: #123f38;
  --r-muted: #537069;
  --r-line: #d8e6e2;
}

/* 八代市テーマ（藍・えんじ） */
.demolition-page.theme-yatsushiro {
  --r-teal: #1b4965;
  --r-teal-light: #f0f7fa;
  --r-teal-border: #9ec5d8;
  --r-orange: #b83246;
  --r-orange-light: #fdf2f4;
  --r-ink: #0f2d3f;
  --r-muted: #4d6d80;
  --r-line: #d6e5ed;
}

/* 宇土市テーマ（水色・濃紺） */
.demolition-page.theme-uto {
  --r-teal: #0d7294;
  --r-teal-light: #f0f9fc;
  --r-teal-border: #8ecae6;
  --r-orange: #c84b31;
  --r-orange-light: #fdf5f3;
  --r-ink: #0b3954;
  --r-muted: #436e84;
  --r-line: #d2e7f2;
}

/* 宇城市テーマ（若草・深緑） */
.demolition-page.theme-uki {
  --r-teal: #1e7a4b;
  --r-teal-light: #f1f8f4;
  --r-teal-border: #99d5b3;
  --r-orange: #d96b27;
  --r-orange-light: #fef7ee;
  --r-ink: #114227;
  --r-muted: #456d56;
  --r-line: #d2e9dc;
}

/* 熊本市テーマ（濃紺・銀杏） */
.demolition-page.theme-kumamoto {
  --r-teal: #0f3b5f;
  --r-teal-light: #f0f4f8;
  --r-teal-border: #93b5d8;
  --r-orange: #d97706;
  --r-orange-light: #fffbeb;
  --r-ink: #0a2540;
  --r-muted: #475f78;
  --r-line: #d5e1ee;
}

/* 全体総合まとめページテーマ（力強い深藍・アクセント赤橙） */
.demolition-page.theme-portal {
  --r-teal: #1e3a8a;
  --r-teal-light: #eff6ff;
  --r-teal-border: #93c5fd;
  --r-orange: #ea580c;
  --r-orange-light: #fff7ed;
  --r-ink: #0f172a;
  --r-muted: #475569;
  --r-line: #e2e8f0;
}

.demolition-page .waste-lead b {
  color: var(--r-teal);
}

/* ---- ヒーローの要点カード ---- */
.demolition-keyfacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  max-width: 960px;
  margin: 28px 0 0;
}

.demolition-keyfacts div {
  padding: 14px 18px;
  border: 3px solid var(--r-teal);
  border-radius: 10px;
  background: #fff;
  box-shadow: 4px 4px 0 var(--r-teal-border);
}

.demolition-keyfacts dt {
  color: var(--r-muted);
  font-size: 13px;
  font-weight: 800;
}

.demolition-keyfacts dd {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.3;
}

.demolition-keyfacts .keyfact-highlight {
  border-color: var(--r-orange);
  background: var(--r-orange-light);
  box-shadow: 4px 4px 0 rgba(234, 88, 12, 0.3);
}

.demolition-keyfacts .keyfact-highlight dd {
  color: var(--r-orange);
}

.keyfacts-note {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--r-muted);
}

/* ---- 電話番号クイックコール帯 ---- */
.quick-phone-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  max-width: 1180px;
  margin: 18px auto 0;
  padding: 16px 22px;
  border: 3px solid #f59e0b;
  border-radius: 12px;
  background: #fefce8;
  box-shadow: 5px 5px 0 #fde68a;
}

.quick-phone-bar .bar-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 900;
  color: #854d0e;
}

.quick-phone-bar .bar-label svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.quick-phone-bar .bar-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-phone-bar .bar-numbers a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 2px solid var(--r-teal);
  border-radius: 6px;
  background: #fff;
  color: var(--r-teal);
  font-size: 16px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 2px 0 var(--r-teal-border);
}

.quick-phone-bar .bar-numbers a:hover {
  background: var(--r-teal);
  color: #fff;
}

.quick-phone-bar .bar-note {
  font-size: 13px;
  font-weight: 800;
  color: #713f12;
}

/* ---- 3つの約束 / 準備事項 ---- */
.demolition-promises {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.demolition-promises li {
  position: relative;
  padding: 24px 22px;
  border: 3px solid var(--r-teal);
  border-radius: 12px;
  background: #fff;
  box-shadow: 6px 6px 0 var(--r-teal-border);
}

.demolition-promises .promise-num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--r-orange);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 12px;
}

.demolition-promises h3 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.4;
  color: var(--r-ink);
}

.demolition-promises p {
  margin: 0;
  color: #334e47;
  font-size: 15px;
  line-height: 1.75;
}

.demolition-promises .promise-warn {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--r-orange-light);
  color: #9a3412;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.6;
}

/* ---- 状況別タブナビ ---- */
.situation-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 1180px;
  margin: 0 auto 20px;
}

.situation-btn {
  padding: 10px 18px;
  border: 2px solid var(--r-teal);
  border-radius: 30px;
  background: #fff;
  color: var(--r-teal);
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: all .2s;
}

.situation-btn:hover {
  background: var(--r-teal-light);
}

.situation-btn[aria-selected="true"] {
  background: var(--r-teal);
  color: #fff;
}

/* ---- 書類リスト・カード ---- */
.docs-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
}

.doc-card {
  padding: 20px;
  border: 2px solid var(--r-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 6px rgba(0,0,0,0.05);
}

.doc-card h4 {
  margin: 0 0 8px;
  font-size: 17px;
  color: var(--r-ink);
}

.doc-card p {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--r-muted);
  line-height: 1.6;
}

.doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.doc-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  background: var(--r-teal-light);
  color: var(--r-teal);
  border: 1px solid var(--r-teal-border);
}

.doc-link:hover {
  background: var(--r-teal);
  color: #fff;
}

/* ---- 総合ダッシュボード専用コンポーネント ---- */
.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto 30px;
}

.metric-card {
  padding: 22px;
  border-radius: 12px;
  background: #fff;
  border: 3px solid var(--r-teal);
  box-shadow: 6px 6px 0 var(--r-teal-border);
}

.metric-card.accent {
  border-color: var(--r-orange);
  box-shadow: 6px 6px 0 rgba(234, 88, 12, 0.3);
}

.metric-card .metric-header {
  font-size: 14px;
  font-weight: 800;
  color: var(--r-muted);
  margin-bottom: 8px;
}

.metric-card .metric-number {
  font-size: 32px;
  font-weight: 900;
  color: var(--r-ink);
  line-height: 1;
}

.metric-card.accent .metric-number {
  color: var(--r-orange);
}

.metric-card .metric-sub {
  margin-top: 8px;
  font-size: 13px;
  color: var(--r-muted);
  line-height: 1.5;
}

/* 自治体別比較テーブル */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 20px 0;
  border-radius: 12px;
  border: 2px solid var(--r-line);
  background: #fff;
}

.demolition-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.demolition-table th,
.demolition-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--r-line);
}

.demolition-table th {
  background: var(--r-teal-light);
  color: var(--r-ink);
  font-weight: 900;
  white-space: nowrap;
}

.demolition-table tr:last-child td {
  border-bottom: none;
}

.demolition-table tr:hover td {
  background: #fbfdfe;
}

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-badge.accepting {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.status-badge.closing-soon {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.status-badge.preparing {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

/* 重要条項解説グリッド */
.clause-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
  max-width: 1180px;
  margin: 0 auto;
}

.clause-card {
  padding: 24px;
  border-radius: 12px;
  background: #fff;
  border: 2px solid var(--r-line);
  box-shadow: 4px 4px 0 rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
}

.clause-card.featured {
  border: 3px solid var(--r-orange);
  background: var(--r-orange-light);
  box-shadow: 5px 5px 0 rgba(234, 88, 12, 0.2);
}

.clause-tag {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 12px;
  background: var(--r-teal);
  color: #fff;
}

.clause-card.featured .clause-tag {
  background: var(--r-orange);
}

.clause-card h3 {
  margin: 0 0 12px;
  font-size: 20px;
  color: var(--r-ink);
  line-height: 1.4;
}

.clause-card p {
  margin: 0 0 14px;
  font-size: 15px;
  color: #334e47;
  line-height: 1.7;
}

.clause-card ul {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
  color: #334e47;
  line-height: 1.7;
}

.clause-card li {
  margin-bottom: 6px;
}

/* 自治体ガイドカード一覧 */
.municipality-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  max-width: 1180px;
  margin: 0 auto;
}

.muni-guide-card {
  border: 3px solid var(--r-teal);
  border-radius: 14px;
  background: #fff;
  padding: 24px;
  box-shadow: 6px 6px 0 var(--r-teal-border);
  display: flex;
  flex-direction: column;
  transition: transform .15s ease;
}

.muni-guide-card:hover {
  transform: translateY(-2px);
}

.muni-guide-card h3 {
  margin: 0 0 6px;
  font-size: 22px;
  color: var(--r-ink);
}

.muni-guide-card .muni-meta {
  font-size: 13px;
  color: var(--r-muted);
  margin-bottom: 16px;
  font-weight: 700;
}

.muni-guide-card .muni-details {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.8;
  flex-grow: 1;
}

.muni-guide-card .muni-details li {
  border-bottom: 1px dashed var(--r-line);
  padding: 6px 0;
}

.muni-guide-card .muni-btn {
  display: block;
  text-align: center;
  padding: 12px;
  border-radius: 8px;
  background: var(--r-teal);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  font-size: 15px;
  box-shadow: 0 3px 0 rgba(0,0,0,0.15);
}

.muni-guide-card .muni-btn:hover {
  filter: brightness(1.1);
}

/* ---- レスポンシブ改行・タイポグラフィ制御 ---- */
.inline-block {
  display: inline-block;
}

.nowrap {
  white-space: nowrap;
}

.word-keep {
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.keyfact-sub {
  font-size: 14px;
  font-weight: 700;
  color: var(--r-muted);
  margin-left: 4px;
}

/* ---- 一次情報リンク・リソースカード ---- */
.resource-category {
  margin: 28px auto 14px;
  max-width: 1180px;
}

.resource-category h3 {
  font-size: 18px;
  color: var(--r-ink);
  margin: 0 0 12px;
  padding-left: 10px;
  border-left: 4px solid var(--r-teal);
  line-height: 1.3;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
}

.resource-card {
  padding: 18px 20px;
  border-radius: 12px;
  background: #fff;
  border: 2px solid var(--r-line);
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: all .15s ease;
}

.resource-card:hover {
  border-color: var(--r-teal);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.08);
}

.resource-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.resource-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  background: var(--r-teal-light);
  color: var(--r-teal);
  border: 1px solid var(--r-teal-border);
}

.resource-badge.pref {
  background: #eff6ff;
  color: #1e40af;
  border-color: #93c5fd;
}

.resource-badge.gov {
  background: #f0fdf4;
  color: #166534;
  border-color: #86efac;
}

.resource-card h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--r-ink);
  line-height: 1.4;
  flex-grow: 1;
}

.resource-card p {
  margin: 6px 0 12px;
  font-size: 13px;
  color: var(--r-muted);
  line-height: 1.6;
}

.resource-card-action {
  margin-top: auto;
  font-size: 13px;
  font-weight: 800;
  color: var(--r-teal);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ---- スマホ画面（幅640px以下）のレイアウト＆改行最適化 ---- */
@media (max-width: 640px) {
  .demolition-page .waste-hero {
    padding: 24px 16px 32px;
  }

  .demolition-page .waste-hero h1 {
    font-size: 24px;
    line-height: 1.35;
    word-break: keep-all;
    overflow-wrap: anywhere;
  }

  .demolition-page .waste-hero h1 small {
    font-size: 13px;
    margin-bottom: 6px;
    display: block;
  }

  .demolition-page .waste-hero h1 span {
    font-size: 20px;
    display: inline-block;
  }

  .demolition-page .waste-lead {
    font-size: 14px;
    line-height: 1.7;
    margin-top: 14px;
  }

  .demolition-keyfacts {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 20px;
  }

  .demolition-keyfacts div {
    padding: 12px 14px;
  }

  .demolition-keyfacts dt {
    font-size: 12px;
  }

  .demolition-keyfacts dd {
    font-size: 18px;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: anywhere;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px;
  }

  .dashboard-metrics {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .metric-card {
    padding: 16px 14px;
  }

  .metric-card .metric-header {
    font-size: 13px;
  }

  .metric-card .metric-number {
    font-size: 26px;
  }

  .metric-card .metric-sub {
    font-size: 13px;
    line-height: 1.6;
  }

  .municipality-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .muni-guide-card {
    padding: 18px 16px;
  }

  .muni-guide-card h3 {
    font-size: 20px;
  }

  .demolition-promises {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .demolition-promises li {
    padding: 18px 16px;
  }

  .demolition-promises h3 {
    font-size: 17px;
    line-height: 1.45;
    word-break: keep-all;
    overflow-wrap: anywhere;
  }

  .clause-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .clause-card {
    padding: 18px 16px;
  }

  .clause-card h3 {
    font-size: 18px;
    line-height: 1.45;
    word-break: keep-all;
    overflow-wrap: anywhere;
  }

  .clause-card p,
  .clause-card ul {
    font-size: 14px;
    line-height: 1.65;
  }

  .table-responsive {
    margin: 14px 0;
  }

  .demolition-table th,
  .demolition-table td {
    padding: 10px 12px;
    font-size: 13px;
  }

  .resource-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .resource-card {
    padding: 14px 16px;
  }
}
