/* =========================================================
   service-outpatient.css
   - 外来リハビリテーション詳細ページ専用スタイル
========================================================= */

/* --- Utilities --- */
.bg-gray {
  background-color: var(--color-gray-light);
  padding: 6rem 0;
}
.mt-4 {
  margin-top: 2rem;
}
.mb-0 {
  margin-bottom: 0 !important;
}

.text-link {
  color: var(--color-primary);
  font-weight: 700;
  text-decoration: underline;
}
.text-sm {
  font-size: 0.85rem;
  line-height: 1.6;
}

/* ---------------------------------------------------------
   4. Specialty List (Zig-Zag Layout)
   - 専門外来の紹介（画像とテキストの交互配置）
--------------------------------------------------------- */
.specialty-list {
  display: flex;
  flex-direction: column;
  gap: 60px;
  margin-top: 50px;
}

.specialty-item {
  display: flex;
  align-items: stretch; /* 高さを揃える */
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

/* 偶数番目は左右反転 (Zig-Zag) */
.specialty-item:nth-child(even) {
  flex-direction: row-reverse;
}

.specialty-img {
  flex: 1; /* 幅50% */
  min-height: 300px;
  position: relative;
}
.specialty-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  top: 0;
  left: 0;

  /* 画像の少し上を表示（人物の顔切れ防止） */
  object-position: center 25%;
}

.specialty-text {
  flex: 1; /* 幅50% */
  padding: 40px 50px; /* PCでの十分な余白 */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.specialty-text h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 20px;
  position: relative;
  padding-left: 20px;
}
/* 左側のアクセントライン */
.specialty-text h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 100%;
  background-color: var(--color-primary);
  border-radius: 2px;
}

.specialty-text p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-main);
  text-align: justify;
}

/* ---------------------------------------------------------
   5. Flow (Vertical Step)
   - 縦型フロー（inpatient.cssと共通ルール）
--------------------------------------------------------- */
.flow-steps.vertical {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 40px;
  position: relative;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* 連結線 */
.flow-steps.vertical::before {
  content: '';
  position: absolute;
  top: 40px;
  bottom: 40px;
  left: 40px;
  width: 2px;
  background-color: #ddd;
  z-index: 0;
}

.flow-step {
  display: flex;
  position: relative;
  z-index: 1;
  background: transparent;
  padding-bottom: 40px;
}
.flow-step:last-child {
  padding-bottom: 0;
}

.step-num {
  width: 80px;
  height: 80px;
  background-color: #fff;
  border: 4px solid var(--color-primary);
  border-radius: 50%;
  color: var(--color-primary);
  font-family: 'Helvetica Neue', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 40px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.step-content {
  flex: 1;
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  border: 1px solid var(--color-gray-border);
  position: relative;
  top: 0;
}
.step-content::before {
  content: '';
  position: absolute;
  top: 30px;
  left: -10px;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-right: 10px solid #fff;
}

.step-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 10px;
}
.step-content p {
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- 注釈ボックス (Updated) --- */
.note-box {
  background-color: #fff8e1; /* 薄い黄色 */
  border: 1px solid #ffecb3;
  border-radius: 8px;
  padding: 25px 30px;
  margin-top: 40px;
}
.note-box h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #d84315; /* 濃いオレンジ */
  margin-bottom: 15px;
  display: flex;
  align-items: center;
}
.note-box h4 i {
  margin-right: 8px;
}

.note-box p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #333;
  margin-bottom: 10px;
}
.note-box p:last-child {
  margin-bottom: 0;
}

/* ---------------------------------------------------------
   6. Contact Info (CTA)
--------------------------------------------------------- */
.contact-info {
  margin-top: 30px;
  background-color: #f9fafb;
  padding: 20px;
  border-radius: 8px;
  display: inline-block;
  min-width: 300px;
  border: 1px solid #eee;
}
.contact-tel {
  font-family: 'Helvetica Neue', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  line-height: 1;
  margin-bottom: 5px;
}
.tel-sub {
  font-size: 1rem;
  font-weight: normal;
}
.contact-hour {
  font-size: 0.9rem;
  color: #666;
}

/* ---------------------------------------------------------
   Responsive
--------------------------------------------------------- */
@media (max-width: 768px) {
  /* Specialty List (Zig-Zag解除・縦積み) */
  .specialty-list {
    gap: 40px;
  }
  .specialty-item,
  .specialty-item:nth-child(even) {
    flex-direction: column;
    height: auto;
  }

  .specialty-img {
    width: 100%;
    min-height: 240px;
    position: relative;
    flex: none;
  }
  .specialty-img img {
    position: relative;
    height: 300px;
  }

  .specialty-text {
    flex: none;
    width: 100%;
    padding: 40px 30px; /* スマホでも十分な余白 */
  }
  .specialty-text h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
  }

  /* Flow (縦線の解除) */
  .flow-steps.vertical::before {
    display: none;
  }

  .flow-step {
    flex-direction: column;
    padding-bottom: 30px;
  }

  .step-num {
    width: 60px;
    height: 60px;
    font-size: 1.4rem;
    margin-bottom: 15px;
    margin-right: 0;
    align-self: flex-start;
  }

  .step-content {
    width: 100%;
  }
  .step-content::before {
    display: none;
  }

  /* Note Box */
  .note-box {
    padding: 20px;
  }
}
