/* 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: 20px 0;
    position: relative;
    flex-wrap: nowrap;
}

/* Vertical connector line from president to lower level */
.level-horizontal:first-child::after {
    content: "";
    position: absolute;
    bottom: 15px;
    left: 50%;
    width: 2px;
    height: 80px;
    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: -37px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #7f1d1d;
    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: 120px;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

/* Remove vertical lines from nodes in first level */
.level-horizontal:first-child .node::after {
    display: none;
}

/* Add vertical lines to second level nodes */
.level-horizontal:nth-child(2) .node::before {
    content: "";
    position: absolute;
    top: -60px;
    left: 50%;
    width: 2px;
    height: 60px;
    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: 75px;
    height: 75px;
    position: relative;
    overflow: hidden;
    border-radius: 50%;
    margin-bottom: 4px;
}

.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 president specific styles */
.node-president {
    margin-bottom: 40px;
}