.widget_org_structure {
    background: #fff;
}

.widget_org_structure .penci-block_content,
.widget_org_structure .org-structure-chart {
    margin: 0;
    padding: 0;
}

.org-structure-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 16px 32px;
    background: #fff;
}

.org-structure-level {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.org-structure-level-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

.org-structure-connector {
    width: 2px;
    height: 28px;
    margin: 10px auto;
    background: #c8c8c8;
}

.org-structure-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 0 0 calc((100% - 60px) / 4);
    max-width: calc((100% - 60px) / 4);
    padding: 18px 14px 16px;
    border: 1px solid #ececec;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.org-structure-photo-wrap {
    margin-bottom: 14px;
}

.org-structure-photo {
    width: 108px;
    height: 108px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 3px solid #005331;
}

.org-structure-photo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #999;
    font-size: 38px;
    border-color: #d8d8d8;
}

.org-structure-name {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.02em;
    color: #111;
}

.org-structure-position {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    color: #666;
}

.org-structure-level[data-level="1"] .org-structure-card {
    border-color: #b8d4c4;
    background: #f9fcfa;
}

.block-widget-org_structure {
    background: #fff;
    border: 1px solid #eee;
    margin-bottom: 24px;
}

.block-widget-org_structure .home-widget-slot > .widget_org_structure > .penci-block_content {
    margin: 0;
    padding: 0;
}

.block-widget-org_structure .penci-block_content.home-widget-slot {
    padding-top: 0;
}

.home-widget-main-stack .widget_org_structure,
.block-homepage.block-widget-org_structure {
    margin-bottom: 24px;
}

@media (max-width: 767.98px) {
    .org-structure-chart {
        padding: 20px 12px 24px;
    }

    .org-structure-level-row {
        gap: 14px;
    }

    .org-structure-card {
        flex: 0 0 calc((100% - 14px) / 2);
        max-width: calc((100% - 14px) / 2);
        padding: 14px 10px 12px;
    }

    .org-structure-photo {
        width: 88px;
        height: 88px;
    }
}
