/* Modern UI layer – loads after legacy CSS */
:root {
    --c1: #1b3f80;
    --c2: #2759a6;
    --c3: #1bb157;
    --red: #ee3237;
    --ink: #1f2937;
    --soft: #eef3fb;
    --r: 16px;
    --sh: 0 10px 30px rgba(39, 89, 166, .16);
    --ease: cubic-bezier(.22, .8, .3, 1)
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%
}

img {
    max-width: 100%;
    height: auto
}

::selection {
    background: var(--c2);
    color: #fff
}

/* top strip + nav */
#navbar-btns {
    background: linear-gradient(90deg, var(--c1), #0a4a99)
}

#navigation {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    box-shadow: 0 2px 18px rgba(0, 0, 0, .08);
    transition: box-shadow .3s
}

.pc-nav li a {
    position: relative;
    font-weight: 600;
    border-radius: 8px
}

.pc-nav li a:hover {
    color: var(--c2)
}

.pc-nav>li>a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 2px;
    width: 0;
    height: 2px;
    background: var(--c2);
    transition: .3s var(--ease);
    transform: translateX(-50%)
}

.pc-nav>li:hover>a::after {
    width: 60%
}

.pc-nav .sub-nav ul {
    border-radius: 12px;
    box-shadow: var(--sh);
    overflow: hidden;
    animation: dd .25s var(--ease)
}

@keyframes dd {
    from {
        opacity: 0;
        transform: translateY(8px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

.logo img {
    max-height: 64px;
    width: auto;
    transition: transform .3s
}

.logo img:hover {
    transform: scale(1.05)
}

/* slider */

/* buttons & forms */

/* cards */
.facility-col,
.notice-board,
.img-cont,
.team-box,
.circle {
    border-radius: var(--r);
    transition: transform .35s var(--ease), box-shadow .35s
}

.facility-col:hover,
.img-cont:hover {
    transform: translateY(-6px);
    box-shadow: var(--sh)
}

.circle:hover {
    transform: scale(1.06)
}

section {
    position: relative
}

.notice-board {
    box-shadow: var(--sh);
    overflow: hidden
}

.notice-title,
.download-title {
    border-radius: var(--r) var(--r) 0 0
}

/* gallery / images */
.gallery img,
.img-cont img,
.update-image img {
    border-radius: 12px;
    transition: transform .5s var(--ease)
}

.img-cont:hover img {
    transform: scale(1.05)
}

/* footer */
footer {
    background: linear-gradient(160deg, #021d41, var(--c1));
    color: #dbe7f5
}

footer a {
    color: #cfe3f7
}

footer a:hover {
    color: #fff
}

.footer-social i {
    transition: transform .25s, background .25s
}

.footer-social i:hover {
    transform: translateY(-4px) scale(1.1)
}

/* reveal animation (JS adds .in) */
.rv {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s var(--ease), transform .7s var(--ease)
}

.rv.in {
    opacity: 1;
    transform: none
}

@keyframes up {
    from {
        opacity: 0;
        transform: translateY(28px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

#toTop {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: var(--c2);
    color: #fff;
    font-size: 18px;
    box-shadow: var(--sh);
    opacity: 0;
    visibility: hidden;
    transition: .3s;
    z-index: 998;
    cursor: pointer
}

#toTop.show {
    opacity: 1;
    visibility: visible
}

/* mobile */
@media(max-width:991px) {
    .container {
        width: 100%;
        padding-left: 14px;
        padding-right: 14px
    }

    #navbar-btns .main-nav ul {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        justify-content: center;
        padding: 6px 0
    }

    #navbar-btns .main-nav ul li {
        margin: 0
    }

    #navbar-btns .main-nav ul li a {
        font-size: 12px;
        padding: 4px 8px
    }
}

@media(max-width:767px) {
    body {
        font-size: 15px
    }

    h1 {
        font-size: 26px
    }

    h2 {
        font-size: 22px
    }

    h3 {
        font-size: 19px
    }

    .logo img {
        max-height: 48px
    }

    .col-xs-6 {
        padding-left: 8px;
        padding-right: 8px
    }

    .facility-col,
    .notice-board {
        margin-bottom: 14px
    }

    .modal-dialog {
        margin: 10px
    }

    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch
    }
}

@media(prefers-reduced-motion:reduce) {
    * {
        animation: none !important;
        transition: none !important
    }

    .rv {
        opacity: 1;
        transform: none
    }

    html {
        scroll-behavior: auto
    }
}

/* ===== Header responsive fix (<=1200px) ===== */
@media(max-width:1200px) {
    #navigation .container>.row {
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
        margin: 0
    }

    #navigation .container>.row>[class*=col-] {
        float: none;
        width: auto;
        padding: 8px 10px
    }

    #navigation .container>.row>[class*=col-]:first-child {
        flex: 0 0 auto
    }

    #navigation .container>.row>[class*=col-]:last-child {
        flex: 1 1 auto;
        display: flex;
        justify-content: flex-end;
        padding: 8px 10px !important
    }

    .pc-nav {
        display: none !important
    }

    .mobile-nav {
        display: block !important;
        position: static;
        margin: 0;
        padding: 0;
        list-style: none
    }

    .mobile-nav>li {
        position: static;
        list-style: none
    }

    .mobile-nav .menu-btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 9px 16px;
        border-radius: 10px;
        background: var(--c1);
        color: #fff !important;
        font-weight: 600;
        font-size: 14px;
        text-decoration: none
    }

    .mobile-nav-content {
        display: none !important;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        width: 100%;
        max-height: calc(100vh - 90px);
        overflow-y: auto;
        margin: 0;
        padding: 8px 0;
        background: #fff;
        box-shadow: 0 18px 30px rgba(0, 0, 0, .18);
        border-top: 3px solid var(--c2);
        animation: dd .25s var(--ease);
        -webkit-overflow-scrolling: touch
    }

    .mobile-nav.open .mobile-nav-content {
        display: block !important
    }

    .mobile-nav:hover .mobile-nav-content {
        display: none !important
    }

    .mobile-nav.open:hover .mobile-nav-content {
        display: block !important
    }

    .mobile-nav-content li {
        display: block;
        width: 100%;
        list-style: none;
        border-bottom: 1px solid #eef2f7
    }

    .mobile-nav-content li a {
        display: block;
        padding: 13px 20px;
        color: var(--c1) !important;
        font-size: 14px;
        font-weight: 600;
        text-align: left;
        background: transparent
    }

    .mobile-nav-content li a:active {
        background: var(--soft)
    }

    .mobile-nav-content .sub-nav>a::after {
        content: "\f107";
        font-family: "Font Awesome 5 Free";
        font-weight: 900;
        float: right;
        transition: transform .25s
    }

    .mobile-nav-content .sub-nav.open>a::after {
        transform: rotate(180deg)
    }

    .mobile-nav-content .sub-nav>ul {
        display: none;
        position: static;
        width: 100%;
        margin: 0;
        padding: 0;
        background: var(--soft);
        box-shadow: none
    }

    .mobile-nav-content .sub-nav.open>ul {
        display: block
    }

    .mobile-nav-content .sub-nav>ul li a {
        padding-left: 36px;
        font-weight: 500
    }

    #navigation {
        position: sticky
    }

    #navigation .container {
        position: relative
    }
}

@media(max-width:991px) {

    #navbar-btns .container-fluid,
    #navbar-btns .container {
        padding: 0
    }

    #navbar-btns .main-nav ul {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 6px;
        justify-content: flex-start;
        padding: 6px 10px;
        margin: 0;
        scrollbar-width: none
    }

    #navbar-btns .main-nav ul::-webkit-scrollbar {
        display: none
    }

    #navbar-btns .main-nav ul li {
        flex: 0 0 auto;
        margin: 0;
        float: none
    }

    #navbar-btns .main-nav ul li a {
        white-space: nowrap;
        font-size: 12px;
        padding: 6px 10px
    }
}

@media(max-width:480px) {
    .logo img {
        max-height: 42px
    }

    .mobile-nav .menu-btn {
        padding: 8px 12px;
        font-size: 13px
    }
}

/* ===== New header look ===== */
#navigation {
    background: #fff !important;
    box-shadow: 0 2px 14px rgba(2, 44, 97, .08);
    padding: 0;
    transition: padding .3s, background .3s
}

#navigation>.container {
    max-width: 1280px;
    transition: all .35s var(--ease)
}

#navbar.sticky #navigation {
    background: transparent !important;
    box-shadow: none;
    padding: 10px 0
}

#navbar.sticky #navigation>.container {
    background: rgba(255, 255, 255, .96);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(2, 44, 97, .14);
    border: 1px solid rgba(2, 44, 97, .06);
    width: calc(100% - 24px);
    padding: 0 14px
}

#navigation .container>.row {
    margin: 0
}

.logo img {
    width: auto;
    max-height: 64px;
    margin: 0
}

@media(min-width:1201px) {
    #navigation .col-md-10 {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        padding: 10px 0 !important
    }

    .pc-nav {
        float: none;
        display: flex !important;
        align-items: center;
        gap: 4px;
        margin: 0;
        flex-wrap: nowrap
    }

    .pc-nav li {
        display: block;
        white-space: nowrap
    }

    .pc-nav li a {
        display: block;
        padding: 10px 13px;
        font-size: 13px;
        font-weight: 600;
        letter-spacing: .03em;
        color: var(--c1);
        background: transparent;
        box-shadow: none;
        border-radius: 10px
    }

    .pc-nav li a:hover {
        background: transparent;
        box-shadow: none;
        color: var(--c2)
    }

    .pc-nav>li>a::after {
        left: 13px;
        right: 13px;
        bottom: 4px;
        width: auto;
        height: 2px;
        transform: scaleX(0);
        transform-origin: left;
        border-radius: 2px;
        background: linear-gradient(90deg, var(--c2), var(--c3))
    }

    .pc-nav>li:hover>a::after {
        width: auto;
        transform: scaleX(1)
    }

    .pc-nav .sub-nav {
        position: relative
    }

    .pc-nav>li:last-child {
        margin-left: 8px
    }

    .pc-nav>li:last-child>a {
        background: linear-gradient(135deg, var(--c1), var(--c2));
        color: #fff;
        padding: 10px 20px;
        border-radius: 50px;
        box-shadow: 0 6px 16px rgba(0, 160, 223, .35)
    }

    .pc-nav>li:last-child>a::after {
        display: none
    }

    .pc-nav>li:last-child>a:hover {
        color: #fff;
        transform: translateY(-2px)
    }

    .pc-nav .sub-nav ul {
        margin-top: 8px;
        background: #fff;
        min-width: 230px;
        padding: 6px
    }

    .pc-nav .sub-nav ul li a {
        padding: 10px 14px;
        border-radius: 8px;
        white-space: normal
    }

    .pc-nav .sub-nav ul li a:hover {
        background: var(--soft)
    }
}

@media(min-width:1201px) and (max-width:1350px) {
    .pc-nav li a {
        padding: 10px 9px;
        font-size: 12px
    }
}

/* active menu */
.pc-nav a.active {
    color: var(--c2) !important
}

.pc-nav>li>a.active::after {
    transform: scaleX(1) !important;
    width: auto !important
}

.pc-nav>li:last-child>a.active {
    color: #fff !important
}

.pc-nav .sub-nav ul a.active {
    background: var(--soft);
    color: var(--c2) !important;
    font-weight: 700
}

.mobile-nav-content a.active {
    color: var(--c2) !important;
    background: var(--soft);
    border-left: 4px solid var(--c2)
}

/* stronger active highlight */
@media(min-width:1201px) {
    .pc-nav>li>a.active {
        background: linear-gradient(135deg, var(--c2), var(--c1)) !important;
        color: #fff !important;
        box-shadow: 0 6px 16px rgba(39, 89, 166, .35) !important;
        border-radius: 50px !important
    }

    .pc-nav>li>a.active::after {
        display: none
    }

    .pc-nav>li:last-child>a.active {
        outline: 3px solid rgba(0, 160, 223, .3)
    }
}

.mobile-nav-content a.active {
    background: linear-gradient(90deg, rgba(0, 160, 223, .18), transparent) !important;
    font-weight: 700
}

/* ===== Logo colour theme: blue #2759a6 / red #ee3237 / green #1bb157 ===== */
#navbar-btns {
    background: linear-gradient(90deg, var(--c1), var(--c2)) !important;
    border-bottom: 3px solid var(--red)
}

#navbar-btns .main-nav ul li a:hover {
    color: #bff0d1
}

.pc-nav>li:last-child>a,
.pc-nav .login a {
    background: linear-gradient(135deg, var(--red), #c81f25) !important;
    box-shadow: 0 6px 16px rgba(238, 50, 55, .35) !important
}

.pc-nav>li>a::after {
    background: linear-gradient(90deg, var(--red), var(--c3)) !important
}

.pc-nav .sub-nav ul {
    border-top: 3px solid var(--c3)
}

.pc-nav a.active,
.mobile-nav-content a.active {
    color: var(--c2)
}

.mobile-nav .menu-btn {
    background: var(--c2)
}

.mobile-nav-content {
    border-top-color: var(--red)
}

#navigation>.container,
.sticky #navigation {
    border-color: rgba(39, 89, 166, .1)
}

#news::after,
#query .container-fluid::before {
    border-bottom-color: var(--c1);
    border-top-color: var(--c1)
}

.notice-title {
    background: linear-gradient(135deg, var(--c1), var(--c2)) !important;
    color: #fff
}

.download-title {
    background: linear-gradient(135deg, var(--c3), #12894a) !important;
    color: #fff
}

.notice-title::before {
    border-right-color: var(--red) !important;
    border-bottom-color: var(--red) !important
}

#news .notice-board a:hover {
    border-color: var(--red);
    color: var(--red)
}

.facility-col {
    background: rgba(27, 63, 128, .55) !important;
    border: 2px solid rgba(255, 255, 255, .25) !important
}

.facility-col:hover {
    background: var(--c2) !important;
    border-color: var(--c3) !important
}

#query .query-form,
#query .query-form-col::after {
    background-color: var(--c1) !important
}

#query .query-form-col::after {
    background: none !important;
    border-top-color: var(--c1) !important
}

footer {
    background: linear-gradient(160deg, #10285a, var(--c1)) !important;
    border-top: 4px solid var(--c3)
}

.footer-social i {
    background: rgba(255, 255, 255, .12);
    border-radius: 50%
}

.footer-social i:hover {
    background: var(--red);
    color: #fff
}

#toTop {
    background: var(--red)
}

/* layering fixes */
#navbar {
    z-index: 1000
}

#navigation {
    z-index: 1000
}

/* single back-to-top button (original element) */
#toTop {
    display: none !important
}

.scroll-top {
    width: 48px !important;
    height: 48px !important;
    right: 22px !important;
    bottom: 22px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #2759a6, #1b4084) !important;
    box-shadow: 0 8px 20px rgba(39, 89, 166, .4) !important;
    opacity: 1 !important;
    z-index: 998;
    align-items: center;
    justify-content: center;
    transition: transform .25s, background .25s !important
}

.scroll-top i {
    font-size: 16px;
    line-height: 48px
}

.scroll-top:hover {
    background: linear-gradient(135deg, #ee3237, #c81f25) !important;
    transform: translateY(-4px)
}

@media(prefers-reduced-motion:reduce) {
    #slider {
        animation: animate 16s ease-in-out infinite !important
    }
}

/* light buttons keep dark text */

/* ===== Page banner image (all pages): optimised campus photo ===== */
.banner,
.kd-pbanner {
    background-image: url('../img/banner-campus.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    height: clamp(150px, 23vw, 330px) !important
}

/* ===== Mobile menu v2 ===== */
@media(max-width:1200px) {
    #navigation .container {
        position: relative
    }

    .mobile-nav .menu-btn {
        display: inline-flex !important;
        align-items: center;
        gap: 8px;
        padding: 9px 18px;
        border-radius: 50px !important;
        background: linear-gradient(135deg, #2759a6, #3d82e8) !important;
        color: #fff !important;
        font-weight: 600;
        font-size: 13px;
        letter-spacing: .06em;
        box-shadow: 0 6px 16px rgba(39, 89, 166, .3)
    }

    .mobile-nav .menu-btn i {
        transition: transform .3s
    }

    .mobile-nav.open .menu-btn i::before {
        content: "\f00d"
    }

    .mobile-nav-content {
        left: 10px !important;
        right: 10px !important;
        top: calc(100% + 6px) !important;
        width: auto !important;
        margin: 0 !important;
        padding: 10px !important;
        border: 0 !important;
        border-radius: 20px !important;
        background: #fff !important;
        box-shadow: 0 22px 50px rgba(13, 34, 80, .28) !important;
        max-height: calc(100vh - 130px) !important;
        overflow-y: auto;
        border-top: 4px solid #ee3237 !important;
        animation: kdMenu .3s cubic-bezier(.22, .8, .3, 1)
    }

    @keyframes kdMenu {
        from {
            opacity: 0;
            transform: translateY(-10px) scale(.98)
        }

        to {
            opacity: 1;
            transform: none
        }
    }

    .mobile-nav-content li {
        display: block !important;
        width: auto !important;
        padding: 0 !important;
        margin: 2px 0;
        border: 0 !important;
        text-align: left !important;
        list-style: none
    }

    .mobile-nav-content li>a {
        display: flex !important;
        align-items: center;
        gap: 13px;
        width: 100% !important;
        margin: 0 !important;
        padding: 12px 14px !important;
        min-height: 46px;
        border-radius: 12px;
        box-shadow: none !important;
        background: transparent;
        color: #142f5e !important;
        font-size: 14.5px;
        font-weight: 600;
        letter-spacing: .01em;
        text-align: left;
        transition: background .2s, color .2s, padding .2s
    }

    .mobile-nav-content li>a::before {
        content: "\f015";
        font-family: "Font Awesome 5 Free";
        font-weight: 900;
        width: 34px;
        height: 34px;
        flex: 0 0 34px;
        border-radius: 10px;
        background: #eef3fb;
        color: #2759a6;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 14px
    }

    .mobile-nav-content>li:nth-child(1)>a::before {
        content: "\f015"
    }

    .mobile-nav-content>li:nth-child(2)>a::before {
        content: "\f05a"
    }

    .mobile-nav-content>li:nth-child(3)>a::before {
        content: "\f0c0"
    }

    .mobile-nav-content>li:nth-child(4)>a::before {
        content: "\f19d"
    }

    .mobile-nav-content>li:nth-child(5)>a::before {
        content: "\f1ea"
    }

    .mobile-nav-content>li:nth-child(6)>a::before {
        content: "\f073"
    }

    .mobile-nav-content>li:nth-child(7)>a::before {
        content: "\f500"
    }

    .mobile-nav-content>li:nth-child(8)>a::before {
        content: "\f574"
    }

    .mobile-nav-content>li:nth-child(9)>a::before {
        content: "\f095"
    }

    .mobile-nav-content>li:nth-child(10)>a::before {
        display: none
    }

    .mobile-nav-content>li:nth-child(10)>a {
        background: linear-gradient(135deg, #ee3237, #ff6a4d);
        color: #fff !important;
        justify-content: center;
        margin-top: 6px !important
    }

    .mobile-nav-content>li:nth-child(10)>a::after {
        display: none
    }

    .mobile-nav-content li>a:hover,
    .mobile-nav-content li>a:active {
        background: #eef3fb;
        color: #2759a6 !important
    }

    .mobile-nav-content>li:nth-child(10)>a:hover {
        background: linear-gradient(135deg, #c81f25, #ee3237);
        color: #fff !important
    }

    .mobile-nav-content li>a.active {
        background: linear-gradient(90deg, rgba(39, 89, 166, .14), transparent) !important;
        color: #2759a6 !important;
        border-left: 0 !important
    }

    .mobile-nav-content li>a.active::before {
        background: #2759a6;
        color: #fff
    }

    .mobile-nav-content .sub-nav>a::after {
        margin-left: auto !important;
        font-size: 13px;
        color: #8a97b0;
        transition: transform .25s
    }

    .mobile-nav-content .sub-nav.open>a::after {
        transform: rotate(180deg)
    }

    .mobile-nav-content .sub-nav>ul {
        position: static !important;
        display: none;
        margin: 2px 0 6px 22px !important;
        padding: 4px 0 4px 12px !important;
        border: 0 !important;
        border-left: 2px solid #dbe5f6 !important;
        background: transparent !important;
        box-shadow: none !important;
        border-radius: 0 !important
    }

    .mobile-nav-content .sub-nav.open>ul {
        display: block !important
    }

    .mobile-nav-content .sub-nav>ul li>a {
        min-height: 40px;
        padding: 9px 12px !important;
        font-size: 13.5px;
        font-weight: 500
    }

    .mobile-nav-content .sub-nav>ul li>a::before {
        display: none
    }

    .mobile-nav-content::-webkit-scrollbar {
        width: 0
    }
}

@media(max-width:1200px) {

    #navigation .container>.row,
    #navigation .container>.row>[class*=col-],
    .mobile-nav,
    .mobile-nav>li {
        position: static !important
    }

    #navigation .container {
        position: relative !important
    }
}

/* ===== Breadcrumb on page banner ===== */
.banner {
    position: relative
}

.banner .kd-crumb-wrap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 22px;
    display: flex;
    justify-content: center;
    padding: 0 12px;
    z-index: 2;
    pointer-events: none
}

.banner .kd-crumb {
    pointer-events: auto;
    list-style: none;
    margin: 0;
    padding: 9px 22px;
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    background: rgba(13, 34, 80, .62);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .25);
    animation: kdCrumb .7s .15s both
}

.banner .kd-crumb li {
    margin: 0;
    padding: 0;
    color: #fff
}

.banner .kd-crumb li+li::before {
    content: "\f054";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 10px;
    margin-right: 10px;
    opacity: .7
}

.banner .kd-crumb li:last-child {
    font-weight: 700;
    color: #ffd6d8
}

.banner .kd-crumb a {
    color: #fff !important;
    text-decoration: none
}

.banner .kd-crumb a:hover {
    color: #ffd6d8 !important
}

@keyframes kdCrumb {
    from {
        opacity: 0;
        transform: translateY(14px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

@media(max-width:600px) {
    .banner .kd-crumb-wrap {
        bottom: 12px
    }

    .banner .kd-crumb {
        font-size: 12.5px;
        padding: 7px 16px
    }
}