.top_main {
  width    : 100%;
  max-width: 1024px;
  margin   : auto;
}

.mainimg img {
  width  : 100%;
  height : auto;
  display: block;
  margin : 0 auto;
}

@media (max-width: 767px) {
  .mainimg img {
    aspect-ratio   : 16 / 6;
    object-fit     : cover;
    object-position: left;
  }
}

.top_paper_body h2 {
  padding: 2rem 0;
}

/* .container は styles.css の共通定義を使用（ページ側で上書きしない） */

/*-------------
　診療メニュー
-------------*/
.top_info {
  display  : flex;
  flex-wrap: wrap;
  gap      : 2rem;
  margin   : 3rem auto;
}

@media (max-width: 767px) {
  .top_info {
    flex-direction: column;
    padding: 0 1.5rem;
  }
}

.top_info_item h3 {
  color: #007b79;
  font-size: 1.2rem;
  text-align: center;
}

.top_info_item {
  flex         : 1 1 calc((100% / 2) - 2rem);
  list-style   : none;
  padding      : 0;
  margin       : 0;
  box-sizing   : border-box;
  display      : flex;
  flex-direction: column;
  gap          : 1.6rem;
  border-radius: 10px;
  padding      : 1rem;
  box-shadow   : 0 0 10px rgba(0, 0, 0, 0.1);
  transition   : all 0.3s ease;
}

@media (max-width: 767px) {
  .top_info_item {
    width: 100%;
    display      : flex;
    flex-direction: column;
  }
}

.top_info_item img {
  width  : 100%;
  height : auto;
  display: block;
  margin : 0 auto;
}



/* 各治療のページへのリンク。日本語サイトの styles.css の .section_link_btn と同じ見た目（枠線の丸いボタン＋右の矢印）。
   カードの下端にそろえて中央に置く（下はカードの余白 1rem に加えて 1.5rem あける） */
.top_info a.section_link_btn {
  position: relative;
  display: block;
  width: fit-content;
  margin: auto auto 1.5rem;
  padding: 0.9rem 4.5rem 0.9rem 3.5rem;
  background-color: transparent;
  border: 1px solid #007b79;
  border-radius: 999px;
  color: #007b79;
  font-weight: bold;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  word-break: normal;
  transition: opacity 0.2s ease;
}

.top_info a.section_link_btn::after {
  content: "";
  /* 「>」は SVG（Material Icons の arrow_forward_ios と同じ形）。文字のときと同じく、1em 角を中身の枠の中央上に置き、文字色で塗る */
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z'/%3E%3C/svg%3E") center top / 1em 1em no-repeat content-box;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z'/%3E%3C/svg%3E") center top / 1em 1em no-repeat content-box;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1.5rem;
  height: auto;
  margin: auto;
  padding: 1rem 0.5rem;
  font-size: 1.3em;
  line-height: 1;
  aspect-ratio: 1 / 1;
}

.top_info a.section_link_btn:hover {
  opacity: 0.8;
  text-decoration: none;
}

@media (max-width: 767px) {
  .top_info a.section_link_btn {
    width: auto;
    min-width: 80%;
    max-width: 100%;
    padding: 0.9rem 3rem 0.9rem 2rem;
    font-size: 1rem;
    white-space: normal;
  }
}

.top .cta {
  padding: 4rem 0 3rem;
  width: 100%;
}

@media (max-width: 767px) {
  .top .cta {
    padding: 3rem 0 2rem;
  }
}

/* PC は文の区切りで改行して中央揃え。SP は改行もまとまり（.wbr）も使わず普通に折り返し、左揃えで読みやすく */
.top .cta_text {
  text-align: center;
  font-size: 1.05rem;
  line-height: 2;
  word-break: normal; /* styles.css の body の break-all を打ち消し、英単語の途中で改行しない */
}

@media (max-width: 767px) {
  .top .cta_text {
    text-align: left;
    font-size: 1rem;
    line-height: 1.8;
  }

  .top .cta_text .wbr {
    display: inline;
  }
}

/* 予約ボタン。ヘッダーの APPOINTMENT ボタン（header.html の a.header_btn_reserve）と同じゴールド系 */
.top .cta a.btn_appo,
.top .cta a.btn_appo:link,
.top .cta a.btn_appo:visited {
  display: block;
  width: fit-content;
  min-width: 280px;
  margin: 2.5rem auto 0;
  padding: 0.8rem 2.5rem;
  background-color: #a9803f;
  color: #fff;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.05em;
  text-align: center;
  text-decoration: none;
  border-radius: 0.6rem;
  transition: opacity 0.3s ease;
}

.top .cta a.btn_appo:hover {
  opacity: 0.8;
  text-decoration: none;
}

/* ============================
   医療法人Zion 理念
   =============================*/
.top_philosophy2026 {
  padding: 3rem 1rem 4rem 1rem;
  font-family: var(--mincho);
  text-align: center;
  margin: 0 auto;
  background-color: #fafafa;
}

/* 見出し（Our Mission）だけはほかの .section_title と同じく本文のフォント（明朝にしない）。
   上の余白は欄の padding（3rem）だけにし、下もリード文との間を詰める */
.top_philosophy2026 .section_title {
  font-family: sans-serif;
  margin: 0 auto 1rem;
}

.top_philosophy2026_lead {
  padding: 1rem 1.2rem;
  margin-bottom: 30px;
}

/* チェックボックス制御 */
.toggle_input {
  display: none !important;
}

/* フレーム本体 (閉じている初期状態) */
.top_philosophy2026_frame {
  display: grid !important;
  grid-template-rows: 250px !important;
  overflow: hidden !important;
  background: #fff;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 3.4rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  transition: grid-template-rows 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
}

.philosophy_inner {
  min-height: 0;
}

.gradient_overlay {
  position: relative;
  width: 100%;
  max-width: 800px;
  height: 150px;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0) 0%, #fafafa 50%);
  margin: -150px auto 0;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.4s;
}

.toggle_label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
  cursor: pointer;
  margin-top: -80px;
  position: relative;
  z-index: 3;
}

.btn_text_open, .btn_text_close {
  font-weight: bold;
  color: #444;
  font-size: 15px;
}

.btn_text_close {
  display: none;
}

.arrow {
  width: 12px;
  height: 12px;
  border-right: 2px solid #444;
  border-bottom: 2px solid #444;
  transform: rotate(45deg);
  margin-top: 10px;
  transition: transform 0.4s;
}

/* --- チェックが入った時の状態変化 --- */
#philosophy_toggle:checked~.top_philosophy2026_frame {
  grid-template-rows: 1fr !important;
  padding-bottom: 40px !important;
}

#philosophy_toggle:checked~.gradient_overlay {
  opacity: 0 !important;
  visibility: hidden !important;
}

#philosophy_toggle:checked~.toggle_label .btn_text_open {
  display: none !important;
}

#philosophy_toggle:checked~.toggle_label .btn_text_close {
  display: block !important;
}

#philosophy_toggle:checked~.toggle_label .arrow {
  transform: rotate(-135deg) !important;
  margin-top: 15px !important;
}

#philosophy_toggle:checked~.toggle_label {
  margin-top: -80px !important;
}

.top_philosophy2026 h3 {
  color: #007b79;
  padding: 40px 0 20px 0;
  font-size: 1.7rem;
  line-height: 2.6rem;
}

.top_philosophy2026 h4 {
  padding: 40px 0 24px 0;
  font-size: 1.3rem;
}

.top_philosophy2026 p {
  line-height: 180%;
}

.top_philosophy2026 ul {
  max-width: 640px;
  margin: auto;
  list-style: none;
  padding: 0;
}

.top_philosophy2026_sign {
  text-align: center;
  display: block;
  padding: 64px 0;
}

@media (max-width: 767px) {
  .top_philosophy2026 h3 {
    font-size: 1.4rem;
  }

  .top_philosophy2026_frame {
    padding: 0 1.5rem;
  }
}

/*-------------
　インバウンドバナー
-------------*/
.inbound {
  padding      : 4rem 1.5rem 0 1.5rem;
  margin       : auto;
  display      : grid;
  place-content: center;
  width        : 100%;
}

.inbound h2 {
  text-align: center;
}

.inbound img {
  width : 100%;
  margin: auto;
}

.inbound_banners {
  display        : flex;
  gap            : var(--space32);
  justify-content: space-between;
  align-items    : stretch;
  max-width      : 1024px;
  margin         : auto;
  margin-top     : 48px;
  gap            : 2rem;
}

@media (max-width: 767px) {
  .inbound_banners {
    display       : flex;
    flex-direction: column;
    width         : 100%;
  }
}

.banners {
  max-width      : 1000px;
  display        : flex;
  justify-content: center;
  align-items    : center;
  margin         : auto;
  margin-bottom  : 4rem;
}

.banners>* {
  padding: 12px 0;
  margin : 6px;
}
/*---------------------
お知らせ欄（日本語サイトのトップ ../index.css と同じ見た目）
-----------------------*/
.attention {
  background-color: #f8f8f8;
  padding: 24px;
  margin: auto;
  margin-bottom: 24px;
  max-width: 800px;
  /* 欄全体（余白を含む）の高さは PC 600px・SP 460px まで。超えたら縦にスクロール */
  box-sizing: border-box;
  max-height: 600px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  /* 英語の単語の途中で改行しない（styles.css の body の word-break: break-all を打ち消す。長いURLなどは折り返す） */
  word-break: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 767px) {
  .attention {
    max-height: 460px;
  }
}

.attention .date {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.attention .title {
  font-size: 20px;
  line-height: 26px;
  font-weight: 600;
}

.attention .text {
  font-size: 16px;
  line-height: 22px;
}

.newslist {
  display: flex;
  justify-content: flex-start;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 16px;
  margin-bottom: 24px;
  /* 投稿ごとの区切り線（欄の背景 #f8f8f8 より少し濃いグレー） */
  padding-bottom: 24px;
  border-bottom: 1px solid #ddd;
}

/* 最後の投稿の下には線を入れない */
.newslist:last-of-type {
  padding-bottom: 0;
  border-bottom: none;
}

/* 本文の強調（strong）は太字＋黄色のマーカー風（文字の下半分に背景色。行をまたいでも各行に付ける） */
.attention strong {
  font-weight: bold;
  background: linear-gradient(transparent 55%, rgba(255, 235, 59, 0.6) 55%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.attention img {
  width: 100px;
}

.attention p {
  margin: 0;
  padding: 8px;
}

/* AI相談 */
.top_ai {
  padding: 48px 16px;
  background: #e4efef;
  word-break: normal;
}
.top_ai .dentai-inline-head[hidden] {
  display: block;
}
.top_ai:not(:has(.dai--inline)) .dentai-inline-head {
  margin-bottom: calc(24px + 56px);
}
.top_ai .dentai-inline-buttons:empty {
  display: block;
  min-height: 39px;
}
.top_ai .dentai-inline-head {
  max-width: 760px;
  margin: 0 auto 24px;
  padding: 0;
  text-align: center;
}
.top_ai .dentai-inline-title,
.top_ai .dentai-inline-lead,
.top_ai .dentai-inline-buttons [data-dentai-ask] {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic Medium", "Yu Gothic", Meiryo, -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: 0.02em;
}
.top_ai .dentai-inline-title {
  margin: 0;
  padding: 0;
  color: #007b79;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.5;
}
.top_ai .dentai-inline-lead {
  margin: 12px 0 0;
  padding: 0;
  color: #444444;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.7;
}
.top_ai .dentai-inline-buttons {
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 760px;
  margin: 20px auto 0;
  padding: 0;
}
.top_ai .dentai-inline-buttons [data-dentai-ask] {
  margin: 0;
  padding: 8px 18px;
  border: none;
  border-radius: 999px;
  background: #fff;
  color: #333;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
  transition: background-color 0.15s;
}
.top_ai .dentai-inline-buttons [data-dentai-ask]:hover {
  background: #d9eeed;
}
.top_ai .dentai-inline-buttons [data-dentai-ask]:focus-visible {
  outline: 2px solid #007b79;
  outline-offset: 2px;
}
@media (max-width: 767px) {
  .top_ai {
    padding: 40px 16px;
  }
  .top_ai .dentai-inline-head {
    margin-bottom: 20px;
  }
  .top_ai:not(:has(.dai--inline)) .dentai-inline-head {
    margin-bottom: calc(20px + 56px);
  }
  .top_ai .dentai-inline-buttons:empty {
    min-height: 78px;
  }
  .top_ai .dentai-inline-title {
    font-size: 19px;
  }
  .top_ai .dentai-inline-lead {
    margin-top: 8px;
    font-size: 14px;
  }
  .top_ai .dentai-inline-buttons {
    gap: 8px;
    margin-top: 16px;
  }
  .top_ai .dentai-inline-buttons [data-dentai-ask] {
    padding: 7px 14px;
    font-size: 14px;
  }
}
