/* css/organizational_structure.css */

#organizational-structure-content {
    padding: 40px 0; /* Reduced padding to decrease height */
    background-color: var(--light-bg);
}

.org-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px; /* Reduced gap between levels */
}

.level {
    display: flex;
    justify-content: center;
    width: 100%;
    position: relative;
}

/* Connecting lines for levels */
.level:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: -15px; /* Half of the gap */
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 15px; /* Half of the gap */
    background-color: #ced4da;
    z-index: 1;
}

.node {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 25px; /* Rounded corners for nodes */
    padding: 10px 20px;
    margin: 0 15px; /* Space between nodes in the same level */
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    font-weight: bold;
    color: #343a40;
}

/* Specific Node Styles based on the image */
.node.executive-committee h4 {
    color: #fff;
    background-color: var(--dark-color); /* Using theme's dark color */
    border-radius: 25px;
    padding: 8px 20px; /* Slightly reduced padding */
    margin-bottom: 0;
    font-size: 0.95rem; /* Slightly smaller font */
}

.node.secretariat h5 {
    color: #fff;
    background-color: #343a40; /* Using theme's primary color */
    border-radius: 25px;
    padding: 8px 20px; /* Slightly reduced padding */
    margin-bottom: 0;
    font-size: 0.9rem; /* Slightly smaller font */
}

.node.branch h5 {
    color: #fff;
    background-color:#343a40; /* Using theme's secondary color */
    border-radius: 25px;
    padding: 8px 20px; /* Slightly reduced padding */
    margin-bottom: 0;
    font-size: 0.9rem; /* Slightly smaller font */
}

.node.council h5 {
    color: #fff;
    background-color:#343a40; /* Using theme's primary color */
    border-radius: 25px;
    padding: 8px 20px; /* Slightly reduced padding */
    margin-bottom: 0;
    font-size: 0.9rem; /* Slightly smaller font */
}

/* Connections between nodes in the same level (horizontal) */
.level.horizontal-connect {
    position: relative;
    padding-top: 20px; /* Space for horizontal connectors */
}

.level.horizontal-connect::before {
    content: '';
    position: absolute;
    top: 0;
    left: 15%; /* Adjust as needed */
    right: 15%; /* Adjust as needed */
    height: 2px;
    background-color: #ced4da;
    z-index: 0;
}

.level.horizontal-connect .node {
    margin-top: 20px; /* To push nodes below the horizontal line */
}

/* Vertical connectors from horizontal line to nodes */
.level.horizontal-connect .node::before {
    content: '';
    position: absolute;
    top: -20px; /* Connects to the horizontal line */
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 20px;
    background-color: #ced4da;
    z-index: 1;
}

/* General adjustments for text within nodes */
.node h4, .node h5 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.2;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .org-chart {
        gap: 20px;
    }

    .level {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .level:not(:last-child)::after {
        height: 20px;
        bottom: -15px;
    }

    .node {
        width: 80%;
        margin: 0;
        padding: 8px 15px;
        min-height: 50px;
        font-size: 0.85rem;
    }

    .level.horizontal-connect::before {
        display: none; /* Hide horizontal line on small screens */
    }

    .level.horizontal-connect .node {
        margin-top: 0;
    }

    .level.horizontal-connect .node::before {
        height: 0; /* Hide vertical connectors as well */
    }
}
    
