@charset "UTF-8";
/* =====================================================================
   조직도 (위원회 / 지원단) - 관리자 '기타 페이지' HTML(.org-chart) 전용 스타일
   - CMS HTML: 클래스만 사용 (style/script 없음). 연결선은 모두 여기서 그린다.
   - 모바일(≤768px): Figma 350px 기준 / PC: 최대 1000px 로 확대
   - 칸 수가 바뀌어도(국/팀 추가) 연결선이 따라가도록 li 단위로 선을 그린다.
   ===================================================================== */
.org-chart {
    --org-line: #B6B9BD;
    --org-grad-blue: linear-gradient(90deg, #0166FE 0%, #7F6DEB 100%);
    --org-grad-pink: linear-gradient(90deg, #C877CF 0%, #7965F2 100%);
    --org-blue: #0966FD;
    --org-dark: #222222;
    --org-curve: 12px;
    /* 모바일 기본값 (Figma) */
    --head-w: 300px; --head-h: 50px; --head-pad: 5px; --head-fs: 16px;
    --vice-w: 300px; --vice-pad: 5px; --vice-fs: 16px; --vice-desc-fs: 12px; --vice-desc-h: 50px; --vice-radius: 10px;
    --gap-head-vice: 40px;
    --side-w: 350px; --side-gap: 50px; --side-row: 20px; --side-h: 60px; --side-fs: 16px; --side-sub-fs: 12px;
    --gap-vice-side: 50px;
    --unit-gap: 10px; --unit-pad: 5px; --unit-fs: 16px; --unit-desc-fs: 12px; --unit-desc-h: 50px; --unit-radius: 10px;
    --gap-side-unit: 70px; --drop: 28px;
    --bg-pos: center 101px; --bg-size: 100% auto;

    position: relative;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 0;
    color: #fff;
    text-align: center;
    word-break: keep-all;
    overflow-wrap: break-word;
    font-family: "SUIT", sans-serif;
    background: url(/doc/images/sub/org_bg_logo.webp) no-repeat;
    background-position: var(--bg-pos);
    background-size: var(--bg-size);
}
.org-chart ul, .org-chart li { list-style: none; margin: 0; padding: 0; }
.org-chart p { margin: 0; }
.org-chart strong { font-weight: 700; }
.org-chart .org-title {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 최상단 (위원장 / 지원단장): 그라데이션 + 안쪽 반투명 ---------- */
.org-chart .org-head {
    position: relative;
    z-index: 1;
    width: var(--head-w);
    max-width: 100%;
    margin: 0 auto;
    padding: var(--head-pad);
    border-radius: 999px;
    background: var(--org-grad-blue);
}
.org-chart .org-head strong {
    display: flex; align-items: center; justify-content: center;
    min-height: calc(var(--head-h) - var(--head-pad) * 2);
    padding: 4px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .2);
    font-size: var(--head-fs);
    line-height: 1.3;
}

/* ---------- 부위원장 ---------- */
.org-chart .org-vice {
    position: relative;
    z-index: 1;
    display: flex; flex-direction: column; gap: 5px;
    width: var(--vice-w);
    max-width: 100%;
    margin: var(--gap-head-vice) auto 0;
    padding: var(--vice-pad);
    border-radius: var(--vice-radius);
    background: var(--org-grad-pink);
}
.org-chart .org-vice::before {
    content: ""; position: absolute; left: 50%; bottom: 100%;
    height: var(--gap-head-vice); border-left: 1px solid var(--org-line);
}
.org-chart .org-vice > strong { display: block; padding: 5px 0; font-size: var(--vice-fs); line-height: 1.3; }
.org-chart .org-vice > p {
    display: flex; align-items: center; justify-content: center;
    min-height: var(--vice-desc-h);
    padding: 6px 10px;
    border-radius: calc(var(--vice-radius) / 2);
    background: rgba(255, 255, 255, .2);
    font-size: var(--vice-desc-fs); font-weight: 700; line-height: 1.42;
}

/* ---------- 좌우 (지원단·자문단 / 간사위원·CAIO 협의회) ---------- */
.org-chart .org-side {
    position: relative;
    display: flex; justify-content: space-between; align-items: flex-start;
    width: var(--side-w);
    max-width: 100%;
    margin: 0 auto;
    padding-top: var(--gap-vice-side);
}
.org-chart .org-side::before {           /* 가운데 세로선 */
    content: ""; position: absolute; left: 50%; top: 0; bottom: 0;
    border-left: 1px solid var(--org-line);
}
.org-chart .org-side > ul {
    display: flex; flex-direction: column; gap: var(--side-row);
    width: calc((100% - var(--side-gap)) / 2);
}
.org-chart .org-side li {
    position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: var(--side-h);
    padding: 6px 16px;
    border-radius: calc(var(--side-h) / 2);
    background: var(--org-dark);
}
.org-chart .org-side li strong { font-size: var(--side-fs); line-height: 1.3; }
.org-chart .org-side li span {
    display: block; margin-top: 1px;
    color: rgba(255, 255, 255, .5);
    font-size: var(--side-sub-fs); font-weight: 400; line-height: 1.42;
}
/* 왼쪽 칸: 모두 가운데 선에서 곡선으로 연결 */
.org-chart .org-side-left li::after {
    content: ""; position: absolute; left: 100%; bottom: 50%;
    width: calc(var(--side-gap) / 2 + 1px); height: var(--org-curve);
    border-right: 1px solid var(--org-line); border-bottom: 1px solid var(--org-line);
    border-bottom-right-radius: var(--org-curve);
}
/* 오른쪽 칸: 첫 칸만 가운데 선과 연결, 나머지는 바로 위 칸 아래로 이어짐 */
.org-chart .org-side-right li:first-child::after {
    content: ""; position: absolute; right: 100%; bottom: 50%;
    width: calc(var(--side-gap) / 2); height: var(--org-curve);
    border-left: 1px solid var(--org-line); border-bottom: 1px solid var(--org-line);
    border-bottom-left-radius: var(--org-curve);
}
.org-chart .org-side-right li + li::before {
    content: ""; position: absolute; left: 50%; bottom: 100%;
    height: var(--side-row); border-left: 1px solid var(--org-line);
}

/* ---------- 아래 칸 (분과위원회/TF/특별위원회, 국 목록) 공통 연결선 ---------- */
.org-chart .org-units,
.org-chart .org-bureaus {
    position: relative;
    display: flex; align-items: stretch; gap: var(--unit-gap);
}
.org-chart .org-units { padding-top: var(--gap-side-unit); }
.org-chart .org-bureaus { padding-top: var(--gap-head-bureau); }
.org-chart .org-units::after,
.org-chart .org-bureaus::after {          /* 위에서 내려오는 가운데 줄기 */
    content: ""; position: absolute; left: 50%; top: 0;
    height: calc(var(--gap-side-unit) - var(--drop));
    border-left: 1px solid var(--org-line);
}
.org-chart .org-bureaus::after { height: calc(var(--gap-head-bureau) - var(--drop)); }
.org-chart .org-units > li,
.org-chart .org-bureaus > li {
    position: relative;
    flex: 1 1 0; min-width: 0;
}
.org-chart .org-units > li::before,
.org-chart .org-bureaus > li::before {     /* 가로선 + 각 칸으로 내려가는 선 */
    content: ""; position: absolute; bottom: 100%;
    left: calc(var(--unit-gap) / -2 - 1px); right: calc(var(--unit-gap) / -2);
    height: var(--drop);
    border-top: 1px solid var(--org-line);
}
.org-chart .org-units > li:first-child::before,
.org-chart .org-bureaus > li:first-child::before {
    left: 50%; border-left: 1px solid var(--org-line); border-top-left-radius: var(--org-curve);
}
.org-chart .org-units > li:last-child::before,
.org-chart .org-bureaus > li:last-child::before {
    right: calc(50% - 1px); border-right: 1px solid var(--org-line); border-top-right-radius: var(--org-curve);
}
.org-chart .org-units > li:only-child::before,
.org-chart .org-bureaus > li:only-child::before { border-top: 0; border-radius: 0; }
.org-chart .org-units > li:not(:first-child):not(:last-child)::after,
.org-chart .org-bureaus > li:not(:first-child):not(:last-child)::after {
    content: ""; position: absolute; left: 50%; bottom: 100%;
    height: var(--drop); border-left: 1px solid var(--org-line);
}

/* 분과위원회/TF/특별위원회 */
.org-chart .org-units > li {
    display: flex; flex-direction: column; gap: 5px;
    padding: var(--unit-pad);
    border-radius: var(--unit-radius);
    background: var(--org-blue);
}
.org-chart .org-units > li > strong { display: block; padding: 10px 0; font-size: var(--unit-fs); line-height: 1.3; }
.org-chart .org-units > li > p {
    flex: 1;
    display: flex; align-items: center; justify-content: center;
    min-height: var(--unit-desc-h);
    padding: 6px 3px;
    letter-spacing: -0.02em;
    border-radius: calc(var(--unit-radius) / 2);
    background: rgba(255, 255, 255, .2);
    font-size: var(--unit-desc-fs); font-weight: 700; line-height: 1.42;
}

/* ---------- 지원단 ---------- */
.org-chart.org-secretariat {
    --head-w: 260px;
    --gap-head-bureau: 60px; --drop: 30px;
    --bureau-h: 50px; --bureau-fs: 16px;
    --team-gap: 30px; --team-h: 50px; --team-fs: 12px; --team-pad: 5px;
    --bg-pos: center 5px;
}
.org-chart .org-bureaus > li { display: flex; flex-direction: column; }
.org-chart .org-bureaus > li > strong {      /* 국: 그라데이션 알약 + 안쪽 반투명 */
    position: relative; z-index: 0;
    display: flex; align-items: center; justify-content: center;
    min-height: var(--bureau-h);
    padding: 8px 12px;
    border-radius: calc(var(--bureau-h) / 2);
    background: var(--org-grad-pink);
    font-size: var(--bureau-fs); line-height: 1.3;
}
.org-chart .org-bureaus > li > strong::before {
    content: ""; position: absolute; z-index: -1; inset: var(--team-pad);
    border-radius: inherit;
    background: rgba(255, 255, 255, .2);
}
.org-chart .org-teams {                      /* 팀 묶음: 파란 상자 (높이는 가장 긴 칸에 맞춤) */
    position: relative;
    flex: 1;
    display: flex; flex-direction: column; gap: 5px;
    margin-top: var(--team-gap);
    padding: var(--team-pad);
    border-radius: 10px;
    background: var(--org-blue);
}
.org-chart .org-teams::before {
    content: ""; position: absolute; left: 50%; bottom: 100%;
    height: var(--team-gap); border-left: 1px solid var(--org-line);
}
.org-chart .org-teams > li {
    display: flex; align-items: center; justify-content: center;
    min-height: var(--team-h);
    padding: 6px 8px;
    border-radius: 5px;
    background: var(--org-dark);
    font-size: var(--team-fs); font-weight: 700; line-height: 1.42;
}

/* ---------- 영문: 문장이 길어 모바일 글자 조금 작게 ---------- */
@media (max-width: 768px) {
    body.eng .org-chart { --side-sub-fs: 11px; --unit-desc-fs: 11px; --bureau-fs: 13px; --team-fs: 11px; }
    body.eng .org-chart .org-side li { padding-left: 10px; padding-right: 10px; }
    body.eng .org-chart .org-side li strong { font-size: 14px; }
    body.eng .org-chart .org-units > li > strong { font-size: 13px; }
    body.eng .org-chart { overflow-wrap: normal; }
    body.eng .org-chart .org-bureaus > li > strong { border-radius: 18px; padding: 10px 8px; }
}
@media (min-width: 769px) {
    body.eng .org-chart { --vice-w: 560px; }
}

/* ---------- PC: 확대 (시안 1000px 기준) ---------- */
@media (min-width: 769px) {
    .org-chart {
        max-width: 1000px;
        --org-curve: 20px;
        --head-w: 400px; --head-h: 100px; --head-pad: 10px; --head-fs: 20px;
        --vice-w: 400px; --vice-pad: 10px; --vice-fs: 22px; --vice-desc-fs: 16px; --vice-desc-h: 90px; --vice-radius: 20px;
        --gap-head-vice: 55px;
        --side-w: 700px; --side-gap: 200px; --side-row: 50px; --side-h: 90px; --side-fs: 22px; --side-sub-fs: 14px;
        --gap-vice-side: 50px;
        --unit-gap: 50px; --unit-pad: 10px; --unit-fs: 22px; --unit-desc-fs: 16px; --unit-desc-h: 70px; --unit-radius: 20px;
        --gap-side-unit: 145px; --drop: 60px;
        --bg-pos: center 46%; --bg-size: 86% auto;
    }
    .org-chart .org-units > li > strong { padding: 20px 0; }
    .org-chart .org-units > li > p br,
    .org-chart .org-teams br { display: none; }
    .org-chart.org-secretariat {
        --head-w: 400px;
        --gap-head-bureau: 150px; --drop: 75px;
        --unit-gap: 90px;
        --bureau-h: 100px; --bureau-fs: 20px;
        --team-gap: 80px; --team-h: 80px; --team-fs: 16px; --team-pad: 10px;
        --bg-pos: center 40%;
    }
    .org-chart .org-teams { gap: 10px; border-radius: 20px; }
    .org-chart .org-teams > li { border-radius: 10px; }
}
@media (min-width: 769px) and (max-width: 1024px) {
    .org-chart { --side-gap: 120px; --unit-gap: 30px; }
    .org-chart.org-secretariat { --unit-gap: 40px; }
}
@media (max-width: 380px) {
    body.eng .org-chart .org-units > li > strong { font-size: 12px; letter-spacing: -0.02em; }
    .org-chart { --unit-gap: 8px; }
}
