/* ========================================
   DOJ — DEPARTMENT OF JUSTICE ORGANIGRAMM CSS
   Farbschema: Gold (#ffd700) + Violet (#8b5cf6)
   ======================================== */

/* Haupt-Container */
.doj-tree-section {
    position: relative;
    padding: 140px 0;
    background: #0a0810;
    border-top: 1px solid rgba(255,215,0,.1);
    border-bottom: 1px solid rgba(255,215,0,.1);
}

.doj-tree-section .section-head {
    margin-bottom: 80px;
}

/* ========================================
   ORG NODE
   ======================================== */
.doj-org-tree {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.doj-org-node {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 220px;
}

/* Linie nach oben */
.doj-org-node::before {
    content: "";
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 30px;
    background: linear-gradient(to bottom, transparent, #ffd700);
}

/* Linie nach unten */
.doj-org-node::after {
    content: "";
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 30px;
    background: linear-gradient(to bottom, #ffd700, transparent);
}

.doj-org-node:first-child::before {
    display: none;
}

/* ========================================
   ORG CARD
   ======================================== */
.doj-org-card {
    position: relative;
    background: linear-gradient(145deg, rgba(20,16,30,.94), rgba(8,6,16,.96));
    border: 1px solid rgba(255,215,0,.2);
    padding: 20px 24px;
    width: 100%;
    text-align: center;
    overflow: hidden;
    transition: transform .35s, border-color .35s;
}

.doj-org-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.doj-org-node.chief_justice .doj-org-card::before { background: linear-gradient(90deg, #ffd700, #ff8a00); }
.doj-org-node.deputy_chief .doj-org-card::before { background: linear-gradient(90deg, #8b5cf6, #ffd700); }
.doj-org-node.senior_judge .doj-org-card::before { background: linear-gradient(90deg, #ffd700, #00d4ff); }
.doj-org-node.judge .doj-org-card::before { background: linear-gradient(90deg, #8b5cf6, #c084fc); }
.doj-org-node.prosecutor .doj-org-card::before { background: linear-gradient(90deg, #ef4444, #ffd700); }
.doj-org-node.defense_attorney .doj-org-card::before { background: linear-gradient(90deg, #00d4ff, #8b5cf6); }
.doj-org-node.bailiff .doj-org-card::before,
.doj-org-node.clerk .doj-org-card::before { background: rgba(255,255,255,.15); }

.doj-org-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255,215,0,.4);
    box-shadow: 0 20px 60px rgba(255,215,0,.15);
}

.doj-org-badge {
    font-family: "Share Tech Mono", monospace;
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #ffd700;
    margin-bottom: 16px;
}

/* ========================================
   ORG MEMBERS
   ======================================== */
.doj-org-members {
    display: grid;
    gap: 8px;
}

.doj-org-member {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.06);
    transition: border-color .25s, transform .25s;
    text-align: left;
}

.doj-org-member:hover {
    border-color: rgba(255,215,0,.3);
    transform: translateX(4px);
}

.doj-org-member.empty {
    justify-content: center;
    background: transparent;
    border: 1px dashed rgba(255,255,255,.15);
}

.doj-org-member.loading {
    justify-content: center;
    background: transparent;
    border: 1px dashed rgba(255,215,0,.2);
}

.doj-org-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,215,0,.3);
    flex-shrink: 0;
}

.doj-org-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    overflow: hidden;
}

.doj-org-name {
    font-family: "Oswald", sans-serif;
    font-size: 13px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doj-org-role {
    font-family: "Share Tech Mono", monospace;
    font-size: 10px;
    color: rgba(237,245,255,.68);
    letter-spacing: .1em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========================================
   ORG LEVELS
   ======================================== */
.doj-org-level {
    display: flex;
    justify-content: center;
    gap: 100px;
    width: 100%;
}

/* ========================================
   VERZWEIGUNGSLINIEN
   ======================================== */
.doj-org-branch {
    position: relative;
    width: 100%;
    height: 60px;
    display: flex;
    justify-content: center;
}

.doj-org-branch::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 30px;
    background: linear-gradient(to bottom, #ffd700, #8b5cf6);
}

.doj-org-branch.two::after {
    content: "";
    position: absolute;
    top: 30px;
    left: 25%;
    width: 50%;
    height: 2px;
    background: linear-gradient(to right, #ffd700, #8b5cf6);
}

.doj-org-branch.two .doj-org-branch-arm {
    position: absolute;
    top: 30px;
    width: 2px;
    height: 30px;
    background: linear-gradient(to bottom, #ffd700, #8b5cf6);
}

.doj-org-branch.two .doj-org-branch-arm.left { left: 25%; transform: translateX(-50%); }
.doj-org-branch.two .doj-org-branch-arm.right { left: 75%; transform: translateX(-50%); }

.doj-org-branch.three::after {
    content: "";
    position: absolute;
    top: 30px;
    left: 16.666%;
    width: 66.666%;
    height: 2px;
    background: linear-gradient(to right, #ffd700, #8b5cf6);
}

.doj-org-branch.three .doj-org-branch-arm {
    position: absolute;
    top: 30px;
    width: 2px;
    height: 30px;
    background: linear-gradient(to bottom, #ffd700, #8b5cf6);
}

.doj-org-branch.three .doj-org-branch-arm.left { left: 16.666%; transform: translateX(-50%); }
.doj-org-branch.three .doj-org-branch-arm.center { left: 50%; transform: translateX(-50%); }
.doj-org-branch.three .doj-org-branch-arm.right { left: 83.333%; transform: translateX(-50%); }

.doj-org-branch.four::after {
    content: "";
    position: absolute;
    top: 30px;
    left: 12.5%;
    width: 75%;
    height: 2px;
    background: linear-gradient(to right, #ffd700, #8b5cf6);
}

.doj-org-branch.four .doj-org-branch-arm {
    position: absolute;
    top: 30px;
    width: 2px;
    height: 30px;
    background: linear-gradient(to bottom, #ffd700, #8b5cf6);
}

.doj-org-branch.four .doj-org-branch-arm.left { left: 12.5%; transform: translateX(-50%); }
.doj-org-branch.four .doj-org-branch-arm.center-left { left: 37.5%; transform: translateX(-50%); }
.doj-org-branch.four .doj-org-branch-arm.center-right { left: 62.5%; transform: translateX(-50%); }
.doj-org-branch.four .doj-org-branch-arm.right { left: 87.5%; transform: translateX(-50%); }

/* ========================================
   RESPONSIVE
   ======================================== */
@media(max-width: 900px) {
    .doj-org-level {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }
    
    .doj-org-branch {
        display: none;
    }
    
    .doj-org-node::before,
    .doj-org-node::after {
        display: none;
    }
}

@media(max-width: 760px) {
    .doj-org-node {
        min-width: 180px;
    }
    
    .doj-org-card {
        padding: 16px;
    }
}
