/* =========================
   Base / Reset
========================= */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  line-height: 1.6;
  color: #333;
  margin: 0;
}

/* =========================
   Header & Navigation
========================= */
.fixed-header {
  position: relative; /* モバイルメニュー(.nav-links absolute)の基準 */
  left: 0; right: 0;
  z-index: 1000;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,.1);
}
.header-top {
  display: flex; justify-content: center; align-items: center;
  padding: 10px 20px; position: relative;
}
.header-top a { display: inline-block; text-decoration: none; }
.header-logo { max-width: 360px; width: 100%; height: auto; transition: opacity .3s ease; }
.header-logo:hover { opacity: .8; }

.menu-toggle {
  display: none;
  background: #3A7F41; /* 採用色 */
  color: #fff; border: none;
  padding: 10px 15px; font-size: 1.2rem; cursor: pointer; border-radius: 4px;
}

nav.nav-links { background-color: #3A7F41; transition: all .3s ease; }
.nav-inner {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 2rem;
  padding: .8rem 1rem; max-width: 1200px; margin: 0 auto;
}
.nav-links a {
  color: #fff; text-decoration: none; font-weight: bold; font-size: 1rem;
  padding: .5rem 1rem; border-radius: 4px; white-space: nowrap; transition: background-color .3s ease;
}
.nav-links a:hover {
  background-color: rgba(255,255,255,.2);
  transform: translateY(-1px);
  text-decoration: none;
}
.nav-links a.current { font-weight: 700; border-bottom: 2px solid #fff; }

/* ナビ内の文字色は常に白（hover/active/focusでも白を維持） */
.nav-links a,
.nav-links a:hover,
.nav-links a:active,
.nav-links a:focus {
  color: #fff;
}

/* ハンバーガー文字色も常に白 */
.menu-toggle:hover,
.menu-toggle:active,
.menu-toggle:focus {
  color: #fff;
}

/* =========================
   Hero
========================= */
.hero { position: relative; width: 100%; overflow: hidden; }
.hero img {
  width: 100%; height: auto; min-height: 400px;
  object-fit: contain; object-position: center center; display: block;
  background-color: #f8f9fa;
}
.hero-overlay {
  position: absolute;
  top: 33%;            /* ← 上から約1/3 */
  left: 50%;           /* ← 左右は中央 */
  transform: translate(-50%, -50%); /* ← テキストの中心をその位置に */
  color: #fff;
  font-size: 2.4rem;
  font-weight: bold;
  text-shadow: 2px 2px 8px rgba(0,0,0,.7);
  text-align: center;
  padding: 0 20px;
}
.hero-overlay h2 { color: inherit; font-size: inherit; margin: 0; border: none; padding: 0; }

/* ==== Hero Title: 2行固定 + 流体フォント ==== */
.hero-overlay .hero-title {
  /* 画面幅に応じて自動で縮む／広がる（下限, 推奨計算, 上限） */
  font-size: clamp(1.6rem, 2.6vw + 0.8rem, 2.4rem);
  line-height: 1.25;
  margin: 0;
  /* 色や影は .hero-overlay 側の指定を継承（既存ルール参照） */
}

.hero-overlay .hero-title span {
  display: block;       /* 各行を独立ブロックに */
  white-space: nowrap;  /* 任意折返しを禁止 → 常に2行固定 */
}

/* 極小デバイスでの微調整（必要に応じて） */
@media (max-width: 360px) {
  .hero-overlay .hero-title {
    font-size: clamp(1.3rem, 5vw + 0.6rem, 1.7rem);
  }
}


/* =========================
   Main / Typography
========================= */
main { max-width: 900px; margin: 0 auto; padding: 2rem 1rem; }
main.introduce-main { max-width: 800px; }
section { margin-bottom: 3rem; }

h2 {
  color: #3A7F41; /* 採用色 */
  font-size: 1.8rem; margin-bottom: 1rem;
  border-bottom: 3px solid #3A7F41; padding-bottom: .5rem;
}
p { font-size: 1rem; margin-bottom: 1rem; }

/* =========================
   Components: News
========================= */
.news-box {
  background: #fff; /* 背景は白 */
  border-radius: 8px;
  padding: 1.5rem;
  border: none;     /* 緑のラインなし */
}
.news-list { display: flex; flex-direction: column; gap: 0; }
.news-item {
  display: flex; align-items: center; gap: 1rem;
  padding: .8rem 0; border-bottom: 1px solid #e9ecef; transition: background-color .2s ease;
}
.news-item:last-child { border-bottom: none; }
.news-item:hover { background-color: rgba(58,127,65,.06); } /* #3A7F41ベースの淡い塗り */

.news-date { color: #666; font-size: .9rem; font-weight: bold; min-width: 80px; flex-shrink: 0; }

/* リンク付きニュースタイトル */
a.news-title {
  color: #26A69A; /* ティール */
  text-decoration: none;
  font-weight: normal;
  transition: color .3s ease, text-decoration .3s ease;
}
a.news-title:hover { color: #00897B; text-decoration: underline; }

/* リンクなしニュースタイトル */
span.news-title { color: #333; font-weight: normal; text-decoration: none; }

/* =========================
   Components: Image + Text
========================= */
.image-text { display: flex; align-items: center; gap: 2rem; margin-bottom: 3rem; }
.image-text.reverse { flex-direction: row-reverse; }
.image-text img {
  flex: 1; max-width: 500px; width: 100%; height: 300px; object-fit: cover;
  border-radius: 8px; box-shadow: 0 0 12px rgba(0,0,0,.1);
}
.image-text div { flex: 1; min-width: 300px; }

/* =========================
   Buttons (link-button 最終版)
========================= */
.link-button {
  display: inline-block;
  background-color: #43A047; /* 通常時（必要なら #3A7F41 へ） */
  color: #fff;
  text-decoration: none;
  padding: .8rem 1.5rem;
  border-radius: 4px;
  font-weight: bold;
  transition: background-color .2s ease, outline .2s ease;
  margin-top: 1rem;
  border: none; outline: none;
}
.link-button:hover { background-color: #66BB6A; text-decoration: none; }
.link-button:active { background-color: #388E3C; }
.link-button:focus { outline: 2px solid #A5D6A7; outline-offset: 3px; }

/* ボタン文字は常に白（hover/active/focusでも白を維持） */
.link-button,
.link-button:hover,
.link-button:active,
.link-button:focus {
  color: #fff;
}

/* =========================
   Footer（共通・統一）
========================= */
footer {
  background-color: #3A7F41; /* ← フッターも採用色に統一 */
  color: #fff; text-align: center; padding: 2rem 1rem;
  margin-top: 3rem; width: 100%; box-sizing: border-box;
}
footer p { margin-bottom: .5rem; }
footer a { color: #FFFFFF; text-decoration: underline; transition: color .3s ease; }
footer a:hover { color: #C8E6C9; text-decoration: underline; }

/* =========================
   FAQ TOC（カード型）+ 緑の丸数字
========================= */
.toc {
  background:#faf9ff; border-left:4px solid #3A7F41;
  padding:.75rem 1rem; margin:0 0 1.25rem 0;
}
.toc a { text-decoration: none; }

.toc--cards { border-left: none; padding: .75rem 1.5rem; margin: 0 auto 1.25rem; }
.toc--cards .toc-title {
  font-size: 1.05rem; margin: 0 0 .5rem; color: #4b5563; border: 0; padding-bottom: 0;
}
.toc--cards .toc-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .6rem;
}
.toc--cards .toc-list a {
  display: flex; align-items: center; gap: .5rem;
  background: #fff; border: 1px solid #e5e7eb; border-radius: .6rem;
  padding: .65rem .75rem; color: #1f2937; text-decoration: none;
}
.toc--cards .toc-list a:hover { background: #f5f7ff; border-color: #c4b5fd; text-decoration: none; }
/* 緑の丸数字 */
.toc--cards .toc-list a > span:first-child {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.8em; height: 1.8em; border-radius: 999px;
  background: #3A7F41; color: #fff; font-weight: 700; line-height: 1; flex: 0 0 auto;
}
.toc--cards .toc-list a:hover > span:first-child { background: #388E3C; }

/* Q/A 本文 */
.qa { margin: 1rem 0 1.25rem; }
.qa .q {
  position: relative; margin: 0 0 .5rem; padding-left: 2.2em;
  color: #3A7F41; font-weight: 700; line-height: 1.5;
}
.qa .q::before {
  content: "Q."; position: absolute; left: 0; top: 0;
  font-weight: 700; color: #3A7F41;
}
.qa .a {
  position: relative; padding: .75rem 1rem .75rem 2.2em;
  background: #faf9ff; border: 1px solid #e8e6ff; border-radius: 8px; color: #333;
}
.qa .a::before {
  content: "A."; position: absolute; left: .6rem; top: .75rem;
  font-weight: 700; color: #3A7F41;
}
.qa ul { margin: .25rem 0 0 1.25rem; }

/* =========================
   About（画像・表・挨拶）
========================= */
.about-image { text-align: center; margin-top: 20px; }
.about-image img { width: 60%; max-width: 400px; height: auto; border-radius: 8px; }
@media (max-width: 600px) { .about-image img { width: 90%; max-width: none; } }

.info-card {
  margin-top: .5rem; background: #fff; border: 1px solid #e6e6ef; border-radius: 12px;
  box-shadow: 0 1px 6px rgba(0,0,0,.04); padding: .5rem .75rem;
}
.info-table {
  width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0;
  overflow: hidden; border-radius: 8px; margin: 0;
}
.info-table caption {
  caption-side: top; text-align: left; font-weight: 600; padding:.75rem 1rem .25rem; color: #333;
}
.info-table th, .info-table td { padding: .7rem 1rem; vertical-align: middle; }
.info-table thead th {
  background: #f3f0ff; border-bottom: 1px solid #e6e6ef; text-align: center; font-weight: 700; letter-spacing: .02em;
}
.info-table tbody tr:nth-child(even) { background: #faf9ff; }
.info-table tbody tr + tr td { border-top: 1px solid #f0f0f6; }
.info-table thead th:first-child { text-align: right; }
.info-table thead th:last-child  { text-align: left;  }
.info-table td:first-child  { text-align: right; width: 46%; padding-right: 1rem; }
.info-table td:last-child   { text-align: left;  width: 54%; padding-left:  1rem; }

/* センター長挨拶：写真右回り込み */
.greeting-photo {
  float: right;
  width: 150px;
  max-width: 42%;
  height: auto;
  margin: 0 0 1rem 1.25rem;
  border-radius: 8px;
  box-shadow: 0 1px 6px rgba(0,0,0,.08);
}
/* 署名（肩書＋氏名）を文末・右寄せに */
.greeting-sign { clear: both; text-align: right; margin-top: 1rem; }
.greeting-sign .affil { color: #555; line-height: 1.6; margin: 0; }
.greeting-sign .name  { font-size: 1.25rem; font-weight: 700; letter-spacing: .05em; margin: .25rem 0 0; }

/* =========================
   PDページ
========================= */
.pd-main h3 {
  color: #336699;
  border-left: 4px solid #336699;
  padding-left: .5em;
}

/* =========================
   Utilities
========================= */
.back-to-top {
  position: fixed; right: 20px; bottom: 20px; display: none;
  padding: .6rem .9rem; font-size: 14px;
  border: 1px solid #e6e6ef; border-radius: 999px; background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.08); cursor: pointer; transition: transform .2s ease;
}
.back-to-top:hover { transform: translateY(-1px); }

/* =========================
   Responsive
========================= */
@media (max-width: 768px) {
  .header-top { justify-content: space-between; }
  .menu-toggle { display: block; position: static; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background-color: #3A7F41; box-shadow: 0 2px 10px rgba(0,0,0,.1);
  }
  .nav-links.active { display: block; }
  .nav-inner { flex-direction: column; gap: 0; padding: 0; }
  .nav-links a { display: block; padding: 1rem; border-bottom: 1px solid rgba(255,255,255,.1); text-align: center; }
  .hero-overlay { font-size: 1.8rem; }
  .hero img { min-height: 300px; }
  .image-text, .image-text.reverse { flex-direction: column; text-align: center; }
  .image-text img { max-width: 100%; order: 2; }
  .image-text div { order: 1; }
  h2 { font-size: 1.5rem; }
  main { padding: 1.5rem 1rem; }

  .greeting-photo {
    float: none; display: block; margin: 0 auto 1rem;
    width: min(420px, 100%); max-width: 100%;
  }
}

@media (max-width: 480px) {
  .header-top { padding: 8px 12px; }
  .header-logo { max-width: 240px; }
  .hero-overlay { font-size: 1.4rem; padding: 0 15px; }
  .hero img { min-height: 250px; }
  .news-item { padding: .6rem; }
  .news-date { font-size: .8rem; }
  h2 { font-size: 1.3rem; }
  .link-button { padding: .6rem 1.2rem; font-size: .9rem; }
  main { padding: 1rem .8rem; }
  footer { padding: 1.5rem 1rem; font-size: .9rem; }
}

/* =========================
   Minor tweaks
========================= */
.section-card h2 { margin-top: 2em; margin-bottom: 1em; }
.section-card:first-child h2 { margin-top: 0; }
.section-card h3 { margin-top: 1.8em; margin-bottom: 0.8em; }
.section-card p { margin-top: 0; margin-bottom: 1em; line-height: 1.7; }
.section-card { max-width: 800px; margin: 0 auto; padding-left: 1.5rem; padding-right: 1.5rem; }

.small-note { font-size: .95rem; color: #6b7280; margin-bottom: 1rem; }

main ul, main ol { margin-left: 0; padding-left: 1.25rem; list-style-position: outside; }
.pd-main ol, .pd-main ul { list-style-position: outside; padding-left: 1.25rem; margin-left: 0; }
.pd-main li + li { margin-top: .25rem; }
.pd-main li > ol, .pd-main li > ul { padding-left: 1.1rem; margin-top: .25rem; }

/* =========================
   Typography & Colors（競合回避版）
========================= */
h1, h3 { color: #2E7D32; } /* h2 は上の #3A7F41 を生かす */
h2.section-title, h3.section-title { color: #3A7F41; }

/* 本文中リンク：通常は下線なし、hoverで下線 */
a { color: #26A69A; text-decoration: none; transition: color .3s ease; }
a:hover { color: #00897B; text-decoration: underline; }
