/* 메인(intro.html). 바닥글은 footer.css, 빠른 메뉴는 quick-menu.css 가 맡는다 */
:root {
  --ink: #211c2e;
  --sub: #5d5769;
  --line: #e6e2ee;
  --tint: #f7f5fb;
  --brand: #5b4a8a;
  --brand-dark: #463768;
  --deep: #2b2340;
  --page: 1280px;
  --gutter: 40px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body.home { margin: 0; background: #fff; color: var(--ink); font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; font-size: 16px; line-height: 1.65; overflow-wrap: anywhere; }
h1, h2, h3, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; }
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; z-index: 50; padding: 8px 12px; background: #fff; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border: 1px solid transparent; border-radius: 8px; font-weight: 700; white-space: nowrap; }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 17px; }
.btn-main { background: var(--brand); color: #fff; }
.btn-main:hover { background: var(--brand-dark); }
.btn-line { border-color: var(--brand); background: #fff; color: var(--brand); }
.btn-line:hover { background: var(--tint); }
.btn-white { background: #fff; color: var(--deep); }
.btn-ghost { border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); }

.top { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line); background: #fff; }
.top-in { display: flex; align-items: center; gap: 28px; max-width: 1440px; height: 76px; margin: 0 auto; padding: 0 var(--gutter); }
.brand { flex: none; }
.brand img { width: 210px; height: 44px; object-fit: contain; object-position: left center; }
.gnb { display: flex; flex: 1 1 auto; align-items: center; justify-content: center; gap: 30px; min-width: 0; font-weight: 700; white-space: nowrap; }
.gnb > a, .gnb summary, .drop-panel a { transition: color .2s ease, background-color .2s ease; }
.gnb > a:hover, .gnb summary:hover { color: var(--brand); }
.top-act { display: flex; flex: none; align-items: center; gap: 16px; }

.drop { position: relative; }
.drop > summary::after { content: ""; display: inline-block; margin-left: 6px; border: 4px solid transparent; border-top-color: currentColor; transform: translateY(2px); transition: transform .2s ease; }
.drop[open] > summary::after { transform: translateY(-2px) rotate(180deg); }
/* 메뉴가 열릴 때 살짝 내려오며 나타난다 */
.drop[open] > .drop-panel, .burger[open] > .burger-panel { animation: menu-in .18s ease-out; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } }
/* ::details-content 를 아는 브라우저는 닫힐 때도 흐려지며 사라진다. 모르는 브라우저는 지금처럼 바로 닫힌다 */
@supports selector(::details-content) {
  .drop::details-content, .burger::details-content { opacity: 0; transition: opacity .18s ease, content-visibility .18s allow-discrete; }
  .drop[open]::details-content, .burger[open]::details-content { opacity: 1; }
}
.drop-panel { position: absolute; top: calc(100% + 14px); left: -16px; z-index: 5; display: grid; min-width: 168px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 12px 28px rgba(33, 28, 46, .12); }
.drop-panel a { padding: 8px 10px; border-radius: 6px; font-weight: 500; }
.drop-panel a:hover { background: var(--tint); }
.burger-lang a { display: flex; align-items: center; gap: 8px; }
.burger-lang img { width: 20px; height: auto; }
.burger { display: none; }

.hero { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: stretch; max-width: 1440px; height: min(760px, calc(100vh - 77px)); min-height: 560px; margin: 0 auto; padding: 32px var(--gutter); }
.hero-copy { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.eyebrow { color: var(--brand); font-size: 14px; font-weight: 700; letter-spacing: .08em; }
.hero h1 { margin-top: 14px; font-size: 52px; font-weight: 700; line-height: 1.22; letter-spacing: -.01em; }
.lead { margin-top: 20px; color: var(--sub); font-size: 19px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-facts { display: grid; gap: 6px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--sub); }
.hero-facts li { display: flex; gap: 14px; }
.hero-facts b { flex: none; min-width: 40px; color: var(--ink); }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; min-width: 0; }
.tile { position: relative; display: block; overflow: hidden; border-radius: 12px; background: var(--tint); }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50%) 50%; transition: transform .25s ease; }
.tile::after { content: ""; position: absolute; inset: auto 0 0; height: 34%; background: linear-gradient(to top, rgba(33, 28, 46, .72), rgba(33, 28, 46, 0)); }
.tile span { position: absolute; right: 10px; bottom: 16px; left: 12px; z-index: 1; color: #fff; font-size: clamp(13px, 1.25vw, 20px); font-weight: 700; line-height: 1.3; overflow-wrap: normal; }
.tile span::after { content: "›"; margin-left: 6px; }
.tile:hover img { transform: scale(1.03); }

.sec { padding: 88px var(--gutter); }
.sec > * { max-width: var(--page); margin-right: auto; margin-left: auto; }
.sec-tint { background: var(--tint); }
.sec-head { margin-bottom: 36px; }
.sec-head h2, .contact h2 { margin-top: 8px; font-size: 34px; font-weight: 700; line-height: 1.32; }
.sec-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.more { flex: none; padding-bottom: 6px; border-bottom: 1px solid currentColor; color: var(--brand); font-weight: 700; }

.depts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.dept { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 26px 22px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.dept h3 { font-size: 22px; font-weight: 700; }
.dept h3 a:hover { color: var(--brand); }
.dept > p:not(.dept-links) { flex: 1 1 auto; color: var(--sub); font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips a { display: inline-block; padding: 5px 11px; border-radius: 999px; background: var(--tint); color: var(--brand-dark); font-size: 14px; font-weight: 700; }
.chips a:hover { background: #ebe6f5; }
.dept-links { display: flex; flex-wrap: wrap; gap: 4px 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 700; }
.dept-links a:hover { color: var(--brand); }

.why { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; counter-reset: why; }
.why li { min-width: 0; padding-top: 18px; border-top: 2px solid var(--brand); counter-increment: why; }
.why h3 { margin-bottom: 10px; font-size: 19px; font-weight: 700; }
.why p { color: var(--sub); font-size: 15px; }

.docs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.docs li { min-width: 0; }
.docs img { width: 100%; aspect-ratio: 320 / 331; border-radius: 12px; background: var(--tint); object-fit: cover; object-position: top; }
.docs h3 { margin-top: 12px; font-size: 17px; font-weight: 700; }
.docs p { color: var(--sub); font-size: 14px; line-height: 1.5; }

.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.col { min-width: 0; overflow: hidden; border-radius: 12px; background: #fff; }
.col a { display: flex; flex-direction: column; height: 100%; }
.col img { width: 100%; aspect-ratio: 640 / 336; object-fit: cover; }
.col h3 { margin: 18px 20px 8px; font-size: 18px; font-weight: 700; line-height: 1.42; }
.col p { flex: 1 1 auto; margin: 0 20px; color: var(--sub); font-size: 15px; }
.col small { margin: 14px 20px 20px; color: var(--sub); font-size: 13px; }
.col a:hover h3 { color: var(--brand); }

.rvs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.rvs li { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 12px; }
.rvs h3 { margin-bottom: 8px; font-size: 18px; font-weight: 700; }
.rvs a { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); color: var(--sub); font-size: 15px; }
.rvs b { color: var(--ink); font-size: 17px; white-space: nowrap; }
.rvs a:hover span { color: var(--brand); }

.sec-deep { background: var(--deep); color: #fff; }
.sec-deep .eyebrow { color: #cfc5ea; }
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; }
.contact-lead { margin-top: 12px; color: #dcd6ea; }
.contact-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 26px; }
.contact-btns .btn { padding: 0 12px; }
.contact-btns > a:not(.btn) { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .45); border-radius: 8px; color: #fff; font-size: 17px; font-weight: 700; }
.contact-btns > a:not(.btn):hover { background: rgba(255, 255, 255, .1); }
.contact-faq { min-width: 0; }
.contact-faq details { padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, .22); }
.contact-faq summary { font-size: 18px; font-weight: 700; }
.contact-faq p { margin-top: 8px; color: #dcd6ea; font-size: 15px; }


.pick { width: min(420px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 26px; border: 0; border-radius: 14px; color: var(--ink); }
.pick::backdrop { background: rgba(33, 28, 46, .55); }
.pick h2 { font-size: 20px; font-weight: 700; }
.pick-list { display: grid; gap: 8px; margin-top: 16px; }
.pick-list a { padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; font-weight: 700; }
.pick-list a:hover { border-color: var(--brand); color: var(--brand); }
.pick-close { width: 100%; min-height: 44px; margin-top: 12px; border: 0; background: none; color: var(--sub); }


@media (max-width: 1439px) {
  .gnb { gap: 20px; font-size: 15px; }
  .hero h1 { font-size: 44px; }
  .docs { gap: 12px; }
}

/* 빠른 메뉴 자리를 비운 뒤 칸이 가장 좁은 구간이다. 러시아어 진료과 이름이 칸을 넘지 않게 줄인다 */
@media (min-width: 1069px) and (max-width: 1279px) {
  .tile span { font-size: 12px; }
}

@media (max-width: 1068px) {
  :root { --gutter: 24px; }
  .gnb, .top .hx-lang { display: none; }
  .top-in { justify-content: space-between; }
  .burger { position: relative; display: block; }
  .burger summary { display: grid; gap: 5px; place-content: center; width: 44px; height: 44px; }
  .burger summary span { display: block; width: 22px; height: 2px; background: var(--ink); transition: transform .2s ease, opacity .2s ease; }
  .burger[open] summary span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .burger[open] summary span:nth-child(2) { opacity: 0; }
  .burger[open] summary span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .burger-panel { position: absolute; top: calc(100% + 16px); right: -8px; display: grid; gap: 2px; width: min(300px, calc(100vw - 32px)); max-height: calc(100vh - 110px); padding: 12px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 14px 30px rgba(33, 28, 46, .16); }
  .burger-panel > a { padding: 10px; font-weight: 700; }
  .burger-panel hr { width: 100%; margin: 6px 0; border: 0; border-top: 1px solid var(--line); }
  .burger-lang { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; padding: 6px 10px; font-size: 14px; }
  .burger-lang a { padding: 6px 0; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 24px; height: auto; }
  .tiles { height: 340px; }
  .depts, .why, .rvs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .docs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .sec { padding-top: 64px; padding-bottom: 64px; }
}

@media (max-width: 767px) {
  :root { --gutter: 16px; }
  html { scroll-padding-top: 72px; }
  body { font-size: 16px; }
  .top-in { gap: 8px; height: 60px; }
  .brand img { width: 168px; height: 36px; }
  .hero { gap: 16px; min-height: 0; padding-top: 20px; padding-bottom: 20px; }
  .hero h1 { margin-top: 8px; font-size: 32px; }
  .eyebrow { font-size: 12px; }
  .lead { margin-top: 10px; font-size: 16px; }
  .hero-cta, .hero-facts { display: none; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 168px; gap: 8px; height: auto; }
  .tile span { bottom: 10px; font-size: 16px; }
  .sec { padding-top: 52px; padding-bottom: 52px; }
  .sec-head { margin-bottom: 24px; }
  .sec-head h2, .contact h2 { font-size: 26px; }
  .sec-head-row { display: block; }
  .more { display: inline-block; margin-top: 10px; padding-bottom: 2px; }
  .depts, .why, .cols { grid-template-columns: minmax(0, 1fr); }
  .rvs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .rvs li { padding: 14px; }
  .rvs a { flex-wrap: wrap; gap: 0 6px; font-size: 14px; }
  .cols { gap: 10px; }
  .col a { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 4px 12px; padding: 12px; }
  .col img { grid-row: span 2; aspect-ratio: 1; border-radius: 8px; }
  .col h3 { margin: 0; font-size: 15px; }
  .col p { display: none; }
  .col small { margin: 0; font-size: 12px; }
  .docs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-btns { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile img { transition: none; }
  .drop-panel, .burger-panel { animation: none !important; }
  .drop::details-content, .burger::details-content { transition: none; }
  .drop > summary::after, .burger summary span, .gnb > a, .gnb summary, .drop-panel a { transition: none; }
}

:lang(ko) body.home { word-break: keep-all; }

/* 769px 부터 오른쪽에 붙는 빠른 메뉴(84px)와 겹치지 않게 비운다. 가운데 여백이 넉넉한 넓은 화면에서는 저절로 줄어든다 */
@media (min-width: 769px) {
  .hero { padding-right: max(var(--gutter), min(96px, calc(816px - 50vw))); }
  .sec { padding-right: max(var(--gutter), min(96px, calc(1512px - 100vw))); }
}
