/* 첫 화면 유튜브 영상 영역 (갤러리 #con02 와 진료 분야 #con03 사이)
   - 기준 폭은 main.css 와 같다: 1400 · 1200 · 992 · 768 · 576
   - 오른쪽 퀵메뉴가 덮는 폭(1401 이상 115px · 1400~577 90px · 576 이하 45px)만큼 오른쪽을 비운다.
   - 993 이상: 목록마다 영상 3편(넷째부터는 .yt_row_extra 로 숨김)
   - 992 이하: 목록마다 영상을 옆으로 넘겨 본다(전부 보임) */

.container_yt { position: relative; padding: 0 0 320px; background-color: #fff; }
.container_yt * { box-sizing: border-box; }
.yt_inner { width: 100%; max-width: 1680px; margin: 0 auto; padding: 0 140px; }

/* 위쪽: 왼쪽 채널 소개 + 오른쪽 큰 영상 */
.yt_top { display: grid; grid-template-columns: minmax(0, 1fr) 54.5714%; column-gap: 40px; align-items: center; }
.yt_intro { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 0 0 2px; }
.yt_eyebrow { display: flex; align-items: center; gap: 12px; margin: 0; color: #00b5cd; font-size: 24px; font-weight: 700; line-height: 1.25; }
.yt_logo { display: block; flex: none; width: 34px; height: 24px; }
.yt_eyebrow_text { display: block; }
.yt_title { margin: 25px 0 0; color: #202020; font-size: 56px; font-weight: 700; line-height: 1.4; word-break: keep-all; }
.yt_title_line { display: block; }
.yt_title_point { color: #00b5cd; }
.yt_desc { margin: 33px 0 0; color: #767676; font-size: 21px; font-weight: 400; line-height: 1.6; word-break: keep-all; }
.yt_desc_line { display: block; }
.yt_btns { display: flex; flex-wrap: wrap; gap: 12px; margin: 52px 0 0; }
.yt_btn { display: inline-flex; align-items: center; justify-content: center; height: 56px; padding: 0 36px; font-size: 20px; font-weight: 700; line-height: 1; white-space: nowrap; text-decoration: none; border: 0; border-radius: 28px; transition: color 0.3s, background-color 0.3s; }
.yt_btn_fill { color: #fff; background-color: #00bcd5; }
.yt_btn_line { padding: 0 34px; color: #00bcd5; background-color: #fff; border: 2px solid #00bcd5; }
.yt_btn_fill:hover { background-color: #00a7be; }
.yt_btn_line:hover { color: #fff; background-color: #00bcd5; }

.yt_feature { min-width: 0; }
.yt_feature_thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; margin: 0; padding: 0; overflow: hidden; background-color: #000; border: 0; border-radius: 16px; cursor: pointer; appearance: none; }
.yt_feature_img { display: block; width: 100%; height: 100%; object-fit: cover; }
.yt_playbtn { position: absolute; top: 50%; left: 50%; display: flex; align-items: center; justify-content: center; width: 124px; height: 124px; margin: -62px 0 0 -62px; background-color: #01b5ce; border: 8px solid rgba(255, 255, 255, 0.88); border-radius: 50%; }
.yt_playbtn_icon { display: block; width: 46px; height: 46px; }
.yt_time { position: absolute; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; color: #fff; font-size: 14px; font-weight: 700; line-height: 1; background-color: rgba(20, 20, 20, 0.82); border-radius: 6px; }
.yt_time_big { padding: 3px 8px; font-size: 15px; line-height: 1.2; }
.yt_time_icon { display: block; width: 10px; height: 10px; }
.yt_feature_label { margin: 27px 0 0; color: #00b5cd; font-size: 17px; font-weight: 700; line-height: 1.3; }
.yt_feature_title { margin: 12px 0 0; color: #202020; font-size: 28px; font-weight: 700; line-height: 1.35; word-break: keep-all; }

/* 아래쪽: 재생목록 */
.yt_lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 80px; row-gap: 64px; align-items: start; margin: 119px 0 0; }
.yt_list { min-width: 0; }
.yt_list_head { padding: 0 0 22px; border-bottom: 2px solid #202020; }
.yt_list_name { margin: 0; color: #202020; font-size: 28px; font-weight: 700; line-height: 1.25; word-break: keep-all; }
.yt_rows { margin: 0; padding: 0; list-style: none; }
.yt_row { margin: 0; padding: 0; border-bottom: 1px solid #ebebeb; }
.yt_row_btn { display: flex; align-items: center; gap: 28px; width: 100%; margin: 0; padding: 24px 0; color: #202020; font-family: inherit; text-align: left; background-color: transparent; border: 0; cursor: pointer; appearance: none; }
.yt_row_thumb { position: relative; display: block; flex: none; width: 200px; aspect-ratio: 16 / 9; overflow: hidden; background-color: #000; border-radius: 8px; }
.yt_row_img { display: block; width: 100%; height: 100%; object-fit: cover; }
.yt_row_title { display: block; flex: 1; min-width: 0; color: #202020; font-size: 20px; font-weight: 600; line-height: 1.6; word-break: keep-all; overflow-wrap: anywhere; }
.yt_row_btn:hover .yt_row_title { color: #00a7be; }
.yt_row_extra { display: none; }

/* 영상을 누르면 뜨는 팝업
   - 어두운 배경은 .yt_pop 이 칠한다. 플레이어가 아닌 곳을 누르면 닫힌다(mainYoutube.js).
   - 상자 폭은 화면 높이에도 맞춘다. 그래도 화면이 낮아 다 안 들어가면 위에서부터 보이고 팝업 안에서 스크롤된다(margin: auto 0).
   - dvh 는 휴대폰 주소창을 뺀 실제 보이는 높이. 모르는 브라우저는 바로 앞의 vh 줄을 쓴다. */
.yt_pop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 9999; display: flex; justify-content: center; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; background-color: rgba(0, 0, 0, 0.8); }
.yt_pop[hidden] { display: none; }
.yt_pop_guard { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.yt_pop_box { position: relative; display: flex; flex-direction: column; width: calc(100vw - 240px); max-width: 1200px; margin: auto 0; }
.yt_pop_box { width: min(1200px, calc(100vw - 240px), calc((100vh - 250px) * 16 / 9)); width: min(1200px, calc(100vw - 240px), calc((100dvh - 250px) * 16 / 9)); }
.yt_pop_close { display: flex; align-items: center; justify-content: center; align-self: flex-end; width: 56px; height: 56px; margin: 0 0 20px; padding: 0; background-color: #01b5ce; border: 0; border-radius: 50%; cursor: pointer; appearance: none; }
.yt_pop_close_icon { display: block; width: 20px; height: 20px; }
.yt_pop_player { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background-color: #000; background-position: center; background-size: cover; background-repeat: no-repeat; border-radius: 16px; }
.yt_pop_iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.yt_pop_label { margin: 20px 0 0; color: #62d9e8; font-size: 15px; font-weight: 700; line-height: 1.3; }
.yt_pop_title { margin: 8px 0 0; color: #fff; font-size: 22px; font-weight: 700; line-height: 1.4; word-break: keep-all; }

/* 팝업이 열린 동안 뒤 화면을 멈춘다. 스크롤바가 사라지면서 화면이 옆으로 밀리지 않게, 스크롤바 폭(--yt_sbw, 스크립트가 잼)만큼 채운다 */
html.yt_lock, html.yt_lock body { overflow: hidden; }
html.yt_lock body { padding-right: var(--yt_sbw, 0px); }
html.yt_lock .quick_bar { margin-right: var(--yt_sbw, 0px); }

/* 키보드로 다닐 때만 보이는 테두리 (main.css 맨 앞의 초기화가 브라우저 기본 테두리를 지우므로 다시 그린다) */
.container_yt .yt_btn:focus-visible, .container_yt .yt_play:focus-visible { outline: 3px solid #007f91; outline-offset: 3px; }
.container_yt .yt_pop_close:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* aspect-ratio 를 모르는 옛 브라우저: 16:9 칸을 안쪽 여백으로 만든다 */
@supports not (aspect-ratio: 16 / 9) {
  .yt_feature_thumb::before, .yt_row_thumb::before, .yt_pop_player::before { content: ""; display: block; padding-top: 56.25%; }
  .yt_feature_img, .yt_row_img { position: absolute; top: 0; left: 0; }
}

/* ---------- 1400 이하: 퀵메뉴 버튼이 50px 로 작아짐 → 오른쪽 90px 를 덮음 ---------- */
@media screen and (max-width: 1400px) {
  .container_yt { padding: 0 0 10vw; }
  .yt_inner { padding: 0 110px; }
  .yt_top { grid-template-columns: minmax(0, 1fr) 50%; column-gap: 36px; }
  .yt_eyebrow { gap: 10px; font-size: 20px; }
  .yt_logo { width: 30px; height: 21px; }
  .yt_title { margin-top: 22px; font-size: 50px; }
  .yt_desc { margin-top: 24px; font-size: 18px; }
  .yt_btns { gap: 10px; margin-top: 36px; }
  .yt_btn { height: 50px; padding: 0 30px; font-size: 17px; border-radius: 25px; }
  .yt_playbtn { width: 104px; height: 104px; margin: -52px 0 0 -52px; border-width: 5px; }
  .yt_playbtn_icon { width: 42px; height: 42px; }
  .yt_feature_label { margin-top: 22px; font-size: 15px; }
  .yt_feature_title { font-size: 24px; }
  .yt_lists { column-gap: 56px; margin-top: 90px; }
  .yt_list_head { padding-bottom: 22px; }
  .yt_list_name { font-size: 24px; }
  .yt_row_btn { gap: 22px; padding: 20px 0; }
  .yt_row_thumb { width: 180px; }
  .yt_row_title { font-size: 18px; }
  .yt_pop_box { width: calc(100vw - 220px); }
  .yt_pop_box { width: min(1200px, calc(100vw - 220px), calc((100vh - 230px) * 16 / 9)); width: min(1200px, calc(100vw - 220px), calc((100dvh - 230px) * 16 / 9)); }
}

/* ---------- 1200 이하 ---------- */
@media screen and (max-width: 1200px) {
  .yt_top { column-gap: 32px; }
  .yt_eyebrow { gap: 8px; font-size: 18px; }
  .yt_logo { width: 27px; height: 19px; }
  .yt_title { margin-top: 18px; font-size: 40px; }
  .yt_desc { margin-top: 20px; font-size: 16px; }
  .yt_desc_line { display: inline; }
  .yt_btns { gap: 8px; margin-top: 30px; }
  .yt_btn { height: 46px; padding: 0 24px; font-size: 16px; border-radius: 23px; }
  .yt_feature_thumb { border-radius: 14px; }
  .yt_playbtn { width: 88px; height: 88px; margin: -44px 0 0 -44px; }
  .yt_playbtn_icon { width: 36px; height: 36px; }
  .yt_time { right: 9px; bottom: 9px; gap: 4px; padding: 4px 7px; font-size: 12px; border-radius: 5px; }
  .yt_time_icon { width: 8px; height: 8px; }
  .yt_time_big { right: 12px; bottom: 12px; padding: 3px 8px; font-size: 14px; border-radius: 6px; }
  .yt_feature_label { margin-top: 18px; font-size: 14px; }
  .yt_feature_title { margin-top: 6px; font-size: 20px; }
  .yt_lists { column-gap: 40px; margin-top: 72px; }
  .yt_list_head { padding-bottom: 18px; }
  .yt_list_name { font-size: 22px; }
  .yt_row_btn { gap: 18px; padding: 18px 0; }
  .yt_row_thumb { width: 150px; }
  .yt_row_title { font-size: 17px; line-height: 1.5; }
}

/* ---------- 992 이하: 소개 → 큰 영상 → 목록 순서로 한 줄로 쌓고, 목록의 영상은 옆으로 넘겨 본다 ---------- */
@media screen and (max-width: 992px) {
  .yt_inner { padding: 0 110px 0 40px; }
  .yt_top { grid-template-columns: minmax(0, 1fr); row-gap: 40px; }
  .yt_eyebrow { font-size: 17px; }
  .yt_title { font-size: 34px; }
  .yt_desc { margin-top: 16px; }
  .yt_btns { margin-top: 26px; }
  .yt_playbtn { width: 96px; height: 96px; margin: -48px 0 0 -48px; }
  .yt_playbtn_icon { width: 40px; height: 40px; }
  .yt_time { right: 14px; bottom: 14px; gap: 5px; padding: 5px 9px; font-size: 14px; border-radius: 6px; }
  .yt_time_icon { width: 10px; height: 10px; }
  .yt_time_big { right: 14px; bottom: 14px; padding: 3px 8px; font-size: 15px; }
  .yt_feature_label { margin-top: 20px; font-size: 15px; }
  .yt_feature_title { font-size: 24px; }
  .yt_lists { grid-template-columns: minmax(0, 1fr); row-gap: 44px; margin-top: 64px; }
  .yt_rows { display: flex; gap: 20px; padding: 22px 0 0; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .yt_rows::-webkit-scrollbar { display: none; }
  .yt_rows.is_dragging { scroll-snap-type: none; }
  .yt_rows.is_dragging, .yt_rows.is_dragging * { cursor: grabbing; }
  .yt_row { flex: none; width: 240px; border-bottom: 0; scroll-snap-align: start; }
  .yt_row_extra { display: block; }
  .yt_row_btn { flex-direction: column; align-items: stretch; gap: 12px; padding: 0; }
  .yt_row_thumb { width: 100%; }
  .yt_row_title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; flex: none; overflow: hidden; font-size: 17px; line-height: 1.45; }
  /* 넘기는 줄은 바깥으로 나간 것을 잘라 내므로, 키보드 테두리를 카드 바깥이 아니라 썸네일 안쪽에 그린다 */
  .container_yt .yt_row_btn:focus-visible { outline: 0; }
  .container_yt .yt_row_btn:focus-visible .yt_row_thumb::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; border: 3px solid #007f91; border-radius: inherit; box-shadow: inset 0 0 0 2px #fff; pointer-events: none; }
  .yt_pop_box { width: calc(100vw - 80px); }
  .yt_pop_box { width: min(1200px, calc(100vw - 80px), calc((100vh - 220px) * 16 / 9)); width: min(1200px, calc(100vw - 80px), calc((100dvh - 220px) * 16 / 9)); }
}

/* ---------- 768 이하 ---------- */
@media screen and (max-width: 768px) {
  .yt_inner { padding: 0 110px 0 32px; }
  .yt_top { row-gap: 32px; }
  .yt_eyebrow { font-size: 16px; }
  .yt_logo { width: 24px; height: 17px; }
  .yt_title { margin-top: 14px; font-size: 30px; }
  .yt_desc { font-size: 15px; }
  .yt_btn { height: 44px; padding: 0 22px; font-size: 15px; border-radius: 22px; }
  .yt_feature_thumb { border-radius: 12px; }
  .yt_playbtn { width: 80px; height: 80px; margin: -40px 0 0 -40px; border-width: 4px; }
  .yt_playbtn_icon { width: 33px; height: 33px; }
  .yt_time { right: 10px; bottom: 10px; padding: 4px 8px; font-size: 13px; }
  .yt_time_icon { width: 9px; height: 9px; }
  .yt_time_big { right: 12px; bottom: 12px; padding: 3px 8px; font-size: 14px; }
  .yt_feature_label { margin-top: 16px; font-size: 14px; }
  .yt_feature_title { font-size: 20px; }
  .yt_lists { row-gap: 36px; margin-top: 52px; }
  .yt_list_name { font-size: 20px; }
  .yt_rows { gap: 16px; padding-top: 18px; }
  .yt_row { width: 220px; }
  .yt_row_title { font-size: 16px; }
  .yt_pop_box { width: calc(100vw - 48px); }
  .yt_pop_box { width: min(1200px, calc(100vw - 48px), calc((100vh - 200px) * 16 / 9)); width: min(1200px, calc(100vw - 48px), calc((100dvh - 200px) * 16 / 9)); }
  .yt_pop_close { width: 48px; height: 48px; margin-bottom: 14px; }
  .yt_pop_player { border-radius: 12px; }
  .yt_pop_label { margin-top: 16px; font-size: 14px; }
  .yt_pop_title { font-size: 19px; }
}

/* ---------- 576 이하(휴대폰): 퀵메뉴 버튼 35px → 오른쪽 45px 를 덮음 ---------- */
@media screen and (max-width: 576px) {
  .container_yt { padding: 4vw 0 12vw; }
  .yt_inner { padding: 0 57px 0 20px; }
  .yt_top { row-gap: 26px; }
  .yt_eyebrow { gap: 7px; font-size: 14px; }
  .yt_logo { width: 21px; height: 15px; }
  .yt_title { margin-top: 12px; font-size: 26px; }
  .yt_desc { margin-top: 12px; font-size: 14px; line-height: 1.7; }
  .yt_btns { gap: 8px; margin-top: 22px; width: 100%; }
  .yt_btn { flex: 1 1 auto; padding: 0 14px; font-size: 14px; }
  .yt_feature_thumb { border-radius: 10px; }
  .yt_playbtn { width: 60px; height: 60px; margin: -30px 0 0 -30px; border-width: 3px; }
  .yt_playbtn_icon { width: 25px; height: 25px; }
  .yt_feature_label { margin-top: 14px; font-size: 13px; }
  .yt_feature_title { margin-top: 5px; font-size: 17px; }
  .yt_lists { row-gap: 30px; margin-top: 44px; }
  .yt_list_head { padding-bottom: 14px; }
  .yt_list_name { font-size: 18px; }
  .yt_rows { gap: 12px; padding-top: 14px; }
  .yt_row { width: 62%; min-width: 168px; max-width: 220px; }
  .yt_row_btn { gap: 9px; }
  .yt_row_thumb { border-radius: 6px; }
  .yt_row_title { font-size: 14px; }
  .yt_time { right: 5px; bottom: 5px; gap: 3px; padding: 3px 5px; font-size: 11px; border-radius: 4px; }
  .yt_time_icon { width: 7px; height: 7px; }
  .yt_time_big { right: 8px; bottom: 8px; padding: 3px 7px; font-size: 12px; border-radius: 5px; }
  .yt_pop_box { width: calc(100vw - 32px); }
  .yt_pop_box { width: min(1200px, calc(100vw - 32px), calc((100vh - 180px) * 16 / 9)); width: min(1200px, calc(100vw - 32px), calc((100dvh - 180px) * 16 / 9)); }
  .yt_pop_close { width: 44px; height: 44px; margin-bottom: 12px; }
  .yt_pop_close_icon { width: 16px; height: 16px; }
  .yt_pop_player { border-radius: 10px; }
  .yt_pop_label { margin-top: 14px; font-size: 13px; }
  .yt_pop_title { margin-top: 5px; font-size: 17px; }
}
