/* Organizational Chart Styles */
.org-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

/* Unordered List Style */
.org-chart ul {
    padding: 0;
    margin: 0;
    list-style: none;
    position: relative;
}

/* List Style */
.org-chart li {
    padding-top: 20px;
    position: relative;
    display: inline-block;
    vertical-align: top;
    text-align: center;
    margin: 0 20px;
}

/* Lines for the chart */
.org-chart li::before, .org-chart li::after {
    content: '';
    position: absolute;
    top: 0;
    right: 50%;
    border-top: 2px solid #ccc;
    width: 50%;
    height: 20px;
}

.org-chart li::after {
    right: auto;
    left: 50%;
    border-left: 2px solid #ccc;
}

/* Remove left border from first child and right from last */
.org-chart li:only-child::after, .org-chart li:only-child::before {
    display: none;
}

.org-chart li:first-child::before, .org-chart li:last-child::after {
    border: 0 none;
}

.org-chart li:last-child::before {
    border-right: 2px solid #ccc;
    border-radius: 0 5px 0 0;
    transition: background-color 0.3s, border-color 0.3s;
}

.org-chart li:first-child::after {
    border-radius: 5px 0 0 0;
    transition: background-color 0.3s, border-color 0.3s;
}

.org-chart ul ul::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    border-left: 2px solid #ccc;
    width: 0;
    height: 20px;
    transition: background-color 0.3s, border-color 0.3s;
}

/* Employee Box Style */
.employee-box {
    border: 2px solid #ccc;
    padding: 10px;
    border-radius: 15px;
    background-color: #fafafa;
    min-width: 150px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

/* Hover Effect */
.employee-box:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    transform: translateY(-5px);
}

/* Image Style */
.employee-box img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #0056b3;
}

/* Name Style */
.employee-box a {
    text-decoration: none;
    color: #0056b3;
    font-weight: bold;
}
 /* Hover Effect */
.employee-box a:hover {
    text-decoration: underline;
}

/* Employee Detail Page Styles */
.employee-detail {
    text-align: left;
    max-width: 600px;
    margin: 8% auto;
    padding: 20px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Image Style */
.employee-detail img {
    float: left;
    margin-right: 20px;
    margin-bottom: 20px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid #0056b3;
}

/* Employee Name Style */
.employee-detail h1 {
    margin-top: 0;
}

/* Text Style */
.employee-detail p {
    line-height: 1.6;
    margin: 10px 0;
}

/* Employee Field Text */
.employee-detail .info-label {
    font-weight: bold;
    color: #333;
}

/* Back Link Text Style */
.back-link {
    display: block;
    margin-top: 20px;
    text-align: center;
}

/* Footer Styles */
.footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 0px solid #ccc;
    font-size: 0.8em;
    color: #fff;
    clear: both;
}

.footer .validation, .footer .last-modified {
    text-align: center;
    margin-bottom: 10px;
}


/* Employee Box (Org Chart) Dark Mode Style */
body.dark-mode .employee-box {
    background-color: #1e1e1e;
    border-color: #121212;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

/* Employee Detail Dark Mode Style */
body.dark-mode .employee-detail {
    background-color: #1e1e1e;
    border-color: #3a3a3a3a;
}

/* Employee field text dark mode style */
body.dark-mode .info-label {
    color: #fff;
}

/* Dark mode style for the lines in the org chart */
body.dark-mode .org-chart li::before,
body.dark-mode .org-chart li::after,
body.dark-mode .org-chart ul ul::before {
    border-color: #1e1e1e;
    transition: background-color 0.3s, border-color 0.3s;
}