/* =======================================================================
 *  의료진 상세 (/doctors/<slug>) — 광교365리움치과병원
 *  디자인: Figma node 835-40644 (PC, 의사별 프레임 835:417xx 등)
 *  히어로/브레드크럼/컨테이너/리셋·변수는 doctors.css(.doctors-page) 재사용.
 *  토큰: point2 #A8599E, warmGray 800 #292524 / 500 #78716C / 400 #A8A29E, grey39 #636363
 * ======================================================================= */

/* 콘텐츠 폭: Figma 기준 좌우 240px 거터 / 콘텐츠 max 1440 (목록 1480 대신 상세는 1440로 고정).
   min()으로 폭 캡 — 1920에서 1440·거터 240, 좁아지면 24px 최소 거터 */
.doctor-detail-page .dp-container { max-width: none; width: min(100% - 48px, 1440px); margin: 0 auto; padding: 0; }
/* 브레드크럼(테마 #site_config)도 본문과 동일 1440 정렬 */
#doctorDetailPage #site_config .site { max-width: 1440px; }
/* 브레드크럼 3단계 home4(의사명) — Figma처럼 드롭다운 화살표 표시(테마 site_arr.webp 재사용) */
#doctorDetailPage #site_config .site .home.home4 { position: relative; border-right: 1px solid #eee; }
#doctorDetailPage #site_config .site .home.home4:after {
  content: ""; position: absolute; z-index: 1; right: 20px; top: 0; width: 22px; height: 100%;
  background: url(../img/site_arr.webp) center center no-repeat; transition: transform .3s ease-out;
}
#doctorDetailPage #site_config .site .home.home4.act:after { transform: rotate(180deg); }

/* ---------- PROFILE 영역 ----------
   photo / head / secs 3개 그리드 아이템으로 브레이크포인트별 배치 전환:
   - 데스크톱: [사진 | head] · [사진 | secs]  (사진 좌측 2행 span)
   - 태블릿:   [사진336 | head] · [secs 풀폭]
   - 모바일:   [사진] · [head] · [secs]  (세로 스택) */
.dd-profile { position: relative; }
.dd-profile__inner {
  position: relative;
  display: grid;
  grid-template-columns: 710px minmax(0, 1fr);
  column-gap: 60px; row-gap: 60px;
  align-items: start;
  padding: 60px 0 130px;
}

/* 좌측 사진 710×710 라운드 박스 (Figma: border 2px rgba(234,222,235,.4), radius 30, 인물 누끼 contain) */
.dd-photo {
  grid-column: 1; grid-row: 1 / span 2;
  width: 710px; height: 710px;
  border: 2px solid rgba(234, 222, 235, 0.4); border-radius: 30px;
  background: radial-gradient(circle at 50% 28%, #ffffff 18%, #fafaf9 62%);
  overflow: hidden; display: flex; align-items: flex-end; justify-content: center;
}
.dd-photo img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; display: block; }

/* 우측 상단: 이름/소제목/소개 */
.dd-profile__head { grid-column: 2; grid-row: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }

.dd-name {
  margin: 0; display: flex; align-items: center; gap: 14px;
  color: #1c1917; font-size: 56px; font-weight: 800; line-height: 1.3; letter-spacing: -1.68px;
  word-break: keep-all;
}
.dd-name .dd-role { color: #636363; font-size: 28px; font-weight: 500; line-height: 1.3; letter-spacing: -1.4px; }

.dd-sub { display: flex; flex-direction: column; gap: 8px; }
/* 소제목(복수 가능 — 이시영처럼 바 마커가 여러 개). 각 항목 앞에 2px 바 */
.dd-sub__title { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.dd-sub__item {
  position: relative; padding-left: 8px;
  color: var(--dp-point2, #a8599e); font-size: 24px; font-weight: 500; line-height: 34px; letter-spacing: -1.2px;
}
.dd-sub__item::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 2px; height: 20px; background: var(--dp-point2, #a8599e); }
.dd-sub__intro {
  margin: 0;
  color: #636363; font-size: 17px; font-weight: 500; line-height: 1.6; letter-spacing: -0.68px;
  word-break: keep-all;
}

/* ---------- 섹션 ---------- */
.dd-secs { grid-column: 2; grid-row: 2; min-width: 0; display: flex; flex-direction: column; gap: 40px; }
.dd-sec { display: flex; flex-direction: column; gap: 10px; }
.dd-sec__title {
  margin: 0; display: flex; align-items: center; gap: 8px;
  color: #292524; font-size: 24px; font-weight: 700; line-height: 30px; letter-spacing: -0.72px;
}
.dd-check { flex: 0 0 20px; width: 20px; height: 20px; display: block; }
.dd-check svg { display: block; width: 100%; height: 100%; }

/* Type A: 슬래시 1줄(세로 마커) — 전문 진료 분야 / 진료 시스템 */
.dd-lead {
  position: relative; margin: 0; padding-left: 14px;
  color: #78716c; font-size: 17px; font-weight: 400; line-height: 1.7; letter-spacing: -0.51px;
}
.dd-lead::before { content: ""; position: absolute; left: 0; top: 9px; width: 4px; height: 4px; border-radius: 50%; background: #a8a29e; }

/* Type B: 불릿 리스트 — 학력/약력 / 학회활동 */
.dd-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dd-list li {
  position: relative; padding-left: 14px;
  color: #78716c; font-size: 17px; font-weight: 400; line-height: 1.45; letter-spacing: -0.51px;
}
.dd-list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 4px; height: 4px; border-radius: 50%; background: #a8a29e; }

/* ---------- 브랜드 워터마크(reum) — Figma 렌더에서 1:1(492px)로 추출한 연회색 마크.
   우측은 뷰포트 끝으로(우240 블리드), 하단은 섹션 끝에 밀착(아래가 살짝 잘려 footer가 덮음).
   이미지가 흰배경+연회색이라 흰 섹션 위에 자연 블렌딩 → 추가 필터/투명도 불필요.
   sparse 의사(섹션 짧음)에서도 bottom 기준이라 섹션 안에 머무름 ---------- */
.dd-wm { position: absolute; right: -240px; bottom: 0; width: 492px; z-index: 0; pointer-events: none; }
.dd-wm img { display: block; width: 100%; height: auto; }
/* 워터마크는 항상 콘텐츠 텍스트 뒤로 — 콘텐츠 아이템을 위 레이어로(z-index:1 > wm 0).
   섹션 배경이 투명이라 워터마크는 텍스트 사이 여백으로 은은히 비치고 글자는 또렷이 위에 올라옴(Figma 동일). */
.dd-photo, .dd-profile__head, .dd-secs { position: relative; z-index: 1; }

/* =======================================================================
 *  태블릿 (≤1199, Figma 768 node 835-38922)
 *  [사진336 | head] · [secs 풀폭], 콘텐츠 거터 40, 워터마크 415
 * ======================================================================= */
@media (max-width: 1199px) {
  .doctor-detail-page .dp-container { width: 100%; max-width: none; margin: 0; padding: 0 40px; }

  /* 브레드크럼 — Figma 태블릿/모바일은 Mobile_category(풀폭 3행 스택, 각 60px = 180px).
     1행[홈아이콘+특별함] / 2행[의료진 소개] / 3행[의사명]. 각 행 우측 chevron(테마 site_arr.webp).
     테마 가로형은 3단계가 잘리므로 #doctorDetailPage(2-id) specificity로 스택 전환. font 17px. */
  #doctorDetailPage #site_config .site { display: flex; flex-wrap: wrap; align-items: stretch; max-width: none; }
  #doctorDetailPage #site_config .site .home { height: 60px; line-height: 1.3; font-size: 17px; }
  #doctorDetailPage #site_config .site .home.home1 { flex: 0 0 60px; width: 60px; height: 60px; }
  #doctorDetailPage #site_config .site .home.home1 img { width: 20px; height: 20px; }
  #doctorDetailPage #site_config .site .home.home2 { flex: 1 1 0; width: auto; min-width: 0; }
  /* 2·3행도 홈 아이콘 폭(60px) 만큼 좌측 비우고 그 다음부터(=home2와 동일 시작점 x60).
     margin-left로 박스 자체를 밀어 드롭다운(width:100%)도 home2와 같은 폭(x60~우측)으로 맞춤.
     (이전 full-width+padding-left는 텍스트만 들여쓰고 박스/드롭다운이 x0부터라 home2와 어긋남) */
  #doctorDetailPage #site_config .site .home.home3 { flex: 0 0 calc(100% - 60px); width: calc(100% - 60px); margin-left: 60px; }
  #doctorDetailPage #site_config .site .home.home4 { flex: 0 0 calc(100% - 60px); width: calc(100% - 60px); margin-left: 60px; border-right: none; }
  #doctorDetailPage #site_config .site .home > span { padding-left: 20px; }

  /* 드롭다운 열림 처리 — 스택 레이아웃에선 열린 메뉴(ul.toggle_menu, position:absolute top:100%)가
     아래 행을 덮는데, 아래 행 span(테마 z-index:3)이 메뉴를 뚫고 보임. 열린 행(.act)을 위로 올려 깔끔히 덮음.
     (데스크톱은 가로 배치라 정상 → ≤1199에서만 적용) */
  #doctorDetailPage #site_config .site .home.act { position: relative; z-index: 30; }
  #doctorDetailPage #site_config .site .home.act > ul.toggle_menu { z-index: 30; }

  /* 드롭다운 항목 폰트/들여쓰기 = 헤더(선택 행)와 동일하게.
     테마 sub.css ≤768은 li a를 12px·padding:5px 7px(텍스트 x68)로 줄여 헤더(17px·텍스트 x80)와 어긋남.
     → 17px + padding-left 20px(ul이 x60부터라 텍스트 x80 = 헤더와 정렬). */
  #doctorDetailPage #site_config .site .home > ul li a { font-size: 17px; padding: 12px 20px; }

  .dd-profile__inner { grid-template-columns: 336px minmax(0, 1fr); column-gap: 20px; row-gap: 60px; padding: 40px 0 90px; }
  .dd-photo { grid-column: 1; grid-row: 1; width: 336px; height: 336px; border-width: 1px; border-radius: 20px; }
  .dd-profile__head { grid-column: 2; grid-row: 1; gap: 20px; padding: 20px 0; }
  .dd-secs { grid-column: 1 / -1; grid-row: 2; gap: 40px; }

  /* 이름 40(Bold 700) / 역할 24 */
  .dd-name { font-size: 40px; font-weight: 700; line-height: 1.3; letter-spacing: -1.5px; gap: 12px; }
  .dd-name .dd-role { font-size: 24px; line-height: 34px; letter-spacing: -1.2px; }
  /* 소제목 21px, 세로 스택(Figma 태블릿) */
  .dd-sub__title { flex-direction: column; align-items: flex-start; gap: 0; }
  .dd-sub__item { font-size: 21px; line-height: 31px; letter-spacing: -0.84px; }
  .dd-sub__intro { font-size: 17px; line-height: 1.6; letter-spacing: -0.68px; }

  /* 워터마크 415, 뷰포트 우측 끝으로 블리드(거터 40) */
  .dd-wm { width: 415px; right: -40px; bottom: 0; }
}

/* =======================================================================
 *  모바일 (≤767, Figma 375 node 835-39074)
 *  [사진 풀폭] · [head] · [secs] 세로 스택, 거터 20, 워터마크 240
 * ======================================================================= */
@media (max-width: 767px) {
  .doctor-detail-page .dp-container { padding: 0 20px; }

  .dd-profile__inner { grid-template-columns: 1fr; row-gap: 40px; padding: 32px 0 60px; }
  .dd-photo { grid-column: 1; grid-row: auto; width: 100%; height: auto; aspect-ratio: 335 / 232; border-width: 0.7px; border-radius: 13px; }
  .dd-photo img { object-position: center; }
  .dd-profile__head { grid-column: 1; grid-row: auto; gap: 14px; padding: 0; }
  .dd-secs { grid-column: 1; grid-row: auto; gap: 24px; }

  /* 이름 32(Bold 700, #292524) / 역할 17 */
  .dd-name { font-size: 32px; font-weight: 700; color: #292524; line-height: 1.2; letter-spacing: -1.6px; gap: 8px; }
  .dd-name .dd-role { font-size: 17px; font-weight: 500; line-height: 1.3; letter-spacing: -0.85px; }
  /* 소제목 15px Bold, 인라인(Figma 모바일), 바 2×14 */
  .dd-sub__title { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; }
  .dd-sub__item { font-size: 15px; font-weight: 700; line-height: 1.5; letter-spacing: -0.75px; }
  .dd-sub__item::before { height: 14px; }
  .dd-sub__intro { font-size: 13px; color: #78716c; line-height: 1.6; letter-spacing: -0.52px; }

  /* 섹션: 헤더 17 Bold, 본문 13, 체크 16, 섹션 gap 24, 리스트 gap 6 */
  .dd-sec { gap: 8px; }
  .dd-sec__title { font-size: 17px; line-height: 1.3; letter-spacing: -0.51px; gap: 6px; }
  .dd-check { flex-basis: 16px; width: 16px; height: 16px; }
  .dd-lead { font-size: 13px; line-height: 1.6; letter-spacing: -0.39px; padding-left: 12px; }
  .dd-lead::before { top: 7px; }
  .dd-list { gap: 6px; }
  .dd-list li { font-size: 13px; line-height: 1.45; letter-spacing: -0.39px; padding-left: 12px; }
  .dd-list li::before { top: 7px; }

  /* 워터마크 240, 뷰포트 우측 끝으로 블리드(거터 20) */
  .dd-wm { width: 240px; right: -20px; bottom: 0; }
}

/* =======================================================================
 *  브레드크럼 체브론 크기 통일 — 3행 전부 데스크톱과 동일한 22px 유지.
 *  테마(sub.css)는 ≤768서 home2/home3:after를 22→10px(background-size:100%)로,
 *  common.css는 ≤372서 9px로 줄이는데, home4는 안 줄어 위 2행만 작아짐.
 *  → 작은 쪽이 아니라 22px(원래 버튼 크기)로 맞춤. #doctorDetailPage(2-id)로 테마 덮음.
 *  ≤1199 한 블록이 ≤768·≤372 테마 축소 규칙까지 모두 덮음(specificity 우선). ======== */
@media (max-width: 1199px) {
  #doctorDetailPage #site_config .site .home.home2:after,
  #doctorDetailPage #site_config .site .home.home3:after,
  #doctorDetailPage #site_config .site .home.home4:after {
    right: 20px; width: 22px; background-size: auto;
  }
}

/* =======================================================================
 *  하단 고정 상담폼(.bform, position:fixed bottom:0)이 footer를 가리는 문제.
 *  #footer.darkzone은 기본 padding-bottom:130px라 데스크톱(bform 106)·모바일(95)은 OK인데,
 *  태블릿(768~1199)은 폼이 2줄로 늘어 bform≈161px → 130으론 부족해 Copyright가 31px 가려짐.
 *  태블릿 범위에서만 footer 하단 여백을 키워 해소(footer bg #0e0e0e dark라 bform과 자연 연결, 흰 틈 없음). */
@media (min-width: 768px) and (max-width: 1199px) {
  /* 테마 default.css의 `#footer{padding:50px 0 130px !important}`를 덮으려면 !important 필요 */
  body:has(.doctor-detail-page) #footer { padding-bottom: 180px !important; }
}
