/*Now the CSS*/
* {margin: 0; padding: 0;}

.tree ul {
	padding-top: 20px;
	padding-left: 0;
	padding-right: 0;
	padding-bottom: 0; 
	position: relative;
	
	transition: all 0.5s;
	-webkit-transition: all 0.5s;
	-moz-transition: all 0.5s;
}

.tree ul li {
	float: left; text-align: center;
	list-style-type: none;
	position: relative;
	padding: 20px 1px 0 1px;
	
	transition: all 0.5s;
	-webkit-transition: all 0.5s;
	-moz-transition: all 0.5s;
}

/*We will use ::before and ::after to draw the connectors*/

.tree li::before, .tree li::after{
	content: '';
	position: absolute; top: 0; right: 50%;
	border-top: 1px solid #ccc;
	width: 50%; height: 20px;
}
.tree li::after{
	right: auto; left: 50%;
	border-left: 1px solid #ccc;
}

/*We need to remove left-right connectors from elements without 
any siblings*/
.tree li:only-child::after, .tree li:only-child::before {
	display: none;
}

/*Remove space from the top of single children*/
.tree li:only-child{ padding-top: 0;}

/*Remove left connector from first child and 
right connector from last child*/
.tree li:first-child::before, .tree li:last-child::after{
	border: 0 none;
}
/*Adding back the vertical connector to the last nodes*/
.tree li:last-child::before{
	border-right: 1px solid #ccc;
	border-radius: 0 5px 0 0;
	-webkit-border-radius: 0 5px 0 0;
	-moz-border-radius: 0 5px 0 0;
}
.tree li:first-child::after{
	border-radius: 5px 0 0 0;
	-webkit-border-radius: 5px 0 0 0;
	-moz-border-radius: 5px 0 0 0;
}

/*Time to add downward connectors from parents*/
.tree ul ul::before{
	content: '';
	position: absolute; top: 0; left: 50%;
	border-left: 1px solid #ccc;
	width: 0; height: 20px;
}

.tree li a {
	border: 1px solid #ccc;
	padding: 5px 10px;
	text-decoration: none;
	color: #666;
	font-family: arial, verdana, tahoma;
	font-size: 1em;
	display: inline-block;
	
	border-radius: 5px;
	-webkit-border-radius: 5px;
	-moz-border-radius: 5px;
	
	transition: all 0.5s;
	-webkit-transition: all 0.5s;
	-moz-transition: all 0.5s;
}

/*Time for some hover effects*/
/*We will apply the hover effect the the lineage of the element also*/
.tree li a:focus
, .tree li a:focus + ul li a
, .tree li a:hover
, .tree li a:hover+ul li a {
	background: #c8e4f8; color: #000; border: 1px solid #94a0b4;
}
/*Connector styles on hover*/
.tree li a:hover+ul li::after, 
.tree li a:hover+ul li::before, 
.tree li a:hover+ul::before, 
.tree li a:hover+ul ul::before{
	border-color:  #94a0b4;
}

.chief
{
  width: 6em;
  color: #FFFFFF;
  background: none repeat scroll 0% 0% #0470D6;
}
a:link.chief, a:visited.chief
{
	color: #FFFFFF;
}

.verticalAlignment
{
	width: 1.1em;
	direction:ltr; 
	writing-mode: vertical-lr;
  -webkit-writing-mode: vertical-lr;  
  text-align: left;
}

.verticalAlignment.departBusiness
{
  font-size: 1.0em;
  height: 7em;
	width: 1.75em;
	padding: 0.125em; 
	margin: 0;
  color: #FFFFFF;
  background: none repeat scroll 0% 0% #009933;
}

.verticalAlignment.departAides
{
  height: 7em;
	width: 1.75em;
	padding: 0.125em; 
	margin: 0;
  color: #FFFFFF;
  background: none repeat scroll 0% 0% #647C0A;
}

.verticalAlignment.subdepartBusiness
{
  height: 30em;
	width: 1.75em;
	padding: 0.125em; 
	margin: 0;
  color: #FFFFFF;
  background: none repeat scroll 0% 0% #217B91;
}

.verticalAlignment.subdepartAides
{
  height: 30em;
	width: 1.75em;
	padding: 0.125em; 
	margin: 0;
  color: #0099FF;
  background: none repeat scroll 0% 0% #7E40BF;
}

.verticalAlignment.subchild
{
  height: 9em;
	width: 1.75em;
	padding: 0.125em; 
	margin: 0;
  background: none repeat scroll 0% 0% #D43845;
}

.verticalAlignment.extdepart
{
  height: 15em;
	width: 1.75em;
	padding: 0.125em; 
	margin: 0;
  color: #000000;
  background: none repeat scroll 0% 0% #FFFFFF;
}

#OrgChart
{
  display: table;
  margin: 0 auto;
  text-align: center;
}

#OrgChart ul li 
{
  font-size: 1.0em;
}

/*Time to add downward connectors from parents*/
#OrgChart .level_00:before 
{
    content: "";
    position: absolute;
    border-left: 1px solid #CCCCCC;
    width: 0px;
    height: 1.3em;
    left: 50%;
    top: 2.0em;
}

#OrgChart .level_01:before 
{
	 display: none;
}
#OrgChart .level_01 li:last-child::before
{
  border-right: 1px solid #CCCCCC;
  border-radius: 0 5px 0 0;
  -webkit-border-radius: 0 5px 0 0;
  -moz-border-radius: 0 5px 0 0;
}

#OrgChart .level_02:before 
{
	 display: none;
}
#OrgChart .level_02 li:last-child::before
{
  border-right: 1px solid #CCCCCC;
  border-radius: 0 5px 0 0;
  -webkit-border-radius: 0 5px 0 0;
  -moz-border-radius: 0 5px 0 0;
}


.contentOrgChart {
	margin: 0 auto;
	text-align: center; 
  overflow: hidden;
}

.contentOrgChart * {
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
}


.org-chart {
  max-width: 45em;
  min-height: 80em;
	display: block;
	clear: both;
/*	margin-bottom: 2em;*/
}

.org-chart.cf:before, .org-chart.cf:after {
	content: "";
	display: table;
}

.org-chart.cf:after {
	clear: both;
}

.org-chart.cf {
	zoom: 1;
}
.org-chart .chief
{
  color: #FFFFFF;
  background: none repeat scroll 0% 0% #0470D6;
}

.org-chart ul {
	padding: 0;
	margin: 0;
	list-style: none;
}

.org-chart ul li {
	position: relative;
}

.org-chart ul li span {
	display: block;
	border: 1px solid #6A6969;
	text-align: center;
	overflow: hidden;
	border-radius: 6px;
	text-decoration: none;
	box-shadow: 4px 4px 9px -4px rgba(0, 0, 0, 0.4);
	-webkit-transition: all linear .1s;
	-moz-transition: all linear .1s;
	transition: all linear .1s;
	padding: 4px;
}

.org-chart .lvl-b {
	
}

.org-chart a
{
  color: #FFFFFF;
  text-decoration: none;
}
.org-chart a:visited
{
  color: #FFFFFF;
}
.org-chart a:hover
{
  color: #333333;
}
.org-chart .board {
	width: 100%; margin : 0 auto;
	display: block;
	position: relative;
	margin: 0 auto;
}

.org-chart ul.columnOne {
	height: 90px;
	position: relative;
	width: 100%;
	display: block;
	clear: both;
}

.org-chart ul.lvl_1 li {
	margin: 0px auto;
	text-align: center;
	top: 20px;
	width: 100%;
}

.org-chart ul.lvl_3 li {
	margin: 0px auto;
	text-align: center;
	top: 20px;
	width: 48%;
}
.org-chart ul.lvl_1 li:before {
	content: "";
	display: block;
	position: absolute;
	height: 3.3em;
	border-left: 2px solid #6A6969;
	margin-left: 50%;
	top: 2em;
}
.org-chart ul.lvl_3 li:before {
	content: "";
	display: block;
	position: absolute;
	height: 2.4em;
	border-left: 2px solid #6A6969;
	margin-left: 50%;
	top: -2.2em;
}
.org-chart ul.lvl_3 li:after {
	content: "";
	display: block;
	position: absolute;
	height: 1.5em;
	border-left: 2px solid #6A6969;
	margin-left: 50%;
	top: 2.2em;
}

.org-chart ul.columnOne .noElement:before {
  border: none;
  height: 0;
}
.org-chart ul.columnTwo {
	position: relative;
	width: 100%;
	display: block;
	clear: both;
	margin-top: 10px;
}

.org-chart ul.columnTwo:before {
	content: "";
	display: none;
	position: absolute;
	height:5em;
	border-left: 2px solid #6A6969;
	margin-left: 50%;
	top: 2em;
}

.org-chart ul.columnTwo li:first-child {
	width: 46%;
	float: left;
	margin-left: 0;
}

.org-chart ul.columnTwo li:first-child:after {
	content: "";
	display: block;
	position: relative;
	width: 19%;
	height: 10%;
	border-top: 2px solid #6A6969;
	margin-left: 0 auto;
	left: 100%; /*20.4em;*/
	top: -1em;
}

.org-chart ul.columnTwo li {
	width: 46%;
	margin-left: 5%;
	float: left;
}

.org-chart ul.columnTwo li:last-child:before {
	content: "";
	display: none;
	position: relative;
	width: 18%;
	height: 10%;
	border-top: 2px solid #6A6969;
	margin-left: 0 auto;
	left: -2.3em;
	top: 1em;
}

.org-chart ul.columnTwo li:last-child {
	width: 46%;
	float: right;
	margin-left: 0;
}

.org-chart .departments {
	width: 45em; /* (0.5 + 1.8 + 0.5) * 16 */
	display: block;
	clear: both;
	margin: 0 auto;
	text-align: center;
}

.org-chart .departments:before {
	content: "";
	display: block;
	width: 42em; /* 扣掉 左右兩邊的寬度與 padding */
	height: 30px;
	border-top: 2px solid #6A6969;
	margin: 0 auto;
	top: 0px;
}

.org-chart .department {
	width: 2.0em;
	float: left;
	margin: 0 0.5em;
	border-radius: 6px;
}

.org-chart .department:after {
	content: "";
	position: absolute;
	display: block;
	width: 10px;
	height: 30px;
	border-left: 2px solid #6A6969;
	left: 50%;
	top: -30px;
}

.org-chart .department:first-child:after
, .org-chart .department:last-child:after
	{
	content: "";
	position: absolute;
	display: block;
	width: 10px;
	height: 30px;
	border-left: 2px solid #6A6969;
	left: 50%;
	top: -30px;
}

.org-chart .department .division:after {
	content: "";
	position: absolute;
	display: block;
	width: 10px;
	height: 1.7em;
	border-left: 2px solid #6A6969;
	left: 50%;
	top: 0;
}

.org-chart .department.central {
	background: #F5EEC9;
}

.org-chart .department.central:after {
	display: none;
}

.org-chart .department li {
	padding-left: 25px;
	border: 0;
	height: 33px;
}

.org-chart .department li span {
	top: 1.7rem;
	position: absolute;
	z-index: 1;
	max-width: 100%;
	height: auto;
	vertical-align: top;
	right: 0;
  border-radius: 6px;
  border: 1px solid #6A6969;

	padding: 0.125em;
	margin: 0;
	overflow-wrap: break-word;
	word-wrap: break-word;
	-ms-word-break: break-all;
	word-break: break-all;
	-ms-hyphens: auto;
	-moz-hyphens: auto;
	-webkit-hyphens: auto;
	hyphens: auto;
}
.org-chart .lvl_1 span:hover
, .org-chart .lvl_1 span:focus
, .org-chart .lvl_1 span:hover ~ .org-chart ui li span
, .org-chart .lvl_1 span:focus ~ .org-chart ul li span
, .org-chart .department span:hover
, .org-chart .department span:focus
, .org-chart .department span:hover + ul li span
, .org-chart .department span:focus + ul li span  
{
  background-color: #c8e4f8;
  color: #333333;
}

.org-chart .department .divisions {
	margin-top: 0;
	background-color: #FFFFFF;
}


.org-chart .hassub:before {
  content: "";
  display: block;
  position: absolute;
  border-left: 2px solid #6A6969;
  z-index: 1;
  left: 50%;
  top: 27.5em;
  height: 11.3em;
  width: 1.85em;
}
.org-chart .subdivisions {
  width:  5.65em; /* (0.5 + 1.88 + 0.5) * 16 */
  display: block;
  clear: both;
  margin: 0 auto;
  text-align: center;
  position: relative;
  top: 37em;
  left: -0.55em;
  background-color: #FFFFFF;
}

.org-chart .subdivisions:before {
  content: "";
  display: block;
  width: 2.4em; /* 扣掉 左右兩邊的寬度與 padding */
  height: 1.6em;
  border-top: 2px solid #6A6969;
  margin: 0 auto;
  top: 0px;
}

.org-chart .subdivision {
  width: 1.8em;
  float: left;
  margin: 0 0.5em;
}

.org-chart .subdivision:after {
  content: "";
  position: absolute;
  display: block;
  width: 1em;
  height: 1.6em;
  border-left: 2px solid #6A6969;
  left: 50%;
  top: -30px;
}

.org-chart .subdivision:first-child:after, .org-chart .subdivision:last-child:after
  {
  content: "";
  position: absolute;
  display: block;
  width: 10px;
  height: 3.2em;
  border-left: 2px solid #6A6969;
  left: 0.75em;
  top: -30px;
}

.org-chart .subdivision .division:after {
  content: "";
  position: absolute;
  display: block;
  width: 10px;
  height: 22px;
  border-left: 2px solid #00FFFF;
  left: 50%;
  top: 0;
}

.org-chart .subdivision.central {
  background: #F5EEC9;
}

.org-chart .subdivision.central:after {
  display: none;
}

.org-chart .subdivision span {
  border: 0;
}

.org-chart .subdivision li {
  padding-left: 25px;
  border: 0;
  height: 33px;
}

.org-chart .subdivision li span {
  background-color: #33CCCC;
  top: 19px;
  position: absolute;
  z-index: 1;
  width: 100%;
  height: auto;
  vertical-align: top;
  right: 0px;
  border: 1px solid #6A6969;
  border-radius: 5px;
  padding: 0.125em;
  margin: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
  -ms-word-break: break-all;
  word-break: break-all;
  -ms-hyphens: auto;
  -moz-hyphens: auto;
  -webkit-hyphens: auto;
  hyphens: auto;
}

.org-chart .departBusiness {
    color: #FFFFFF;
}
.org-chart .subdepartBusiness {
    color: #FFFFFF;
    background: none repeat scroll 0% 0% #217B91;
}
.org-chart .departAides {
    color: #FFFFFF;
    background: none repeat scroll 0% 0% #647C0A;
}
.org-chart .subdepartAides {
    color: #0099FF;
    background: none repeat scroll 0% 0% #7E40BF;
}
.org-chart .extdepart {
    color: #FFFFFF;
    background: none repeat scroll 0% 0% #31815A;
}
.org-chart .subchild {
    color: #FFFFFF;
    background: none repeat scroll 0% 0% #D43845;
}

.org-chart .chief {
  background: none repeat scroll 0 0 #0470D6;
}
@media all and (max-width: 767px) {
	.org-chart {
		min-height: 65rem;
	}
  .org-chart .board {
    margin: 0px;
    width: 100%;
  }
  .org-chart .board:before {
    height: 212px;
  }
  .org-chart .departments {
    width: 90%;
  }
  .org-chart .departments:before {
    border: none;
    height: 0;
  }
  .org-chart .department {
    float: none;
    width: 100%;
    margin-left: 0;
    margin-bottom: 0.5em;
  }
  .org-chart .department .divisions
  , .org-chart .department .divisions li
  {
    width: 100%;
    /*top: -0.9em;*/
  }
  .org-chart .department .division:after {
    border: none;
  }
  .org-chart .department:before {
    content: "";
    display: block;
    position: absolute;
    width: 0.76em;
    border-top: 2px solid #6A6969;
    z-index: 1;
    top: 0.75em;
    left: -0.5em;
    margin-left: -2px;
  }
  .org-chart .department:first-child:before {
    content: "";
    display: block;
    position: absolute;
    width: 0.5em;
    height: 72.6em;
    border-top: 2px solid #6A6969;
    border-left: 2px solid #6A6969;
    z-index: 1;
    top: 0.75em;
    left: -0.5em;
    margin-left: -2px;
  }
  .org-chart .department:last-child:before {
    height: 0;
  }
  .org-chart .department:after {
    border: none;
  }
  .org-chart .department:first-child:after
  , .org-chart .department:last-child:after {
    border: none;
  }
  .org-chart .department .divisions:before {
    content: "";
    display: block;
    position: absolute;
    border-left: 2px solid #6A6969;
    z-index: 1;
    left: 50%;
    top: 2.1em;
    height: 1em;
    width: 1.85em;
  }
  .org-chart .department li {
    min-height: 3.6em;
    height: auto;
    /*top: -0.9em;*/
  }
  .org-chart .department li span {
	  top: 1.0rem;  	
    position: relative;
  }
  .org-chart ul.columnTwo li:first-child:after {
    border: none;
  }
  .org-chart ul.columnTwo li:last-child:before {
    border: none;
  }
  
   .org-chart .subdepartBusiness li span
  , .org-chart .divisions li span
  , .org-chart .subdivisions li span {
    font-size: 1.0em;
    line-height: 1.1em;
  }
  /* 第三層的 */
  .org-chart .hassub:before 
  {
   border: none;
  }
  .org-chart .subdivisions {
    width: 100%;
    top: 0;
    left: 0;
  }
  .org-chart .subdivisions:before {
    border: none;
    height: 0;
  }
  .org-chart .subdivision {
    float: none;
    width: 100%;
    margin-left: 0;
    margin-bottom: 0.5em;
  }
  
  .org-chart .subdivision:after {
    border: none;
  }

  .org-chart .subdivision:first-child:before {
		content: "";
		display: block;
		position: absolute;
		width: 1em;
		height: 6.6em;
		border-top: 2px solid #6A6969;
		border-left: 2px solid #6A6969;
		z-index: 1;
		top: -0.4em;
		left: 0.5em;
		margin-left: -2px;
  }
  .org-chart .subdivision:first-child:after {
    border: none;
  }
  
  .org-chart .subdivision:last-child:before {
    height: 0;
  }
  
  .org-chart .subdivision:first-child:after
  ,   .org-chart .subdivision:last-child:after {
    content: "";
    display: block;
    position: absolute;
    width: 1em;
    border-top: 2px solid #6A6969;
    border-left: none;
    z-index: 1;
    top: 2.6em;
    left: 0.5em;
    margin-left: -2px;
  }

  .org-chart .subdivision:before {
    border: none;
  }
  .org-chart .subdivision li {
    height: 3em;
  }
  .org-chart .subdivision li span {
    position: relative;
  }
}


@media (max-width: 450px) {
   .org-chart .department .divisions
 , .org-chart .department .divisions li {
    width: 100%;
    top: 0;
  } 
  .org-chart .department li {
    height: 5.6em;
    top: -0.9em;
  }
}