/* ==========================================
   トップページ（/index.php）専用スタイル
   ========================================== */

/* ---------- 共通カラー ----------
   メインカラー（緑）   : #239d71
   アクセントカラー（赤）: #e61d50
   -------------------------------- */

@page {
  size: A4;
  margin: 20mm 15mm;
  @bottom-right {
    content: counter(page);
    font-size: 16pt;
    color: #64748b;
  }
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0 auto;
  padding: 0;
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  font-size: 16pt;
  line-height: 1.7;
  color: #334155;
  background-color: #ffffff;
  max-width: 900px;
}

/* ---------- 見出し・本文 ---------- */
h2 {
  font-size: 20pt;
  color: #239d71;
  background-color: #f1f5f9;
  padding: 10px 15px;
  border-left: 6px solid #239d71;
  margin-top: 35px;
  margin-bottom: 18px;
  page-break-after: avoid;
  font-weight: bold;
}

h2.is-first {
  margin-top: 10px;
}

p {
  margin: 0 0 15px 0;
  text-align: justify;
}

hr.plain {
  background-color: #ccc;
  border: none;
  height: 4px;
  margin: 40px auto;
}

/* ---------- テキスト装飾 ---------- */
.highlight {
  font-weight: bold;
  color: #239d71;
}

.alert-text {
  font-weight: bold;
  color: #e61d50;
}

.underline {
  text-decoration: underline;
  text-decoration-thickness: 4px;
  text-decoration-color: #eb4e75;
}

.text-red   { color: red; }
.text-green { color: green; }
.text-blue  { color: blue; }

/* ---------- ボタン ---------- */
.matsui-site-link-button.is-green {
  background: #1f9e72;
}

/* ---------- 囲みボックス ---------- */
.diagram-summary {
  background-color: #fff5f5;
  border: 1px solid #fed7d7;
  padding: 15px;
  margin: 20px 0;
  border-radius: 6px;
  text-align: center;
  color: #e61d50;
  font-weight: bold;
  page-break-inside: avoid;
}

.news-headline {
  font-size: 20pt;
  text-align: center;
  margin: 30px;
  color: #de0c40;
}

/* ---------- 連絡先カード ---------- */
.smartphone-disease-container.contact-card {
  border: 7px solid #de0c40;
  padding: 20px;
}

.modal-company {
  display: block;
}

.modal-company img {
  width: 140px;
  margin: 0 40px 10px;
}

.contact-card .company-detail {
  margin: 10px 0 0;
  font-size: 0.8rem;
}

/* ---------- 症例 ---------- */
.case-report {
  font-size: 1.1rem;
}

/* ---------- 疾患と実績 ---------- */
.disease-grid {
  margin-bottom: 25px;
}

.disease-item {
  scroll-margin-top: 80px; /* PC表示の固定メニューに隠れないように */
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 12px 15px;
  margin-bottom: 10px;
  border-radius: 6px;
  page-break-inside: avoid;
}

.disease-name {
  font-weight: bold;
  color: #0f172a;
  display: inline-block;
  width: 65%;
}

.disease-rate {
  font-weight: bold;
  color: #e61d50;
  display: inline-block;
  width: 18%;
  text-align: right;
  font-size: 16pt;
}

.disease-button {
  font-weight: bold;
  color: #3370e3;
  display: inline-block;
  width: 13%;
  text-align: center;
  font-size: 14pt;
}

.details-summary {
  cursor: pointer;
  transition: 0.2s;
  padding: 6px;
  border-radius: 6px;
  font-size: 20px;
}

.details-summary:hover {
  background-color: #bee1de;
}

/* ---------- 東京頭痛センター ---------- */
.thc-heading {
  text-align: center;
}

.thc-affiliation {
  font-size: smaller;
  color: gray;
}

.thc-name {
  font-size: x-large;
  font-weight: bold;
}

.thc-director {
  font-weight: bold;
}

/* ---------- 導入メッセージ ---------- */
.intro-box {
  background-color: #f0fdf4;
  border-left: 5px solid #239d71;
  padding: 15px 20px;
  margin-bottom: 30px;
  border-radius: 0 6px 6px 0;
}

.intro-box p {
  margin: 0 0 8px 0;
  font-size: 18pt;
  font-weight: bold;
  color: #14532d;
}

.intro-box p:last-child {
  margin-bottom: 0;
}

.intro-box .intro-title {
  font-size: 2rem;
  text-align: center;
  color: #e61d50;
}

/* ---------- 交通案内（地図） ---------- */
.map {
  position: relative;
  width: 100%;
  height: 0;
  padding-top: 56.25%; /* 16:9 */
}

.map iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- 診療科別の症状 ---------- */
.figure {
  text-align: center;
}

.figure img {
  max-width: 90%;
}

table.mapping-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  margin-bottom: 20px;
  page-break-inside: avoid;
}

table.mapping-table th,
table.mapping-table td {
  border: 1px solid #cbd5e1;
  padding: 10px 12px;
  font-size: 16pt;
  vertical-align: top;
}

table.mapping-table th {
  background-color: #239d71;
  color: #ffffff;
  font-weight: bold;
  width: 25%;
  text-align: center;
}

table.mapping-table td {
  background-color: #f8fafc;
}

/* ---------- 根本原因 ---------- */
.root-cause-container {
  background-color: #239d71;
  color: #ffffff;
  padding: 25px;
  border-radius: 8px;
  text-align: center;
  margin-top: 20px;
  page-break-inside: avoid;
}

.root-cause-container h4 {
  margin: 0 0 15px 0;
  font-size: 18pt;
  color: #a7f3d0;
  font-weight: bold;
}

.root-cause-flow {
  font-size: 18pt;
  font-weight: bold;
  margin: 15px 0;
}

.root-cause-flow span {
  background-color: #ffffff;
  color: #239d71;
  padding: 6px 15px;
  border-radius: 4px;
  display: inline-block;
  margin: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.root-cause-arrow {
  margin: 5px 0;
  color: #a7f3d0;
}

.root-cause-footer {
  font-size: 16pt;
  font-weight: bold;
  color: #fef08a;
  margin-top: 15px;
}

/* ---------- PC（768px以上） ---------- */
@media (min-width: 768px) {
  .modal-company {
    display: flex;
  }
}
