/* ==========================================================================
   page_history.css - 創業ストーリー ページ固有スタイル
   全クラスに .p-history プレフィックスで衝突回避
   ========================================================================== */

/* --------------------------------------------------------------------------
   ヒーローセクション（背景画像＋タイトル）
   -------------------------------------------------------------------------- */
.p-history_hero {
  position: relative;
  width: 100%;
  height: 340px;
  overflow: hidden;
  background: #f8f8f8 url('/img/pages/history/hero_bg.jpg') center center / cover no-repeat;
}

.p-history_hero_inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.p-history_hero_heading {
  background: rgba(255, 255, 255, 0.9);
  padding: 28px 30px;
  text-align: center;
  width: 536px;
  max-width: 90%;
}

.p-history_hero_title {
  font-family: "Hiragino Mincho ProN", "HG明朝E", serif;
  font-size: 30px;
  font-weight: normal;
  color: #333;
  letter-spacing: 1.5px;
  line-height: 1.4;
  margin: 0;
}

/* --------------------------------------------------------------------------
   タイトルバー＋院長メッセージコンテンツ
   -------------------------------------------------------------------------- */
.p-history_titlebar {
  background: #f8f8f8;
  padding: 0 0 60px;
  overflow: hidden;
}

.p-history_titlebar_bg {
  position: relative;
  padding: 60px 0;
  text-align: center;
}

.p-history_titlebar_bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: #fff;
}

.p-history_titlebar_box {
  position: relative;
  z-index: 1;
  display: inline-block;
  background: #fff;
  border-top: 3px solid #c6b7a7;
  border-bottom: 3px solid #c6b7a7;
  padding: 30px 40px;
  min-width: 616px;
}

.p-history_titlebar_text {
  font-family: "Hiragino Mincho ProN", "HG明朝E", serif;
  font-size: 30px;
  font-weight: normal;
  color: #6c5c49;
  letter-spacing: 0.8px;
  line-height: 1.1;
  margin: 0;
}

/* --------------------------------------------------------------------------
   院長メッセージ本文（テキスト左 + 写真右）
   -------------------------------------------------------------------------- */
.p-history_message {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin-top: 10px;
}

.p-history_message_text {
  flex: 1;
}

.p-history_message_text p {
  font-size: 14px;
  line-height: 1.7;
  color: #333;
  margin: 0 0 16px;
}

.p-history_message_text p:last-child {
  margin-bottom: 0;
}

.p-history_message_photo {
  flex-shrink: 0;
  width: 383px;
}

.p-history_message_photo img {
  width: 100%;
  height: 276px;
  object-fit: cover;
  border: 1px solid #c6b7a7;
  display: block;
}

/* --------------------------------------------------------------------------
   共通：セクション見出し（border-bottom 付き）
   -------------------------------------------------------------------------- */
.p-history_heading {
  font-family: "Hiragino Mincho ProN", "HG明朝E", serif;
  font-size: 30px;
  font-weight: normal;
  color: #333;
  letter-spacing: 1.5px;
  line-height: 1.2;
  border-bottom: 1px solid #81725d;
  padding-bottom: 14px;
  margin-bottom: 40px;
}

/* --------------------------------------------------------------------------
   なぜ開院したのか
   -------------------------------------------------------------------------- */
.p-history_why {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.p-history_why_text {
  flex: 1;
}

.p-history_why_text p {
  font-size: 14px;
  line-height: 1.7;
  color: #333;
  margin: 0 0 16px;
}

.p-history_why_text p:last-child {
  margin-bottom: 0;
}

.p-history_why_photo {
  flex-shrink: 0;
  width: 441px;
}

.p-history_why_photo img {
  width: 100%;
  height: 276px;
  object-fit: cover;
  border: 1px solid #c6b7a7;
  display: block;
}

/* --------------------------------------------------------------------------
   私たちの歩み（タイムライン）
   -------------------------------------------------------------------------- */
.p-history_timeline {
  display: flex;
  flex-direction: column;
  gap: 35px;
}

.p-history_timeline_item {
  display: flex;
  align-items: center;
  gap: 111px;
  padding-bottom: 35px;
  border-bottom: 1px solid #ddd;
  font-size: 18px;
  color: #000;
}

.p-history_timeline_item:last-child {
  border-bottom: 1px solid #ddd;
}

.p-history_timeline_date {
  font-family: "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ Pro W6", sans-serif;
  font-weight: 600;
  white-space: nowrap;
  margin: 0;
  min-width: 100px;
}

.p-history_timeline_desc {
  font-family: "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ Pro W3", sans-serif;
  font-weight: normal;
  margin: 0;
  flex: 1;
}

/* --------------------------------------------------------------------------
   お客様の声セクション
   -------------------------------------------------------------------------- */
.p-history_voice_list {
  display: flex;
  gap: 27px;
  justify-content: center;
}

.p-history_voice_card {
  background: #fff;
  border: 1px solid #ebe4dc;
  width: calc((100% - 54px) / 3);
  max-width: 349px;
}

.p-history_voice_card_head {
  background: #ebe4dc;
  padding: 20px;
  height: 62px;
  display: flex;
  align-items: center;
}

.p-history_voice_card_head span {
  font-family: "Inter", "Noto Sans JP", sans-serif;
  font-weight: 500;
  font-size: 18px;
  color: #333;
  letter-spacing: 0.9px;
}

.p-history_voice_card_img {
  padding: 20px 20px 0;
}

.p-history_voice_card_img img {
  width: 100%;
  height: 192px;
  object-fit: cover;
  border: 1px solid #c6b7a7;
  display: block;
}

.p-history_voice_card_text {
  padding: 10px 20px 20px;
  font-size: 14px;
  line-height: 1.7;
  color: #333;
  margin: 0;
}

/* --------------------------------------------------------------------------
   Gallery セクション（スライダー：3枚表示 + 左右矢印ナビ + 自動スクロール）
   -------------------------------------------------------------------------- */
.p-history_gallery {
  display: flex;
  align-items: center;
  gap: 15px;
  position: relative;
}

.p-history_gallery_track_wrap {
  flex: 1;
  overflow: hidden;
}

.p-history_gallery_track {
  display: flex;
  gap: 20px;
  transition: transform 0.5s ease;
}

.p-history_gallery_item {
  flex: 0 0 calc((100% - 40px) / 3);
}

.p-history_gallery_item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  border: 1px solid #c6b7a7;
}

.p-history_gallery_arrow {
  flex-shrink: 0;
  width: 53px;
  height: 53px;
  border-radius: 50%;
  border: 1px solid #9f8f78;
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
  padding: 0;
  z-index: 2;
}

.p-history_gallery_arrow:hover {
  background: rgba(255, 255, 255, 1);
}

.p-history_gallery_arrow span {
  display: block;
  width: 10px;
  height: 10px;
  border-top: 2px solid #9f8f78;
  border-right: 2px solid #9f8f78;
}

.p-history_gallery_arrow--prev span {
  transform: rotate(-135deg);
  margin-left: 3px;
}

.p-history_gallery_arrow--next span {
  transform: rotate(45deg);
  margin-right: 3px;
}

/* --------------------------------------------------------------------------
   リンクボタン（角丸長方形 + 右矢印）
   -------------------------------------------------------------------------- */
.p-history_links_inner {
  display: flex;
  gap: 30px;
  justify-content: center;
}

.p-history_links_btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 535px;
  height: 80px;
  border: 1px solid #c6b7a7;
  border-radius: 40px;
  background: #fff;
  text-decoration: none;
  transition: background 0.3s;
  padding: 0 30px;
}

.p-history_links_btn_text {
  font-family: "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ Pro W3", sans-serif;
  font-size: 16px;
  color: #333;
}

.p-history_links_btn_arrow {
  display: block;
  width: 8px;
  height: 8px;
  border-top: 2px solid #9f8f78;
  border-right: 2px solid #9f8f78;
  transform: rotate(45deg);
}

.p-history_links_btn:hover {
  background: #f7f4f0;
}

/* --------------------------------------------------------------------------
   レスポンシブ
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
  .p-history_hero {
    height: 260px;
  }

  .p-history_hero_title {
    font-size: 24px;
  }

  .p-history_titlebar_box {
    min-width: 0;
    width: 90%;
    max-width: 616px;
  }

  .p-history_titlebar_text {
    font-size: 24px;
  }

  .p-history_heading {
    font-size: 24px;
  }

  .p-history_message {
    flex-direction: column;
  }

  .p-history_message_photo {
    width: 100%;
  }

  .p-history_message_photo img {
    height: 240px;
  }

  .p-history_why {
    flex-direction: column;
  }

  .p-history_why_photo {
    width: 100%;
  }

  .p-history_why_photo img {
    height: 240px;
  }

  .p-history_timeline_item {
    gap: 40px;
  }

  .p-history_voice_list {
    flex-wrap: wrap;
    flex-direction: column;
    align-items: center;
  }

  .p-history_voice_card {
    width: 100%;
    max-width: 500px;
  }

  .p-history_gallery_item img {
    height: 200px;
  }

  .p-history_links_inner {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .p-history_links_btn {
    width: 100%;
    max-width: 535px;
  }
}

@media (max-width: 767px) {
  .p-history_hero {
    height: 200px;
  }

  .p-history_hero_heading {
    padding: 20px 25px;
  }

  .p-history_hero_title {
    font-size: 20px;
  }

  .p-history_titlebar {
    padding: 0 0 40px;
  }

  .p-history_titlebar_bg {
    padding: 30px 15px;
  }

  .p-history_titlebar_box {
    padding: 20px;
  }

  .p-history_titlebar_text {
    font-size: 20px;
  }

  .p-history_heading {
    font-size: 20px;
  }

  .p-history_why_photo img {
    height: 200px;
  }

  .p-history_timeline_item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    font-size: 16px;
  }

  .p-history_voice_card_head span {
    font-size: 16px;
  }

  .p-history_voice_card_img img {
    height: 160px;
  }

  .p-history_gallery {
    gap: 10px;
  }

  .p-history_gallery_arrow {
    width: 40px;
    height: 40px;
  }

  .p-history_gallery_arrow span {
    width: 8px;
    height: 8px;
  }

  .p-history_gallery_track {
    gap: 10px;
  }

  .p-history_gallery_item {
    flex: 0 0 calc((100% - 20px) / 3);
  }

  .p-history_gallery_item img {
    height: 160px;
  }

  .p-history_links {
    padding: 40px 0;
  }

  .p-history_links_btn {
    height: 60px;
    padding: 0 20px;
  }

  .p-history_links_btn_text {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .p-history_gallery_item {
    flex: 0 0 calc((100% - 10px) / 2);
  }

  .p-history_gallery_arrow {
    width: 32px;
    height: 32px;
  }

  .p-history_gallery_arrow span {
    width: 6px;
    height: 6px;
  }

  .p-history_gallery_item img {
    height: 140px;
  }
}
