/* リセット */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
}

/* ヘッダー */
header {
  background: #f8f8f8;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* ヘッダー全体 */
.header-top {
  display: flex;
  align-items: center;   /* ロゴとメニューの高さを揃える */
  justify-content: space-between;
  padding: 10px 20px;
  flex-wrap: wrap;
}

/* ロゴ */
.logo {
  font-size: 1.5rem;
  font-weight: bold;
}
.logo a {
  text-decoration: none;
  color: #333;
  font-weight: bold;
  font-size: 1.5rem;
}
.logo a:hover {
  color: #4CAF50;
}
/* ハンバーガー */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 18px;
  cursor: pointer;
  z-index: 1000;
}

.hamburger span {
  display: block;
  height: 3px;
  background: #333;
  border-radius: 2px;
}

/* メニュー */
.main-nav {
  margin-left: auto; /* PC時はロゴの右に配置 */
}
.main-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav li {
  margin: 0 10px;
}

.main-nav a {
  text-decoration: none;
  color: #333;
  font-weight: bold;
  padding: 10px 15px;
  display: block;
  border-radius: 5px;
  transition: all 0.3s;
}

.main-nav a:hover {
  background-color: #4CAF50;
  color: #fff;
}


main {
  width: 90%;
  max-width: 1000px;
  margin: 0 auto;
}

/* 診療所情報（PC） */
.clinic-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 0.95rem;
  gap: 6px;
}
.clinic-info .time {
  background: #f0f8f5; /* 薄いグリーン背景で視認性UP */
  color: #333;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 500;
}

.clinic-info .tel {
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: bold;
  color: #E53935; /* 赤で強調 */
  background: #fff3f3;
  padding: 6px 10px;
  border-radius: 6px;
  transition: 0.3s;
}

.clinic-info .tel:hover {
  background: #E53935;
  color: #fff;
}

/* スマホ表示 */
@media (max-width: 768px) {
  .header-top {
    flex-direction: row;        /* 横並びを維持 */
    align-items: center;        /* 高さを中央揃え */
  }
  .hamburger {
    display: flex;
    margin-left: auto;          /* ロゴの右側に配置 */
  }

  .main-nav {
    display: none;
    position: absolute;          /* ヘッダー下に配置 */
    top: 60px;                   /* ヘッダー高さ分 */
    left: 0;
    width: 100%;
    background-color: #fff;
    z-index: 999;
    max-height: calc(100vh - 60px - 70px); /* ヘッダー + 固定ボタンの高さ分を引く */
    overflow-y: auto;            /* メニューが画面を超えたらスクロール */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  }
  .main-nav.active {
    display: block;
  }
  .main-nav ul {
    flex-direction: column;
    padding: 0;
    margin: 0;
  }
  .main-nav li {
    margin: 6px 0;
    text-align: center;
  }
  .main-nav a {
    display: block;
    padding: 14px 0;
    font-size: 1rem;
    width: 100%;
  }
  /* 固定ボタンとメニューの重なり防止 */
  body {
    padding-bottom: 60px; /* 固定ボタン分の余白を確保 */
  }
  /* 診療所情報を非表示 */
  .clinic-info {
    display: none;
  }
}


/* ファーストビュー */
.hero {
  position: relative;
  text-align: center;
  color: white;
}
.hero img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  filter: brightness(70%);
}
.hero-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.hero-inner span {
  font-size: 2rem;
  margin-bottom: 10px;
}
.hero-inner h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}
.hero-inner p {
  font-size: 1.5rem;
}

/* スマホ表示 */
@media (max-width: 768px) {
  .hero-inner h1 {
    font-size: 2.2rem;
    margin-bottom: 20px;
  }
  .hero-inner p {
    font-size: 1.3rem;
  }
}

/* 共通ボタン */
.btn {
  display: block;
  width: 200px;             /* 適当な横幅を指定 */
  max-width: 80%;           /* 画面が狭い場合は幅を80%まで縮小 */
  padding: 12px 0;          /* 上下余白、左右は自動で中央寄せ */
  background: #4CAF50;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  text-align: center;       /* テキスト中央寄せ */
  font-weight: bold;
  margin: 20px auto 0 auto;/* 上マージン20px、横中央 */
  transition: background 0.3s;
}

.btn:hover {
  background: #45a049;
}

/* セクション */
.section {
  padding: 50px 20px;
}
.section h2 {
  text-align: center;
  margin-bottom: 30px;
}

.section .btn {
  display: block;
  margin: 20px auto 0 auto;  /* 上マージン20px, 下0, 横中央 */
}


/* 診療内容セクション */
.diagnosis-section {
  background-color: #f9f9f9;
  padding: 60px 0;
}

.diagnosis-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 40px;
}

.diagnosis-section .cards {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;          /* 横に並び切れない場合は折り返す */
  justify-content: center;  /* 中央寄せ */
}

.diagnosis-card {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 30px 20px;
  width: 300px;             /* PCでは横並びで3枚くらい収まる幅 */
  text-align: center;
  transition: transform 0.3s;
}

.diagnosis-card:hover {
  transform: translateY(-5px);
}

.diagnosis-card h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
}

.diagnosis-card p {
  font-size: 1rem;
  margin-bottom: 20px;
  color: #555;
}

.diagnosis-card .button-link {
  display: inline-block;
  padding: 10px 20px;
  font-size: 0.95rem;
  background-color: #2196F3;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  transition: 0.3s;
}

.diagnosis-card .button-link:hover {
  background-color: #1976D2;
}

/* スマホ対応 */
@media (max-width: 768px) {
  .diagnosis-section .cards {
    flex-direction: column;
    gap: 20px;
    padding: 0 10px;
  }
  .diagnosis-card {
    width: 100%;
  }
}

/* 院長あいさつ */
.director-greeting {
  text-align: center;
  padding: 50px 20px;
  background-color: #fff;
}
.director-greeting h2 {
  font-size: 2rem;
  color: #0077cc;
  margin-bottom: 30px;
}
.greeting-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 30px;
  max-width: 900px;
  margin: 0 auto;
}
.greeting-content img {
  width: 200px;
  border-radius: 10px;
  object-fit: cover;
}
.greeting-text {
  max-width: 600px;
  text-align: left;
}
.greeting-text p {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 15px;
}
.btn-detail {
  display: inline-block;
  padding: 12px 25px;
  background-color: #0077cc;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
}
.btn-detail:hover {
  background-color: #005fa3;
}

/* スマホ対応 */
@media (max-width: 768px) {
  .greeting-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .greeting-text {
    text-align: center;
  }
}

/* 診療時間・予約セクション */
.schedule-section {
  background-color: #f9f9f9;
  padding: 40px 0;
}

/* 内部テーブル・ボタンもコンテナ内に収める */
.schedule-section .container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}


/* 診療時間・予約セクション */
.schedule-table {
  width: 80%;
  max-width: 600px;
  margin: 0 auto 20px auto;
  border-collapse: collapse;
  font-size: 1rem;
}
/* テーブル */
.schedule-table th,
.schedule-table td {
  border: 1px solid #999;
  padding: 15px;
  text-align: center;
}
.schedule-table tr:nth-child(even) {
  background-color: #f7f7f7;
}
.schedule-tables th {
  background-color: #4CAF50;
  color: white;
  font-weight: bold;
}


/* アクセスセクション */
#access {
  text-align: center;        /* タイトル中央寄せ */
  padding: 50px 20px;
}

#access .access-map {
  margin: 20px auto;
  width: 100%;
  max-width: 600px;          /* 最大幅 */
  height: 300px;
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
}

#access p {
  margin: 10px 0;
  font-size: 1rem;
}

#access .btn {
  margin-top: 20px;
}

/* モバイル対応 */
@media (max-width: 768px) {
  #access .access-map {
    height: 200px;
  }
}

/* お知らせセクション */
#news {
  text-align: center;
  padding: 50px 20px;
}

#news .news-list {
  list-style: none;
  max-width: 600px;
  margin: 0 auto;
  padding: 0;
}

#news .news-list li {
  background: #f7f7f7;
  margin-bottom: 10px;
  padding: 10px 20px;
  border-radius: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: sans-serif;
  font-size: 1rem;
}
#news .news-list span {
  font-weight: bold;
  margin-right: 10px;
  flex-shrink: 0;
}
#news .news-list li span.date {
  flex-shrink: 0;
  margin-left: 10px;
}
#news .news-list li .title {
  flex-grow: 1;
  text-align: left;
  position: relative;
  padding-right: 10px;
}
#news .btn {
  margin-top: 20px;
}

/* お問合せセクション */
#contact {
  padding: 50px 20px;
  text-align: center;
}

#contact form {
  max-width: 600px;
  margin: 0 auto;
  background: #f7f7f7;
  padding: 30px 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

#contact label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  text-align: left;
}

#contact input,
#contact textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 20px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
}

#contact .btn {
  margin: 0 auto;
  display: block;
}

/* フッター3分割 */
/* フッター全体 */
footer {
  background-color: #333;
  color: white;
  padding: 40px 20px;
  font-size: 0.9rem;
}

/* 3分割コンテナ */
.footer-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  text-align: left;
  gap: 20px;
}
.footer-container a {
  text-decoration: none;
  color: #fff;
  transition: color 0.3s;
}
.footer-container a:hover {
  color: #4CAF50;
}

/* 左・中央・右の各カラム */
.footer-left,
.footer-center,
.footer-right {
  flex: 1 1 200px;
}

.footer-left h4,
.footer-center h4,
.footer-right h4 {
  margin-bottom: 15px;
  font-size: 1.1rem;
  font-weight: bold;
}

/* リスト */
.footer-left ul,
.footer-center ul {
  list-style: none;
  padding: 0;
}

.footer-left li,
.footer-center li {
  margin-bottom: 8px;
}

.footer-right p,
.footer-center li {
  margin-bottom: 8px;
}

/* コピーライト */
.footer-copyright {
  margin-top: 15px;
  text-align: center;
  padding: 15px 0;
  border-top: 1px solid #ddd;
  font-size: 0.8rem;
  color: #777;
}

/* スマホ専用フッター */
.mobile-footer {
  display: none; /* PCでは非表示 */
  height: 60px; /* 例：ボタンの高さ */
}

/* スマホ用スタイル */
@media (max-width: 768px) {
  .main-nav ul {
    flex-direction: column;
    padding: 10px 0;
  }
  .main-nav li {
    margin: 5px 0;
  }
  .hero-inner span {
    font-size: 1.5rem;
  }

  /* スマホフッターを表示 */
  .mobile-footer {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px; /* ボタン高さ */
    z-index: 999;
    margin-top: 0;
    padding-top: 0;
  }

  footer {
    margin-bottom: 0;
    padding-bottom: 0; /* 余白をなくす */
  }
  .footer-container {
    margin-bottom: 0;
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
    text-align: left;
  }
  .footer-left,
  .footer-center,
  .footer-right {
    min-width: 100%;
    width: 100%;
    margin-bottom: 20px;
  }
  .footer-container a {
    display: inline-block;       /* ブロック扱いにして余白やパディング調整可能 */
    width: 100%;
    padding: 10px 20px;          /* ボタン内の余白 */
    background-color: #eee;   /* 背景色（青） */
    color: #444;                 /* 文字色 */
    font-weight: bold;
    text-decoration: none;       /* 下線を消す */
    border-radius: 6px;          /* 角丸 */
    text-align: center;
    transition: 0.3s;
  }
  .footer-container a:hover {
    background-color: #1976D2;   /* ホバー時に少し濃くする */
  }
  .footer-right h3,
  .footer-center h3,
  .footer-left h3 {
    text-align: center;
  }
  .footer-copyright {
    padding: 15px 0;  /* 最小限 */
    margin: 0;
    text-align: center;
    font-size: 0.8rem;
    color: #777;
  }

  .footer-btn {
    flex: 1; /* 均等幅 */
    display: flex;               /* 中央寄せ用 */
    flex-direction: column;      /* 縦に並べる */
    justify-content: center;     /* 上下中央 */
    align-items: center;         /* 左右中央 */
    text-align: center;
    text-decoration: none;
    color: #fff;
    font-weight: bold;
    font-size: 1rem;
    padding: 10px 0;
  }
  .footer-btn small {
    display: block;
    font-size: 0.75rem;
    font-weight: normal;
    margin-top: 2px;
  }
  /* アクセスボタン */
  .access-btn {
    background: #2196F3; /* ブルー */
  }
  /* 電話ボタン */
  .tel-btn {
    background: #E53935; /* レッド */
  }
}



/* パンくず */
.breadcrumb {
  list-style: none;
  padding: 0.5rem 1rem;
  margin: 0;
  font-size: 0.9rem;
}
.breadcrumb li {
  display: inline;
  margin-right: 0.5rem;
}
.breadcrumb a {
  color: #0077cc;
  text-decoration: none;
}
.breadcrumb a:hover {
  text-decoration: underline;
}


/* 当院についてページ */
.about-section {
  padding: 60px 20px;
  text-align: center;
}

.about-section.bg-light {
  background-color: #f9f9f9;
}

.about-section h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  text-align: center;
}

.features {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 600px;
  text-align: left;
}

.features li {
  font-size: 1.1rem;
  margin-bottom: 10px;
  padding-left: 20px;
  position: relative;
}

.gallery {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

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

.gallery img {
  width: 300px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.gallery figcaption {
  margin-top: 8px;
  font-size: 0.9rem;
  color: #555;
}

/* 診療内容ページ */
/* セクション */
.diagnosis-section {
  margin-bottom: 2.5rem;
}
.diagnosis-section h2 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  border-left: 4px solid #0077cc;
  padding-left: 0.5rem;
  color: #0077cc;
  border-left: none; /* 中央揃えにするため左ラインは削除 */
}
/* タイトル画像 */
.diagnosis-section .title-image {
  display: block;
  margin: 0.5rem auto 1rem auto;
  width: 600px;   /* お好みで調整 */
  height: auto;
}

/* 表 */
.table-wrapper {
  overflow-x: auto;
}
.service-table {
  width: 90%;          /* 横幅を少し縮める */
  max-width: 900px;    /* PCで広がりすぎないように上限を設定 */
  margin: 20px auto;   /* 中央寄せ */
  border-collapse: collapse;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}
.service-table th,
.service-table td {
  border: 1px solid #ddd;
  padding: 0.75rem;
  text-align: left;
  vertical-align: top;
}
.service-table th {
  background-color: #eef6fb;
  font-weight: bold;
}
.service-table tr:nth-child(even) {
  background-color: #fafafa;
}
/* 詳細テキスト */
.diagnosis-section .detail-text {
  max-width: 750px;
  margin: 0 auto;
  text-align: center;
}
.diagnosis-section .detail-text p {
  margin-bottom: 0.7rem;
}
/* 画像がはみ出さないように調整 */
.diagnosis-section .detail img,
.diagnosis-section .title-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0.5rem auto 1rem auto;
}


/* 医師紹介ページ */
/* 医師紹介カード */
.doctors {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  padding: 40px 20px;
}

.doctor-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 20px;
  max-width: 300px;
  text-align: center;
  flex: 1 1 280px;
}

.doctor-card img {
  border-radius: 50%;
  width: 150px;
  height: 150px;
  object-fit: cover;
  margin-bottom: 15px;
}

.doctor-card h2 {
  color: #0077cc;
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.doctor-card p {
  margin: 5px 0;
  line-height: 1.6;
}

.doctor-card .role {
  font-weight: bold;
  color: #555;
}

.doctor-card .message {
  margin-top: 10px;
  font-style: italic;
  color: #333;
}

@media (max-width: 768px) {
  .doctors {
    flex-direction: column;
    align-items: center;
  }
}



/* 予約・お問合せページ */
/* 電話番号表示 */
.phone-contact {
  text-align: center;
  padding: 30px 20px;
  background-color: #e6f0ff;
  border-radius: 10px;
  margin: 20px auto;
  max-width: 700px;
}
.phone-contact .tel {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 10px 0;
}
.phone-contact .tel a {
  color: #0077cc;
  text-decoration: none;
}
.phone-contact p {
  margin: 5px 0;
}

/* フォーム */
.form-section {
  max-width: 700px;
  margin: 30px auto;
  padding: 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.contact-form label {
  display: block;
  margin-top: 15px;
  font-weight: bold;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border-radius: 6px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

.contact-form .required {
  color: red;
}

.contact-form .btn-submit {
  display: block;
  width: 200px;
  margin: 20px auto 0 auto;
  padding: 12px 0;
  background-color: #0077cc;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
}

.contact-form .btn-submit:hover {
  background-color: #005fa3;
}


/* お知らせページ */
/* お知らせ一覧 */
.news-list ul {
  list-style: none;
  padding: 0;
  max-width: 800px;
  margin: 0 auto;
}
.news-list li {
  display: flex;
  justify-content: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid #ddd;
}
.news-list li .date {
  width: 120px;
  font-weight: bold;
  color: #0077cc;
}
.news-list li a {
  text-decoration: none;
  color: #333;
}
.news-list li a:hover {
  text-decoration: underline;
}

/* ページネーション */
.pagination {
  text-align: center;
  margin: 20px 0;
}
.pagination a,
.pagination span {
  display: inline-block;
  padding: 6px 12px;
  margin: 0 2px;
  border-radius: 4px;
  border: 1px solid #ddd;
  color: #0077cc;
  text-decoration: none;
}
.pagination .current {
  background-color: #0077cc;
  color: #fff;
  border-color: #0077cc;
}

/* お知らせ詳細 */
.news-detail {
  max-width: 800px;
  margin: 30px auto;
  padding: 30px;
  background: #f8f9fa;
  border-radius: 10px;
  line-height: 1.8;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.news-detail ul {
  list-style: disc;
  padding-left: 20px;
  margin: 10px 0;
}

/* 戻るリンク */
.back-link {
  max-width: 800px;
  margin: 20px auto;
  text-align: left;
}
.back-link a {
  text-decoration: none;
  color: #0077cc;
  font-weight: bold;
}
.back-link a:hover {
  text-decoration: underline;
}


/* アクセスページ */
/* アクセスセクション */
.location {
  max-width: 900px;
  margin: 0 auto;
  padding: 30px 20px;
}

.location h2 {
  font-size: 1.3rem;
  color: #0077cc;
  margin-bottom: 10px;
  text-align: left;
}

.location p, .location ul {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.location ul {
  padding-left: 20px;
}

/* 地図 */
.map iframe {
  border-radius: 8px;
  width: 100%;
  max-width: 100%;
  height: 400px;
}


/* サイトマップ */
.sitemap {
  max-width: 900px;
  margin: 30px auto;
  padding: 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.sitemap ul {
  list-style: none;
  padding-left: 0;
}
.sitemap ul li {
  margin: 10px 0;
}
.sitemap ul li ul {
  padding-left: 20px;
}
.sitemap a {
  color: #0077cc;
  text-decoration: none;
}
.sitemap a:hover {
  text-decoration: underline;
}
