.org-scroll-wrapper {
	width: 100%;
	overflow-x: auto;
	padding-bottom: 8px;
}

.grid-container {
	display: grid;
	grid-template-columns: repeat(50, 1fr);
	grid-template-rows: repeat(50, 15px);
	position: relative;
	gap: 0;
	width: 100%;
	min-width: 920px;
	margin: 0 auto;
	background-color: #ffffff;
	font-family: Arial, Helvetica, 'Segoe UI', sans-serif;
	padding: 0;
}

/* Contenedores visuales de fondo (cuadros que agrupan elementos de lista) */
.group-container {
	pointer-events: none;
	z-index: 1;
}

.contenedor-unidades {
	background-color: #f2f1f0;
	border: 1px solid #d4d3d1;
	border-radius: 0;
}

.contenedor-sub {
	background-color: #f4f3f2;
	border: 1px solid #e6e6e4;
	border-radius: 6px;
	margin: -2px 0;
}

/* Nodos interactivos */
.node {
	position: relative;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	text-align: left;
	word-break: break-word;
	z-index: 2;
	transition: background-color 0.15s ease, filter 0.15s ease, transform 0.1s ease;
	user-select: none;
}

.node-label {
	position: relative;
	display: inline-block;
	line-height: 1.15;
}

.node:active {
	transform: translateY(1px);
}

/* Tipo 1: Asamblea de Socios, Alcalde/sa, Directorio */
.tipo-1 {
	background-color: #b7bac0;
	color: #111111;
	font-size: clamp(0.66rem, 0.72vw, 0.78rem);
	font-weight: 400;
	letter-spacing: 0.01em;
	border-radius: 0;
	border: none;
	margin: 2px 0;
	padding: 4px 8px 4px 18px;
}

.tipo-1 .node-label {
	max-width: 95px;
	line-height: 1.08;
}

.tipo-1:hover {
	background-color: #a3a7ae;
}

/* Tipo 2: Secretario General */
.tipo-2 {
	background-color: #bb1a30;
	color: #ffffff;
	font-size: clamp(1.30rem, 1.5vw, 1.68rem);
	font-weight: 700;
	border-radius: 20px;
	border: none;
	margin: 2px 0;
	justify-content: center;
	padding: 10px 18px;
	letter-spacing: 0.01em;
}

.tipo-2 .node-label {
	max-width: 195px;
	line-height: 1.06;
}

.tipo-2:hover {
	background-color: #a11528;
}

/* Tipo 3: Unidades superiores derechas (fondo gris claro con cuadro rojo) */
.tipo-3 {
	background-color: #e9eae7;
	color: #141414;
	font-size: clamp(0.64rem, 0.70vw, 0.76rem);
	font-weight: 400;
	border-radius: 0;
	border: none;
	margin: -3px 0;
	padding: 4px 8px 4px 26px;
}

.tipo-3 .node-label {
	max-width: 195px;
	line-height: 1.12;
}

.tipo-3 .node-label::before {
	content: "";
	position: absolute;
	left: -14px;
	top: 0.22em;
	width: 7px;
	height: 7px;
	background-color: #b51d2e;
}

.tipo-3:hover {
	background-color: #dcded9;
}

/* Tipo sub: Elementos de lista en sub-cuadros superiores derechos */
.tipo-sub {
	background-color: transparent;
	color: #1a1a1a;
	font-size: clamp(0.56rem, 0.60vw, 0.66rem);
	font-weight: 400;
	border-radius: 4px;
	border: none;
	padding: 0 4px 0 14px;
}

.tipo-sub .node-label {
	line-height: 1.05;
}

.tipo-sub .node-label::before {
	content: "•";
	position: absolute;
	left: -6px;
	top: 0;
	font-weight: 700;
	color: #1a1a1a;
}

.tipo-sub:hover {
	background-color: rgba(187, 26, 48, 0.10);
	color: #bb1a30;
}

/* Tipo 4: Departamentos principales (negros con barra vertical roja a la izquierda) */
.tipo-4 {
	background-color: #0f1110;
	color: #ffffff;
	font-size: clamp(0.65rem, 0.72vw, 0.78rem);
	font-weight: 700;
	border-radius: 12px;
	border: none;
	padding: 8px 10px 8px 20px;
}

.tipo-4 .node-label {
	line-height: 1.20;
}

.tipo-4::before {
	content: "";
	position: absolute;
	left: 9px;
	top: 10px;
	bottom: 10px;
	width: 3.5px;
	background-color: #bb1a30;
}

.tipo-4:hover {
	background-color: #262928;
}

/* Tipo 5: Elementos de lista dentro de los cuadros inferiores */
.tipo-5 {
	background-color: transparent;
	color: #141414;
	font-size: clamp(0.62rem, 0.68vw, 0.74rem);
	font-weight: 400;
	border-radius: 4px;
	border: none;
	padding: 4px 8px 4px 28px;
}

.tipo-5 .node-label {
	max-width: 190px;
	line-height: 1.12;
}

.tipo-5 .node-label::before {
	content: "";
	position: absolute;
	left: -14px;
	top: 0.20em;
	width: 7px;
	height: 7px;
	background-color: #b51d2e;
}

.tipo-5:hover {
	background-color: rgba(187, 26, 48, 0.08);
}

/* Líneas conectoras */
.line {
	position: absolute;
	background-color: #141414;
	z-index: 0;
}

.line.horizontal.dashed {
	background-color: transparent;
	background-image: repeating-linear-gradient(
		to right,
		#141414 0,
		#141414 5px,
		transparent 5px,
		transparent 8px
	);
}

.line.vertical.dashed {
	background-color: transparent;
	background-image: repeating-linear-gradient(
		to bottom,
		#141414 0,
		#141414 5px,
		transparent 5px,
		transparent 8px
	);
}

.line.horizontal.dotted {
	background-color: transparent;
	background-image: repeating-linear-gradient(
		to right,
		#141414 0,
		#141414 2px,
		transparent 2px,
		transparent 5px
	);
}

.line.vertical.dotted {
	background-color: transparent;
	background-image: repeating-linear-gradient(
		to bottom,
		#141414 0,
		#141414 2px,
		transparent 2px,
		transparent 5px
	);
}

/* Puntos cuadrados rojos en las intersecciones de líneas */
.connector-square {
	position: absolute;
	width: 10px;
	height: 10px;
	background-color: #b51d2e;
	transform: translate(-50%, -50%);
	z-index: 3;
	pointer-events: none;
}
