body {
    font-family: 'Roboto', 'Segoe UI', sans-serif;
    background-color: #f0f2f5;
    margin: 0;
    padding: 40px 0;
    color: #444;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    overflow-x: hidden;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 60px;
    gap: 20px;
}

.logo-real {
    height: 80px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.title-box {
    text-align: left;
    border-left: 3px solid #d32f2f;
    padding-left: 15px;
}

h1 {
    text-transform: uppercase;
    font-size: 1.4rem;
    margin: 0;
    color: #2c3e50;
    font-weight: 700;
    letter-spacing: 1px;
}

h2 {
    font-size: 1.2rem;
    margin: 5px 0 0 0;
    color: #555;
    font-weight: 400;
}

.tree {
    white-space: nowrap;
    display: flex;
    justify-content: center;
    width: 100%;
    padding-top: 20px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;

}

.tree::-webkit-scrollbar {
    display: none;
}

.tree ul {
    padding-top: 20px;
    position: relative;
    display: flex;
    justify-content: center;
}

.tree li {
    float: left;
    text-align: center;
    list-style-type: none;
    position: relative;
    padding: 20px 10px 0 10px;
}

.tree li::before,
.tree li::after {
    content: '';
    position: absolute;
    top: 0;
    right: 50%;
    border-top: 2px solid #ccc;
    width: 50%;
    height: 20px;
}

.tree li::after {
    right: auto;
    left: 50%;
    border-left: 2px solid #ccc;
}

.tree li:only-child::after,
.tree li:only-child::before {
    display: none;
}

.tree li:only-child {
    padding-top: 0;
}

.tree li:first-child::before,
.tree li:last-child::after {
    border: 0 none;
}

.tree li:last-child::before {
    border-right: 2px solid #ccc;
    border-radius: 0 10px 0 0;
}

.tree li:first-child::after {
    border-radius: 10px 0 0 0;
}

.tree ul ul::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    border-left: 2px solid #ccc;
    width: 0;
    height: 20px;
}

.card {
    background: #fff;
    border: none;
    padding: 15px 10px;
    text-decoration: none;
    color: #444;
    display: inline-block;
    border-radius: 8px;
    min-width: 150px;
    max-width: 180px;
    white-space: normal;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #d32f2f, #2c3e50);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.15), 0 10px 10px rgba(0, 0, 0, 0.12);
}


.card.active {
    background-color: #e3f2fd;
    box-shadow: 0 0 0 2px #2196f3;
}

.card.active::before {
    background: #2196f3;
}

.role {
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
    font-size: 12px;
    color: #d32f2f;
    letter-spacing: 0.5px;
}

.description {
    font-size: 11px;
    margin-bottom: 6px;
    display: block;
    color: #666;
    line-height: 1.3;
}

.name {
    font-size: 12px;
    color: #000;
    font-weight: 500;
    border-top: 1px solid #eee;
    padding-top: 5px;
    margin-top: 5px;
    display: block;
}

.root-node {
    min-width: 250px;
    transform: scale(1.1);
    border-bottom: 3px solid #d32f2f;
}

.root-node .role {
    font-size: 14px;
}

.root-node .name {
    font-size: 14px;
}

@media screen and (max-width: 800px) {
    .tree {
        transform: scale(0.6);
        transform-origin: top center;
    }

    .header-container {
        flex-direction: column;
        text-align: center;
    }

    .title-box {
        border-left: none;
        padding-left: 0;
        margin-top: 10px;
    }
}
