:root {
    --primary-color: #086d7a;
    --secondary-color: #195a91;
    --border-grey: #aec1d5;
    --gray-300: #f3f7fd
}


*,:before,:after {
    box-sizing: border-box;
    border-width: 0;
    border-style: solid;
    border-color: #e5e7eb
}

:before,:after {
    --tw-content: ""
}

.dynamic-line {
    position: absolute;
    background: var(--border-grey);
    z-index: -1;
    box-sizing: border-box;
    pointer-events: none;
}

.connection-line.dynamic-line {
    height: 1px !important;
}

.connection-vertical-line.dynamic-line {
    width: 1px !important;
}


.line {
    background: var(--border-grey);
    width: 1px
}

.department-card-line {
    width: 1px;
    background: #fff;
    position: relative;
    overflow: hidden
}

.department-card-line:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--border-grey);
    transform: translateY(-100%);
    animation: drawLine 1.2s ease-in-out forwards
}

.department-card:nth-child(odd) .department-card-line {
    height: 42px
}

.department-card:nth-child(odd) .department-card-line:before {
    animation-delay: calc(var(--card-index) * .3s)
}

.department-card:nth-child(2n) .department-card-line {
    height: 240px
}

.department-card:nth-child(2n) .department-card-line:before {
    animation-delay: calc(var(--card-index) * .3s)
}

.subsection-leading-line,.subsection-connecting-line {
    position: relative;
    overflow: hidden
}

.subsection-leading-line:before,.subsection-connecting-line:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    transform: translate(-100%);
    animation: drawLineHorizontal 1s ease-in-out forwards
}

.subsection-leading-line:before {
    animation-delay: calc(var(--subsection-delay) * .2s + .5s)
}

.subsection-connecting-line:before {
    animation-delay: calc(var(--subsection-delay) * .2s + .7s)
}

@keyframes drawLine {
    0% {
        transform: translateY(-100%)
    }

    to {
        transform: translateY(0)
    }
}

@keyframes drawLineHorizontal {
    0% {
        transform: translate(-100%)
    }

    to {
        transform: translate(0)
    }
}

@keyframes connectorDraw {
    to {
        stroke-dashoffset: 0
    }
}

@keyframes pulseRing {
    0% {
        transform: scale(0);
        opacity: 0
    }

    50% {
        opacity: 1
    }

    to {
        transform: scale(1.8);
        opacity: 0
    }
}

@keyframes pulseRing2 {
    0% {
        transform: scale(0);
        opacity: 0
    }

    50% {
        opacity: 1
    }

    to {
        transform: scale(1.5);
        opacity: 0
    }
}

@keyframes pulseRing3 {
    0% {
        transform: scale(0);
        opacity: 0
    }

    50% {
        opacity: 1
    }

    to {
        transform: scale(1.2);
        opacity: 0
    }
}

@keyframes pulseIcon {
    0%,to {
        transform: scale(1)
    }

    50% {
        transform: scale(1.05)
    }
}

.animate-pulse-ring-1 {
    animation: pulseRing 1.5s ease-out infinite
}

.animate-pulse-ring-2 {
    animation: pulseRing2 1.5s ease-out infinite .15s
}

.animate-pulse-ring-3 {
    animation: pulseRing3 1.5s ease-out infinite .3s
}

.animate-pulse-icon {
    animation: pulseIcon 2s ease-in-out infinite
}

.hierarchy-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px
}

.hierarchy-level {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    justify-content: center
}

.hierarchy-horizontal-line {
    width: 1312px;
    height: 1px;
    background: var(--border-grey);
    position: relative;
    overflow: hidden
}

.hierarchy-horizontal-line:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--border-grey);
    transform: translate(-100%);
    animation: drawLineHorizontal 1.2s ease-in-out forwards;
    animation-delay: .5s
}

.hierarchy-vertical-connectors {
    display: flex;
    justify-content: space-between;
    width: 1312px;
    height: 40px;
    position: relative
}

.hierarchy-vertical-connector {
    width: 1px;
    height: 100%;
    background: var(--border-grey);
    position: relative;
    overflow: hidden
}

.hierarchy-vertical-connector:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--border-grey);
    transform: translateY(-100%);
    animation: drawLine 1s ease-in-out forwards;
    animation-delay: calc(var(--card-index) * .1s + .8s)
}

.hierarchy-cards-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 1312px;
    align-self: stretch;
    align-items: stretch
}

.hierarchy-level3 .hierarchy-cards-row {
    width: 1312px
}

.hierarchy-level4 .hierarchy-cards-row,.hierarchy-level4 .hierarchy-vertical-connectors {
    width: 444px;
    justify-content: center;
    gap: 40px
}

.hierarchy-level>div[class*="h-[1px]"] {
    position: relative;
    overflow: hidden
}

.hierarchy-level>div[class*="h-[1px]"]:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--border-grey);
    transform: translate(-100%);
    animation: drawLineHorizontal 1.2s ease-in-out forwards;
    animation-delay: .5s
}

.hierarchy-level1>div[class*="h-[1px]"],.hierarchy-level2>div[class*="h-[1px]"] {
    width: 1312px
}

.hierarchy-level3>div[class*="h-[1px]"] {
    width: 1312px
}

.hierarchy-level4>div[class*="h-[1px]"] {
    width: 100%
}

.department-card {
    opacity: 0;
    transform: translateY(30px) scale(.9);
    animation: drawCard .8s ease-out forwards;
    animation-delay: calc(var(--card-delay, 0) * .1s + .3s)
}

.department-card .line {
    position: relative;
    overflow: hidden
}

.department-card .line:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--border-grey);
    transform: translateY(-100%);
    animation: drawLine .6s ease-in-out forwards;
    animation-delay: calc(var(--card-delay, 0) * .1s + .5s)
}

@keyframes drawCard {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(.9)
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1)
    }
}

@media (max-width: 1400px) {
    .hierarchy-container {
        max-width:100%;
        padding: 0 10px
    }

    .hierarchy-horizontal-line,.hierarchy-vertical-connectors,.hierarchy-cards-row {
        width: 1155px
    }

    .hierarchy-cards-row {
        gap: 15px;
        align-items: stretch
    }

    .hierarchy-level3 .hierarchy-cards-row {
        width: 1155px
    }
}

@media (max-width: 1200px) {
    .hierarchy-horizontal-line,.hierarchy-vertical-connectors,.hierarchy-cards-row {
        width:1020px
    }

    .hierarchy-cards-row {
        gap: 12px;
        align-items: stretch
    }

    .hierarchy-level3 .hierarchy-cards-row {
        width: 1020px
    }

    .hierarchy-level4 .hierarchy-cards-row {
        width: 652px
    }
}

@media (max-width: 1000px) {
    .hierarchy-horizontal-line,.hierarchy-vertical-connectors,.hierarchy-cards-row {
        width:890px
    }

    .hierarchy-cards-row {
        gap: 10px;
        align-items: stretch
    }

    .hierarchy-level3 .hierarchy-cards-row {
        width: 890px
    }

    .hierarchy-level4 .hierarchy-cards-row {
        width: 290px
    }
}

@media (max-width: 900px) {
    .hierarchy-container {
        gap:20px
    }

    .hierarchy-level {
        gap: 15px
    }

    .hierarchy-vertical-connectors {
        height: 30px
    }
}

.faculty-items-block ::-webkit-scrollbar {
    width: 8px;
    height: 8px
}

.faculty-items-block ::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px
}

.faculty-items-block ::-webkit-scrollbar-thumb {
    background: #0000001a;
    border-radius: 10px
}

.faculty-items-block ::-webkit-scrollbar-thumb:hover {
    background: #0003
}

.container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    width: 100%;
    max-width: 1328px;
    margin: 0 auto;
    margin-bottom: 70px;
}

.top-block {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
    position: relative
}

.top-block div:first-child {
    grid-column: 1;
    justify-self: end
}

.top-block div:nth-child(2) {
    grid-column: 2;
    justify-self: center;
}

.top-block div:nth-child(3) {
    grid-column: 3;
    justify-self: start
}

.top-block div {
    position: relative;
    width: 283px;
    height: 50px;
    background: #7a7878;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px 0;
    padding: 0 10px;
    font-size: 18px;
    font-weight: 500;
    color: #fff
}

.top-block div:not(:last-child):after {
    content: "";
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    width: 303px;
    height: 2px;
    background: #145FCB;
    z-index: -1
}

.top-block div:nth-child(2):before {
    content: "";
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    width: 303px;
    height: 2px;
    background: #145FCB;
    z-index: -1
}

.top-block div:nth-child(2):after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translate(-50%);
    width: 1px;
    height: 48px;
    background: var(--border-grey);
    z-index: -1
}

.top-block.has-2-items {
    grid-template-columns: 1fr auto 1fr
}

.top-block.has-2-items div:first-child {
    grid-column: 1;
    justify-self: end
}

.top-block.has-2-items div:last-child {
    grid-column: 2;
    justify-self: center
}

.top-block.has-2-items div:first-child:after {
    content: "";
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    width: 303px;
    height: 2px;
    background: var(--primary-color);
    z-index: -1
}

.top-block.has-2-items div:last-child:after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translate(-50%);
    width: 1px;
    height: 48px;
    background: var(--border-grey);
    z-index: -1
}

.top-block.has-2-items div:nth-child(2):before {
    display: none
}

.top-block div:nth-child(odd) {
    background-color: #145FCB;
    color: #fff;
    text-align: center
}

.top-block div:nth-child(2n) {
    background: #002D6D;
    color: #fff;
    cursor: pointer
}

.parent-block {
    width: 100%;
    position: relative;
    justify-content: space-between;
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    padding-top: 10px
}

.parent-block:before {
    content: "";
    position: absolute;
    top: 17px;
    left: 89px;
    right: 88.9px;
    height: 1px;
    background: var(--border-grey);
    z-index: -1
}

.parent-block.is-6:before {
    left: 314px;
    right: 314px
}

.parent-block.is-5:before {
    left: 127.5px;
    right: 127.5px
}

.parent-block div {
    position: relative;
    width: 184px;
    height: 100px;
    background: #f6f6f7;
    border: 1px solid var(--border-grey);
    color: #566d80;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    font-size: 14px;
    text-align: center;
    padding: 0 10px
}

.parent-block div p {
    cursor: pointer
}

.parent-block div:before {
    content: "";
    position: absolute;
    top: -23px;
    left: 50%;
    transform: translate(-50%);
    width: 0.5px;
    height: 22px;
    background: var(--border-grey)
}

/* .parent-block div.active:after {
    content: "";
    position: absolute;
    top: 95%;
    left: 50%;
    transform: translate(-50%);
    width: 1px;
    height: 37px;
    background: var(--border-grey);
    z-index: -1
} */

.parent-block-vertical-line div.active:first-child:after {
    content: "";
    position: absolute;
    top: 95%;
    left: 50%;
    transform: translate(-50%);
    width: 1px;
    height: 37px;
    background: var(--border-grey);
    z-index: -1
}

.bottom-block-line {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translate(-50%);
    cursor: pointer;
    border: 1px solid var(--border-grey);
    border-radius:50%;
    width: 23px;
    height: 23px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: #f6f6f7;
}

.wrapper {
    position: relative;
    display: flex;
    gap: 20px;
    /* justify-content: space-between; */
    margin-bottom: -20px;
    margin-top: 101.3px
}

.wrapper a{
    text-decoration: none;
}

.wrapper:before {
    content: "";
    position: absolute;
    top: -23px;
    left: var(--wrapper-line-left, 100.5px);
    right: -30px;
    height: 0.5px;
    background: var(--border-grey);
    z-index: -1
}

.wrapperFaculty::before{
    top: 17px;
}

.wrapperFaculty.is-6:before{
    left: 74px !important;
    right: -31px;
}

.wrapper.is-5:before {
    left: 70px
}

.wrapper.is-6:before {
    left: 85px
}

.card {
    position: relative;
    width: 202px;
    height: auto;
    min-height: 90px;
    max-height: 110px;
    background: #f6f6f7;
    border: 1px solid var(--border-grey);
    color: #566d80;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    padding: 10px;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: flex;
    align-items: center;
    justify-content: center
}

.card:before {
    content: "";
    position: absolute;
    top: -23px;
    left: 50%;
    transform: translate(-50%);
    width: 0.5px;
    height: 23px;
    background: var(--border-grey);
    z-index: -1
}

.card-line {
    position: absolute;
    right: -31px;
    background: var(--border-grey);
    min-height: 843.5px;
    width: 1px!important;
    margin-top: 24px;
    transition: height .3s ease,min-height .3s ease,top .3s ease;
    box-sizing: border-box
}

.horizontal-line {
    position: absolute;
    top: 83.5px;
    left: 50%;
    height: 0.5px;
    width: 52.3%;
    background: var(--border-grey);
    z-index: -1
}

.children-block {
    display: none;
    position: relative;
    column-gap: 12px;
    row-gap: 55px; /* MUHIM */
    margin-top: 60px;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
    width: 1070px;
    max-width: 1070px;
    padding-left: 40px;
    box-sizing: content-box;
    margin-left: -10.5px;
}

.children-block.show {
    display: flex
}

.children-block .child {
    position: relative;
    width: 202px;
    height: 90px;
    background: #f6f6f7;
    border: 1px solid var(--border-grey);
    border-radius: 50px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 12px;
    color: #566d80;
    padding: 10px;
    cursor: pointer;
}

.children-block .child.has-connection:after {
    content: "";
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    width: 182px;
    height: 2px;
    background: var(--border-grey);
    z-index: -1
}

.connection-line {
    position: absolute;
    height: 1px!important;
    background: var(--border-grey);
    z-index: -10;
    box-sizing: border-box
}

.connection-vertical-line {
    position: absolute;
    width: 1px!important;
    background:var(--border-grey);
    z-index: -10;
    box-sizing: border-box;
    min-height: 1px
}

.parent-appear {
    opacity: 0;
    transform: translateY(10px);
    animation: parent-rise .7s ease-out forwards
}

@keyframes parent-rise {
    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.child-enter {
    opacity: 0;
    transform: translate(-10px);
    animation: child-slide-in .55s ease-out forwards;
    animation-delay: calc(var(--i) * .4s)
}

@keyframes child-slide-in {
    to {
        opacity: 1;
        transform: translate(0)
    }
}

.line-animate-x,.line-animate-y {
    transition: transform .7s ease-out
}

.card-appear {
    opacity: 0;
    transform: translateY(10px);
    animation: card-rise .7s ease-out forwards
}

@keyframes card-rise {
    to {
        opacity: 1;
        transform: translateY(0)
    }
}
