@charset "utf-8";

/* 조직도 */

/* ---------- 기존(폴백용) : JS 실패 시에만 보임 ---------- */
.org-list { position: relative; width: 1004px; margin: 0 auto; min-height: 950px; display: block; }
.org-list .general { margin-top: 130px !important; }
.org-list ul.dep3th { position: absolute; left: -313px; top: 160px; width: 1004px; z-index: 1; }
.org-list.org-replaced { display: none !important; }
 
/* =========================================
    	조직도
   ========================================= */
.org-m {
    --org-primary-70: #083891;
    --org-primary-50: #256ef4;
    --org-gray-90: #1e2124;
    --org-gray-60: #58616a;
    --org-gray-30: #b1b8be;
    --org-gray-10: #e6e8ea;
    --org-gray-5:  #f4f5f6;
    --org-radius: 6px;
 
    max-width: 1004px;
    margin: 20px auto 56px;
    padding: 0 8px;
    font-size: 14px;
    line-height: 1.4;
    color: var(--org-gray-90);
    -webkit-tap-highlight-color: transparent;
}
.org-m * { box-sizing: border-box; }
.org-m a { color: inherit; text-decoration: none; }
.org-m ul { margin: 0; padding: 0; list-style: none; }
.org-m a:focus-visible {
    outline: 3px solid var(--org-primary-50);
    outline-offset: 2px;
}
 
/* ---- 1단: 부위원장 · 위원장 · 상임위원/비상임위원 (연결선 없음) ---- */
.org-m-top {
    display: grid;
    grid-template-columns: 1fr 160px 1fr;
    gap: 12px;
    align-items: center;
    max-width: 840px;
    margin: 0 auto;
}
.org-m-left  { display: grid; gap: 6px; justify-items: end; }
.org-m-left .org-m-card,
.org-m-right .org-m-card { width: 160px; min-height: 44px; font-size: 15px; }   /* 사무처장 박스와 같은 크기 */
.org-m-right { display: grid; grid-template-columns: repeat(2, 160px); gap: 8px; justify-content: start; }
 
.org-m-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 8px;
    font-size: 17px;
    font-weight: 700;
    color: #fff !important;
    background: var(--org-primary-70);
    border-radius: var(--org-radius);
}
 
.org-m-card {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 4px 8px;
    text-align: center;
    font-weight: 600;
    color: var(--org-gray-90) !important;
    background: #fff;
    border: 1px solid var(--org-gray-30);
    border-radius: var(--org-radius);
}
a.org-m-card:hover { background: var(--org-gray-5); }
.org-m-card.is-plain { color: var(--org-gray-60) !important; background: var(--org-gray-5); }
 
/* 위원장 -> 아래 단 연결선 */
.org-m-vline { position: relative; width: 100%; height: 20px; }
.org-m-vline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: var(--org-gray-30);
}
 
/* ---- 2단: 대변인 · 사무처장 · 방송미디어통신사무소 ---- */
.org-m-sub {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding-top: 20px;
    align-items: stretch;
    max-width: 600px;
    margin: 0 auto;
}
.org-m-sub::before {                       /* 가로 연결선 */
    content: "";
    position: absolute;
    top: 0;
    left: calc((100% - 24px) / 6);
    right: calc((100% - 24px) / 6);
    height: 1px;
    background: var(--org-gray-30);
}
.org-m-slot { position: relative; display: flex; flex-direction: column; min-width: 0; }
.org-m-slot::before {                      /* 각 칸 위 세로선 */
    content: "";
    position: absolute;
    top: -20px;
    left: 50%;
    width: 1px;
    height: 20px;
    background: var(--org-gray-30);
}
.org-m-slot.is-l, .org-m-slot.is-r { align-self: start; width: 100%; }
.org-m-vwrap { position: relative; flex: 1; min-height: 20px; width: 100%; }
.org-m-vwrap::before {                     /* 사무처장 아래 세로선 */
    content: "";
    position: absolute;
    top: 0;
    bottom: -48px;                         /* 간격(28px) + 국 위 여백(20px)까지 한 줄로 */
    left: 50%;
    width: 1px;
    background: var(--org-gray-30);
}
.org-m-col:nth-child(3)::before { display: none; }   /* 국 5칸의 가운데 칸: 사무처장 선이 직접 연결 */
.org-m-extra { margin-top: 8px; }   /* 기획조정관 아래 따로 놓는 박스 */
 
.org-m-chief {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 160px;
    min-height: 44px;
    margin: 0 auto;
    padding: 8px 12px;
    font-size: 16px;
    font-weight: 700;
    color: var(--org-primary-70) !important;
    background: #fff;
    border: 2px solid var(--org-primary-70);
    border-radius: var(--org-radius);
}
 
.org-m-office {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 12px;
    font-weight: 600;
    color: var(--org-gray-90) !important;
    background: #fff;
    border: 1px solid var(--org-gray-30);
    border-radius: var(--org-radius);
}
a.org-m-office:hover { background: var(--org-gray-5); }
 
/* 대변인 · 방송미디어통신사무소 박스 폭 제한 (칸 중앙 정렬) */
.org-m-slot.is-l .org-m-acc,
.org-m-slot.is-r .org-m-office { width: 100%; max-width: 180px; margin: 0 auto; }
 
.org-m-label { display: none; }
 
/* ---- 3단: 국 6칸 (5개 국 + 운영지원·감사) 한 줄, 선으로 연결 ---- */
.org-m-cols {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-top: 28px;
    padding-top: 20px;
    align-items: start;
}
.org-m-cols::before {                      /* 가로 연결선 (1번째 칸 중앙 ~ 6번째 칸 중앙) */
    content: "";
    position: absolute;
    top: 0;
    left: calc((100% - 32px) / 10);
    right: calc((100% - 32px) / 10);
    height: 1px;
    background: var(--org-gray-30);
}
.org-m-col { position: relative; min-width: 0; }
.org-m-col .org-m-acc + .org-m-acc { margin-top: 8px; }   /* 국 박스 아래 시장조사심의관 박스 */
.org-m-col::before {                       /* 각 국 위 세로선 */
    content: "";
    position: absolute;
    top: -20px;
    left: 50%;
    width: 1px;
    height: 20px;
    background: var(--org-gray-30);
}
 
/* ---- 카드 공통 ---- */
.org-m-acc {
    background: #fff;
    border: 1px solid var(--org-gray-30);
    border-radius: var(--org-radius);
    overflow: hidden;
}
 
.org-m-acc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    padding: 6px 8px;
    text-align: center;
    color: var(--org-gray-90);
    background: var(--org-gray-5);
    border-bottom: 1px solid var(--org-gray-30);
}
a.org-m-acc-btn:hover { background: var(--org-gray-10); }
.org-m-acc-name { font-size: 15px; font-weight: 700; word-break: keep-all; }
 
.org-m-panel li { border-top: 1px solid var(--org-gray-10); }
.org-m-panel li:first-child { border-top: 0; }
.org-m-panel li a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 6px 8px;
    text-align: center;
    word-break: keep-all;
}
.org-m-panel li a:hover { background: var(--org-gray-5); }
 
/* ---- 중간 폭 (선 없이 3열) ---- */
@media screen and (max-width: 980px) {
    .org-m-top { grid-template-columns: 1fr 160px 1fr; gap: 12px; }
    .org-m-right { grid-template-columns: 160px; }
    .org-m-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-top: 16px; }
    .org-m-cols::before, .org-m-col::before { display: none; }
    .org-m-vwrap::before { bottom: 0; }
    .org-m-cols { margin-top: 16px; }
}
 
/* =========================================
   모바일 (768px 이하): 1열, 전부 펼침
   ========================================= */
@media screen and (max-width: 768px) {
    .org-m { margin: 8px auto 48px; font-size: 15px; }
 
    .org-m-top { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .org-m-left, .org-m-right { display: contents; }
    .org-m-hero { order: -1; grid-column: 1 / -1; min-height: 56px; font-size: 18px; }
    .org-m-card { padding: 8px 4px; min-height: 44px; }
 
    .org-m-vline, .org-m-vdown, .org-m-sub::before, .org-m-slot::before, .org-m-cols::after { display: none; }
    .org-m-top, .org-m-sub { max-width: none; }
    .org-m-vwrap { min-height: 0; }
    .org-m-vwrap::before, .org-m-direct::before { display: none; }
    .org-m-direct { position: static; width: auto; margin-top: 10px; }
    .org-m-left .org-m-card,
    .org-m-right .org-m-card { width: auto; }
    .org-m-slot.is-l .org-m-acc,
    .org-m-slot.is-r .org-m-office { max-width: none; }
 
    .org-m-sub { display: flex; flex-direction: column; padding-top: 0; gap: 0; }
    .org-m-slot.is-l { order: 1; }
    .org-m-slot.is-r { order: 2; margin-top: 8px; }
    .org-m-slot.is-c { order: 3; }
 
    .org-m-label {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 24px 0 8px;
        font-size: 15px;
        font-weight: 700;
    }
    .org-m-label::after { content: ""; flex: 1; height: 1px; background: var(--org-gray-10); }
 
    .org-m-chief { max-width: none; justify-content: space-between; min-height: 48px; }
    .org-m-chief::after { content: "›"; font-size: 22px; line-height: 1; }
 
    .org-m-cols { display: block; padding-top: 0; margin-top: 12px; }
    .org-m-col { margin-bottom: 10px; }
 
    .org-m-acc-btn { justify-content: flex-start; text-align: left; min-height: 50px; padding: 0 16px; }
    .org-m-acc-name { font-size: 16px; }
    a.org-m-acc-btn::after { content: "›"; margin-left: auto; font-size: 20px; color: var(--org-gray-60); }
 
    .org-m-panel li a { justify-content: flex-start; text-align: left; min-height: 46px; padding: 8px 16px; }
    .org-m-panel li a::after { content: "›"; margin-left: auto; padding-left: 8px; font-size: 18px; color: var(--org-gray-30); }
 
    /* 사무처장 직속(운영지원·감사) 카드에 제목 표시 */
    .org-m-acc.is-direct::before {
        content: "사무처 직속";
        display: flex;
        align-items: center;
        min-height: 50px;
        padding: 0 16px;
        font-size: 16px;
        font-weight: 700;
        background: var(--org-gray-5);
        border-bottom: 1px solid var(--org-gray-30);
    }
}
 