/* Importa la fuente Poppins desde Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

/* Aplica un reset general al margen y padding, y usa box-sizing border-box para mejor control del diseño */
* {
	padding: 0px;
	margin: 0px;
	box-sizing: border-box;
}

/* Estiliza el cuerpo del documento: ocupa el alto total de la pantalla, centra verticalmente y aplica la fuente Poppins */
body {
	height: 100vh;
	display: grid;
	align-items: center;
	font-family: 'Poppins', sans-serif;
}

/* Contenedor principal del árbol */
.tree {
	width: 100%;
	height: auto;
	text-align: center;
}

/* Lista principal del árbol (nivel raíz) */
.tree ul {
	padding-top: 20px;
	position: relative;
	transition: .5s;
}

/* Cada nodo del árbol */
.tree li {
	display: inline-table;
	/* Se comporta como una celda de tabla */
	text-align: center;
	list-style-type: none;
	/* Quita viñetas */
	position: relative;
	padding: 10px;
	/* Espacio entre nodos */
	transition: .5s;
}

/* Líneas horizontales que conectan los nodos */
.tree li::before,
.tree li::after {
	content: '';
	position: absolute;
	top: 0;
	right: 50%;
	border-top: 1.5px solid #c5ba9f;
	/* Línea horizontal */
	width: 51%;
	height: 10px;
}

/* Línea del lado izquierdo */
.tree li::after {
	right: auto;
	left: 50%;
	border-left: 1.5px solid #c5ba9f;
}

/* Si el nodo es único (sin hermanos), no se muestran líneas */
.tree li:only-child::after,
.tree li:only-child::before {
	display: none;
}

/* Nodo único sin padding superior */
.tree li:only-child {
	padding-top: 0;
}

/* Elimina líneas en nodos extremos para que no se dibujen bordes sobrantes */
.tree li:first-child::before,
.tree li:last-child::after {
	border: 0 none;
}

/* Estilo especial para esquinas en líneas */
.tree li:last-child::before {
	border-right: 1.5px solid #c5ba9f;
	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;
}

/* Línea vertical que conecta niveles del árbol */
.tree ul ul::before {
	content: '';
	position: absolute;
	top: 0;
	left: 50%;
	border-left: 1px solid #c5ba9f;
	width: 0;
	height: 20px;
}

/* Contenedor del contenido de cada nodo (imagen + texto) */
.tree li a {
	border: 1.5px solid #c5ba9f;
	padding: 10px;
	display: inline-grid;
	border-radius: 5px;
	text-decoration-line: none;
	transition: .5s;
}

/* Imagen del nodo: ahora RECTANGULAR */
.tree li a img {
	/*width: 100px; */
	/* Ancho personalizado */
	/*height: 140px;  */
	/* Alto personalizado */
	/*margin-bottom: 10px !important;*/
	/*margin: auto;*/
	/*border-radius: 0;  */
	/* Quitar borde circular para que sea rectangular */
	/*object-fit: cover; */
	/* Ajusta la imagen para que llene el contenedor sin deformarse */

	width: 120px;
	height: 120px;
	margin-bottom: 10px !important;
	border-radius: 100px;
	margin: auto;
	background-color: #ffF;
}

/* Texto debajo de la imagen */
.tree li a .info {
	border: 1px solid #ccc;
	border-radius: 5px;
	color: #666;
	padding: 8px;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 1px;
	font-weight: 500;
}



.tree li a span span.nombre {
	color: #422b7c;
	font-weight: bold;
}

.tree li a:hover span.nombre {
	border: none !important;
	background: none !important;
}


/* Efectos al pasar el cursor sobre los nodos y sus elementos relacionados */
.tree li a:hover,
.tree li a:hover i,
.tree li a:hover span,
.tree li a:hover+ul li a {
	background: #e3e1e0;
	/* Fondo azul claro */
	color: #422b7c;
	/* Texto negro */
	border: 2px solid #981861;
	/* Borde azul grisáceo */
}

/* Cambia el color de las líneas cuando se hace 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;
}


/* Estilo personalizado para nodos con mayor ancho */
.tree li a.nodo2 {
	width: 225px;
	/* Puedes ajustar el tamaño según necesites */
}

/* Ajusta también el tamaño de la imagen dentro del nodo más ancho */
.tree li a.nodo2 img {
	width: 100%;
	/* Que ocupe todo el ancho disponible */
	height: 120px;
	object-fit: cover;
}

/* Opcional: centra el texto y mejora la estética del texto en nodos grandes */
.tree li a.nodo2 span {
	text-align: center;
	font-size: 13px;
}

/* Estilo personalizado para nodos con mayor ancho */
.tree li a.nodo3 {
	width: 150px;
	/* Puedes ajustar el tamaño según necesites */
}

/* Ajusta también el tamaño de la imagen dentro del nodo más ancho */
.tree li a.nodo3 img {
	width: 100%;
	/* Que ocupe todo el ancho disponible */
	height: 120px;
	object-fit: cover;
}

.btn_regresar {
	display: flex;
	justify-content: center;
	/* Centra horizontalmente */
	margin: 20px 0;
	/* Espacio superior e inferior */
}

.nombre {
	color: #422b7c;
	/* Cambia este código por el color que desees */
	font-weight: bold;
}