/* =====================================================
   organization.css  ─  조직도 페이지 전용 스타일
   common.css 로드 후 이 파일을 추가로 로드합니다.
   ===================================================== */


/* ─── 조직도 섹션 ─────────────────────────────────── */
#org-section {
  padding: 100px 0 140px;
  background: var(--white);
}

.org-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

/* 섹션 헤더 */
.org-sec-header {
  text-align: center;
  margin-bottom: 72px;
}
.org-sec-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px; font-weight: 600;
  letter-spacing: 4px; color: var(--accent);
  margin-bottom: 12px;
}
.org-headline {
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 700; line-height: 1.25;
  color: var(--navy);
}
.org-headline em { color: var(--blue); font-style: normal; }
.org-divider {
  width: 48px; height: 3px;
  background: var(--accent);
  margin: 20px auto 24px;
}
.org-desc {
  font-size: 15px; line-height: 1.9;
  color: var(--text-sub);
  word-break: keep-all;
}


/* ─── 조직도 차트 레이아웃 ───────────────────────── */
.org-chart-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  animation: fadeUp 0.8s 0.1s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ─── 노드 공통 스타일 ───────────────────────────── */
.org-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  transition: transform 0.25s, box-shadow 0.25s;
}
.org-node:hover {
  transform: translateY(-4px);
}

/* 대표이사 노드 */
.node-ceo {
  width: 160px;
  padding: 22px 16px 18px;
  background: var(--navy);
  border-bottom: 4px solid var(--accent);
  box-shadow: 0 8px 32px rgba(26,58,107,0.22);
}
.node-ceo:hover {
  box-shadow: 0 16px 40px rgba(26,58,107,0.32);
}
.node-ceo .node-icon {
  font-size: 28px;
  margin-bottom: 8px;
  opacity: 0.85;
}
.node-ceo .node-title {
  font-size: 16px; font-weight: 700;
  color: var(--white); letter-spacing: 1px;
}
.node-ceo .node-sub {
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px; font-weight: 600;
  letter-spacing: 3px;
  color: var(--accent);
  margin-top: 4px;
}

/* 부서(팀) 노드 */
.node-dept {
  width: 148px;
  padding: 18px 12px 16px;
  background: var(--white);
  border: 2px solid var(--navy);
  border-top: 4px solid var(--accent);
  box-shadow: 0 4px 20px rgba(37,99,200,0.10);
}
.node-dept:hover {
  box-shadow: 0 10px 30px rgba(37,99,200,0.18);
  border-color: var(--blue);
}
.node-dept .node-dept-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 9px; font-weight: 700;
  letter-spacing: 3px;
  color: var(--accent);
  margin-bottom: 6px;
}
.node-dept .node-title {
  font-size: 16px; font-weight: 700;
  color: var(--navy);
}

/* 팀 노드 (하위) */
.node-team {
  width: 130px;
  padding: 14px 10px 12px;
  background: var(--light);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
}
.node-team:hover {
  background: var(--blue-pale);
  border-color: var(--blue);
  box-shadow: 0 4px 16px rgba(37,99,200,0.12);
}
.node-team .node-title {
  font-size: 14px; font-weight: 700;
  color: var(--navy);
}
.node-team .node-sub {
  font-family: 'Rajdhani', sans-serif;
  font-size: 9px; font-weight: 600;
  letter-spacing: 2px;
  color: var(--steel);
  margin-top: 4px;
}


/* ─── 연결선 스타일 ──────────────────────────────── */

/* 대표이사 → 수직선 */
.org-vline-top {
  width: 2px;
  height: 36px;
  background: var(--navy);
}

/* 수평 분기선 (전체 폭) */
.org-hline-wrap {
  width: 720px;
  display: flex;
  justify-content: center;
}
.org-hline {
  width: 100%;
  height: 2px;
  background: var(--navy);
}

/* 1단계 레벨 행 */
.org-level-1 {
  display: flex;
  align-items: flex-start;
  gap: 0;
  width: 720px;
  justify-content: space-between;
}

/* 각 브랜치 (부서) */
.org-branch {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

/* 부서에서 내려오는 수직선 */
.org-vline-branch {
  width: 2px;
  height: 36px;
  background: var(--navy);
}

/* 설계팀 하위 수직선 */
.org-vline-sub {
  width: 2px;
  height: 28px;
  background: var(--blue-light);
}

/* 설계팀 하위 수평선 래퍼 */
.org-hline-sub-wrap {
  width: 340px;
}
.org-hline-sub {
  width: 100%;
  height: 2px;
  background: var(--blue-light);
}

/* 2단계 레벨 */
.org-level-2 {
  display: flex;
  align-items: flex-start;
  gap: 0;
  width: 340px;
  justify-content: space-between;
}

.org-sub-branch {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

/* 하위 팀으로 내려오는 수직선 */
.org-vline-leaf {
  width: 2px;
  height: 24px;
  background: var(--blue-light);
}


/* ─── 반응형 ─────────────────────────────────────── */
@media (max-width: 900px) {

  .org-hline-wrap { width: 500px; }
  .org-level-1    { width: 500px; }
  .org-hline-sub-wrap { width: 260px; }
  .org-level-2    { width: 260px; }

  .node-dept  { width: 120px; }
  .node-team  { width: 100px; }
  .node-ceo   { width: 140px; }
}

@media (max-width: 640px) {
  /* 모바일: 세로 방향으로 펼치기 */
  .org-chart-wrap {
    align-items: flex-start;
    padding-left: 20px;
  }
  .org-hline-wrap,
  .org-hline-sub-wrap { display: none; }
  .org-level-1 {
    flex-direction: column;
    width: auto;
    gap: 0;
    align-items: flex-start;
    padding-left: 32px;
    border-left: 2px solid var(--navy);
  }
  .org-branch { align-items: flex-start; }
  .org-vline-branch { display: none; }
  .org-vline-sub { display: none; }

  .org-level-2 {
    flex-direction: column;
    width: auto;
    align-items: flex-start;
    padding-left: 24px;
    border-left: 2px solid var(--blue-light);
    margin-top: 4px;
    gap: 0;
  }
  .org-sub-branch { align-items: flex-start; }
  .org-vline-leaf { height: 16px; width: 2px; }

  .node-dept, .node-team, .node-ceo {
    width: auto;
    min-width: 140px;
    text-align: left;
    align-items: flex-start;
    margin-bottom: 8px;
  }
}
