/* Estilos para el organigrama */
.org-container {
    overflow-x: auto;
    white-space: nowrap;
    position: relative;
}

.level-horizontal {
    display: flex;
    flex-direction: row;
    justify-content: center;
    padding: 240px 0;
    position: relative;
    flex-wrap: nowrap;
}
/* Vertical connector line from president to lower level */
.level-horizontal:first-child::after {
    content: "";
    position: absolute;
    bottom: -325px; /* Ajusta esta propiedad para mover la línea justo debajo del nodo del presidente */
    left: 46.7%;
    width: 2px;
    height: 670px; /* Ajusta la altura según sea necesario */
    background-color: #7f1d1d;
    transform: translateX(-50%);
    z-index: 0;
}


/* Horizontal connector line for lower level */
.level-horizontal:nth-child(2)::before {
    content: "";
    position: absolute;
    top: 25px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: black;
    z-index: 0;
}
.node {
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 5px solid #7f1d1d;
    padding: 8px;
    margin: 0 8px;
    background-color: #f5f5dc;
    min-width: 50px;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
    height: 250px;
}
.info-box {
    position: absolute;
    top: 100%; /* Centra el cuadro verticalmente respecto a la línea */
    left: 50%; /* Centra el cuadro horizontalmente respecto al nodo del presidente */
    transform: translate(-50%, -50%); /* Ajuste fino para centrar exactamente el cuadro */
    width: 200px; /* Ancho del cuadro */
    height: 300px; /* Altura del cuadro */
    background-color: #f5f5dc; /* Color de fondo del cuadro */
    border: 5px solid #7f1d1d; /* Borde del cuadro, ajustado para que coincida con otros nodos */
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 15px;
}

.nodea {
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 5px solid #7f1d1d;
    padding: 8px;
    margin: 0 8px;
    background-color: #f5f5dc;
    width: 130px;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    top:100px;
    z-index: 1;
    height: 280px;
}
.level-horizontal:first-child .info-box::before {
    content: "";
    position: absolute;
    top: 120px;
    left: 14%;
    width: 61px;  /* Puedes ajustar el largo según sea necesario */
    height: 2px;
    background-color: #7f1d1d;  /* Puedes cambiar el color según sea necesario */
    transform: translateX(-150%);  /* Ajusta la posición a la izquierda */
    z-index: 0;
}

/* Remove vertical lines from nodes in first level */
.level-horizontal:first-child .node::after {
    display: none;
}
/* Horizontal connector line for lower level */
.level-horizontal:nth-child(2)::before {
    content: "";
    position: absolute;
    top: 304px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #7f1d1d;
    z-index: 0;
}
/* Add vertical lines to second level nodes */
.level-horizontal:nth-child(2) .nodea::before {
    content: "";
    position: absolute;
    top: -40px;
    left: 50%;
    width: 2px;
    height: 40px;
    background-color:#7f1d1d;
    transform: translateX(-50%);
}

.node:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.node-image-container {
    width: 100px;
    height: 100px;
    position: relative;
    overflow: hidden;
    border-radius: 50%;
    margin-top: 35px;
    flex-shrink: 0;
 }
 
.node-image {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    object-fit: cover;
}


.node-text {
    color: #333;
    font-weight: bold;
}

.node-title {
    font-size: 14px;
    color: #7f1d1d;
    font-weight: bold;
    margin-bottom: 4px;
    text-align: center;
}
.node-image-containeren {
    width: 100px;
    height: 100px;
    overflow: hidden;
    border-radius: 50%;
    margin-top: 5px; /* Ajusta la separación si es necesario */
    flex-shrink: 0;
    position: relative; /* Importante para el centrado de la imagen */
}

.node-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Asegura que la imagen cubra completamente el espacio sin deformarse */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.node-titleen {
    font-size: 14px;
    color: #7f1d1d;
    font-weight: bold;
    margin-bottom: 10px; /* Espacio después del título */
}

.node-texten {
    font-size: 12px; /* Ajusta el tamaño de fuente si es necesario */
    color: #333;
    font-weight: bold;
    overflow: hidden; /* Previene desbordamiento de texto */
    white-space: nowrap; /* Mantiene el texto en una sola línea */
    text-overflow: ellipsis; /* Añade puntos suspensivos si el texto es demasiado largo */
}

/* Node president specific styles */
.node-president {
    margin-bottom: 80px;
    margin-top: -100px;
}
/* Horizontal connector line for upper level */

.node-texta {
    color: #333;
    font-weight: bold;
    width: 100%;
    font-size: 12px;
    overflow: visible;
    word-wrap: break-word;
    white-space: pre-wrap;
    text-transform: uppercase;
    padding: 4px;
    box-sizing: border-box;
    margin-top: 10px;
    line-height: 1.2;
 }
 

.node-titlea {
    position: relative;
    z-index: 2;
    font-size: 10px;
    color: #7f1d1d;
    font-weight: bold;
    margin-top: 0;
    width: 114px;
    overflow: visible;
    word-break: keep-all;
    word-spacing: -0.5px;
    letter-spacing: -0.3px;
    text-transform: uppercase;
    text-align: center;
    padding: 0 2px;
    box-sizing: border-box;
    line-height: 1.3;
 }
 /* Quitar media query ya que el tamaño fijo es más controlable en este caso */