/* =============================================================
   hospital-detail.css — C15 병원 상세(/hospitals/{id}) 페이지 전용
   시안: Figma TheKKOT-yhlee · node 54:9754(모바일 393)

   구조·반응형 규칙은 C3 시술 상세(treatment-detail.css)와 같은 관례를 따른다:
   모바일은 히어로 풀블리드 + 앵커 탭 sticky, 데스크탑(≥1100)은 본문(좌)+고정 카드(우) 2단.
   데스크탑 시안이 없어 C3 의 치수를 그대로 쓴다 — 상세 화면끼리 어긋나지 않게 한다.
   ============================================================= */

/* ---------------------------------------------------------------
   히어로 이미지 (시안 Rectangle 5338 · 306px)
   --------------------------------------------------------------- */
.hd-hero {
  /* 모바일은 풀블리드 — 프레임 좌우 패딩을 벗어난다 */
  margin: 0 calc(-1 * var(--kb-frame-pad));
}

.hd-hero img {
  width: 100%;
  height: 306px;
  object-fit: cover;
  background: var(--kb-gray-50);
}

/* ---------------------------------------------------------------
   병원명 + 핵심 메타 (시안 상세 top · px16 py30 · gap 16)
   --------------------------------------------------------------- */
.hd-top {
  padding: 30px 0;
}

.hd-subtitle {
  color: var(--kb-gray-700);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.hd-title {
  color: var(--kb-gray-900);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 30px;
}

.hd-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0;
}

.hd-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--kb-gray-600);
  font-size: 0.8125rem;
  font-weight: 500;
}

.hd-meta-row::before {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background: currentColor;
}

.hd-meta-location::before {
  -webkit-mask: url("../img/hospital/icon/icon-location.svg") center / contain no-repeat;
  mask: url("../img/hospital/icon/icon-location.svg") center / contain no-repeat;
}

.hd-meta-clock::before {
  -webkit-mask: url("../img/treatment/icon/icon-clock.svg") center / contain no-repeat;
  mask: url("../img/treatment/icon/icon-clock.svg") center / contain no-repeat;
}

/* division 밴드도 모바일 풀블리드 */
main .t-division {
  margin: 0 calc(-1 * var(--kb-frame-pad));
}

/* ---------------------------------------------------------------
   본문 섹션 (시안 py24 · 제목 18 SemiBold)
   --------------------------------------------------------------- */
.hd-section {
  padding: 24px 0;
  scroll-margin-top: 110px; /* 앵커 이동 시 sticky 헤더+탭에 가리지 않게 */
}

.hd-section h2 {
  color: var(--kb-gray-900);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 12px;
}

/* 의료진 섹션의 「총 n명」은 제목 오른쪽 끝 */
.hd-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.hd-section-head h2 {
  margin-bottom: 0;
}

.hd-section-count {
  flex: none;
  color: var(--kb-gray-600);
  font-size: 0.875rem;
  font-weight: 500;
}

.hd-copy {
  color: var(--kb-gray-600);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 22px;
  white-space: pre-line; /* 운영자가 넣은 줄바꿈 유지 */
}

/* 문의 범위 안내 (D-84) — 병원 채널은 「시술 가능 여부」까지다 */
.hd-consult-scope {
  margin-top: 12px;
  color: var(--kb-gray-500);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 20px;
}

/* ---------------------------------------------------------------
   정보요약 — 2×2 그리드 (시안 정보요약 · px16 py24 · gap 20/12)
   --------------------------------------------------------------- */
.hd-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 12px;
  padding: 24px 0;
  border-top: 1px solid var(--kb-gray-200);
  border-bottom: 1px solid var(--kb-gray-200);
}

.hd-summary-item {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.hd-summary-item > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.hd-summary-icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--kb-radius);
  background: var(--kb-main-50);
}

.hd-summary-icon::before {
  content: "";
  width: 16px;
  height: 16px;
  background: var(--kb-main-600);
}

.hd-icon-clock::before {
  -webkit-mask: url("../img/treatment/icon/icon-clock.svg") center / contain no-repeat;
  mask: url("../img/treatment/icon/icon-clock.svg") center / contain no-repeat;
}

.hd-icon-clipboard::before {
  -webkit-mask: url("../img/hospital/icon/icon-clipboard-tick.svg") center / contain no-repeat;
  mask: url("../img/hospital/icon/icon-clipboard-tick.svg") center / contain no-repeat;
}

.hd-icon-monitor::before {
  -webkit-mask: url("../img/hospital/icon/icon-monitor.svg") center / contain no-repeat;
  mask: url("../img/hospital/icon/icon-monitor.svg") center / contain no-repeat;
}

.hd-summary-label {
  color: var(--kb-gray-600);
  font-size: 0.875rem;
  font-weight: 500;
}

.hd-summary-value {
  color: var(--kb-gray-900);
  font-size: 1rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------------------------------------------------------------
   의료진 (시안 54:9786 — 회색 카드 · 원형 사진 80px · p12 · gap 10)
   --------------------------------------------------------------- */
.hd-doctors {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hd-doctor {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: var(--kb-radius);
  background: var(--kb-gray-100);
  overflow: hidden;
}

.hd-doctor img {
  flex: none;
  width: 80px;
  height: 80px;
  border-radius: 100px;
  object-fit: cover;
  background: var(--kb-gray-50);
}

.hd-doctor-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 6px 0;
}

/* 성명 + 직함이 한 줄 (「제서진 원장」) */
.hd-doctor-name {
  color: var(--kb-gray-800);
  font-size: 1rem;
  font-weight: 700;
}

.hd-doctor-meta {
  color: var(--kb-gray-600);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 18px;
}

/* ---------------------------------------------------------------
   프로그램 (시안 프로그램 리스트박스 · 1열)
   --------------------------------------------------------------- */
.hd-programs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.hd-program-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hd-program-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--kb-radius);
  background: var(--kb-gray-50);
  margin-bottom: 8px;
}

.hd-program-name {
  color: var(--kb-gray-800);
  font-size: 1rem;
  font-weight: 700;
}

.hd-program-meta {
  color: var(--kb-gray-500);
  font-size: 0.75rem;
  font-weight: 500;
}

/* ---------------------------------------------------------------
   위치 (시안 위치 · 지도 170px + 주소·교통 안내)
   --------------------------------------------------------------- */
.hd-map {
  border-radius: var(--kb-radius);
  overflow: hidden;
  background: var(--kb-gray-50);
  aspect-ratio: 361 / 170; /* 시안 비율 — 폭이 늘어도 같은 모양을 유지한다 */
}

.hd-map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.hd-address {
  margin-top: 12px;
  color: var(--kb-gray-800);
  font-size: 0.875rem;
  font-weight: 500;
}

.hd-transit {
  margin-top: 6px;
  color: var(--kb-gray-500);
  font-size: 0.75rem;
  font-weight: 500;
}

/* ---------------------------------------------------------------
   태블릿 — 히어로만 조금 키우고 프로그램을 2열로
   --------------------------------------------------------------- */
@media (min-width: 560px) {
  .hd-hero img {
    height: 360px;
  }

  .hd-programs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hd-program-card img {
    height: 160px;
  }
}

/* ---------------------------------------------------------------
   데스크탑 — 본문(좌) + 고정 카드(우) 2단 (C3 상세와 같은 배치)
   --------------------------------------------------------------- */
@media (min-width: 1100px) {
  .hd-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 384px;
    gap: 20px;
    align-items: start;
    padding-top: 50px;
    padding-bottom: 30px;
  }

  .hd-hero {
    margin: 0; /* 풀블리드 해제 */
  }

  .hd-hero img {
    height: 480px;
    border-radius: 12px;
  }

  .hd-section {
    padding: 30px 0;
  }

  #hd-about h2 {
    font-size: 1.25rem;
  }

  .hd-summary {
    padding: 30px 0;
  }

  .hd-map {
    aspect-ratio: 16 / 7;
  }

  /* 우측 고정 카드 */
  .hd-aside {
    position: sticky;
    top: 90px; /* 헤더 70 + 20 */
  }

  .hd-aside-card {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 30px 24px;
    border: 1px solid var(--kb-gray-300);
    border-radius: 12px;
    background: var(--kb-white);
  }

  .hd-aside-head {
    padding-bottom: 24px;
    border-bottom: 1px solid var(--kb-gray-300);
  }

  .hd-aside-head .hd-title {
    font-size: 1.5rem;
  }

  .hd-aside-cta {
    width: 100%;
  }

  .hd-aside-card .hd-consult-scope {
    margin-top: -12px; /* 카드 gap(24) 안에서 CTA 바로 아래에 붙인다 */
  }
}
