@charset "utf-8";

/* =========================================================
   custom.css
   山岸内科サイト 独自追加CSS
   ---------------------------------------------------------
   既存の css/style.css は変更せず、このファイルを最後に読み込んで使用。
   SASページでは、本文全体を <div class="page-sas"> ... </div> で囲む。
   例：
   <link rel="stylesheet" href="css/style.css">
   <link rel="alternate stylesheet" href="css/change.css" title="change">
   <link rel="stylesheet" href="css/custom.css">
   ========================================================= */

/* =========================================================
   共通パーツ：custom-*
   他ページにも流用可能。既存CSSの .box .btn .menu 等とは衝突させない。
   ========================================================= */
.custom-hero,
.custom-card,
.custom-note,
.custom-alert,
.custom-flow-item,
.custom-faq-item {
  box-sizing: border-box;
}

.custom-hero {
  background: linear-gradient(135deg, #eef8ec 0%, #ffffff 100%);
  border: 1px solid #d6ead2;
  border-radius: 14px;
  padding: 2.2em 1.5em;
  margin: 0 0 1.8em;
  text-align: center;
}

.custom-hero-badge {
  display: inline-block;
  margin-bottom: 0.8em;
  padding: 0.25em 1em;
  color: #3f7f39;
  font-size: 0.85em;
  font-weight: 700;
  line-height: 1.6;
  background: #fff;
  border: 1px solid #bfe0ba;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.custom-grid {
  display: grid;
  gap: 0.9em;
  margin: 0 20px 1em;
}

.custom-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.custom-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.custom-card {
  background: #fff;
  border: 1px solid #d6ead2;
  border-radius: 12px;
  padding: 1em 1.1em;
}

.custom-card-title {
  color: #5b9f53;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 0.25em;
}

.custom-card p,
.custom-note p,
.custom-alert p {
  padding: 0 !important;
  margin: 0;
}

.custom-note {
  margin: 1.5em 20px 1em;
  padding: 1em 1.2em;
  background: #eef8ec;
  border-left: 5px solid #7ebb77;
  border-radius: 8px;
}

.custom-alert {
  display: flex;
  gap: 0.8em;
  align-items: flex-start;
  margin: 0 20px 1.8em;
  padding: 1em 1.2em;
  background: #fff;
  border-left: 5px solid #c0392b;
  border-radius: 0 10px 10px 0;
}

.custom-alert-icon {
  flex: 0 0 auto;
  font-size: 1.7em;
  line-height: 1.2;
}

.custom-alert-title {
  color: #c0392b;
  font-weight: 700;
  margin-bottom: 0.3em;
}

.custom-check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.25em 1em;
  margin: 0;
  padding: 0;
  list-style: none;
}

.custom-check-list li {
  position: relative;
  padding-left: 1.25em;
  line-height: 1.7;
}

.custom-check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: #c0392b;
  font-weight: 700;
}

.custom-flow {
  margin: 0 20px 1em;
}

.custom-flow-item {
  display: flex;
  gap: 1em;
  position: relative;
  padding-bottom: 1.4em;
}

.custom-flow-item:last-child {
  padding-bottom: 0;
}

.custom-flow-num {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  background: #7ebb77;
  border-radius: 50%;
}

.custom-flow-item:not(:last-child) .custom-flow-num::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 2px;
  height: calc(100% + 0.9em);
  background: #bfe0ba;
  transform: translateX(-50%);
}

.custom-flow-body {
  padding-top: 0.25em;
}

.custom-flow-title {
  color: #3f7f39;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 0.2em;
}

.custom-flow-body p {
  padding: 0 !important;
  margin: 0;
}

.custom-faq-list {
  margin: 0 20px 1em;
}

.custom-faq-item {
  background: #fff;
  border: 1px solid #d6ead2;
  border-radius: 10px;
  margin-bottom: 0.8em;
  padding: 0.9em 1em;
}

.custom-faq-item summary {
  position: relative;
  display: block;
  padding-right: 1.6em;
  color: #3f7f39;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.custom-faq-item summary::-webkit-details-marker {
  display: none;
}

.custom-faq-item summary::after {
  content: "＋";
  position: absolute;
  right: 0;
  top: 0;
  color: #7ebb77;
  font-weight: 700;
}

.custom-faq-item[open] summary::after {
  content: "－";
}

.custom-faq-item p {
  padding: 0 !important;
  margin: 0.6em 0 0;
}

/* =========================================================
   SASページ用
   HTML側で <div class="page-sas"> ... </div> と囲む。
   ========================================================= */
.page-sas {
  --sas-green: #7ebb77;
  --sas-green-dark: #3f7f39;
  --sas-green-mid: #bfe0ba;
  --sas-green-light: #eef8ec;
  --sas-border: #d6ead2;
  --sas-text: #333;
  --sas-muted: #596b56;
  --sas-warn: #c0392b;
}

/* 既存 style.css の #main p padding を、SASページ内だけ扱いやすく調整 */
.page-sas p {
  line-height: 1.9;
}

.page-sas .sas-lead,
.page-sas .sas-lead-muted {
  padding: 0 20px 1em !important;
}

.page-sas .sas-lead-muted {
  color: var(--sas-muted);
}

/* ヒーロー内の見出しは既存 #main h2 のクローバー罫線を消す */
.page-sas .custom-hero h1,
.page-sas .custom-hero h2 {
margin: 0 0 0.6em !important;
  padding: 0 !important;
  color: #3f7f39 !important;
  font-size: 2.4em;
  line-height: 1.45 !important;
  font-family: inherit !important;
  font-weight: 700 !important;
  background: none !important;
  border: none !important;
}

.page-sas .custom-hero h2::before,
.page-sas .custom-hero h2::after {
  display: none !important;
}


.page-sas .custom-hero h1::before,
.page-sas .custom-hero h1::after {
  display: none !important;
}

.page-sas .custom-hero h1 span,
.page-sas .custom-hero h2 span {
  color: var(--sas-green);
}

.page-sas .custom-hero p {
  padding: 0 !important;
  color: var(--sas-muted);
  line-height: 1.8;
}

/* 既存の h2 デザインを活かしながら余白だけ調整 */
.page-sas h2.sas-section-title {
  margin-top: 1.8em;
  margin-bottom: 1em;
}

.page-sas .sas-risk-title {
  padding: 0 20px 0.6em !important;
  color: var(--sas-green-dark);
  font-weight: 700;
}

.page-sas .sas-card-green {
  border-top: 4px solid var(--sas-green);
  text-align: center;
}

.page-sas .sas-card-green .custom-card-title {
  color: var(--sas-green-dark);
}

.page-sas .sas-card-featured {
  border: 2px solid var(--sas-green);
}

.page-sas .sas-icon-large {
  display: block;
  font-size: 1.8em;
  line-height: 1.2;
  margin-bottom: 0.25em;
}

.page-sas .sas-consult-note {
  margin-top: 2em;
}

.page-sas .sas-consult-note strong {
  color: var(--sas-green-dark);
}

/* SASページ内の画像を使う場合 */
.page-sas .sas-image {
  margin: 0 20px 1.2em;
}

.page-sas .sas-image img {
  border-radius: 12px;
  border: 1px solid var(--sas-border);
}

/* =========================================================
   レスポンシブ
   既存テンプレートのスマホ表示を邪魔しない範囲で調整。
   ========================================================= */
@media screen and (max-width: 900px) {
  .custom-grid-2,
  .custom-grid-3,
  .custom-check-list {
    grid-template-columns: 1fr;
  }

  .custom-hero {
    padding: 1.6em 1em;
  }

  .custom-alert {
    flex-direction: column;
  }
}

@media screen and (max-width: 600px) {
  .custom-grid,
  .custom-alert,
  .custom-flow,
  .custom-faq-list,
  .custom-note,
  .page-sas .sas-image {
    margin-left: 0;
    margin-right: 0;
  }

  .page-sas .sas-lead,
  .page-sas .sas-lead-muted,
  .page-sas .sas-risk-title {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .page-sas .custom-hero h2 {
    font-size: 1.45em;
  }
}

/* =========================================================
   文字サイズボタン対応：h2をpx固定からem連動に戻す
   ========================================================= */

/* 通常のh2：通常時は約22px、大ボタン時は約37px */
#main h2 {
  font-size: 1.22em;
}

/* SASページ冒頭の大きな見出し */
#main .page-sas .custom-hero h2 {
  font-size: 2.4em;
}

/* スマホでは大きすぎないよう調整 */
@media screen and (max-width: 600px) {
  #main h2 {
    font-size: 1.15em;
  }

  #main .page-sas .custom-hero h2 {
    font-size: 1.55em;
  }
}
