/* WKU College of Education and Behavioral Sciences - Org Chart Styles */

/* Basic org chart structure */
.org-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    font-family: 'Open Sans', sans-serif;
}

.org-container {
    text-align: center;
    padding: 2rem 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.org-node {
    display: inline-block;
    position: relative;
    margin: 0 0.5rem 2.5rem;
    vertical-align: top;
}

/* Ensure the top level node (Dean) is centered */
.top-level {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto 3rem;
    width: 100%;
}

/* First level children (direct reports) need to be in a single row */
.top-level > .org-children-container > .org-children {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    width: 100%;
}

/* Card styling - using WKU colors and design */
.org-node .card {
    width: 180px;
    height: 120px; /* Fixed height for all cards */
    transition: all 0.3s ease;
    border-radius: 0.25rem;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
}

.org-node .card:hover {
    box-shadow: 0 0.25rem 0.75rem rgba(0,0,0,0.15) !important;
    border-color: #C8102E;
}

/* Top level styling - give dean a distinct look */
.top-level > .card {
    width: 240px;
    height: 140px; /* Slightly larger height for dean */
    border-color: #C8102E;
    border-width: 2px;
    margin-bottom: 1.5rem;
}


/* Name and title styling */
.org-node .card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
}

.org-name {
    font-weight: 600;
    color: #C8102E;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.top-level .org-name {
    font-size: 1.25rem;
}

.title-text {
    white-space: pre-line;
    color: #58595B;
    font-size: 1.5rem; /* Increased font size as requested */
    line-height: 1.2;
}

.top-level .title-text {
    font-size: 1.5rem;
}

/* Children container and organization */
.org-children {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

/* The vertical connector lines for each node */
.org-node::after {
    content: "";
    position: absolute;
    top: -1.5rem; /* Move lines above the cards instead of below */
    left: 50%;
    width: 2px;
    height: 1.5rem;
    background-color: #A7A9AC;
    z-index: -1; /* Ensure lines are behind cards */
}

.org-node.has-children::after {
    display: block;
}

.org-node:last-child::after {
    display: none;
}

.org-children-container {
    position: relative;
    margin-top: 1.5rem;
}

/* For the top level node, add more space to the children container */
.top-level > .org-children-container {
    margin-top: 3rem;
    width: 100%; /* Ensure full width */
}

/* Horizontal connector line above child nodes - NOT for top level */
.org-children-container::before {
    content: "";
    position: absolute;
    top: -1.5rem;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #A7A9AC;
    z-index: -1; /* Ensure horizontal connector is behind cards */
}

/* Special treatment for dean's direct reports */
.top-level > .org-children-container > .org-children > .org-node {
    margin: 0 1rem 2.5rem;
}

/* WKU specific colors for various elements */
.wku-heading {
    color: #C8102E;
    font-weight: 600;
    margin-bottom: 1.5rem;
}