/* ═════════════════════════════════════════════════════════════
   의료진 소개 페이지 (/page/99, 100, 101, 111)
   큰 세로 사진 + 전문 분야 표시 + 경력/학회 두 칸. 카드는 좌우를 번갈아 배치.
   ═════════════════════════════════════════════════════════════ */

.dr-top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px 24px; margin-bottom: 32px;
}
.dr-tabs {
  display: inline-flex; flex-wrap: wrap; gap: 4px;
  padding: 5px; border-radius: 999px;
  background: var(--blush); box-shadow: inset 0 0 0 1px var(--line);
}
.dr-tabs a {
  padding: 9px 18px; border-radius: 999px;
  font-size: 15px; font-weight: 700; text-decoration: none; color: var(--muted);
}
.dr-tabs a:hover { color: var(--magenta-deep); background: var(--paper); }
.dr-tabs a[aria-current="page"] {
  background: linear-gradient(135deg, #c4237d, var(--magenta-deep));
  color: #fff;
  box-shadow: 0 8px 18px -8px rgb(142 18 87 / 0.7);
}
.dr-summary { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 15px; color: var(--muted); }
.dr-summary strong { color: var(--ink); font-weight: 800; }
.dr-summary .faces img { width: 40px; height: 40px; }

.dr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }

.dr-card {
  display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 36px;
  padding: 22px;
  border-radius: 28px;
  background: var(--paper);
  box-shadow: var(--shadow-1);
  position: relative;
  overflow: hidden;
}
/* 카드 오른쪽 위 은은한 원 장식 */
.dr-card::after {
  content: ""; position: absolute; right: -60px; top: -60px;
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, var(--tint) 0%, rgb(251 239 245 / 0) 70%);
  pointer-events: none;
}
.dr-card:nth-child(even) { grid-template-columns: minmax(0, 1fr) 300px; }
.dr-card:nth-child(even) .dr-photo { order: 2; }
.dr-card:nth-child(even)::after { right: auto; left: -60px; }
.dr-card:hover { box-shadow: var(--shadow-2); }

.dr-photo {
  margin: 0; position: relative;
  aspect-ratio: 4 / 5; border-radius: 22px; overflow: hidden;
  background: #efeaed;
}
.dr-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.dr-card:hover .dr-photo img { transform: scale(1.03); }
.dr-photo figcaption { display: none; }

.dr-info { position: relative; z-index: 1; padding: 10px 6px 6px; display: flex; flex-direction: column; }
.dr-dept {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  background: var(--tint); color: var(--magenta-deep);
  font-size: 13px; font-weight: 800;
}
.dr-name { margin-top: 10px; font-size: clamp(28px, 2.8vw, 36px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.15; }
.dr-name small { font-size: 17px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 4px; }

.dr-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 18px 0 0; padding: 0; }
.dr-tags li {
  padding: 7px 14px; border-radius: 999px;
  background: var(--blush); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 14px; font-weight: 700; color: var(--ink);
}
.dr-tags li.is-key {
  background: linear-gradient(135deg, #c4237d, var(--magenta-deep)); color: #fff; box-shadow: none;
}

.dr-cols {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 32px;
  margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line);
}
.dr-cols h3 { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 800; margin-bottom: 10px; }
.dr-cols h3 svg {
  width: 32px; height: 32px; padding: 6px; border-radius: 10px;
  background: var(--tint); fill: none; stroke: var(--magenta-deep);
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.dr-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.dr-cols li { position: relative; padding-left: 14px; font-size: 14.5px; color: var(--muted); line-height: 1.6; }
.dr-cols li::before { content: ""; position: absolute; left: 0; top: .7em; width: 5px; height: 5px; border-radius: 50%; background: var(--line-strong); }

.dr-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: auto 0 0; padding-top: 24px; }
.dr-btn {
  display: inline-block; padding: 10px 18px; border-radius: 999px;
  background: var(--magenta); color: #fff;
  font-size: 14px; font-weight: 800; text-decoration: none;
}
.dr-btn:hover { background: var(--magenta-deep); color: #fff; }
.dr-btn.is-ghost { background: var(--paper); color: var(--magenta-deep); box-shadow: inset 0 0 0 1.5px var(--magenta); }
.dr-btn.is-ghost:hover { background: var(--tint); }

@media (max-width: 999px) {
  .dr-card, .dr-card:nth-child(even) { grid-template-columns: 220px minmax(0, 1fr); gap: 24px; }
  .dr-card:nth-child(even) .dr-photo { order: 0; }
  .dr-cols { grid-template-columns: 1fr; }
}

@media (max-width: 639px) {
  .dr-top { margin-bottom: 20px; }
  .dr-tabs { width: 100%; }
  .dr-tabs a { flex: 1; text-align: center; padding: 8px 6px; font-size: 14px; }
  .dr-card, .dr-card:nth-child(even) { grid-template-columns: 1fr; gap: 0; padding: 12px; border-radius: var(--r-xl); }
  .dr-photo { aspect-ratio: 1; border-radius: 18px; }
  .dr-photo img { object-position: center 18%; }
  /* 작은 화면에서는 이름을 사진 위에 얹는다 */
  .dr-photo figcaption {
    display: grid; gap: 4px; justify-items: start;
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 40px 16px 14px;
    background: linear-gradient(to top, rgb(40 20 32 / 0.62), rgb(40 20 32 / 0));
    color: #fff;
  }
  .dr-photo figcaption .dr-dept { background: rgb(255 255 255 / 0.9); }
  .dr-photo figcaption .dr-name { margin: 0; font-size: 24px; color: #fff; }
  .dr-photo figcaption .dr-name small { color: rgb(255 255 255 / 0.85); font-size: 14px; }
  .dr-info { padding: 14px 6px 6px; }
  .dr-info > header { display: none; }
  .dr-tags { margin-top: 4px; }
  .dr-tags li { font-size: 13px; padding: 6px 12px; }
  .dr-cols { margin-top: 18px; padding-top: 16px; }
}

/* 스크롤하면 카드가 하나씩 떠오른다 */
@media (prefers-reduced-motion: no-preference) {
  .js .dr-card[data-reveal] { opacity: 0; translate: 0 34px; transition: opacity .7s ease, translate .7s cubic-bezier(.2, .7, .2, 1), box-shadow .2s ease; }
  .js .dr-card[data-reveal].is-in { opacity: 1; translate: 0 0; }
  .js .dr-card[data-reveal] .dr-tags li { opacity: 0; scale: .8; transition: opacity .4s ease, scale .4s cubic-bezier(.3, 1.6, .5, 1); }
  .js .dr-card[data-reveal].is-in .dr-tags li { opacity: 1; scale: 1; }
  .js .dr-card[data-reveal].is-in .dr-tags li:nth-child(1) { transition-delay: .25s; }
  .js .dr-card[data-reveal].is-in .dr-tags li:nth-child(2) { transition-delay: .32s; }
  .js .dr-card[data-reveal].is-in .dr-tags li:nth-child(3) { transition-delay: .39s; }
  .js .dr-card[data-reveal].is-in .dr-tags li:nth-child(4) { transition-delay: .46s; }
  .js .dr-card[data-reveal].is-in .dr-tags li:nth-child(n+5) { transition-delay: .53s; }
}

/* ═════════════════════════════════════════════════════════════
   협력병원: 로고 카드가 두 줄로 반대 방향으로 흐른다
   ═════════════════════════════════════════════════════════════ */
.partners {
  padding-block: 80px;
  background: linear-gradient(160deg, var(--blush) 0%, #f7e6ef 100%);
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.partners-inner {
  display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 48px; align-items: center;
}
.partners-side h2 { margin-top: 14px; font-size: clamp(28px, 3vw, 38px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.2; }
.partners-side p { margin: 10px 0 0; color: var(--muted); }
.cert-card {
  display: grid; gap: 10px; justify-items: start;
  margin-top: 24px; padding: 18px 20px;
  border-radius: var(--r-lg); background: var(--paper); box-shadow: var(--shadow-1);
}
.cert-card span { font-size: 14px; font-weight: 600; color: var(--ink); }

.partners-marquee {
  display: grid; gap: 16px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.partners { display: block; }
.marquee-row { display: flex; width: max-content; }
.partners .marquee-track { display: flex; flex: none; flex-wrap: nowrap; gap: 16px; list-style: none; margin: 0; padding: 0 16px 0 0; }
.marquee-track a {
  display: grid; place-items: center;
  width: 230px; height: 92px;
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: var(--shadow-1);
}
.marquee-track img { max-width: 80%; height: auto; filter: grayscale(1); opacity: .7; transition: filter .3s ease, opacity .3s ease; }
.marquee-track a:hover { box-shadow: var(--shadow-2); }
.marquee-track a:hover img, .marquee-track a:focus-visible img { filter: none; opacity: 1; }

@media (prefers-reduced-motion: no-preference) {
  .marquee-row { animation: marquee 38s linear infinite; }
  .marquee-row.is-reverse { animation-direction: reverse; animation-duration: 44s; }
  .partners-marquee:hover .marquee-row, .partners-marquee:focus-within .marquee-row { animation-play-state: paused; }
  @keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
}
/* 움직임을 줄인 경우: 흐르지 않고 바둑판으로 */
@media (prefers-reduced-motion: reduce) {
  .partners-marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee-row { width: auto; }
  .marquee-row.is-reverse, .marquee-track[aria-hidden="true"] { display: none; }
  .partners .marquee-track { flex-wrap: wrap; }
}

@media (max-width: 899px) {
  .partners { padding-block: 56px; }
  .partners-inner { grid-template-columns: 1fr; gap: 28px; }
  .marquee-track a { width: 180px; height: 76px; }
}

/* ═════ 기존 본문: 오른쪽에 뜨는 설명 사진 (기존 사이트의 c_img 배치를 되살림) ═════ */
.legacy .c_img {
  float: right;
  width: min(320px, 42%);
  height: auto;
  margin: 4px 0 20px 32px;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}
.legacy .c_img2 { display: block; max-width: 100%; height: auto; margin: 8px 0 20px; border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.legacy h2.ct, .legacy .gap + .gap { clear: both; }
.legacy::after { content: ""; display: block; clear: both; }
@media (max-width: 699px) {
  .legacy .c_img { float: none; display: block; width: 100%; margin: 0 0 18px; }
}

/* ═════ 메인 구역 바탕색: 흰색과 같은 계열의 연한 색을 번갈아 ═════ */
:root {
  --sec-pink: #fcf3f8;
  --sec-lavender: #f4f0fa;
  --sec-rose: #f8eef3;
}
.hero { background: var(--sec-pink); border-bottom: 0; }
.journey { background: var(--sec-lavender); border-top: 0; }
.journey .step-floor { box-shadow: 0 0 0 6px var(--sec-lavender), var(--shadow-1); }
.journey .sec-tag svg, .partners .sec-tag svg { background: #7a5aa6; }
.journey .sec-tag, .partners .sec-tag { color: #5d3f87; }
.doctors { background: var(--paper); border-block: 0; }
.updates { background: var(--sec-rose); }
.shortcuts { background: var(--paper); border-block: 0; }
.shortcuts .sec-tag { background: var(--sec-rose); box-shadow: none; }
.partners { background: var(--sec-lavender); border-top: 0; }
.home-lower { border-top: 0; }

/* ═════ 푸터: 진한 자두색 ═════ */
.site-footer { background: #2b1e27; border-top: 0; color: rgb(255 255 255 / 0.62); }
.site-footer h2 { color: #fff; }
.site-footer a { color: rgb(255 255 255 / 0.82); }
.site-footer a:hover { color: #fff; }
.footer-name { margin: 0; font-size: 19px; font-weight: 800; color: #fff; letter-spacing: -0.01em; }
.footer-name span { display: block; margin-top: 2px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; color: rgb(255 255 255 / 0.5); }
.footer-phones dd, .footer-phones dd a { color: #fff; }
.footer-bottom { border-top-color: rgb(255 255 255 / 0.1); }
.footer-bottom strong { color: #fff; }
.footer-cert { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.cert-logo { display: grid; place-items: center; padding: 6px 10px; border-radius: var(--r-md); background: #fff; }
.cert-logo img { display: block; height: 36px; width: auto; }
.footer-cert > span:last-child { font-size: 13px; font-weight: 700; color: rgb(255 255 255 / 0.85); }

/* 왼쪽 메뉴 아래 전화 문의 상자: site.css의 '.subnav a' 규칙보다 우선 */
.subnav .subnav-call { display: grid; gap: 2px; padding: 14px 16px; margin: 8px 10px 12px; font-weight: 400; }
.subnav .subnav-call span { display: block; }
.subnav .subnav-call strong { display: block; font-size: 19px; white-space: nowrap; }

/* 왼쪽 메뉴 머리: 원 무늬 없이 로고 색(분홍 → 자홍 → 보라) 그라데이션 */
.subnav .subnav-head {
  background: linear-gradient(135deg, #e5509b 0%, #b5176f 52%, #7e3a99 100%);
}

/* 메인 의료진 카드에서 눌러 들어오면 그 의료진 위치로: 고정 머리글에 가리지 않게, 잠깐 테두리로 표시 */
.dr-card { scroll-margin-top: calc(var(--header-h, 82px) + 24px); }
.dr-card:target { outline: 3px solid var(--brand-purple, #7b2d8e); outline-offset: 6px; border-radius: 28px; animation: dr-target 2.4s ease forwards 1s; }
@keyframes dr-target { to { outline-color: transparent; } }
