/* 组织架构图样式 */
.org-chart {
  width: 100%;
  max-width: 1400px;
  margin: 20px auto;
  position: relative;
  overflow-x: auto;
  padding-bottom: 20px;
}

.org-chart * {
  box-sizing: border-box;
}

/* 节点基础样式 */
.org-node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 节点连接线 */
.org-level {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 15px 0;
  position: relative;
}

.org-level:before {
  content: "";
  position: absolute;
  top: -15px;
  left: 50%;
  width: 2px;
  height: 15px;
  background-color: #0277bd;
}

.org-level:first-child:before {
  display: none;
}

.org-level:after {
  content: "";
  position: absolute;
  top: -15px;
  left: 25%;
  width: 50%;
  height: 2px;
  background-color: #0277bd;
}

.org-level:first-child:after {
  display: none;
}

.org-level .org-node:before {
  content: "";
  position: absolute;
  top: -15px;
  left: 50%;
  width: 2px;
  height: 15px;
  background-color: #0277bd;
}

.org-level .org-node:first-child:before,
.org-level .org-node:last-child:before {
  display: none;
}

.org-level .org-node:after {
  content: "";
  position: absolute;
  top: -15px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #0277bd;
}

.org-level .org-node:first-child:after {
  left: 50%;
  width: 50%;
}

.org-level .org-node:last-child:after {
  width: 50%;
}

.org-level .org-node:only-child:after {
  display: none;
}

/* 节点盒子样式 */
.org-box {
  background-color: #0277bd;
  color: white;
  border-radius: 5px;
  padding: 8px 12px;
  min-width: 100px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  margin: 0 5px;
  z-index: 1;
  font-size: 14px;
}

.org-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  background-color: #01579b;
}

/* 不同层级节点样式 */
.org-level-1 .org-box {
  background-color: #01579b;
  font-weight: bold;
  font-size: 16px;
  padding: 10px 20px;
}

.org-level-2 .org-box {
  background-color: #0277bd;
  font-size: 15px;
}

.org-level-3 .org-box {
  background-color: #0288d1;
}

.org-level-4 .org-box {
  background-color: #039be5;
  font-size: 13px;
  padding: 6px 10px;
}

/* 水平连接线 */
.org-horizontal-line {
  position: absolute;
  height: 2px;
  background-color: #0277bd;
  top: 50%;
  z-index: 0;
}

/* 垂直连接线 */
.org-vertical-line {
  position: absolute;
  width: 2px;
  background-color: #0277bd;
  left: 50%;
  z-index: 0;
}

/* 自定义连接线 */
.custom-connection {
  position: absolute;
  background-color: #0277bd;
  z-index: 0;
}

/* 响应式布局 */
@media screen and (max-width: 1400px) {
  .org-chart {
    padding: 10px;
  }
  
  .org-level {
    min-width: 1200px;
  }
}

@media screen and (max-width: 768px) {
  .org-box {
    min-width: 80px;
    padding: 6px 10px;
    font-size: 12px;
  }
  
  .org-level-1 .org-box {
    font-size: 14px;
  }
  
  .org-level {
    margin: 10px 0;
  }
  
  .org-level:before,
  .org-level .org-node:before {
    height: 10px;
    top: -10px;
  }
}

/* 现代化美化样式 */
.modern-org-chart .org-box {
  border-radius: 8px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.modern-org-chart .org-box:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animated-org-chart .org-box {
  animation: fadeIn 0.5s ease-out forwards;
  opacity: 0;
}

.animated-org-chart .org-level:nth-child(1) .org-box {
  animation-delay: 0.1s;
}

.animated-org-chart .org-level:nth-child(2) .org-box {
  animation-delay: 0.3s;
}

.animated-org-chart .org-level:nth-child(3) .org-box {
  animation-delay: 0.5s;
}

.animated-org-chart .org-level:nth-child(4) .org-box {
  animation-delay: 0.7s;
}

.animated-org-chart .org-level:nth-child(5) .org-box {
  animation-delay: 0.9s;
}

/* 自定义组织架构样式 */
.custom-org-chart {
  font-family: "Microsoft YaHei", sans-serif;
  padding: 20px 0;
}

.custom-org-chart .org-box {
  position: relative;
  overflow: hidden;
}

.custom-org-chart .org-box:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
  z-index: -1;
}

/* 特殊节点样式 */
.org-special {
  background-color: #e53935 !important;
}

.org-management {
  background-color: #7b1fa2 !important;
}

.org-department {
  background-color: #00897b !important;
}

/* 部门图标 */
.org-icon {
  margin-bottom: 5px;
  font-size: 20px;
}

/* 职位标题 */
.org-title {
  font-weight: bold;
  margin-bottom: 3px;
}

/* 职位描述 */
.org-description {
  font-size: 12px;
  opacity: 0.8;
}

/* 确保组织架构图在容器内滚动 */
.about-container {
  overflow-x: auto;
  margin-bottom: 30px;
  padding-bottom: 20px;
}

/* 部门细分表格样式 */
.org-departments-table {
  width: 100%;
  margin: 30px auto 0;
  overflow-x: auto;
}

.org-departments-table table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.org-departments-table th {
  background-color: #00897b;
  color: white;
  font-weight: bold;
  text-align: center;
  padding: 12px 15px;
  font-size: 15px;
  border: 1px solid #eaeaea;
}

.org-departments-table td {
  padding: 10px 15px;
  text-align: center;
  border: 1px solid #eaeaea;
  color: #333;
  font-size: 14px;
  transition: all 0.3s ease;
}

.org-departments-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

.org-departments-table tr:hover td {
  background-color: #f0f7fa;
}

/* 响应式表格 */
@media screen and (max-width: 768px) {
  .org-departments-table {
    width: 100%;
  }
  
  .org-departments-table table {
    min-width: 800px;
  }
  
  .org-departments-table th,
  .org-departments-table td {
    padding: 8px;
    font-size: 13px;
  }
} 