/* === 1) リセット＆基本設定 ====================== */
/* すべての要素のボックスサイズを「枠線込み」に統一（レイアウト崩れを防ぐ） */
*, *::before, *::after { box-sizing: border-box; }

/* ページ全体の高さを100%にしておく（必要に応じて使える） */
html, body { height: 100%; }

/* 基本の文字設定と行間。日本語では少し広めの行間が読みやすい */
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Noto Sans JP", sans-serif;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

/* 画像は親の幅を超えないようにする */
img { max-width: 100%; height: auto; display: block; }

:root {
  --green: #2f6f5f;
  --green-light: #e6f1ee;
  --blue: #3a7ca5;
  --gray: #444;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
  color: var(--gray);
  background: #fafafa;
}

/* ===== ヘッダー ===== */
.header {
  background: white;
  border-bottom: 3px solid var(--green);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: auto;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 16px;
}

.logo {
  width: 80px;
  height: 40px;
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.nav {
  display: flex;
  gap: 15px;
  flex: 1;
}

.nav a {
  text-decoration: none;
  color: var(--green);
  font-weight: 500;
}

.nav a:hover {
  color: var(--blue);
}

.search input {
  padding: 6px 10px;
  border-radius: 20px;
  border: 1px solid #ccc;
}

/* ===== メイン ===== */
.main {
  max-width: 1200px;
  margin: auto;
  padding: 20px;
}

/* 見出しデザイン */
h2 {
  border-left: 6px solid var(--green);
  padding-left: 12px;
  margin-top: 40px;
}

h3 {
  color: var(--green);
  margin-top: 30px;
  position: relative;
}

h3::after {
  content: "";
  width: 40px;
  height: 2px;
  background: var(--blue);
  position: absolute;
  left: 0;
  bottom: -6px;
}

h4 {
  color: var(--blue);
  margin-top: 20px;
}

/* ===== 上部ヒーロー ===== */
.hero {
  background: var(--green-light);
  padding: 30px;
  border-radius: 12px;
}

/* ===== 横並びボタン ===== */
.info-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 30px;
}

.info-card {
  display: block;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 6px 20px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.info-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

.info-card img {
  width: 100%;
  display: block;
}

.info-card h3,
.info-card p {
  padding: 0 16px;
}

.info-card p {
  padding-bottom: 16px;
}

/* グリッド配置 */
.doctor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

/* 医師カード */
.doctor-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.doctor-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

.doctor-card img {
  width: 100%;
  max-width: 180px;
  aspect-ratio: 4 / 5;
  object-fit: cover;

  border-radius: 6px;
  border: 2px solid #2f7f6f;

  display: block;
  margin: 0 auto 16px auto;
}

.doctor-card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.position {
  color: #2f7f6f;
  font-weight: bold;
  margin: 6px 0;
}

.specialty {
  font-size: 0.9rem;
  color: #555;
}

/* ===== シンプルボタン ===== */
.button-1 {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 350px;
    margin:0 auto;
    padding: .9em 2em;
    border: 1px solid #2f6f5f;
    border-radius: 25px;
    background-color: #fff;
    color: #2f6f5f;
    font-size: 1em;
}

.button-1::after {
    transform: rotate(45deg);
    width: 5px;
    height: 5px;
    margin-left: 10px;
    border-top: 2px solid #2f6f5f;
    border-right: 2px solid #2f6f5f;
    content: '';
}

.pdf-button {
  display: inline-block;
  padding: 12px 24px;
  background-color: #2f7f6f; /* 落ち着いた緑 */
  color: #ffffff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  transition: 0.2s ease;
}

.pdf-button:hover {
  background-color: #245f54;
}

/* ===== フッター ===== */
.footer {
  background: var(--green);
  color: white;
  margin-top: 60px;
}

.footer-inner {
  max-width: 1200px;
  margin: auto;
  padding: 30px 20px;
  display: flex;
  gap: 30px;
}

.footer-logo {
  width: 100px;
  height: 50px;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== スマホ最適化 ===== */
@media (max-width: 768px) {

  .header-inner {
    flex-wrap: wrap;
  }

  .nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .info-buttons {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ハンバーガー */
.hamburger {
  display: none;
  font-size: 26px;
  background: none;
  border: none;
  cursor: pointer;
}

/* 診療科ボタン表 */
.dept-table {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.dept-btn {
  background: white;
  border: 1px solid #cce3dc;
  padding: 14px;
  text-align: center;
  border-radius: 12px;
  text-decoration: none;
  color: #2f6f5f;
  font-weight: 500;
  transition: 0.2s;
}

.dept-btn:hover {
  background: #e6f1ee;
}

/* トピックス */
.topics {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.topic-card {
  background: white;
  padding: 20px;
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 6px 20px rgba(0,0,0,0.05);
  transition: 0.2s;
}

.topic-card:hover {
  transform: translateY(-3px);
}

/* Q&A */
.qa-box {
  margin-top: 20px;
  display: grid;
  gap: 12px;
}

.qa-item {
  background: white;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e0e0e0;
}

.qa-q {
  width: 100%;
  padding: 16px;
  background: #e6f1ee;
  border: none;
  text-align: left;
  font-weight: bold;
  cursor: pointer;
}

.qa-a {
  padding: 16px;
  display: none;
}

/* スマホ対応 */
@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .nav {
    display: none;
    flex-direction: column;
    width: 100%;
  }

  .nav.active {
    display: flex;
  }

  .dept-table {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ■ 検索結果ページ */
.search-results {
  padding-top: 30px;
}

/* 検索キーワード */
.search-keyword {
  font-weight: bold;
  margin-bottom: 6px;
  color: var(--green);
}

/* 件数 */
#resultCount {
  margin-bottom: 20px;
  font-size: 1rem;
  color: var(--gray);
}

/* 結果リスト */
.results-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 個別結果 */
.result-item {
  background: white;
  padding: 18px;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 3px 10px rgba(0,0,0,0.04);
}

.result-item a {
  text-decoration: none;
  color: var(--blue);
  font-size: 1.1rem;
  font-weight: bold;
}

.result-item p {
  margin-top: 6px;
  color: var(--gray);
  font-size: 0.95rem;
}

/* 見つからない時 */
.no-results {
  font-size: 1rem;
  color: var(--gray);
  text-align: center;
  padding: 30px 0;
}

