@charset "utf-8";

/* ==========================================================================
   (주)월드디엔씨 조직도 (Organization Chart)
   ========================================================================== */

/* Title Section */
.gw-sub-title,
.sub-org-title {
    font-family: 'Cormorant', 'Cinzel', 'Playfair Display', serif;
    font-size: var(--main-title02);
    font-weight: 700;
    color: #222;
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

.gw-sub-text,
.sub-org-desc {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #666;
    text-align: center;
    line-height: 1.6;
}

/* Tree Container */
.org-tree-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 780px;
    margin: 0 auto;
    padding: 20px 0 50px;
}

/* Common Node Style */
.org-node {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    user-select: none;
}

.org-node:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* Level 1: CEO */
.org-ceo-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.ceo-node {
    width: 122px;
    height: 122px;
    background-color: #866B4E;
    color: #fff;
    box-shadow: 0 4px 20px rgba(134, 107, 78, 0.2);
}

.ceo-text {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: #ffffff;
}

/* Line connecting CEO to Branch Bar */
.tree-line-stem {
    width: 2px;
    height: 40px;
    background-color: #866B4E;
    margin: 0 auto;
}

/* Level 2: Department Section */
.org-dept-wrap {
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Branch horizontal bar with rounded corners for Left (경영지원부) & Right (연구전담부서) */
.org-dept-wrap .tree-line-branch {
    position: absolute;
    top: 0;
    /* Spans from center of 1st circle (10%) to center of 5th circle (90%) */
    left: 10%;
    right: 10%;
    height: 40px;
    border-top: 2px solid #866B4E;
    border-left: 2px solid #866B4E;
    border-right: 2px solid #866B4E;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    box-sizing: border-box;
    pointer-events: none;
    z-index: 1;
}

/* Department Items List */
.org-dept-list {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    position: relative;
    z-index: 2;
}

.dept-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 20%;
}

/* Vertical drop line to middle department circles (설계디자인부, 생산관리부, 영업부) */
.tree-line-drop {
    width: 2px;
    height: 40px;
    background-color: #866B4E;
    margin: 0 auto;
}

/* dept-1 and dept-5 use the rounded outer borders of tree-line-branch */
.dept-item.dept-1 .tree-line-drop,
.dept-item.dept-5 .tree-line-drop {
    visibility: hidden;
}

/* Department Node (Circle) */
.dept-node {
    width: 106px;
    height: 106px;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    color: #2E221A;
    letter-spacing: -0.02em;
}

/* Department Tone-on-tone Background Colors */
.dept-1 .dept-node {
    background-color: #D4C4B5;
}

.dept-2 .dept-node {
    background-color: #EFE6DC;
}

.dept-3 .dept-node {
    background-color: #D8C9BC;
}

.dept-4 .dept-node {
    background-color: #F3ECE3;
}

.dept-5 .dept-node {
    background-color: #D0BFB1;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

/* Laptop / Small Desktop (901px ~ 1100px) */
@media screen and (max-width: 1100px) {
    .gw-sub-title,
    .sub-org-title {
        font-size: 38px;
    }

    .org-tree-container {
        max-width: 780px;
    }

    .ceo-node {
        width: 120px;
        height: 120px;
    }

    .ceo-text {
        font-size: 20px;
    }

    .dept-node {
        width: 106px;
        height: 106px;
        font-size: 15px;
    }

    .tree-line-stem,
    .tree-line-drop,
    .org-dept-wrap .tree-line-branch {
        height: 42px;
    }

    .org-dept-wrap .tree-line-branch {
        border-top-left-radius: 18px;
        border-top-right-radius: 18px;
    }
}

/* Tablet (701px ~ 900px) */
@media screen and (max-width: 900px) {
    .gw-sub-title,
    .sub-org-title {
        font-size: 32px;
        margin-bottom: 14px;
    }

    .org-tree-container {
        max-width: 100%;
        padding: 15px 10px 40px;
    }

    .ceo-node {
        width: 104px;
        height: 104px;
    }

    .ceo-text {
        font-size: 18px;
    }

    .dept-node {
        width: 92px;
        height: 92px;
        font-size: 13px;
    }

    .tree-line-stem,
    .tree-line-drop,
    .org-dept-wrap .tree-line-branch {
        height: 35px;
    }

    .org-dept-wrap .tree-line-branch {
        border-top-left-radius: 14px;
        border-top-right-radius: 14px;
    }
}

/* Mobile (<= 700px) */
@media screen and (max-width: 700px) {
    .gw-mb-80 {
        margin-bottom: 35px !important;
    }

    .gw-sub-title,
    .sub-org-title {
        font-size: 26px;
        margin-bottom: 10px;
    }

    .gw-sub-text,
    .sub-org-desc {
        font-size: 14px;
        padding: 0 15px;
        word-break: keep-all;
    }

    .org-tree-container {
        padding: 10px 15px 20px;
    }

    /* CEO Node in Mobile */
    .ceo-node {
        width: 96px;
        height: 96px;
        box-shadow: 0 4px 15px rgba(134, 107, 78, 0.25);
    }

    .ceo-text {
        font-size: 17px;
    }

    .tree-line-stem {
        height: 24px;
    }

    /* Hide desktop horizontal branch bridge on mobile */
    .org-dept-wrap .tree-line-branch {
        display: none;
    }

    /* Mobile Department Flow: Continuous Connected Vertical Tree */
    .org-dept-list {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 0;
    }

    .dept-item {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Show connecting lines between all department circles in mobile */
    .tree-line-drop,
    .dept-item.dept-1 .tree-line-drop,
    .dept-item.dept-5 .tree-line-drop {
        display: block !important;
        visibility: visible !important;
        width: 2px;
        height: 24px;
        background-color: #866B4E;
    }

    .dept-node {
        width: 96px;
        height: 96px;
        font-size: 14px;
        line-height: 1.35;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    }
}