@charset "utf-8";
/**
 * 组织架构页（page-zuzhijiagou.php）专用样式 · 方案 A：经典树状连线版 · 2026-10-16
 * ------------------------------------------------------------------
 * 复用 bc-about.css 的 Banner / 吸顶胶囊条 / 区块标题 / 深蓝收尾横幅；
 * 本文件只新增 .org-tree（树状连线图）与 .org-legend（图例）。
 * 配色与圆角、边框、阴影全部沿用站内规范：#023793 / #f7c433 / #e6ebf3 / radius 8。
 * 连线为纯 CSS：li::before/::after 拼横线 + 竖线；根 ul::before 补根节点下方竖线。
 */

/* ---------------- 树状连线图 ---------------- */
.org-tree {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    padding: 6px 0 4px;
}
.org-tree ul {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    position: relative;
    margin: 0;
    padding: 26px 0 0;
}
.org-tree ul::before {                       /* 每层 ul 顶部竖线：连接父节点与子横线 */
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 0;
    height: 26px;
    border-left: 2px solid #c3cede;
}
.org-tree li {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    position: relative;
    margin: 0;
    padding: 26px 7px 0;
    list-style: none;
}
.org-tree li::before,
.org-tree li::after {
    content: '';
    position: absolute;
    top: 0;
    right: 50%;
    width: 50%;
    height: 26px;
    border-top: 2px solid #c3cede;
}
.org-tree li::after {
    right: auto;
    left: 50%;
    border-left: 2px solid #c3cede;
}
.org-tree li:only-child::before { display: none; }
.org-tree li:only-child::after { border-top: 0; }
.org-tree li:first-child::before,
.org-tree li:last-child::after { border: 0 none; }
.org-tree li:last-child::before { border-right: 2px solid #c3cede; border-radius: 0 6px 0 0; }
.org-tree li:first-child::after { border-radius: 6px 0 0 0; }

/* ---------------- 节点样式 ---------------- */
.org-tree .node {
    position: relative;
    border-radius: 8px;
    text-align: center;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}
.org-tree .root {
    padding: 14px 34px;
    background: -webkit-linear-gradient(135deg, #023793, #1a5ac2);
    background: linear-gradient(135deg, #023793, #1a5ac2);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 2px;
    -webkit-box-shadow: 0 6px 18px rgba(2, 55, 147, .25);
    box-shadow: 0 6px 18px rgba(2, 55, 147, .25);
    white-space: nowrap;
}
.org-tree .grp {
    padding: 10px 26px;
    background: #fff;
    border: 2px solid #c9a227;
    color: #8a6a08;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
}
.org-tree .grp.blue {                        /* 内部树三大分支：蓝边蓝字 */
    border-color: #9db8d4;
    color: #023793;
}
.org-tree .co {
    min-width: 128px;
    max-width: 200px;
    padding: 11px 16px;
    background: #e8f1f8;
    border: 1px solid #9db8d4;
    color: #22314e;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    line-height: 1.6;
}
.org-tree .co.en { letter-spacing: 0; word-break: break-word; }
.org-tree .co small {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0;
    color: #5a6a85;
}
.org-tree .dep {
    min-width: 96px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #b9c6da;
    color: #22314e;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
}
.org-tree .sub {
    min-width: 88px;
    max-width: 180px;
    padding: 8px 12px;
    background: #f4f7fb;
    border: 1px dashed #b9c6da;
    color: #5a6a85;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.6;
}
.org-tree .sub2 {
    min-width: 80px;
    padding: 7px 10px;
    background: #f4f7fb;
    border: 1px dashed #cfd9e6;
    color: #7b88a1;
    font-size: 12px;
    font-weight: 400;
}

/* 分组数量徽章：仅手机端显示（方案 A 曲线主干树） */
.org-tree .gcnt { display: none; }

/* ---------------- 图例 ---------------- */
.org-legend {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 26px;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    margin-top: 28px;
    font-size: 12px;
    color: #8a97ad;
}
.org-legend i {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 7px;
    vertical-align: -2px;
    border-radius: 4px;
}
.org-legend .lg-root { background: -webkit-linear-gradient(135deg, #023793, #1a5ac2); background: linear-gradient(135deg, #023793, #1a5ac2); }
.org-legend .lg-grp { background: #fff; border: 2px solid #c9a227; }
.org-legend .lg-co { background: #e8f1f8; border: 1px solid #9db8d4; }
.org-legend .lg-sub { background: #f4f7fb; border: 1px dashed #b9c6da; }

/* ---------------- 平板（768~1024）：压缩节点与间距 ---------------- */
@media (max-width: 1024px) {
    .org-tree ul { padding-top: 20px; }
    .org-tree ul::before { height: 20px; }
    .org-tree li { padding: 20px 4px 0; }
    .org-tree li::before,
    .org-tree li::after { height: 20px; }
    .org-tree .root { padding: 12px 24px; font-size: 15px; }
    .org-tree .grp { padding: 9px 18px; font-size: 13px; }
    .org-tree .co { min-width: 110px; max-width: 160px; padding: 10px 12px; font-size: 12.5px; }
    .org-tree .dep { min-width: 84px; padding: 9px 10px; font-size: 12.5px; }
    .org-tree .sub, .org-tree .sub2 { font-size: 11.5px; }
}

/* ---------------- 手机（≤767）：方案 A 曲线主干树（2026-10-24 上线） ----------------
 * 由「通栏层级卡片」升级为「左侧主干 + 圆角曲线分支」思维导图：
 *   根卡（深蓝）→ 二级分组（浅金，带数量徽章）→ 成员公司 / 部门（浅蓝实线）→ 下属机构 / 岗位（白底虚线）
 * 每级缩进 28px，主干竖线落在 x=9，与根卡左边缘对齐；分支用 li::before 画
 * 19×22 的圆角折线拐进卡片；末项用 li:last-child::after 画与页面底色同色的
 * 6px 遮罩把主干干净截断（全部纯 CSS，无图片、无脚本）。
 * 两棵树共用：企业树 根→组→公司→机构；内部树 总经理→副总/市场/财务→部门→岗位。
 */
@media (max-width: 767px) {
    .org-tree {
        display: block;
        max-width: none;
        margin: 0;
        padding: 0 0 2px;
        font-size: 13px;
        line-height: 1.45;
    }

    /* ---- 列表与缩进：每级 28px；竖线颜色 金 → 蓝 → 虚线 ---- */
    .org-tree ul {
        display: block;
        margin: 0;
        padding: 0 0 0 28px;
        position: relative;
    }
    .org-tree ul::before {                    /* 父节点下来的主干 */
        content: '';
        position: absolute;
        top: 0;
        bottom: 12px;
        left: 9px;
        width: 2px;
        height: auto;
        border: 0 none;
        border-radius: 2px;
        background: -webkit-linear-gradient(180deg, #b9d1f0, #a9c4e7);
        background: linear-gradient(180deg, #b9d1f0, #a9c4e7);
    }
    .org-tree > ul::before {
        background: -webkit-linear-gradient(180deg, #f7c433, #f0d089);
        background: linear-gradient(180deg, #f7c433, #f0d089);
    }
    .org-tree > ul > li > ul::before {
        background: -webkit-linear-gradient(180deg, #b9d1f0, #a9c4e7);
        background: linear-gradient(180deg, #b9d1f0, #a9c4e7);
    }
    .org-tree > ul > li > ul > li > ul::before {   /* 第四级：浅灰虚线 */
        background: repeating-linear-gradient(180deg, #cbd6e4 0 5px, rgba(203, 214, 228, 0) 5px 10px);
    }

    .org-tree li {
        display: block;
        position: relative;
        margin: 0;
        padding: 0 0 7px;
        list-style: none;
    }

    /* ---- 圆角折线：从主干拐进卡片左侧（同时复位桌面横线树的所有变体） ---- */
    .org-tree li::before,
    .org-tree li:only-child::before,
    .org-tree li:first-child::before,
    .org-tree li:last-child::before {
        content: '';
        display: block;
        position: absolute;
        top: 0;
        right: auto;
        left: -19px;
        width: 19px;
        height: 22px;
        border: 0 none;
        border-width: 0 0 2px 2px;
        border-style: solid;
        border-color: #adc6e8;
        border-radius: 0 0 0 11px;
        background: none;
    }
    /* 二级分支线走金 */
    .org-tree > ul > li::before,
    .org-tree > ul > li:only-child::before,
    .org-tree > ul > li:first-child::before,
    .org-tree > ul > li:last-child::before {
        border-color: #f0d089;
    }
    /* 四级（下属岗位）走浅灰虚线 */
    .org-tree > ul > li > ul > li > ul > li::before,
    .org-tree > ul > li > ul > li > ul > li:only-child::before,
    .org-tree > ul > li > ul > li > ul > li:first-child::before,
    .org-tree > ul > li > ul > li > ul > li:last-child::before {
        border-color: #ccd8e7;
        border-left-style: dashed;
        border-bottom-style: dashed;
    }

    /* ---- 末项遮罩：把主干截断（底色 = 页面 .ab-page 的 #f4f6fa） ---- */
    .org-tree li::after,
    .org-tree li:only-child::after,
    .org-tree li:first-child::after,
    .org-tree li:last-child::after {
        content: '';
        display: none;
        position: absolute;
        top: 24px;
        bottom: -8px;
        left: -20px;
        right: auto;
        width: 6px;
        height: auto;
        border: 0 none;
        border-radius: 0;
        background: #f4f6fa;
        z-index: 0;
    }
    .org-tree li:last-child::after { display: block; }

    /* ---- 节点：整宽卡，左对齐，长名称自然换行 ---- */
    .org-tree .node {
        display: block;
        width: auto;
        max-width: none;
        min-width: 0;
        text-align: left;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
        letter-spacing: .3px;
    }

    /* 根卡：深蓝渐变；左侧留 9px，让主干正好从卡左边缘往下长 */
    .org-tree .root {
        margin-left: 9px;
        padding: 13px 14px;
        border-radius: 12px;
        background: -webkit-linear-gradient(135deg, #1259cf 0%, #023793 52%, #002a70 100%);
        background: linear-gradient(135deg, #1259cf 0%, #023793 52%, #002a70 100%);
        color: #fff;
        text-align: center;
        font-size: 14.5px;
        font-weight: 700;
        letter-spacing: .6px;
        line-height: 1.45;
        white-space: normal;
        -webkit-box-shadow: 0 10px 22px rgba(2, 55, 147, .26);
        box-shadow: 0 10px 22px rgba(2, 55, 147, .26);
    }
    .org-tree .root::after {                  /* 根卡底部长出主干，与子级竖线（x=9）对齐 */
        content: '';
        position: absolute;
        left: 0;
        bottom: -12px;
        width: 2px;
        height: 12px;
        border-radius: 2px;
        background: -webkit-linear-gradient(180deg, #f7c433, #f2d98d);
        background: linear-gradient(180deg, #f7c433, #f2d98d);
        z-index: 0;
    }

    /* 二级分组：浅金卡 + 数量徽章（内部树的三大分支同样走金，颜色由主干决定） */
    .org-tree .grp,
    .org-tree .grp.blue {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        -webkit-box-pack: justify;
        -ms-flex-pack: justify;
        justify-content: space-between;
        padding: 10px 12px;
        border: 1px solid #f0d489;
        border-radius: 10px;
        background: -webkit-linear-gradient(135deg, #fffdf4, #fdf2cc);
        background: linear-gradient(135deg, #fffdf4, #fdf2cc);
        color: #8a5f00;
        font-size: 13.5px;
        font-weight: 700;
        letter-spacing: .3px;
        line-height: 1.4;
        -webkit-box-shadow: 0 3px 9px rgba(200, 149, 26, .12);
        box-shadow: 0 3px 9px rgba(200, 149, 26, .12);
    }
    .org-tree .grp .gt {
        -webkit-box-flex: 1;
        -ms-flex: 1 1 auto;
        flex: 1 1 auto;
        min-width: 0;
    }
    .org-tree .grp .gcnt {
        display: inline-block;
        -ms-flex-negative: 0;
        flex-shrink: 0;
        margin-left: 8px;
        padding: 1px 7px;
        border-radius: 9px;
        background: #f7c433;
        color: #6b4a00;
        font-size: 10.5px;
        font-weight: 800;
        letter-spacing: 0;
        line-height: 1.5;
    }

    /* 成员公司 / 部门：浅蓝实线卡 */
    .org-tree .co,
    .org-tree .dep {
        min-width: 0;
        max-width: none;
        padding: 9px 12px;
        border: 1px solid #cfe1f9;
        border-radius: 10px;
        background: #f4f9ff;
        color: #10407f;
        font-size: 13px;
        font-weight: 600;
        letter-spacing: .2px;
        line-height: 1.5;
        -webkit-box-shadow: 0 2px 6px rgba(2, 55, 147, .05);
        box-shadow: 0 2px 6px rgba(2, 55, 147, .05);
    }
    .org-tree .co.en { letter-spacing: 0; word-break: break-word; }
    .org-tree .co small,
    .org-tree .dep small {
        display: block;
        margin-top: 3px;
        font-size: 11px;
        font-weight: 600;
        letter-spacing: .2px;
        color: #93a1b3;
    }

    /* 下属机构 / 岗位：白底虚线，弱化一级 */
    .org-tree .sub,
    .org-tree .sub2 {
        min-width: 0;
        max-width: none;
        padding: 8px 11px;
        border: 1px dashed #ccd8e7;
        border-radius: 10px;
        background: #fbfcfe;
        color: #7f8d9e;
        font-size: 12.5px;
        font-weight: 500;
        letter-spacing: 0;
        line-height: 1.5;
        -webkit-box-shadow: none;
        box-shadow: none;
    }

    /* 图例：紧凑两行，左对齐，色块与卡面对应 */
    .org-legend {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        gap: 9px 15px;
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
        -webkit-box-pack: start;
        -ms-flex-pack: start;
        justify-content: flex-start;
        margin-top: 20px;
        padding-top: 15px;
        border-top: 1px dashed #e5ecf6;
        font-size: 11.5px;
        color: #8b98a8;
    }
    .org-legend span { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; gap: 6px; }
    .org-legend i { width: 11px; height: 11px; margin-right: 0; vertical-align: 0; border-radius: 4px; }
    .org-legend .lg-root {
        border-radius: 50%;
        background: -webkit-linear-gradient(135deg, #1259cf, #002a70);
        background: linear-gradient(135deg, #1259cf, #002a70);
    }
    .org-legend .lg-grp { background: #fdf2cc; border: 1.5px solid #f7c433; }
    .org-legend .lg-co { background: #f4f9ff; border: 1.5px solid #cfe1f9; }
    .org-legend .lg-sub { background: #fff; border: 1.5px dashed #ccd8e7; border-radius: 50%; }
}

/* 超窄屏（≤339，320 老机型）：缩进与折线同步收一档，字号再降半级 */
@media (max-width: 339px) {
    .org-tree ul { padding-left: 22px; }
    .org-tree li::before,
    .org-tree li:only-child::before,
    .org-tree li:first-child::before,
    .org-tree li:last-child::before { left: -13px; width: 13px; }
    .org-tree .grp,
    .org-tree .grp.blue { font-size: 13px; }
    .org-tree .co,
    .org-tree .dep { font-size: 12.5px; }
    .org-tree .sub,
    .org-tree .sub2 { font-size: 12px; }
}
