*,
*:before,
*:after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.organizational-chart a,
.organizational-chart a:hover {
    color: #fff;
}

a:hover {
    text-decoration: none !important;
}

.structure-bg {
    background-color: #f3f4f6;
    margin-bottom: 10px !important;
}

.structure-header {
    display: flex !important;
    width: 100%;
    align-items: flex-end;
    background-color: #f3f4f6 !important;
}

.main-button {
    display: flex;
    align-items: center;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    line-height: 23px;
    font-size: 13px;
    padding: 12px 25px;
    background-color: #EEB13C;
    color: #fff;
    border: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}


.item {
    margin: 0 65px;
}

.green-button {
    display: flex;
    align-items: center;
    font-family: 'Montserrat', serif;
    font-weight: 700;
    line-height: 29px;
    font-size: 16px;
    padding: 12px 25px;
    background-color: #4f6392;
    color: #fff;
    border: none;
    border-radius: 8px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

ol.organizational-chart,
ol.organizational-chart ol,
ol.organizational-chart li,
ol.organizational-chart li > div {
    position: relative;
}

ol.organizational-chart,
ol.organizational-chart ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

ol.organizational-chart {
    text-align: center;
}

ol.organizational-chart ol {
    padding-top: 1em;
}

ol.organizational-chart ol:before,
ol.organizational-chart ol:after,
ol.organizational-chart li:before,
ol.organizational-chart li:after,
ol.organizational-chart > li > div:before,
ol.organizational-chart > li > div:after {
    background-color: #6b7280;
    content: '';
    position: absolute;
}

ol.organizational-chart ol > li {
    padding: 1em 0 0 1em;
}

ol.organizational-chart > li ol:before {
    height: 1em;
    left: 50%;
    top: 0;
    width: 3px;
}

ol.organizational-chart > li ol:after {
    height: 3px;
    left: 3px;
    top: 1em;
    width: 50%;
}

ol.organizational-chart > li ol > li:not(:last-of-type):before {
    height: 3px;
    left: 0;
    top: 2em;
    width: 1em;
}

ol.organizational-chart > li ol > li:not(:last-of-type):after {
    height: 100%;
    left: 0;
    top: 0;
    width: 3px;
}

ol.organizational-chart > li ol > li:last-of-type:before {
    height: 3px;
    left: 0;
    top: 2em;
    width: 1em;
}

ol.organizational-chart > li ol > li:last-of-type:after {
    height: 2em;
    left: 0;
    top: 0;
    width: 3px;
}

ol.organizational-chart li > div {
    background-color: #fff;
    border-radius: 8px;
    min-height: 2em;
    transition: all 0.3s ease;
}


/* PRIMARY */
ol.organizational-chart > li > div {
    background-color: #003163;
    margin-right: 1em;
}

ol.organizational-chart > li > div:before {
    bottom: 2em;
    height: 3px;
    right: -1em;
    width: 1em;
}

ol.organizational-chart > li > div:first-of-type:after {
    bottom: 0;
    height: 2em;
    right: -1em;
    width: 3px;
}

ol.organizational-chart > li > div + div {
    margin-top: 1em;
}

ol.organizational-chart > li > div + div:after {
    height: calc(100% + 1em);
    right: -1em;
    top: -1em;
    width: 3px;
}

/* SECONDARY */
ol.organizational-chart > li > ol:before {
    left: inherit;
    right: 0;
}

ol.organizational-chart > li > ol:after {
    left: 0;
    width: 100%;
}

ol.organizational-chart > li > ol > li > div {
    background-color: #4f6392;
}

ol.organizational-chart > li > ol > li > div h2 {
    color: #fff;
    max-width: 300px;
    font-family: 'Montserrat', serif;
    font-weight: 700;
    font-size: 13px !important;
    line-height: 26px;
    text-transform: uppercase;
    padding: 13px 5px;
}

/* TERTIARY */
ol.organizational-chart > li > ol > li > ol > li > div {
    background-color: #EEB13C;
    color: #fff;
    max-width: 250px;
    font-family: 'Inter', serif;
    font-weight: 600;
    font-size: 12px;
    padding: 13px 5px;
    border-radius: 6px;
}

/* QUATERNARY */
ol.organizational-chart > li > ol > li > ol > li > ol > li > div {
    background-color: #f3f4f6;
    border: 1px solid #003163;
    max-width: 200px;
    font-family: 'Inter', serif;
    font-weight: 400;
    font-size: 12px;
    border-radius: 6px;
}

ol.organizational-chart > li > ol > li > ol > li > ol > li > div > a {
    color: #003163;
}

ol.organizational-chart > li > ol > li > ol > li > ol > li > div > a:hover {
    color: #002147;
}

/* QUINARY */
ol.organizational-chart > li > ol > li > ol > li > ol > li > ol > li > div {
    background-color: #EEB13C;
}

ol.organizational-chart > li > div:before,
ol.organizational-chart > li > div:after {
    bottom: 0 !important;
    top: inherit !important;
}

ol.organizational-chart > li > div:before {
    height: 100%;
    left: 50% !important;
    width: 3px !important;
}

ol.organizational-chart > li > div > a.line::before {
    content: '';
    position: absolute;
    background-color: #6b7280;
    display: inline-block;
    width: 100%;
    top: 50% !important;
    height: 3px !important;
    left: 0;
}

/* Остальные стили для соединительных линий остаются такими же... */
ol.organizational-chart > li > div > div > a.top-inline::after,
ol.organizational-chart > li > div > div > a.top-inline::before {
    content: '';
    position: absolute;
    background-color: #6b7280;
    display: inline-block;
}

ol.organizational-chart > li > div > div > a.top-inline::before {
    width: 3px;
    height: 2em;
    right: 0;
    bottom: 0;
}

ol.organizational-chart > li > div > div > a.top-inline::after {
    width: 2em;
    height: 3px;
    right: 0;
    bottom: 2em;
}

/* Продолжение всех остальных стилей соединительных линий точно как в оригинале... */
ol.organizational-chart > li > div > div > a.center-inline::after,
ol.organizational-chart > li > div > div > a.center-inline::before {
    content: '';
    position: absolute;
    background-color: #6b7280;
    display: inline-block;
}

ol.organizational-chart > li > div > div > a.center-inline::before {
    width: 3px;
    height: 4em;
    right: 0;
    bottom: 0;
}

ol.organizational-chart > li > div > div > a.center-inline::after {
    width: 2em;
    height: 3px;
    right: 0;
    bottom: 23px;
}

ol.organizational-chart > li > div > div > a.bottom-inline::after,
ol.organizational-chart > li > div > div > a.bottom-inline::before {
    content: '';
    position: absolute;
    background-color: #6b7280;
    display: inline-block;
}

ol.organizational-chart > li > div > div > a.bottom-inline::before {
    width: 3px;
    height: 23px;
    right: 0;
    top: 0;
}

ol.organizational-chart > li > div > div > a.bottom-inline::after {
    width: 2em;
    height: 3px;
    right: 0;
    bottom: 2em;
}

ol.organizational-chart > li > div > div > a.bottom-inline-right::after,
ol.organizational-chart > li > div > div > a.bottom-inline-right::before {
    content: '';
    position: absolute;
    background-color: #6b7280;
    display: inline-block;
}

ol.organizational-chart > li > div > div > a.bottom-inline-right::before {
    width: 3px;
    height: 2em;
    left: 0;
    top: 0;
}
ol.organizational-chart > li > div > div > a.bottom-inline-center::after {
    width: 2em;
    height: 4px;
    left: 0;
    top: 2em;
}

ol.organizational-chart > li > div > div > a.bottom-inline-right::after {
    width: 2em;
    height: 4px;
    left: 0;
    top: 2em;
}

ol.organizational-chart > li > div > div > a.top-inline-right::after,
ol.organizational-chart > li > div > div > a.top-inline-right::before {
    content: '';
    position: absolute;
    background-color: #6b7280;
    display: inline-block;
}

ol.organizational-chart > li > div > div > a.top-inline-right::before {
    width: 3px;
    height: 2em;
    left: 0;
    bottom: 0;
}

ol.organizational-chart > li > div > div > a.top-inline-right::after {
    width: 2em;
    height: 3px;
    left: 0;
    bottom: 2em;
}

ol.organizational-chart > li > div > div > a.center-inline-right::after,
ol.organizational-chart > li > div > div > a.center-inline-right::before {
    content: '';
    position: absolute;
    background-color: #6b7280;
    display: inline-block;
}

ol.organizational-chart > li > div > div > a.center-inline-right::before {
    width: 3px;
    height: 100%;
    left: 0;
    bottom: 0;
}

ol.organizational-chart > li > div > div > a.center-inline-right::after {
    width: 2em;
    height: 3px;
    left: 0;
    bottom: 23px;
}

/* MEDIA QUERIES */
@media only screen and (min-width: 45em) {
    ol.organizational-chart {
        margin-left: -1em;
        margin-right: -1em;
    }

    /* PRIMARY */
    ol.organizational-chart > li > div {
        display: inline-block;
        float: none;
        vertical-align: bottom;
    }

    ol.organizational-chart > li > div:only-of-type {
        margin-bottom: 0;
        width: 100%;
    }

    ol.organizational-chart > li > div:first-of-type:nth-last-of-type(2),
    ol.organizational-chart > li > div:first-of-type:nth-last-of-type(2) ~ div {
        width: calc((100% / 2) - 2em - 4px);
    }

    ol.organizational-chart > li > div:first-of-type:nth-last-of-type(3),
    ol.organizational-chart > li > div:first-of-type:nth-last-of-type(3) ~ div {
        width: calc((100% / 3) - 2em - 4px);
    }

    ol.organizational-chart > li > div:first-of-type:nth-last-of-type(4),
    ol.organizational-chart > li > div:first-of-type:nth-last-of-type(4) ~ div {
        width: calc((100% / 4) - 2em - 4px);
    }

    ol.organizational-chart > li > div:first-of-type:nth-last-of-type(5),
    ol.organizational-chart > li > div:first-of-type:nth-last-of-type(5) ~ div {
        width: calc((100% / 5) - 2em - 4px);
    }

    ol.organizational-chart > li > div:only-of-type:after {
        display: none;
    }

    ol.organizational-chart > li > div:first-of-type:not(:only-of-type):after,
    ol.organizational-chart > li > div:last-of-type:not(:only-of-type):after {
        bottom: -1em;
        height: 3px;
        width: calc(50% + 1em + 3px);
    }

    ol.organizational-chart > li > div:first-of-type:not(:only-of-type):after {
        left: calc(50% + 3px);
    }

    ol.organizational-chart > li > div:last-of-type:not(:only-of-type):after {
        left: calc(-1em - 3px);
    }

    ol.organizational-chart > li > div + div:not(:last-of-type):after {
        height: 3px;
        left: -2em;
        width: calc(100% + 4em);
    }

    /* SECONDARY */
    ol.organizational-chart > li > ol {
        display: flex;
        flex-wrap: nowrap;
    }

    ol.organizational-chart > li > ol:before,
    ol.organizational-chart > li > ol > li:before {
        height: 1em !important;
        left: 50% !important;
        top: 0 !important;
        width: 3px !important;
    }

    ol.organizational-chart > li > ol:after {
        display: none;
    }

    ol.organizational-chart > li > ol > li {
        flex-grow: 1;
        padding-left: 1em;
        padding-right: 1em;
        padding-top: 1em;
    }

    ol.organizational-chart > li > ol > li:only-of-type {
        padding-top: 0;
    }

    ol.organizational-chart > li > ol > li:only-of-type:before,
    ol.organizational-chart > li > ol > li:only-of-type:after {
        display: none;
    }

    ol.organizational-chart > li > ol > li:first-of-type:not(:only-of-type):after,
    ol.organizational-chart > li > ol > li:last-of-type:not(:only-of-type):after {
        height: 3px;
        top: 0;
        width: 50%;
    }

    ol.organizational-chart > li > ol > li:first-of-type:not(:only-of-type):after {
        left: 50%;
    }

    ol.organizational-chart > li > ol > li:last-of-type:not(:only-of-type):after {
        left: 0;
    }

    ol.organizational-chart > li > ol > li + li:not(:last-of-type):after {
        height: 3px;
        left: 0;
        top: 0;
        width: 100%;
    }
}

/* Все остальные медиа-запросы остаются такими же... */
@media (max-width: 991px) {
    .main-button {
        font-size: 13px;
    }
    
    ol.organizational-chart > li > ol > li > div {
        font-size: 8px;
    }
    
    ol.organizational-chart > li > ol > li > ol > li > div {
        font-size: 11px;
    }
    
    ol.organizational-chart > li > ol > li > ol > li > ol > li > div {
        font-size: 11px;
    }
}

@media screen and (max-width: 768px) {
    organizational-chart{
        position: relative;
    }
    ol.organizational-chart > li::after{
        height: 100%;
        left: 0;
        top: 17px;
        width: 3px;
    }

    .green-button{
        margin-left: auto;
        margin-right: auto;
    }

    ol.organizational-chart > li > div:first-of-type:after {
    top: 0 !important;
    height: 100px;
    left: 0;
    width: 3px;
}
ol.organizational-chart > li > div.main:before {
        left: 0 !important;
        top: 17px !important;
        height: 4px;
        width: 48% !important;
    }
    ol.organizational-chart > li > div.main:after {
        top: 17px !important;
    }

    /* ol.organizational-chart > li > div:first-of-type:after {
    top: 20px !important;
    height: 40px;
    left: 0;
    width: 3px;
} */
 ol.organizational-chart > li > div > div > a.bottom-inline-center::after {
        content: '';
        position: absolute;
        background-color: #6b7280;
        width: 2em;
        height: 3px;
        left: 10px;
        top: 50%;
}
 ol.organizational-chart > li > div > div > a.bottom-inline-center::before {
        content: '';
        position: absolute;
        background-color: #6b7280;
        width: 3px;
        height: 35px;
        left: 10px;
        bottom: 50%;
}

ol.organizational-chart > li > div > div > a.bottom-inline-right::after {
    left: 10px;
}
ol.organizational-chart > li > div > div > a.top-inline-right::after {
    left: 10px;
}

ol.organizational-chart > li > div > div > a.top-inline::before {
    height: 2em;
}

    ol.organizational-chart > li > div > div > a.bottom-inline-right::before {
    left: 10px;
    top: -10px;
    height: 43px;
}
    ol.organizational-chart > li > div > div > a.top-inline::before {
        left: 10px;
    }
    
    ol.organizational-chart > li > div > div > a.top-inline::after {
        left: 10px;
    }
    
    ol.organizational-chart > li > div > div > a.center-inline::before {
        height: 100%;
        left: 10px;
    }

    ol.organizational-chart > li > div > div > a.center-inline::after {
        left: 10px;
    }

    ol.organizational-chart > li > div > div > a.bottom-inline::before {
        height: 100%;
        left: 10px;
    }

    ol.organizational-chart > li > div > div > a.bottom-inline::after {
        left: 10px;
    }

    ol.organizational-chart > li > div > a.line {
        padding-bottom: 10px;
    }

    ol.organizational-chart > li > div > a.line::before {
        height: 62px !important;
        left: 50%;
        top: 0 !important;
        width: 3px;
        /* width: 40%;
        left: 10px;
        top: 0 !important; */
    }
    ol.organizational-chart > li > div > a.line::after {
        height: 1em;
        left: 50%;
        top: 0;
        width: 3px;
    }

    ol.organizational-chart > li > div > a.line::after {
        content: '';
        position: absolute;
        background-color: #6b7280;
        display: inline-block;
        height: 3px;
        top: 59px;
        width: 48% !important;
        left: 10px;
    }
    ol.organizational-chart > li > div > div.relative::after{
        content: '';
        position: absolute;
        background-color: #6b7280;
        display: inline-block;
        height: 3px;
        bottom: 0;
        width: 48% !important;
        left: 10px;
    }

    ol.organizational-chart > li > div > div > a.top-inline-right::before {
        height: 60px;
        left: 10px;
    }

    ol.organizational-chart > li > div > div.relative::before {
        content: '';
        position: absolute;
        background-color: #6b7280;
        display: inline-block;
        height: 31px;
        bottom: 0;
        width: 3px !important;
        left: 10px;
    }

    ol.organizational-chart > li > ol:after {
        left: 0;
        width: 50%;
    }
    
    ol.organizational-chart > li > ol:before {
        left: 50%;
    }
    
    .main-button {
        padding: 10px 5px;
    }
    
    ol.organizational-chart > li > div:before {
        left: 10px !important;
    top: 17px !important;
    height: 3px;
    width: 48% !important;
    }
    
    .structure-header {
        flex-wrap: wrap;
    }

    .green-button {
        line-height: 17px;
        font-size: 10px;
        margin-top: 10px;
        margin-bottom: 10px;
    }
    .flex-column {
        width: 100% !important;
    }
    .d-block {
        width: 100% !important;
    }
    /* ol.organizational-chart > li > .main:after {
    content: '';
        position: absolute;
        background-color: #6b7280;
        display: inline-block;
        width: 50%;
        top: 50% !important;
        height: 3px !important;
        left: 0;
} */
}

/* Utilities */
.align-items-center {
    align-items: center !important;
}

.justify-content-center {
    justify-content: center !important;
}

.w-100 {
    width: 100% !important;
}

.position-relative {
    position: relative !important;
}

.d-block {
    display: block !important;
}

.flex-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    width: 50%;
}

.d-flex {
    display: flex !important;
}

.pb-2 {
    padding-bottom: 0.5rem !important;
}

.px-4 {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
}