/* Shared responsive header for the UKSSSC website master pages. */
.top-header.inner-new-header {
    padding: 12px 0;
    background: #fff;
}

.top-header.inner-new-header > .container > .row {
    justify-content: center;
    margin-right: 0;
    margin-left: 0;
}

.top-header.inner-new-header .txt h3 {
    margin: 2px 0;
    color: #111827 !important;
    line-height: 1.22;
}

.bottom-header {
    position: relative;
    z-index: 1100;
}

.bottom-header .main-menu {
    min-height: 45px;
    padding: 0 20px;
    border-radius: 10px;
    background: #0f84e8;
}

.bottom-header .nav-list {
    align-items: center;
}

.bottom-header .nav-list li.period {
    margin-top: 0;
    color: rgba(255, 255, 255, 0.75);
}

.bottom-header .nav-list li a {
    color: #fff;
}

.bottom-header .nav-btn {
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 991px) {
    .top-header:not(.inner-new-header) {
        padding: 5px 12px !important;
    }

    .top-header:not(.inner-new-header) .contact-item {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 3px 8px;
        padding-right: 0 !important;
        text-align: center !important;
        font-size: 12px;
        line-height: 1.25;
    }

    .top-header.inner-new-header {
        min-height: 86px;
        padding: 8px 0;
        border-bottom: 1px solid #e5eef7;
    }

    .top-header.inner-new-header > .container {
        width: 100%;
        max-width: 100% !important;
        padding-right: 14px;
        padding-left: 14px;
    }

    .top-header.inner-new-header > .container > .row {
        display: grid;
        grid-template-columns: 68px minmax(0, 1fr);
        gap: 10px;
        min-height: 70px;
        align-items: center;
        text-align: left !important;
    }

    .top-header.inner-new-header > .container > .row > div {
        width: auto;
        max-width: none;
        padding: 0;
    }

    .top-header.inner-new-header > .container > .row > div:first-child {
        text-align: center !important;
    }

    .top-header.inner-new-header > .container > .row > div:nth-child(2) {
        padding-right: 48px;
        text-align: center;
    }

    .top-header.inner-new-header > .container > .row > div:nth-child(n+3) {
        display: none;
    }

    .top-header.inner-new-header .img-fluid {
        width: auto;
        max-width: 64px;
        max-height: 64px !important;
        object-fit: contain;
    }

    .top-header.inner-new-header .txt h3 {
        margin: 2px 0;
        font-size: clamp(14px, 2.5vw, 19px);
        line-height: 1.2;
    }

    .top-header.inner-new-header .txt h3 + h3 {
        font-size: clamp(15px, 2.7vw, 20px);
    }

    .bottom-header {
        height: 0 !important;
    }

    .bottom-header .container,
    .bottom-header .row,
    .bottom-header .col-md-12 {
        position: static;
        min-height: 0;
        padding: 0;
    }

    .bottom-header .nav-btn {
        position: absolute;
        top: -66px;
        right: 16px;
        z-index: 2100;
        display: block !important;
        width: 44px;
        height: 44px;
        margin: 0;
        border: 1px solid #cfe4f7;
        border-radius: 12px;
        background: #f7fbff;
        box-shadow: 0 5px 14px rgba(15, 132, 232, 0.16);
        cursor: pointer;
        transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    }

    .bottom-header .nav-btn:hover,
    .bottom-header .nav-btn:focus-visible {
        border-color: #0f84e8;
        background: #edf7ff;
        box-shadow: 0 6px 18px rgba(15, 132, 232, 0.24);
        outline: none;
    }

    .bottom-header .nav-btn span.nav-icon {
        position: absolute;
        left: 10px;
        display: block;
        width: 22px;
        height: 2px;
        border-radius: 999px;
        background: #1269aa;
        transition: top 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
    }

    .bottom-header .nav-btn span.top.nav-icon {
        top: 12px;
    }

    .bottom-header .nav-btn span.middle.nav-icon {
        top: 20px;
        width: 22px;
    }

    .bottom-header .nav-btn span.bottom.nav-icon {
        top: 28px;
        width: 22px;
    }

    .bottom-header .nav-btn.open span.top.nav-icon,
    body.menu-open .bottom-header .nav-btn span.top.nav-icon {
        top: 20px;
        transform: rotate(45deg);
    }

    .bottom-header .nav-btn.open span.middle.nav-icon,
    body.menu-open .bottom-header .nav-btn span.middle.nav-icon {
        opacity: 0;
    }

    .bottom-header .nav-btn.open span.bottom.nav-icon,
    body.menu-open .bottom-header .nav-btn span.bottom.nav-icon {
        top: 20px;
        width: 22px;
        transform: rotate(-45deg);
    }

    body.menu-open {
        overflow: hidden;
    }

    .advertiment-box.main-page,
    .application-form-detail.main-page {
        margin-top: 0 !important;
    }

    .bottom-header .main-menu {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 2000;
        display: block;
        width: min(320px, 86vw);
        height: 100vh;
        height: 100dvh;
        padding: 76px 18px 24px;
        overflow-y: auto;
        border-radius: 0 18px 18px 0;
        background: #fff;
        box-shadow: 12px 0 34px rgba(15, 23, 42, 0.2);
        transform: translateX(-105%);
        transition: transform 0.28s ease;
    }

    body.menu-open .bottom-header .main-menu {
        left: 0;
        transform: translateX(0);
    }

    .bottom-header .main-menu::before {
        content: "Navigation";
        position: absolute;
        top: 26px;
        left: 20px;
        color: #0f5f9f;
        font-size: 18px;
        font-weight: 700;
    }

    .bottom-header .main-menu .nav-list {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        width: 100%;
    }

    .bottom-header .main-menu .nav-list li {
        display: block;
        margin: 0;
        border: 0;
    }

    .bottom-header .main-menu .nav-list li.period {
        display: none;
    }

    .bottom-header .main-menu .nav-list li a {
        min-height: 44px;
        padding: 0 14px;
        border: 0;
        border-radius: 9px;
        color: #1f2937 !important;
        line-height: 44px;
    }

    .bottom-header .main-menu .nav-list li a:hover,
    .bottom-header .main-menu .nav-list li a:focus-visible {
        background: #eaf5fe;
        color: #0f65a8 !important;
        outline: none;
    }

    .bottom-header .main-menu .login-btn {
        margin: 18px 0 0;
    }

    .mobile-drawer {
        left: 0;
        width: min(320px, 86vw);
        padding: 74px 18px 24px;
        border-radius: 0 18px 18px 0;
        box-shadow: 12px 0 34px rgba(15, 23, 42, 0.2);
        visibility: hidden;
        transform: translateX(-105%);
        transition: transform 0.28s ease, visibility 0s linear 0.28s;
        pointer-events: none;
    }

    .mobile-drawer.active {
        left: 0;
        visibility: visible;
        transform: translateX(0);
        transition-delay: 0s;
        pointer-events: auto;
    }

    .mobile-drawer ul {
        margin: 0;
    }

    .mobile-drawer ul li {
        margin: 6px 0;
    }

    .mobile-drawer ul li a {
        display: block;
        min-height: 44px;
        padding: 10px 14px;
        border-radius: 9px;
        color: #1f2937;
        font-size: 16px;
    }

    .mobile-drawer ul li a:hover,
    .mobile-drawer ul li a:focus-visible {
        background: #eaf5fe;
        color: #0f65a8;
        outline: none;
    }

    .mobile-drawer .drawer-close {
        top: 20px;
        right: 20px;
        display: grid;
        place-items: center;
        width: 38px;
        height: 38px;
        border-radius: 10px;
        background: #edf7ff;
        color: #1269aa;
        line-height: 1;
    }
}

@media (max-width: 575px) {
    .top-header:not(.inner-new-header) .contact-item {
        font-size: 10px;
    }

    .top-header.inner-new-header {
        min-height: 78px;
        padding: 6px 0;
    }

    .top-header.inner-new-header > .container {
        padding-right: 10px;
        padding-left: 10px;
    }

    .top-header.inner-new-header > .container > .row {
        grid-template-columns: 56px minmax(0, 1fr);
        gap: 7px;
        min-height: 66px;
    }

    .top-header.inner-new-header > .container > .row > div:nth-child(2) {
        padding-right: 44px;
    }

    .top-header.inner-new-header .img-fluid {
        max-width: 52px;
        max-height: 52px !important;
    }

    .top-header.inner-new-header .txt h3 {
        font-size: clamp(13px, 4vw, 16px);
    }

    .top-header.inner-new-header .txt h3 + h3 {
        font-size: clamp(14px, 4.2vw, 17px);
    }

    .bottom-header .nav-btn {
        top: -59px;
        right: 10px;
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    .bottom-header .nav-btn span.nav-icon {
        left: 9px;
        width: 20px;
    }

    .bottom-header .nav-btn span.top.nav-icon {
        top: 11px;
    }

    .bottom-header .nav-btn span.middle.nav-icon {
        top: 18px;
        width: 20px;
    }

    .bottom-header .nav-btn span.bottom.nav-icon {
        top: 25px;
        width: 20px;
    }

    .bottom-header .nav-btn.open span.top.nav-icon,
    body.menu-open .bottom-header .nav-btn span.top.nav-icon,
    .bottom-header .nav-btn.open span.bottom.nav-icon,
    body.menu-open .bottom-header .nav-btn span.bottom.nav-icon {
        top: 18px;
        width: 20px;
    }
}
