/* 八代市 災害援護資金貸付ガイド
   八代市公式トーン（藍碧 #235f7c）を基調に、
   貸付限度額表・所得制限・シミュレーター・必要書類を明快に表現 */

.loan-page {
  --l-teal: #235f7c;
  --l-teal-light: #e8f3f8;
  --l-teal-border: #9dc4d4;
  --l-orange: #c2410c;
  --l-orange-light: #fff7ed;
  --l-blue: #1d4ed8;
  --l-blue-light: #eff6ff;
  --l-yellow: #a16207;
  --l-yellow-light: #fefce8;
  --l-ink: #0f2933;
  --l-muted: #475569;
  --l-line: #cbd5e1;
}

.loan-page .waste-lead b {
  color: var(--l-teal);
}

/* ヒーローキーファクト */
.loan-keyfacts {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr 1.2fr;
  gap: 12px;
  max-width: 960px;
  margin: 28px 0 0;
}

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

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

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

.loan-keyfacts .keyfact-highlight {
  border-color: var(--l-orange);
  background: var(--l-orange-light);
  box-shadow: 4px 4px 0 #fed7aa;
}

.loan-keyfacts .keyfact-highlight dd {
  color: var(--l-orange);
}

.loan-keyfacts .keyfact-deadline {
  border-color: var(--l-blue);
  background: var(--l-blue-light);
  box-shadow: 4px 4px 0 #bfdbfe;
}

.loan-keyfacts .keyfact-deadline dd {
  color: #1e40af;
  font-size: 20px;
}

/* 重要なお知らせ帯 */
.source-alert {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  max-width: 1040px;
  margin: 24px auto 0;
  padding: 18px 24px;
  border: 2px solid #ea580c;
  border-radius: 12px;
  background: #fff7ed;
  color: #9a3412;
}

.source-alert svg {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  stroke: #c2410c;
  stroke-width: 2;
  fill: none;
}

.source-alert b {
  display: block;
  font-size: 17px;
  color: #c2410c;
  margin-bottom: 4px;
}

.source-alert p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #431407;
}

.source-alert a {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 14px;
  background: #c2410c;
  color: #fff;
  font-weight: 700;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
}

/* 3つの重要ポイント */
.loan-principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.loan-principles li {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 3px solid var(--l-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 4px 4px 0 #e2e8f0;
}

.loan-principles li:nth-child(1) {
  border-color: #2563eb;
  box-shadow: 4px 4px 0 #dbeafe;
}
.loan-principles li:nth-child(2) {
  border-color: #059669;
  box-shadow: 4px 4px 0 #d1fae5;
}
.loan-principles li:nth-child(3) {
  border-color: #d97706;
  box-shadow: 4px 4px 0 #fef3c7;
}

.principle-num {
  position: absolute;
  top: -14px;
  left: 20px;
  width: 28px;
  height: 28px;
  background: var(--l-teal);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loan-principles h3 {
  font-size: 19px;
  margin: 8px 0 8px;
  color: var(--l-ink);
}

.loan-principles p {
  font-size: 14px;
  line-height: 1.65;
  color: #334155;
  margin: 0 0 12px;
}

.principle-note {
  margin-top: auto;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}

/* シミュレーターセクション */
.loan-sim-container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 28px;
  border: 3px solid var(--l-teal);
  border-radius: 14px;
  background: #fff;
  box-shadow: 6px 6px 0 var(--l-teal-border);
}

.sim-group {
  margin-bottom: 28px;
}

.sim-group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 800;
  color: var(--l-ink);
  margin-bottom: 12px;
}

.sim-step-badge {
  display: inline-block;
  padding: 2px 10px;
  background: var(--l-teal);
  color: #fff;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 800;
}

.sim-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.sim-btn {
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
  border: 2px solid var(--l-line);
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  font-family: inherit;
}

.sim-btn:hover {
  border-color: var(--l-teal);
  background: var(--l-teal-light);
}

.sim-btn.active {
  border-color: var(--l-teal);
  background: #eff6ff;
  outline: 2px solid var(--l-teal);
  box-shadow: 0 0 0 3px rgba(35, 95, 124, 0.2);
}

.sim-btn-label {
  font-size: 15px;
  font-weight: 800;
  color: var(--l-ink);
}

.sim-btn-sub {
  font-size: 12px;
  color: var(--l-muted);
  margin-top: 4px;
  line-height: 1.4;
}

/* 判定結果カード */
.sim-result-card {
  margin-top: 24px;
  padding: 24px;
  border-radius: 12px;
  background: #f8fafc;
  border: 2px solid var(--l-line);
}

.sim-result-card.success {
  border-color: #2563eb;
  background: #f0f7ff;
}

.sim-result-card.warning {
  border-color: #d97706;
  background: #fffdf5;
}

.result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 2px dashed #cbd5e1;
}

.result-max-amount {
  font-size: 32px;
  font-weight: 900;
  color: #1d4ed8;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.result-item {
  background: #fff;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.result-item dt {
  font-size: 12px;
  font-weight: 800;
  color: var(--l-muted);
}

.result-item dd {
  font-size: 16px;
  font-weight: 800;
  color: var(--l-ink);
  margin: 4px 0 0;
}

.result-docs-box {
  margin-top: 16px;
  padding: 16px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
}

.result-docs-box h4 {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--l-ink);
}

.result-docs-box ul {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.7;
}

/* 一覧表スタイル */
.table-responsive {
  overflow-x: auto;
  margin: 20px 0;
  border: 2px solid var(--l-line);
  border-radius: 10px;
}

.loan-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: #fff;
}

.loan-table th,
.loan-table td {
  padding: 12px 16px;
  border: 1px solid var(--l-line);
  text-align: left;
}

.loan-table th {
  background: #f1f5f9;
  color: var(--l-ink);
  font-weight: 800;
}

.loan-table tr:nth-child(even) td {
  background: #f8fafc;
}

.loan-table .num-cell {
  text-align: right;
  font-weight: 800;
}

.loan-table .highlight-cell {
  background: #eff6ff !important;
  color: #1d4ed8;
  font-weight: 900;
}

/* 必要書類チェックリスト */
.doc-checklist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 1040px;
  margin: 0 auto;
}

.doc-group {
  padding: 22px;
  border: 2px solid var(--l-line);
  border-radius: 12px;
  background: #fff;
}

.doc-group.guarantor-group {
  border-color: #2563eb;
  background: #f8fafc;
}

.doc-group h3 {
  font-size: 17px;
  margin: 0 0 14px;
  color: var(--l-ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.doc-group ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.doc-group li {
  position: relative;
  padding: 10px 10px 10px 32px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 14px;
  line-height: 1.5;
}

.doc-group li:last-child {
  border-bottom: none;
}

.doc-check-icon {
  position: absolute;
  left: 6px;
  top: 10px;
  width: 18px;
  height: 18px;
  border: 2px solid var(--l-teal);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--l-teal);
  font-weight: 900;
}

/* 窓口カード */
.loan-contact-card {
  max-width: 820px;
  margin: 28px auto 0;
  padding: 28px;
  border: 3px solid var(--l-teal);
  border-radius: 14px;
  background: #fff;
  box-shadow: 6px 6px 0 var(--l-teal-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.contact-main h3 {
  font-size: 20px;
  margin: 0 0 8px;
  color: var(--l-ink);
}

.contact-main p {
  margin: 0;
  font-size: 14px;
  color: #475569;
}

.contact-phone a {
  display: inline-block;
  padding: 12px 24px;
  background: var(--l-teal);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  border-radius: 10px;
  text-decoration: none;
  white-space: nowrap;
}

@media (max-width: 820px) {
  .loan-keyfacts {
    grid-template-columns: 1fr 1fr;
  }
  .loan-principles {
    grid-template-columns: 1fr;
  }
  .doc-checklist {
    grid-template-columns: 1fr;
  }
  .loan-contact-card {
    flex-direction: column;
    text-align: center;
  }
}
