/* 외국어 지면 전용 배치 보정 — 외국어 생성기가 외국어 지면에만 연결한다(한국어 지면은 이 파일을 읽지 않는다) */

/* 1) 진료시간표 — 칸 폭을 고르게 나누고 글자는 칸 안에서 줄바꿈 */
html:not([lang^="ko"]) .time_tb { table-layout: fixed; width: 100%; max-width: 100%; }
html:not([lang^="ko"]) .time_tb th,
html:not([lang^="ko"]) .time_tb td { padding: 0.7em 0.25em; font-size: clamp(10px, 1.4vw, 1rem); overflow-wrap: anywhere; line-height: 1.3; }
html:not([lang^="ko"]) .time_tb thead .bodyth,
html:not([lang^="ko"]) .time_tb tbody th { width: 11%; }
html:not([lang^="ko"]) .time_tb .pursquare_solid { white-space: normal !important; padding: 3px 3px; line-height: 1.25; }
@media (max-width: 640px) {
    html:not([lang^="ko"]) .time_tb th,
    html:not([lang^="ko"]) .time_tb td { padding: 8px 1px; font-size: 10px; }
    html:not([lang^="ko"]) .time_tb .pursquare_solid { font-size: 8px; padding: 2px 1px; margin-top: 3px; }
    /* 요일 이름은 한 글자씩 세워 쓴다 — 가로로는 일곱 칸이 폭 375 에 들어가지 않는다(문구는 그대로) */
    html:not([lang^="ko"]):not([lang^="zh"]):not([lang="ja"]) .time_tb thead th:not(.bodyth) { writing-mode: vertical-rl; padding: 8px 2px; vertical-align: top; text-align: start; letter-spacing: 0; }
}

/* 2) 원형 퀵버튼(769px 이상) — 글자가 칸 안에서 줄바꿈 */
@media (min-width: 769px) {
    html:not([lang^="ko"]) .quick_btn .quick_sns { gap: 2px; padding: 0 8px; }
    html:not([lang^="ko"]) .quick_btn .quick_sns .txt { display: block; max-width: 62px; font-size: 10.5px; line-height: 1.15; white-space: normal; overflow-wrap: anywhere; word-break: keep-all; text-align: center; }
    html:not([lang^="ko"]) .quick_btn .quick_sns .icon { width: 22px; height: 22px; flex: 0 0 22px; }
    html[lang="ja"] .quick_btn .quick_sns .txt,
    html[lang^="zh"] .quick_btn .quick_sns .txt { word-break: normal; }
}

/* 일본어·중국어는 글자 사이에서 줄을 바꿀 수 있어야 한다(전역 keep-all 은 한국어 어절 기준이라 긴 문장이 칸 밖으로 나간다) */
html[lang="ja"] .quick_btn .quick_sns .txt,
html[lang^="zh"] .quick_btn .quick_sns .txt { word-break: normal; overflow-wrap: anywhere; }
@media (max-width: 768px) {
    html[lang="ja"] .quick_btn .quick_sns .txt,
    html[lang^="zh"] .quick_btn .quick_sns .txt { font-size: 12px; line-height: 1.2; padding: 0 3px; }
}
html[lang="ja"] .con5 .rightbox, html[lang="ja"] .con5 .rightbox *,
html[lang^="zh"] .con5 .rightbox, html[lang^="zh"] .con5 .rightbox * { word-break: normal; }

html:not([lang^="ko"]) .btnwrap { flex-wrap: wrap; }
html:not([lang^="ko"]) .btnwrap button { max-width: 100%; }
html[lang="ja"] .btnwrap button,
html[lang^="zh"] .btnwrap button { word-break: normal; overflow-wrap: anywhere; }

/* 3) 오른쪽에서 왼쪽으로 읽는 언어 — 모바일 머리글: 로고는 오른쪽 · 메뉴 버튼은 왼쪽 */
html[dir="rtl"] .mo_header .logo_img { margin-left: 0; margin-right: 10px; }
html[dir="rtl"] .nav_btn { right: auto; left: 20px; }

/* 4) PC 머리글 — 로고와 첫 메뉴 사이를 띄우고 긴 메뉴 이름은 글자를 줄여 한 줄에 */
html:not([lang^="ko"]) .header_in { gap: 24px; }
html:not([lang^="ko"]) .header .gnb { min-width: 0; }
html[lang="ru"] .header .gnb .depth1 ul { gap: 16px; font-size: 0.875rem; }

/* 5) 오른쪽에서 왼쪽으로 읽는 언어 — 슬라이드 이전/다음 화살표 · 재생 단추를 슬라이더의 반대쪽으로 */
@media (min-width: 769px) {
    html[dir="rtl"] .con2 .slider .slick-arrow { right: auto; left: calc(-100% + 150px); }
    html[dir="rtl"] .con2 .slider-wrap.slider_d2 .s-autoplay-btn { right: auto; left: calc(-100% + 210px); }
    html[dir="rtl"] .slider_d2 .slick-arrow.slick-prev { transform: translateX(120px); }
}
@media (min-width: 769px) and (max-width: 1200px) {
    html[dir="rtl"] .con2 .slider .slick-arrow { right: auto; left: calc(-100% + 70px); }
    html[dir="rtl"] .con2 .slider-wrap.slider_d2 .s-autoplay-btn { right: auto; left: calc(-100% + 130px); }
}

/* 6) 의료진 칸 — 긴 번역문이 칸 밖으로 나가지 않게 */
html:not([lang^="ko"]) .con5 .col .subtitwrap { max-width: calc(100% - 30px); }
html:not([lang^="ko"]) .con5 .col .subtitwrap .txt1 { flex-wrap: wrap; }
html:not([lang^="ko"]) .con5 .col .subtitwrap .txt2 { flex-wrap: wrap; text-align: center; }
html:not([lang^="ko"]) .con5 .rightbox .tit { margin-right: 0; max-width: 100%; }
html:not([lang^="ko"]) .con5 .rightbox .top-tit { max-width: 100%; }
html:not([lang^="ko"]) .con5 .rightbox .top { max-width: 100%; }

/* 7) 하위 지면 윗줄(진료 안내 등 서브 메뉴) — 한 줄에 다 안 들어가면 줄을 바꾼다(1200px 이하는 원래 줄바꿈) */
@media (min-width: 1201px) {
    html:not([lang^="ko"]) .lnb ul { flex-wrap: wrap; height: auto; min-height: 80px; row-gap: 0.4em; column-gap: 1.5%; padding: 0.7em 0; }
    html:not([lang^="ko"]) .lnb li { padding: 0.3em 0.4em; }
    html:not([lang^="ko"]) .maintop { height: auto; min-height: 450px; }
    html:not([lang^="ko"]) .lnbtit { height: auto; min-height: calc(450px - 80px); }
}
