:root {
  --green: #033009;
  --light-green: #c9dec9;
  --gray: #f5f5f5;
}

body {
  margin: 0;
  font-family: "Helvetica Neue", sans-serif;
  color: #333;
  line-height: 1.8;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

* {
  box-sizing: border-box;
}

.flex-row {
  display: flex;
  align-items: center;
}

/* =============================
    ヘッダー・ナビ
============================= */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--green);
  color: white;
  padding: 0.6rem 3rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 64px;
}
.logo-text {
  font-size: 40px;
  font-weight: bold;
  margin: 0 0 0 1.6rem;
  color: white;
  font-family: "M PLUS Rounded 1c", sans-serif;
  letter-spacing: 0.4rem;
}
.logo-area {
  display: flex;
  align-items: center;
}
.logo-img {
  height: 55px;
}

.nav-menu ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
}

.nav-menu a {
  color: white;
  font-weight: bold;
}

/* SP ハンバーガー */
.hamburger-wrapper {
  display: none;
}
.hamburger {
  width: 36px;
  height: 36px;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1000;
  margin: 0;
  padding: 0;
}

.hamburger::before,
.hamburger::after,
.hamburger span {
  content: "";
  display: block;
  position: absolute;
  left: 6px;
  right: 6px;
  height: 2.4px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s;
}

.hamburger::before {
  top: 8px;
}

.hamburger span {
  top: 16px;
}

.hamburger::after {
  top: 24px;
}

/* バツ（close）アイコンに変化 */
.hamburger.active::before {
  top: 18px;
  transform: rotate(45deg);
}

.hamburger.active::after {
  top: 18px;
  transform: rotate(-45deg);
}

.hamburger.active span {
  opacity: 0;
}

/* SP メニュー */
.mobile-sidebar {
  background-color: var(--light-green);
  position: fixed;
  top: 0;
  right: 0;
  width: 220px;
  height: 100%;
  z-index: 999;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.mobile-sidebar.active {
  transform: translateX(0);
}

.mobile-sidebar ul {
  margin-top: 6rem;
  list-style: none;
  padding: 0;
}

.mobile-sidebar li {
  padding: 1.2rem;
}

.mobile-sidebar a {
  color: var(--green);
  font-weight: bold;
}

/* =============================
    メイン
============================= */
main {
  background-color: white;
  width: 100%;
  padding: 1rem 3rem 4rem !important;
}

.main-content {
  max-width: 1100px;
  margin: auto;
}

.header-image {
  margin-top: 0;
}

.header-image img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 0;
}

section {
  margin-bottom: 4rem;
}

section h2 {
  border-left: 6px solid var(--green);
  padding-left: 1.2rem;
  margin-bottom: 1.5rem;
}

.link {
  color: var(--green);
  text-decoration: underline;
  cursor: pointer;
}

/* 診療案内 上のスペース */
#guide {
  margin-top: 4rem; /* ← 追加で余白を確保 */
}

/* 診療時間表 */
.timetable-grid {
  display: grid;
  grid-template-columns: minmax(140px, 2fr) repeat(6, minmax(40px, 1fr));
  border: 0.5px solid #ccc;
  margin: 1rem 0 0 0;
  width: fit-content;
}

.timetable-grid > div {
  line-height: 1.4;
  border: 0.5px solid #ccc;
  padding: 0.6rem 0.2rem;
  display: flex;
  align-items: center; /* 縦中央 */
  justify-content: center;
  text-align: center; /* 横中央 */
}

.timetable-grid .head,
.timetable-grid .time {
  background-color: var(--gray);
  font-weight: bold;
}

.closed-note {
  margin: 0 0 1.6rem;
  font-weight: bold;
}

/* =============================
    施設画像
============================= */
.facility-photos {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* PC/TBは2列 */
  gap: 2rem;
  margin-top: 2rem;
}

.facility-photos figure {
  margin: 0;
  text-align: center;
}

.facility-photos img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  margin-bottom: 0.5rem;
}

.facility-photos figcaption {
  font-size: 0.95rem;
  font-weight: bold;
  color: #444;
}

/* SPは1列 */
@media (max-width: 768px) {
  .facility-photos {
    grid-template-columns: 1fr;
  }
}

/* =============================
    院長経歴
============================= */
.doctor-info {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.doctor-photo {
  width: 220px;
  height: 260px;
  object-fit: cover;
  border-radius: 8px;
}

.doctor-text {
  flex: 1;
  min-width: 260px;
  text-align: left; /* ← 常に左寄せにする */
}

.doctor-p {
  margin: 0 0 1rem;
}

.career-list {
  padding-left: 1.2rem;
  margin: 1rem 0 2rem;
  border-left: 3px solid var(--light-green);
}

.career-list li {
  margin-bottom: 0.4rem;
  line-height: 1.6;
  list-style: none;
}

/* SP用調整 */
@media (max-width: 768px) {
  .doctor-info {
    flex-direction: column;
    align-items: center;
  }

  .doctor-photo {
    width: 160px;
    height: 200px;
  }
}

/* 求人画像 */
.recruit-photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.recruit-photos img {
  max-width: 340px;
  border-radius: 8px;
}

/* アンカーの余白調整 */
.anchor-offset {
  scroll-margin-top: 90px;
}

.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  /* background: rgba(0,0,0,0.3);    */
  z-index: 998;
}
.overlay.active {
  display: block;
}

/* =============================
    フッター
============================= */
.site-footer {
  background-color: var(--green);
  position: relative;
  color: white;
  text-align: center;
  padding: 1.5rem 2rem;
  position: relative;
  bottom: 0;
  width: 100%;
}

/* =============================
    SP / タブレット レスポンシブ
============================= */
@media (max-width: 1024px) {
  /* ← タブレット以下でハンバーガー */
  .nav-menu ul {
    gap: 1.2rem;
    font-size: 14px;
  }
  .site-header {
    padding: 1rem 1.6rem; /* 左右余白を少し狭く */
  }
  .logo-text {
    font-size: 34px; /* タブレット用に少し小さく */
    margin-left: 1.2rem; /* 左側の余白を少し狭く */
  }
  .logo-area {
    flex: 1;
  }
  main {
    padding: 1rem 1.4rem 4rem !important; /* 左右余白を狭く */
  }
}

@media (max-width: 768px) {
  /* ← スマホ用 */
  main {
    padding: 0.6rem 0.6rem 2rem !important; /* 左右余白を狭く */
  }
  .nav-menu {
    display: none;
  }
  .hamburger-wrapper {
    display: block;
  }
  .timetable-grid {
    grid-template-columns: minmax(120px, 2fr) repeat(6, minmax(30px, 1fr));
  }
  .logo-img {
    height: 38px; /* スマホ用に少し小さく */
  }
  .logo-text {
    font-size: 24px;
    margin-left: 0.6rem; /* 左側の余白を狭く */
    letter-spacing: 0.2rem;
    /* display: none; */
  }
  .site-header {
    padding: 0.6rem 1rem; /* 左右余白をさらに狭く */
  }
}
