/* Base Container */

.shahj-tree {
    /* background: rgba(255, 255, 255, 0.95); */
    background: #F3FBFD;
    padding: 40px 20px;
    overflow-x: auto;
    max-width: 1800px;
    margin: 0 auto;
    scroll-behavior: smooth;
    border-radius: 0;
    box-shadow: none;
}


/* Header */

.tree-header {
    text-align: center;
    margin-bottom: 60px;
    padding: 0 20px;
}

.tree-header h1 {
    font-size: clamp(22px, 5vw, 42px);
    font-weight: 700;
    margin-bottom: 16px;
    color: #2d3748;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.tree-header p {
    font-size: clamp(13px, 2.5vw, 18px);
    color: #4a5568;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}


/* Tree Base */

.tree {
    display: flex;
    justify-content: center;
    width: 100%;
}

.tree ul {
    padding-top: 20px;
    position: relative;
    transition: all 0.5s;
    display: flex;
    justify-content: center;
}

.tree li {
    float: left;
    text-align: center;
    list-style-type: none;
    position: relative;
    padding: 20px 5px;
    padding-bottom: 0px;
    transition: all 0.5s;
}

.tree li.sub-child ul {
    display: flex;
    flex-direction: column;
}

.tree li.sub-child ul li.sub-sub-child ul {
    display: flex;
    flex-direction: column;
}

.tree li.sub-child ul li.sub-sub-child ul li.sub-sub-sub-child ul {
    display: flex;
    flex-direction: column;
}

.tree li.sub-child ul.two-child {
    display: flex;
    flex-direction: row !important;
}


/* Connectors (Classic Logic) */

.tree li::before,
.tree li::after {
    content: "";
    position: absolute;
    top: 0;
    right: 50%;
    border-top: 2px solid #4f9ab2;
    width: 50%;
    height: 20px;
}

.tree li::after {
    right: auto;
    left: 50%;
    border-left: 2px solid #4f9ab2;
}


/* Remove lines for single nodes */

.tree li:only-child::before,
.tree li:only-child::after {
    display: none;
}

.tree li:only-child {
    padding-top: 0;
}


/* Edge cases */

.tree li:first-child::before,
.tree li:last-child::after {
    border: 0 none;
}

.tree li:last-child::before {
    border-right: 2px solid #4f9ab2;
    border-radius: 0 8px 0 0;
}

.tree li:first-child::after {
    border-radius: 8px 0 0 0;
}


/* Vertical connectors */

.tree ul ul::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    border-left: 2px solid #4f9ab2;
    width: 0;
    height: 20px;
}


/* Node Styles */

.tree li a {
    display: inline-block;
    border: none;
    padding: 16px 32px;
    text-decoration: none;
    color: #2d3748;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: clamp(12px, 2vw, 15px);
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: white;
    min-width: 180px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    word-wrap: break-word;
    hyphens: auto;
}


/* Level-based Styling */

.tree>ul>li>a {
    background: #4f9ab2;
    color: white;
    font-weight: 700;
    font-size: clamp(13px, 2.5vw, 16px);
    padding: 18px 36px;
    min-width: 200px;
}

.tree>ul>li>ul>li>a {
    background: white;
    color: #2d3748;
    padding: 18px 40px;
    min-width: 220px;
    font-size: clamp(13px, 2.5vw, 15px);
}

.tree>ul>li>ul>li>ul>li>a {
    background: white;
    color: #2d3748;
    padding: 16px 50px;
    min-width: 280px;
    font-size: clamp(13px, 2.5vw, 16px);
    font-weight: 600;
}


/* Special category styling */

.tree>ul>li>ul>li>ul>li.technical>a,
.tree>ul>li>ul>li>ul>li.core>a {
    color: #2d3748;
    background: white;
    font-weight: 700;
}

.tree>ul>li>ul>li>ul>li>ul>li>a {
    padding: 14px 20px;
    min-width: 160px;
    max-width: 220px;
    font-size: clamp(11px, 2vw, 13px);
    font-weight: 600;
    color: #2d3748;
    line-height: 1.5;
    background: white;
}


/* Subtitle styling */

.subtitle {
    display: block;
    font-size: clamp(11px, 1.8vw, 13px);
    color: #718096;
    font-weight: 400;
    margin-top: 4px;
}


/* Hover Effects */

.tree li a:hover,
.tree li a:hover+ul li a {
    background: #4f9ab2 !important;
    color: white !important;
    box-shadow: 0 8px 20px rgba(79, 154, 178, 0.3);
    transform: translateY(-3px) scale(1.02);
}

.tree li a:hover+ul li::before,
.tree li a:hover+ul li::after,
.tree li a:hover+ul::before {
    border-color: #4f9ab2;
}

.tree>ul>li>a:hover {
    background: #4f9ab2;
    color: white;
}

.tree>ul>li>ul>li>a:hover .subtitle,
.tree li a:hover+ul li a span.subtitle {
    color: white !important;
}


/* Scrollbar */

.shahj-tree::-webkit-scrollbar,
.tree::-webkit-scrollbar {
    height: 8px;
}

.shahj-tree::-webkit-scrollbar-track,
.tree::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.shahj-tree::-webkit-scrollbar-thumb,
.tree::-webkit-scrollbar-thumb {
    background: #2f3089;
    border-radius: 10px;
}

.shahj-tree::-webkit-scrollbar-thumb:hover,
.tree::-webkit-scrollbar-thumb:hover {
    background: #4f9ab2;
}


/* Desktop Large (1600px+) */

@media (min-width: 1600px) {
    .shahj-tree {
        padding: 60px 40px;
    }

    .tree-header {
        margin-bottom: 80px;
    }
}


/* Desktop/Laptop (1200px - 1600px) */

@media (max-width: 1599px) and (min-width: 1200px) {
    .shahj-tree {
        padding: 40px 30px;
    }

    .tree>ul>li>ul>li>ul>li>a {
        padding: 14px 40px;
        min-width: 240px;
    }
}


/* Laptop/Tablet Landscape (1024px - 1199px) */

@media (max-width: 1199px) and (min-width: 1024px) {
    .shahj-tree {
        padding: 35px 25px;
    }

    .tree-header {
        margin-bottom: 50px;
    }

    .tree>ul>li>ul>li>ul>li>a {
        padding: 14px 35px;
        min-width: 220px;
    }

    .tree>ul>li>ul>li>ul>li>ul>li>a {
        min-width: 150px;
        max-width: 200px;
    }
}


/* iPad Pro Portrait & Landscape (834px - 1023px) */

@media (max-width: 1023px) and (min-width: 834px) {
    body {
        padding: 15px;
    }

    .shahj-tree {
        padding: 30px 20px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tree-header {
        margin-bottom: 40px;
    }

    .tree li {
        padding: 18px 12px 0 12px;
    }

    .tree>ul>li>ul>li>ul>li>a {
        padding: 14px 30px;
        min-width: 200px;
    }

    .tree>ul>li>ul>li>ul>li>ul>li>a {
        padding: 12px 18px;
        min-width: 140px;
        max-width: 180px;
    }
}


/* iPad & Tablet (768px - 833px) */

@media (max-width: 833px) and (min-width: 768px) {
    body {
        padding: 12px;
    }

    .shahj-tree {
        padding: 25px 15px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tree-header {
        margin-bottom: 35px;
        padding: 0 15px;
    }

    .tree li {
        padding: 16px 10px 0 10px;
    }

    .tree li a {
        padding: 14px 24px;
        min-width: 160px;
    }

    .tree>ul>li>a {
        padding: 16px 28px;
        min-width: 180px;
    }

    .tree>ul>li>ul>li>a {
        padding: 16px 32px;
        min-width: 190px;
    }

    .tree>ul>li>ul>li>ul>li>a {
        padding: 14px 28px;
        min-width: 190px;
    }

    .tree>ul>li>ul>li>ul>li>ul>li>a {
        padding: 12px 16px;
        min-width: 130px;
        max-width: 170px;
    }
}


/* Mobile Landscape & Small Tablets (600px - 767px) */

@media (max-width: 767px) and (min-width: 600px) {
    body {
        padding: 10px;
    }

    .shahj-tree {
        padding: 20px 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tree-header {
        margin-bottom: 30px;
        padding: 0 12px;
    }

    .tree li {
        padding: 14px 8px 0 8px;
    }

    .tree li a {
        padding: 12px 20px;
        min-width: 140px;
    }

    .tree>ul>li>a {
        padding: 14px 24px;
        min-width: 160px;
    }

    .tree>ul>li>ul>li>a {
        padding: 14px 28px;
        min-width: 170px;
    }

    .tree>ul>li>ul>li>ul>li>a {
        padding: 12px 24px;
        min-width: 170px;
    }

    .tree>ul>li>ul>li>ul>li>ul>li>a {
        padding: 10px 14px;
        min-width: 120px;
        max-width: 150px;
    }
}


/* Mobile Portrait (480px - 599px) */

@media (max-width: 599px) and (min-width: 480px) {
    body {
        padding: 8px;
    }

    .shahj-tree {
        padding: 18px 10px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tree-header {
        margin-bottom: 25px;
        padding: 0 10px;
    }

    .tree li {
        padding: 12px 7px 0 7px;
    }

    .tree li a {
        padding: 10px 16px;
        min-width: 120px;
    }

    .tree>ul>li>a {
        padding: 12px 20px;
        min-width: 140px;
    }

    .tree>ul>li>ul>li>a {
        padding: 12px 24px;
        min-width: 150px;
    }

    .tree>ul>li>ul>li>ul>li>a {
        padding: 10px 20px;
        min-width: 150px;
    }

    .tree>ul>li>ul>li>ul>li>ul>li>a {
        padding: 9px 12px;
        min-width: 110px;
        max-width: 140px;
    }
}


/* Mobile Small (320px - 479px) */

@media (max-width: 479px) {
    body {
        padding: 5px;
    }

    .shahj-tree {
        padding: 15px 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tree-header {
        margin-bottom: 20px;
        padding: 0 8px;
    }

    .tree li {
        padding: 10px 5px 0 5px;
    }

    .tree li a {
        padding: 9px 14px;
        min-width: 110px;
    }

    .tree>ul>li>a {
        padding: 11px 18px;
        min-width: 130px;
    }

    .tree>ul>li>ul>li>a {
        padding: 11px 20px;
        min-width: 140px;
    }

    .tree>ul>li>ul>li>ul>li>a {
        padding: 9px 18px;
        min-width: 140px;
    }

    .tree>ul>li>ul>li>ul>li>ul>li>a {
        padding: 8px 10px;
        min-width: 100px;
        max-width: 130px;
        font-size: 11px;
    }
}


/* iPhone 14 Pro Max, 14 Plus, 13 Pro Max (428px) */

@media only screen and (max-width: 428px) {
    .tree-header h1 {
        font-size: 20px;
    }

    .tree-header p {
        font-size: 12px;
    }
}


/* iPhone SE, 12 mini, 13 mini (375px) */

@media only screen and (max-width: 375px) {
    .tree-header h1 {
        font-size: 18px;
    }

    .tree-header p {
        font-size: 11px;
    }
}

.msc1 .mssc-ul .mssc1 .msssc-ul .msssc1 .mssssc-ul .mssssc2 .msssssc-ul li::after,
.msc1 .mssc-ul .mssc1 .msssc-ul .msssc2 .mssssc-ul li::after,
.msc1 .mssc-ul .mssc2 .msssc-ul li::after,
.msc2 .mssc-ul li::after,
.msc3 .mssc-ul li::after,
.msc4 .mssc-ul li::after,
.msc1 .mssc-ul .mssc1 .msssc-ul .msssc1 .mssssc-ul .mssssc2 .msssssc-ul li::before,
.msc1 .mssc-ul .mssc1 .msssc-ul .msssc2 .mssssc-ul li::before,
.msc1 .mssc-ul .mssc2 .msssc-ul li::before,
.msc2 .mssc-ul li::before,
.msc3 .mssc-ul li::before,
.msc4 .mssc-ul li::before {
    border-radius: unset;
    width: 0px;
}

.tree ul li a {
    min-width: 140px !important;
    max-width: 140px !important;
    width: 140px !important;
    padding: 15px 10px !important;
    font-size: 14px !important;
    text-transform: capitalize !important;
}

.shahj-tree {
    max-width: 100%;
    /* margin: 0px; */
    overflow: unset;
}

.new-mp,
.npm1 {
    position: relative;
    z-index: 3;
}

.new-mp {
    width: max-content;
    margin: 0 auto;
}

.nmp2 {
    position: absolute;
    top: 0;
    left: 300px;
    width: max-content;
}

.new-mp a {
    background: #4f9ab2 !important;
    color: #fff !important;
    z-index: 3;
}

.nmp1::after {
    position: absolute;
    content: '';
    width: 300px;
    height: 1px;
    background: #4f9ab2;
    top: 50%;
    left: 50%;
    /* transform: translate(-50%, -50%); */
    z-index: -3 !important;
}

.parent.mp1:has(> .new-mp > .nmp1:hover)>ul li a {
    background: #4f9ab2 !important;
    color: #fff !important;
    box-shadow: 0 8px 20px rgba(79, 154, 178, 0.3);
    transform: translateY(-3px) scale(1.02);
}

@media only screen and (max-width: 767px) {
    .full-tree {
        padding-bottom: 50px !important;
    }
}

@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {}

@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {}

@media (min-width: 1300px) and (max-width: 1400px) {
    .tree ul li a {
        min-width: 120px !important;
        max-width: 120px !important;
        width: 120px !important;
        padding: 15px 10px !important;
        font-size: 12px !important;
    }
}

@media (min-width: 1400px) and (max-width: 1500px) {
    .tree ul li a {
        min-width: 125px !important;
        max-width: 125px !important;
        width: 125px !important;
        padding: 15px 10px !important;
        font-size: 12px !important;
    }
}