/* ==========================================================================
   Firstier v2 — 홈 (밝은 스냅 패널 8장)
   마크업: template-parts/v2/home/*.php · 기반 토큰/버튼/헤더/푸터: v2.css
   디자인 원본: Main.dc.html (1440) · Mobile.dc.html (390)
   Breakpoints: ≤1099 태블릿 · ≤767 모바일
   ========================================================================== */

/* ---------- snap ---------- */
html { scroll-padding-top: var(--v2-header-h); }
html:has(body.admin-bar) { scroll-padding-top: calc(var(--v2-header-h) + 32px); }
/* 스냅은 마우스로 보는 PC 에서만. 폰·태블릿(터치)은 주소창이 줄었다 늘며 멈춤 위치가 어긋나
   화면이 끌려가서 끈다(2026-10-10) — 패널은 그냥 이어지는 섹션. */
@media (hover: hover) and (pointer: fine) and (min-width: 1024px) and (min-height: 680px) {
	html { scroll-snap-type: y mandatory; }
}
.v2-footer { scroll-snap-align: end; }

/* ---------- panel ---------- */
.v2-home { --v2h-panel-h: calc(100vh - var(--v2-header-h)); }
@supports (height: 100svh) {
	.v2-home { --v2h-panel-h: calc(100svh - var(--v2-header-h)); }
}
@media (max-width: 767px) {
	/* 모바일: 첫 화면만 화면 높이(하단 바는 첫 화면에선 숨어 있다), 나머지 패널은 내용 높이. */
	.v2h-panel:not(.v2h-hero) { min-height: 0; }
}

.v2h-panel {
	position: relative;
	min-height: var(--v2h-panel-h);
	overflow: hidden;
	scroll-snap-align: start;
}
/* .v2-wrap 이 flex/grid 아이템이면 auto 여백 때문에 내용 폭으로 줄어든다 — 폭을 명시. */
.v2h-panel > .v2-wrap { width: calc(100% - 2 * var(--v2-pad)); }

.v2h-panel .v2-media img { object-position: var(--op, 50% 50%); }

.v2h-head { display: flex; flex-direction: column; gap: 18px; }
.v2-home .v2h-h2 { font-size: clamp(34px, 3.6vw, 54px); line-height: 1.2; }
.v2h-more { font-size: 16px; }
.v2h-more .v2-ico, .v2h-depts__list .v2-ico, .v2h-card__title .v2-ico { flex: none; }

/* desktop/mobile-only copy */
@media (min-width: 768px) {
	.v2h-m { display: none !important; }
	br.v2h-mbr { display: none; }
}

/* ==========================================================================
   01 HERO
   ========================================================================== */
.v2h-hero {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	background: var(--v2-night);
	color: #fff;
}
.v2h-hero__video {
	position: absolute; inset: 0;
	width: 100%; height: 100%;
	object-fit: cover; object-position: 60% 50%;
}
.v2h-hero__shade {
	position: absolute; inset: 0; pointer-events: none;
	background: linear-gradient(0deg, rgba(10, 14, 18, .72) 0%, rgba(10, 14, 18, .32) 34%, rgba(10, 14, 18, 0) 58%);
}
.v2h-hero__shade--left { background: linear-gradient(90deg, rgba(10, 14, 18, .34) 0%, rgba(10, 14, 18, 0) 46%); }
/* 세로 화면(폰 · 태블릿 세로)은 세로 전용 타임랩스 — v2.js 가 data-src-portrait 를 고른다. */
@media (orientation: portrait) and (max-width: 1099px) {
	.v2h-hero__video { object-position: 50% 45%; }
}
.v2h-hero__in {
	position: relative; z-index: 1;
	padding-top: 48px;
	padding-bottom: clamp(48px, 6vw, 80px);
	display: flex; flex-direction: column; gap: 20px;
}
.v2h-hero__copy { display: flex; flex-direction: column; gap: 20px; }
.v2h-hero__kicker { font-size: 16px; line-height: 1.4; font-weight: 600; color: rgba(255, 255, 255, .88); }
.v2h-hero__title { font-size: clamp(40px, 5.2vw, 76px); line-height: 1.13; font-weight: 600; letter-spacing: -0.035em; }
.v2h-hero__lead { max-width: 30em; font-size: clamp(16px, 1.35vw, 19px); line-height: 1.7; color: rgba(255, 255, 255, .88); }
.v2h-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-top: 8px; }
.v2h-hero__tel { padding: 0 24px; }
.v2h-hero__status { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, .85); }

/* ==========================================================================
   02 PROMISE
   ========================================================================== */
.v2h-promise { display: flex; background: var(--v2-frost); }
.v2h-promise__media { flex: 1 1 50%; min-height: 360px; }
.v2h-promise__media video { object-position: 50% 50%; }
.v2h-promise__body {
	flex: 1 1 50%; min-width: 0;
	display: flex; flex-direction: column; justify-content: center; gap: 56px;
	padding: 64px clamp(24px, 6.5vw, 112px);
}
.v2h-promise__list { display: flex; flex-direction: column; gap: 36px; }
.v2h-promise__item { display: flex; flex-direction: column; gap: 8px; }
.v2h-promise__title { font-size: clamp(21px, 1.8vw, 26px); line-height: 1.4; font-weight: 600; letter-spacing: -0.02em; }
.v2h-promise__text { font-size: 17px; line-height: 1.7; color: var(--v2-body); }

/* ==========================================================================
   03 DOCTORS
   ========================================================================== */
.v2h-doctors { display: flex; align-items: center; padding: 64px 0; background: var(--v2-mint); }
.v2h-doctors__in { display: flex; flex-direction: column; gap: 56px; }
.v2h-doctors__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 40px; }
.v2h-doctors__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(560px, 100%), 1fr)); gap: 40px; }
.v2h-doc { display: flex; gap: 32px; align-items: flex-end; }
.v2h-doc__photo {
	flex: 0 0 auto; width: clamp(200px, 21vw, 300px); aspect-ratio: 3 / 4;
	padding: 12px; background: #D9E1DD;
	display: flex; align-items: center; justify-content: center; text-align: center;
	font-size: 13px; line-height: 1.5; font-weight: 500; color: var(--v2-meta);
}
.v2h-doc__photo.has-img { padding: 0; overflow: hidden; }
.v2h-doc__photo img { width: 100%; height: 100%; object-fit: cover; }
.v2h-doc__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 10px; padding-bottom: 4px; }
.v2h-doc__id { display: flex; flex-direction: column; gap: 10px; }
.v2h-doc__role { font-size: 15px; line-height: 1.4; font-weight: 600; color: var(--v2-meta); }
.v2h-doc__name { font-size: 36px; line-height: 1.2; font-weight: 600; letter-spacing: -0.025em; }
.v2h-doc__fields { font-size: 15px; line-height: 1.6; color: var(--v2-body); }
.v2-home .v2h-doc__quote { margin-top: 14px; font-size: 18px; line-height: 1.7; }
.v2-home .v2h-doc__career { margin-top: 14px; font-size: 14px; line-height: 1.7; color: var(--v2-meta); }

/* ==========================================================================
   04 DEPARTMENTS
   ========================================================================== */
.v2h-depts { display: flex; background: var(--v2-frost); }
.v2h-depts__body {
	flex: 1 1 55%; min-width: 0;
	display: flex; flex-direction: column; justify-content: center; gap: 48px;
	padding: 64px clamp(24px, 5vw, 96px) 64px max(var(--v2-pad), calc((100% - var(--v2-max)) / 2));
}
.v2h-depts__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
.v2h-depts__list a {
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	padding: 18px 0; border-top: 1px solid var(--v2-line);
	font-size: 22px; line-height: 1.35; font-weight: 600; letter-spacing: -0.02em;
}
.v2h-depts__list a:last-child { border-bottom: 1px solid var(--v2-line); }
.v2h-depts__media { flex: 1 1 45%; min-height: 360px; }

/* ==========================================================================
   05 SPECIALTIES
   ========================================================================== */
.v2h-special { display: flex; flex-direction: column; background: var(--v2-white); }
.v2h-special__head { padding-top: clamp(56px, 7vw, 96px); padding-bottom: 40px; }
.v2h-special__grid {
	flex: 1 1 auto;
	display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px;
	padding-bottom: clamp(48px, 6vw, 80px);
}
.v2h-card { min-height: 0; display: flex; flex-direction: column; gap: 20px; }
.v2h-card__media { flex: 1 1 auto; min-height: 240px; display: block; }
.v2h-card__text { display: flex; flex-direction: column; gap: 8px; }
.v2h-card__title { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 26px; line-height: 1.3; font-weight: 600; letter-spacing: -0.02em; }
.v2h-card__title .v2-ico { display: none; }
.v2h-card__desc { font-size: 16px; line-height: 1.7; color: var(--v2-body); }

/* ==========================================================================
   06 24H TEASER
   ========================================================================== */
.v2h-er { display: flex; align-items: center; padding: 64px 0; background: var(--v2-mint); }
.v2h-er__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr)); gap: 56px 80px; align-items: center; }
.v2h-er__text, .v2h-er__copy { display: flex; flex-direction: column; gap: 22px; }
.v2h-er__lead { max-width: 26em; font-size: 17px; line-height: 1.7; color: var(--v2-body); }
.v2h-er__phone { margin-top: 8px; align-self: flex-start; display: flex; align-items: center; gap: 16px; }
.v2h-er__dot { width: 14px; height: 14px; flex: none; background: var(--v2-lamp); }
.v2h-er__num { font-size: clamp(34px, 3.8vw, 52px); line-height: 1; letter-spacing: -0.03em; white-space: nowrap; }
.v2h-er__actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 12px; }
.v2h-er__guide { padding: 0 26px; }
.v2h-er__call { padding: 0 24px; }
.v2h-er__window { display: block; aspect-ratio: 4 / 3; background: var(--v2-night); }
.v2h-er__window picture { position: absolute; inset: 0; display: block; }
.v2h-er__window img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   07 FACILITIES
   ========================================================================== */
.v2h-fac { display: flex; flex-direction: column; background: var(--v2-frost); }
.v2h-fac__head {
	display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 64px;
	padding-top: clamp(56px, 7vw, 104px); padding-bottom: 48px;
}
.v2h-fac__lead { max-width: 24em; font-size: 17px; line-height: 1.7; color: var(--v2-body); }
.v2h-fac__photos { flex: 1 1 auto; min-height: 360px; display: flex; gap: 2px; }
.v2h-fac__fig { flex: 1 1 0; min-width: 0; }
.v2h-chip {
	position: absolute; left: 24px; bottom: 20px; z-index: 1;
	padding: 8px 14px; background: var(--v2-white); color: var(--v2-ink);
	font-size: 15px; line-height: 1.4; font-weight: 600;
}

/* ==========================================================================
   08 LOCATION (공용 푸터가 바로 뒤에 붙는다)
   ========================================================================== */
.v2h-loc { display: flex; align-items: center; background: var(--v2-white); }
.v2h-loc__grid {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(min(480px, 100%), 1fr)); gap: 40px 80px; align-items: center;
	padding-top: clamp(56px, 7vw, 104px); padding-bottom: 48px;
}
.v2h-loc__copy { display: flex; flex-direction: column; gap: 24px; }
.v2h-loc .v2h-head { gap: 24px; }
.v2h-loc__title { font-size: clamp(30px, 3.2vw, 46px); line-height: 1.26; font-weight: 600; letter-spacing: -0.03em; }
.v2h-loc__addr { font-size: 18px; line-height: 1.7; color: var(--v2-body); }
.v2h-loc__transit { display: flex; flex-direction: column; gap: 8px; font-size: 16px; line-height: 1.7; color: var(--v2-body); }
.v2h-loc__actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 8px; }
.v2h-btn52 { height: 52px; padding: 0 24px; }
.v2h-loc__map { border-color: #9AA4AC; }
.v2h-loc__media { aspect-ratio: 4 / 3; }

/* ==========================================================================
   ≤1099 — tablet
   ========================================================================== */
@media (max-width: 1099px) {
	.v2h-depts__body { padding-left: var(--v2-pad); padding-right: clamp(24px, 4vw, 48px); }
	.v2h-depts__list { column-gap: 28px; }
	.v2h-depts__list a { font-size: 20px; }
	.v2h-special__grid { gap: 16px; }
	.v2h-card__title { font-size: 22px; }
	.v2h-card__desc { font-size: 15px; }
	/* 태블릿에서도 2열 유지 — 쌓으면 4:3 사진 때문에 패널이 화면 두 배로 길어진다. */
	.v2h-er__grid, .v2h-loc__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
	.v2h-loc__title { font-size: clamp(26px, 3.2vw, 34px); }
}

/* ==========================================================================
   ≤767 — mobile (Mobile.dc.html)
   ========================================================================== */
/* 768 이상 — 특화진료 3열 카드 제목을 한 줄에 맞춘다(설명 줄 수가 달라 사진 높이가 어긋나던 것). */
@media (min-width: 768px) {
	.v2h-special__grid { grid-template-rows: minmax(0, 1fr) auto; row-gap: 20px; }
	.v2h-card { grid-row: span 2; display: grid; grid-template-rows: subgrid; }
}
/* 태블릿 세로 — 좌우 분할 패널이 좁고 긴 조각이 되어 사진이 잘리던 것: 위아래로 쌓는다(패널 높이는 그대로). */
@media (min-width: 768px) and (max-width: 1099px) and (orientation: portrait) {
	.v2h-promise, .v2h-depts { flex-direction: column; }
	.v2h-promise__body { flex: 0 0 auto; gap: 40px; padding: 48px var(--v2-pad) 56px; }
	.v2h-promise__list { gap: 28px; }
	.v2h-depts__body { flex: 0 0 auto; padding: 56px var(--v2-pad) 48px; }
	.v2h-promise__media, .v2h-depts__media { flex: 1 1 auto; min-height: 300px; }
	.v2h-special__grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-rows: minmax(0, 1fr); }
	.v2h-card { grid-row: auto; display: flex; flex-direction: row; align-items: center; gap: 32px; }
	.v2h-card__media { flex: 0 0 46%; align-self: stretch; min-height: 200px; }
	.v2h-fac__photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: minmax(0, 3fr) minmax(0, 2fr); min-height: 560px; }
	.v2h-fac__fig:nth-child(2) { grid-column: 1 / -1; grid-row: 1; }
	/* 응급·오시는 길도 세로 화면에선 글 → 사진/지도 순으로 쌓는다(2열이면 지도가 330px 로 작아지고 위아래가 빈다). */
	.v2h-er__grid, .v2h-loc__grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
	.v2h-er__window { aspect-ratio: 16 / 9; }
	.v2h-loc__grid { padding-top: 56px; padding-bottom: 56px; }
	.v2h-loc__media { aspect-ratio: 16 / 10; }
}
/* 1100 이상 — 의료진 두 분을 나란히(1180×820 에서 한 줄로 쌓이면 패널이 화면보다 길어진다). */
@media (min-width: 1100px) {
	.v2h-doctors__grid { grid-template-columns: repeat(auto-fit, minmax(min(500px, 100%), 1fr)); }
}
@media (min-width: 1100px) and (max-width: 1279px) {
	.v2h-doc__photo { width: 200px; }
}
@media (max-width: 767px) {
	.v2h-d { display: none !important; }
	br.v2h-dbr { display: none; }
	.v2h-panel .v2-media img { object-position: var(--op-m, var(--op, 50% 50%)); }

	.v2-home .v2h-h2 { font-size: 28px; line-height: 1.2; }
	.v2-home .v2-label { font-size: 15px; }
	.v2h-head { gap: 10px; }

	/* 01 hero */
	.v2h-hero__video { object-position: 50% 45%; }
	.v2h-hero__shade { background: linear-gradient(0deg, rgba(10, 14, 18, .8) 0%, rgba(10, 14, 18, .4) 36%, rgba(10, 14, 18, 0) 58%); }
	.v2h-hero__shade--left { display: none; }
	.v2h-hero__in { padding-top: 40px; padding-bottom: 28px; gap: 22px; }
	.v2h-hero__copy { gap: 12px; }
	.v2h-hero__kicker { font-size: 15px; }
	.v2h-hero__title { font-size: 32px; line-height: 1.22; }
	.v2h-hero__lead { font-size: 16px; line-height: 1.6; letter-spacing: -0.01em; }
	.v2h-hero__actions { padding-top: 0; }
	.v2h-hero__book { width: 100%; justify-content: space-between; padding: 0 20px; }

	/* 02 promise */
	.v2h-promise { flex-direction: column; }
	.v2h-promise__media { flex: 1 1 auto; min-height: 300px; }
	.v2h-promise__media video { object-position: 50% 55%; }
	.v2h-promise__body { flex: 0 0 auto; justify-content: flex-start; gap: 28px; padding: 36px var(--v2-pad) 32px; }
	.v2h-promise__list { gap: 22px; }
	.v2h-promise__item { gap: 4px; }
	.v2h-promise__title { font-size: 19px; line-height: 1.35; }
	.v2h-promise__text { font-size: 15px; line-height: 1.6; }

	/* 03 doctors */
	.v2h-doctors { padding: 56px 0; }
	.v2h-doctors__in { gap: 40px; }
	.v2h-doctors__head { display: contents; }
	.v2h-doctors__grid { order: 2; gap: 32px; }
	.v2h-doctors .v2h-more { order: 3; align-self: flex-start; }
	.v2h-doc { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 20px; align-items: start; }
	.v2h-doc__photo { width: 120px; font-size: 12px; }
	.v2h-doc__body { gap: 8px; padding-bottom: 0; }
	.v2h-doc__id { flex-direction: row-reverse; justify-content: flex-end; align-items: baseline; gap: 8px; }
	.v2h-doc__name { font-size: 26px; }
	.v2h-doc__fields { font-size: 14px; line-height: 1.5; }
	.v2-home .v2h-doc__quote { margin-top: 0; padding-top: 6px; font-size: 15px; line-height: 1.65; }

	/* 04 departments */
	.v2h-depts { flex-direction: column; }
	.v2h-depts__body { flex: 0 0 auto; gap: 36px; padding: 32px var(--v2-pad); }
	.v2h-depts__list { column-gap: 24px; }
	.v2h-depts__list a { padding: 20px 0; font-size: 19px; }
	.v2h-depts__media { flex: 1 0 220px; min-height: 220px; }

	/* 05 specialties */
	.v2h-special__head { padding-top: 44px; padding-bottom: 22px; }
	.v2h-special__grid { display: flex; flex-direction: column; gap: 18px; padding-bottom: 36px; }
	.v2h-card { flex: 1 0 auto; gap: 10px; }
	.v2h-card__media { min-height: 132px; }
	.v2h-card__text { gap: 2px; }
	.v2h-card__title { font-size: 19px; }
	.v2h-card__title .v2-ico { display: block; }
	.v2h-card__desc { font-size: 14px; line-height: 1.55; }

	/* 06 24h */
	.v2h-er { padding: 40px 0; }
	.v2h-er__grid { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
	.v2h-er__text { display: contents; }
	.v2h-er__copy { order: 1; gap: 14px; }
	.v2h-er .v2h-h2 { line-height: 1.25; }
	.v2h-er__lead { font-size: 15px; line-height: 1.6; }
	.v2h-er__phone { margin-top: 6px; gap: 14px; }
	.v2h-er__dot { width: 12px; height: 12px; }
	.v2h-er__num { font-size: 34px; letter-spacing: -0.02em; }
	.v2h-er__window { order: 2; margin-top: 32px; width: 100%; }
	.v2h-er__actions { order: 3; margin-top: 20px; padding-top: 0; }
	.v2h-er__guide { width: 100%; justify-content: space-between; padding: 0 20px; }

	/* 07 facilities */
	.v2h-fac__head { padding-top: 52px; padding-bottom: 28px; }
	.v2h-fac__photos { flex-direction: column; min-height: 0; }
	.v2h-fac__fig { flex: 240 1 0; min-height: 200px; }
	.v2h-fac__fig:nth-child(2) { flex-grow: 200; min-height: 170px; }
	.v2h-fac__fig:nth-child(3) { flex-grow: 261; min-height: 210px; }
	.v2h-chip { left: 16px; top: 16px; bottom: auto; padding: 6px 12px; font-size: 14px; }

	/* 08 location */
	.v2h-loc { flex-direction: column; align-items: stretch; }
	.v2h-loc__grid { flex: 1 1 auto; display: flex; flex-direction: column; align-items: stretch; gap: 0; padding-top: 56px; padding-bottom: 0; }
	.v2h-loc__copy { gap: 16px; }
	.v2h-loc .v2h-head { gap: 12px; }
	.v2h-loc__title { font-size: 24px; line-height: 1.35; }
	.v2h-loc__addr { font-size: 16px; line-height: 1.6; }
	.v2h-loc__transit { gap: 2px; font-size: 15px; line-height: 1.6; }
	.v2h-loc__media { flex: 1 0 auto; aspect-ratio: auto; min-height: 56.25vw; margin: 28px calc(-1 * var(--v2-pad)) 0; }
}
