/*
 * つるかわ心療クリニック 新デザインCSS (中央寄せスタイル改善・決定版)
*/

/* ===== 1. 基本設定と変数定義 ===== */
@charset "UTF-8";

:root {
  /* 色彩計画 */
  --color-primary: #3A7CA5;
  --color-secondary: #1D5B79;
  --color-accent: #A8D5BA;
  --color-text: #333333;
  --color-text-light: #555555;
  --color-background: #F9F9F9;
  --color-white: #FFFFFF;
  --color-border: #EAEAEA;
  --color-saturday: #007bff;
  --color-holiday: #dc3545;

  /* タイポグラフィ */
  --font-family-base: 'Noto Sans JP', sans-serif;

  /* その他 */
  --border-radius: 8px;
  --transition-speed: 0.3s;
  --shadow-light: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-strong: 0 8px 20px rgba(0, 0, 0, 0.12);
  --header-height: 75px;
}

/* ===== 2. リセットと基本スタイル ===== */
*, *::before, *::after { box-sizing: border-box; }
body { font-family: var(--font-family-base); font-size: 16px; line-height: 1.8; color: var(--color-text); background-color: var(--color-background); margin: 0; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px; }
img { max-width: 100%; height: auto; vertical-align: middle; }
a { color: var(--color-primary); text-decoration: none; transition: opacity var(--transition-speed); }
a:hover { opacity: 0.8; }
.text-link { font-weight: 700; }

/* ===== 3. タイポグラフィ ===== */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.5; margin-top: 0; margin-bottom: 1em; }
h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }
p { margin-top: 0; margin-bottom: 1.5em; }

/* ★★★ このセクションタイトルのスタイルを修正しました ★★★ */
.section-title {
  position: relative;
  display: inline-block; /* 親要素のtext-align:centerで中央寄せするための指定 */
  padding-left: 20px;
  margin-bottom: 2.5em;
  /* leftとtransformを削除し、親のtext-align:centerに中央寄せを委ねる */
}
.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 5px;
  bottom: 5px;
  width: 6px;
  background-color: var(--color-primary);
  border-radius: 3px;
}

/* ===== 4. ヘッダー ===== */
.header { background-color: var(--color-white); height: var(--header-height); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); position: sticky; top: 0; z-index: 1000; }
.header__inner { display: flex; justify-content: space-between; align-items: center; height: 100%; }
.header__logo img { height: 45px; }
.header__nav { display: flex; }
.header__nav ul { display: flex; margin: 0; padding: 0; list-style: none; align-items: center; }
.header__nav li { margin-left: 25px; }
.header__nav a { font-weight: 500; color: var(--color-text); position: relative; padding-bottom: 5px; }
.header__nav a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background-color: var(--color-primary); transition: width var(--transition-speed); }
.header__nav a:hover::after, .header__nav a.current::after { width: 100%; }
.header__mobile-menu-button { display: none; }

/* ===== 5. ボタン ===== */
.button { display: inline-block; padding: 12px 30px; border: none; border-radius: var(--border-radius); font-weight: 700; text-align: center; cursor: pointer; transition: all var(--transition-speed); letter-spacing: 0.5px; }
.button--primary { background-color: var(--color-primary); color: var(--color-white); box-shadow: var(--shadow-light); }
.button--primary:hover { background-color: var(--color-secondary); transform: translateY(-2px); box-shadow: var(--shadow-strong); }
.button--secondary { background-color: transparent; color: var(--color-primary); border: 2px solid var(--color-primary); }
.button--secondary:hover { background-color: var(--color-primary); color: var(--color-white); }
.button--large { padding: 15px 40px; font-size: 1.1rem; }
.button--outline { background: transparent; border: 1px solid var(--color-primary); color: var(--color-primary); }
.button--outline:hover { background: var(--color-primary); color: var(--color-white); }

/* ===== 6. レイアウト & セクション ===== */
.section-padding { padding: 80px 0; }
.section-padding--top-small { padding-top: 30px; }
.text-center { text-align: center; }
.bg-light { background-color: var(--color-white); }
.breadcrumbs { padding: 20px 0; background-color: #f0f4f7; font-size: 0.9rem; color: var(--color-text-light); }
.breadcrumbs a { color: var(--color-text-light); }
.breadcrumbs span { color: var(--color-primary); font-weight: 500; }

/* ===== 7. ページ別コンポーネント ===== */
.hero { position: relative; color: var(--color-white); text-align: center; }
.hero__image-wrapper { height: 500px; overflow: hidden; }
.hero__image-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.hero::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.4); }
.hero__content { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 100%; padding: 0 20px; }
.hero__catchphrase { font-size: 2.8rem; margin-bottom: 0.5em; font-weight: 700; }
.hero__sub-catchphrase { font-size: 1.2rem; margin-bottom: 2em; opacity: 0.9; }
.important-notice { background-color: #fffbe6; border-top: 2px solid #ffe58f; border-bottom: 2px solid #ffe58f; }
.top-message__content { display: flex; align-items: center; gap: 40px; }
.top-message__image { flex-shrink: 0; width: 200px; }
.top-message__image img { border-radius: 50%; }
.quick-links__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.quick-links__item { display: flex; background: var(--color-white); border-radius: var(--border-radius); padding: 20px; box-shadow: var(--shadow-light); transition: all var(--transition-speed) ease; align-items: center; }
.quick-links__item:hover { transform: translateY(-5px); box-shadow: var(--shadow-strong); color: var(--color-text); }
.quick-links__icon { max-width: 50px; height: auto; margin-right: 20px; }
.quick-links__item-content { flex-grow: 1; }
.quick-links__title { color: var(--color-primary); font-size: 1.2rem; margin-bottom: 0.3em; }
.quick-links__item-description { color: var(--color-text-light); font-size: 0.9rem; line-height: 1.7; margin-bottom: 0; }
.clinic-hours__table-wrapper { overflow-x: auto; }
.clinic-hours__table { width: 100%; border-collapse: collapse; margin-bottom: 20px; text-align: center; white-space: nowrap; }
.clinic-hours__table th, .clinic-hours__table td { padding: 15px 10px; border: 1px solid var(--color-border); }
.clinic-hours__table thead th { background-color: #f0f4f7; font-weight: 500; }
.clinic-hours__table-saturday { color: var(--color-saturday); font-weight: 500; }
.clinic-hours__table-sunday, .clinic-hours__table-holiday, .clinic-hours__table-closed { color: var(--color-holiday); background-color: #fcf2f2; }
.clinic-hours__notes { text-align: center; }
.clinic-hours__notes p { font-size: 0.9rem; margin-bottom: 0.5em; display: inline-block; margin-right: 20px; }
.optional-links__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.optional-links__item { background: var(--color-white); border-radius: var(--border-radius); padding: 30px; box-shadow: var(--shadow-light); text-align: center; transition: all var(--transition-speed) ease; }
.optional-links__item:hover { transform: translateY(-5px); box-shadow: var(--shadow-strong); }
.optional-links__title { font-size: 1.3rem; color: var(--color-primary); }
.optional-links__item p { color: var(--color-text-light); }
.page-header { padding: 60px 0; background: var(--color-white); text-align: center; border-bottom: 1px solid var(--color-border); }
.page-title { color: var(--color-primary); }
.page-intro { max-width: 700px; margin: 0 auto; color: var(--color-text-light); }
.page-content-grid { display: grid; grid-template-columns: 1fr 300px; gap: 50px; padding-top: 60px; padding-bottom: 60px; }
.main-content, .sidebar { width: 100%; }
.content-block + .content-block { margin-top: 50px; }
.content-title { padding-bottom: 10px; border-bottom: 2px solid var(--color-primary); margin-bottom: 1.5em; }
.content-subtitle { font-size: 1.3rem; padding-left: 1em; border-left: 4px solid var(--color-accent); }
.page-toc { background: #f0f4f7; padding: 20px; border-radius: var(--border-radius); margin-bottom: 50px; }
.toc-title { font-size: 1.2rem; margin-bottom: 15px; text-align: center; }
.page-toc ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 20px; }
.page-toc a { font-weight: 500; }
.sidebar-title { font-size: 1.2rem; padding-bottom: 10px; border-bottom: 2px solid var(--color-primary); margin-bottom: 15px; }
.sidebar-nav { list-style: none; padding: 0; margin: 0; }
.sidebar-nav li a { display: block; padding: 12px 15px; color: var(--color-text); font-weight: 500; border-radius: var(--border-radius); transition: background-color var(--transition-speed); border-bottom: 1px solid var(--color-border); }
.sidebar-nav li:last-child a { border-bottom: none; }
.sidebar-nav li a:hover { background-color: #e9ecef; opacity: 1; }
.sidebar-nav li.current-cat a { background-color: var(--color-primary); color: var(--color-white); font-weight: 700; }

/* ===== 8. フッター ===== */
.footer { background-color: #2c3e50; color: #ecf0f1; padding: 60px 0 20px 0; font-size: 0.9rem; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid #34495e; }
.footer__clinic-name { font-size: 1.2rem; font-weight: 700; color: var(--color-white); }
.footer a { color: #ecf0f1; }
.footer a:hover { color: var(--color-accent); }
.footer__nav ul { list-style: none; padding: 0; margin: 0; }
.footer__nav li { margin-bottom: 10px; }
.footer__copyright { text-align: center; padding-top: 20px; font-size: 0.8rem; color: #95a5a6; }

/* ===== 9. レスポンシブ & モバイルメニュー ===== */
@media (max-width: 992px) {
  .page-content-grid { grid-template-columns: 1fr; }
  .sidebar { margin-top: 60px; }
}

@media (max-width: 768px) {
  body { font-size: 15px; }
  .section-padding { padding: 60px 0; }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.15rem; }

  .header { height: 65px; --header-height: 65px; }
  .header__logo img { height: 35px; }
  
  .header__nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.98);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    z-index: 1000;
    overflow-y: auto;
    padding-top: var(--header-height);
  }
  .header__mobile-menu-button {
    display: block; background: none; border: none; cursor: pointer; padding: 0;
    width: 30px; height: 24px; position: relative; z-index: 1001;
  }
  .header__mobile-menu-button span {
    display: block; width: 100%; height: 3px;
    background-color: var(--color-primary);
    position: absolute; left: 0;
    transition: all var(--transition-speed);
  }
  .header__mobile-menu-button span:nth-child(1) { top: 0; }
  .header__mobile-menu-button span:nth-child(2) { top: 50%; transform: translateY(-50%); }
  .header__mobile-menu-button span:nth-child(3) { bottom: 0; }

  .header.menu-open .header__nav {
    display: block;
  }
  .header.menu-open .header__mobile-menu-button span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
  .header.menu-open .header__mobile-menu-button span:nth-child(2) { opacity: 0; }
  .header.menu-open .header__mobile-menu-button span:nth-child(3) { top: 50%; transform: translateY(-50%) rotate(-45deg); }

  .header__nav ul { flex-direction: column; align-items: stretch; padding: 20px 0 0 0; }
  .header__nav li { margin: 0; width: 100%; text-align: center; }
  .header__nav li a:not(.button) { padding: 18px 20px; display: block; border-bottom: 1px solid var(--color-border); font-size: 1.1rem; font-weight: 700; }
  .header__nav li a:hover::after { width: 0; }
  .header__nav .button--primary { display: block; width: calc(100% - 40px); margin: 30px auto; padding: 15px; }
  
  .hero__image-wrapper { height: 400px; }
  .hero__catchphrase { font-size: 1.9rem; }
  .hero__sub-catchphrase { font-size: 1rem; }
  .hero .button--large { font-size: 1rem; padding: 14px 28px; }
  .top-message__content { flex-direction: column; text-align: center; gap: 20px; }
  .top-message__image { width: 150px; }
  .quick-links__grid { grid-template-columns: 1fr; }
  .clinic-hours__notes p { display: block; margin-right: 0; margin-bottom: 0.8em; }
  .optional-links__grid { grid-template-columns: 1fr; }
  .page-toc ul { flex-direction: column; align-items: center; }
  .footer__grid { grid-template-columns: 1fr; text-align: center; }
  .footer__nav { order: 1; }
  .footer__info { order: 2; }
  .footer__reserve { order: 3; }
  .footer__nav ul { justify-content: center; }
}

/* ===== お知らせ詳細ページなど、1カラム用本文エリアのスタイル ===== */
.article-container {
    max-width: 800px; /* 本文の最大幅を制限し、読みやすくします */
    margin: 0 auto;   /* 全体を中央に配置します */
}