/* MEDUCATION K - 다국어 전환 스타일 (js/i18n.js 와 함께 사용) */

/* ── 국기 선택기 ─────────────────────────────────────────── */
.mk-lang-selector {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 10px;
    vertical-align: middle;
}
.mk-flag {
    width: 26px;
    height: 17px;
    object-fit: cover;
    cursor: pointer;
    border: 1px solid #d9dde1;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
    vertical-align: middle;
}
.mk-flag:hover,
.mk-flag:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, .2);
    outline: none;
}
.mk-flag.selected {
    border: 2px solid #ef4060;
    transform: scale(1.06);
}

/* 모바일 메뉴 안의 선택기 */
.mk-lang-selector.mk-lang-mobile {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 50px 0 0;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}
.mk-lang-mobile .mk-flag {
    width: 34px;
    height: 23px;
}
.mk-lang-mobile + .mobile_menu_list {
    margin-top: 10px;
}

/* ── 대메뉴: 외국어일 때 글자 이미지 대신 글자 메뉴 ─────────────── */
#menu .menu_list > li.gnb_menu > a {
    position: relative;
}
.gnb_i18n {
    display: none;
}
html.i18n-foreign #menu .menu_list > li.gnb_menu .gnb_i18n {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 14px;               /* 이미지 오른쪽 구분 음영은 그대로 보이게 */
    z-index: 5;
    background: #fff;
    pointer-events: none;
    text-align: center;
}
.gnb_i18n b {
    color: #ef4060;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
}
.gnb_i18n em {
    margin-top: 5px;
    color: #ef4060;
    font-size: 11px;
    font-style: normal;
    letter-spacing: .3px;
}
html[lang="en"] .gnb_i18n b {
    font-size: 17px;
}

/* 영문은 글자가 길어 교육현장 서브메뉴가 오른쪽으로 넘치지 않도록 오른쪽 정렬 */
html.i18n-foreign #menu .sub_menu .sub_menu_list .sub_menu_04 {
    left: auto;
    right: 20px;
}

/* 페이지 상단 탭 — 영문은 글자가 길어 한 줄에 들어가도록 */
html[lang="en"] #content .tab a {
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── 언어별 글꼴 ─────────────────────────────────────────── */
body.lang-cn {
    font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
}
body.lang-ja {
    font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
}

@media (max-width: 768px) {
    .top-login .mk-lang-selector {
        display: none;
    }
}
