  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


body {
    background: url('/res/img/backgrounds/bg2.png') no-repeat center center fixed;
    background-size: cover;
    margin: 0;
    padding: 0;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.org-head {
    font-size: 2rem;
    color: #122348;
    width: 85%;
    justify-content: center;
    align-items: center;
    text-align: justify;
}

.title {
    background-color: #122348;
    border-radius: 5px;
    width: 85%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    margin-top: 10px;
    margin-left: auto;
    margin-right: auto;
    flex-grow: 1;
    animation: fadeIn 1s ease-in forwards 0.5s;
}

.seal_logo {
    width: 150px;
    height: auto;
}

.logo {
    background-color: rgba(255, 255, 255, 0.6);
    color: #122348;
    border-radius: 5px;
    width: 85%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: justify;
    padding: 20px;
    margin-top: 20px;
    margin-left: auto;
    margin-right: auto;
    flex-wrap: wrap;
    margin-bottom: 20px;
    animation: fadeIn 1s ease-in forwards 0.5s;
    height: 300px;
}

.content,
.org-head {
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.subs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding-left: 70px;
    padding-right: 70px;
}

.pma a {
    text-decoration: none;
    font-size: 1.2rem;
}

hr {
    border: 0;
    height: 5px;
    background-color: #cda757;
    margin-bottom: 20px;
}

.tree {
    display: flex;
    justify-content: center;
    padding-bottom: 50px;
}

.tree ul {
    padding-top: 20px;
    position: relative;
    display: flex;
    justify-content: center;
}

.tree li {
    list-style-type: none;
    margin: 0 20px;
    text-align: center;
    position: relative;
    padding: 20px 5px 0 5px;
}

.tree li::before,
.tree li::after {
    content: '';
    position: absolute;
    top: 0;
    width: 50%;
    height: 20px;
}

.tree li::before {
    left: -50%;
}

.tree li::after {
    right: -50%;
}

.tree li:only-child::before,
.tree li:only-child::after {
    content: none;
}

.tree li:only-child {
    padding-top: 0;
}

.tree li ul::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    height: 20px;
}

/* node styling */
.node {
    display: inline-block;
    padding: 12px 18px;
    background: #122348;
    color: #fff;
    border-radius: 8px;
    font-weight: bold;
    transition: background 0.3s;
}

.node:hover {
    background: #1c3879;
}

.node img {
    display: block;
    margin: 0 auto 8px;
    width: 150px;
    height: 150px;
    object-fit: contain;
}

.node p {
    margin: 0;
}

@media screen and (max-width: 768px) {
    .org-head {
        line-height: 3.5rem;
    }

    .subs {
        grid-template-columns: repeat(1, 1fr);
        padding-left: 0px;
        padding-right: 0px;
    }
}

@media screen and (max-width: 480px) {
    .org-head {
        line-height: 3.5rem;
    }

    .subs {
        grid-template-columns: repeat(1, 1fr);
        padding-left: 0px;
        padding-right: 0px;
    }
}

/* ============================== */
/* TABLET — stack level 2 & 3     */
/* ============================== */
@media screen and (max-width: 992px) {

    /* Make tree vertical */
    .tree ul {
        flex-direction: column;
        align-items: center;
    }

    .tree li {
        margin: 20px 0;
    }

    /* Hide horizontal connector lines */
    .tree li::before,
    .tree li::after,
    .tree li ul::before {
        display: none;
    }

    /* Reduce node size */
    .node {
        width: 260px;
        padding: 15px;
    }

    .node img {
        width: 120px;
        height: 120px;
    }

    .node p {
        font-size: 1.1rem;
    }
}

/* ============================== */
/* MOBILE — Full stacking layout  */
/* ============================== */
@media screen and (max-width: 600px) {

    /* Stack the entire organization vertically */
    .tree ul {
        padding: 0;
        flex-direction: column;
        width: 100%;
    }

    .tree li {
        width: 100%;
        margin: 25px 0;
        padding: 0;
    }

    /* Remove connectors fully */
    .tree li::before,
    .tree li::after,
    .tree li ul::before {
        display: none !important;
    }

    /* Node adjustments */
    .node {
        width: 85%;
        padding: 18px;
        font-size: 1rem;
    }

    .node img {
        width: 100px;
        height: 100px;
    }

    .node p {
        font-size: 1rem;
    }

    .org-head h2 {
        font-size: 1.8rem;
    }
}

/* ============================== */
/* VERY SMALL PHONES (≤ 400px)    */
/* ============================== */
@media screen and (max-width: 400px) {
    .node {
        width: 95%;
        padding: 15px;
    }

    .node img {
        width: 80px;
        height: 80px;
    }

    .node p {
        font-size: 0.9rem;
    }
}
