/* CONTENEDOR DEL ORGANIGRAMA PÚBLICO (home) */
#org-chart-publico {
  background: rgba(255,255,255,0.4);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: .75rem;
  padding: 1.2rem;
  margin: 2rem auto;
  width: 95%;
  overflow-x: auto;
}

/* raíz donde se inyecta el árbol */
#org-tree-root {
  display: flex;
  justify-content: center;
}

/* ESTRUCTURA DEL ÁRBOL */
.org-tree {
  display: flex;
  justify-content: center;
}

.org-tree ul {
  padding-top: 20px;
  padding-left: 0;
  position: relative;
  display: flex;
  justify-content: center;
}

.org-tree li {
  list-style-type: none;
  text-align: center;
  position: relative;
  padding: 20px 10px 0 10px;
}

/* LÍNEAS DEL ORGANIGRAMA */
.org-tree li::before,
.org-tree li::after {
  content: '';
  position: absolute;
  top: 0;
  right: 50%;
  border-top: 1px solid #aaa;
  width: 50%;
  height: 20px;
}

.org-tree li::after {
  right: auto;
  left: 50%;
  border-left: 1px solid #aaa;
}

/* cuando es hijo único no dibujamos línea */
.org-tree li:only-child::after,
.org-tree li:only-child::before {
  display: none;
}

.org-tree li:only-child {
  padding-top: 0;
}

/* esquinas de los extremos */
.org-tree li:first-child::before,
.org-tree li:last-child::after {
  border: 0 none;
}

.org-tree li:last-child::before {
  border-right: 1px solid #aaa;
  border-radius: 0 5px 0 0;
}

.org-tree li:first-child::after {
  border-radius: 5px 0 0 0;
}

/* NODO */
.org-node {
  background: rgba(255, 255, 255, 0.5);
  border: 2px solid #222;
  border-radius: .6rem;
  width: 130px;
  min-height: 95px;
  margin: 0 auto;
  padding: .35rem .4rem .5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  box-shadow: 0 4px 10px rgba(0,0,0,.08);
}

/* IMG DEL NODO */
.org-node img {
  width: 70px;           /* ← usa uno solo */
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  background: #eee;
}

.node-inner {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: center;
}

/* TEXTOS */
.org-name {
  font-size: .70rem;
  font-weight: 600;
}

.org-role {
  font-size: .60rem;
  color: #000000;
}

/* PROYECTO (cintillo arriba) */
.org-project {
  background: #222;
  color: #fff;
  font-size: .55rem;
  padding: 0.15rem .35rem;
  border-radius: .4rem .4rem 0 0;
  position: absolute;
  top: -1.1rem;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

/* COLORES POR TIPO */
.node-jefe    { border-color: #e53935; }
.node-coord   { border-color: #fb8c00; }
.node-resp    { border-color: #8e24aa; }
.node-jefe-eq { border-color: #3949ab; }
.node-prog    { border-color: #1e88e5; }
.node-colab   { border-color: #00897b; }
