/* Shared public header. Deliberately independent of the legacy htk header skin. */
.dt-header {
    --dt-blue: #00aee3;
    --dt-ink: #173c60;
    position: relative;
    z-index: 100;
    width: 100%;
    margin: 0;
    color: var(--dt-ink);
    background: #eef7ff;
    font-family: 'Montserrat-Regular',Arial,sans-serif;
    box-shadow: 0 3px 18px #12385d0d;
    transition: box-shadow .35s ease, transform .35s ease;
}

    /* Sticky header state: the spacer is added by ducthang-header.js so content
   keeps its original position when the header leaves the document flow. */
    .dt-header.dt-header--fixed {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        box-shadow: 0 10px 28px rgba(16, 54, 92, .16);
        animation: dt-header-drop-in .35s cubic-bezier(.22, .61, .36, 1) both;
    }

        .dt-header.dt-header--fixed .dt-header__identity {
            min-height: 78px;
            padding-top: 10px;
            padding-bottom: 10px;
            transition: min-height .35s ease, padding .35s ease;
        }

        .dt-header.dt-header--fixed .dt-header__logo {
            width: 80px;
            height: 80px;
            flex-basis: 80px;
            border-radius: 17px;
            transition: width .35s ease, height .35s ease, flex-basis .35s ease, border-radius .35s ease;
        }

        .dt-header.dt-header--fixed .dt-header__school h1 {
            font-size: clamp(19px, 2vw, 27px);
            transition: font-size .35s ease;
        }

        .dt-header.dt-header--fixed .dt-header__bar {
            border-bottom-width: 2px;
        }

.dt-header-spacer {
    display: block;
    width: 100%;
}

@keyframes dt-header-drop-in {
    from {
        transform: translateY(-12px);
        opacity: .96;
    }

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

.dt-header *, .dt-mobile-menu * {
    box-sizing: border-box;
}

.dt-header a {
    text-decoration: none;
}

.dt-header__container {
    width: calc(100% - 48px);
    max-width: 1200px;
    margin: auto;
}

.dt-header__identity {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 110px;
    padding: 10px 0;
}

.dt-header__logo {
    flex: 0 0 120px;
    width: 120px;
    height: 120px;
    padding: 4px;
    border: 1px solid #d8e8f5;
    border-radius: 24px;
    background: #fff;
    box-shadow: 5px 5px 0 #fff1b8;
}

    .dt-header__logo img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 18px;
    }

.dt-header__school {
    min-width: 0;
}

.dt-header__department {
    font-size: 15px;
    line-height: 1.5;
    letter-spacing: 1px;
    font-weight: 600;
    color: #48627d;
}

.dt-header__school h1 {
    margin: 5px 0 0;
    color: var(--dt-blue);
    font-family: 'Montserrat-Bold',Arial,sans-serif;
    font-size: clamp(22px,2.2vw,32px);
    line-height: 1.25;
    text-transform: none;
}

    .dt-header__school h1 span {
        color: #1e305b;
        white-space: nowrap;
    }

.dt-header__actions {
    margin-left: auto;
    flex-shrink: 0;
}

.dt-header__clock {
    margin-bottom: 12px;
    text-align: right;
    color: #597087;
    font-size: 15px;
    line-height: 1.5;
    font-weight: bold;
}

    .dt-header__clock i {
        color: #00aee3;
    }

.dt-header__links {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: end;
    -webkit-justify-content: flex-end;
}

.dt-header__phone, .dt-header__notice {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    transition: background .18s,transform .18s;
}

.dt-header__phone {
    background: #edf8f1;
    color: #12633f;
}

.dt-header__notice {
    background: #ffdf69;
    color: #514000;
}

    .dt-header__phone:hover, .dt-header__notice:hover {
        transform: translateY(-2px);
        color: #173c60;
    }

.dt-header__bar {
    position: relative;
    background: var(--dt-blue);
    border-bottom: 3px solid #f4ce4c;
}

.dt-header__navigation {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 62px;
}

.dt-header__home {
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    height: 42px;
    border-radius: 12px;
    color: #fff;
    background: #ffffff18;
}

    .dt-header__home:hover {
        color: #ffe787;
        background: #ffffff28;
    }

.dt-header__nav {
    flex: 1;
    min-width: 0;
}

    .dt-header__nav ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .dt-header__nav > ul {
        display: flex;
        align-items: center;
        justify-content: space-evenly;
    }

    .dt-header__nav li {
        position: relative;
    }

    .dt-header__nav > ul > li > a {
        display: flex;
        align-items: center;
        gap: 6px;
        min-height: 54px;
        padding: 10px 9px;
        color: #fff;
        font-size: 17px;
        line-height: normal;
        font-family: 'Montserrat-SemiBold';
        font-weight: normal;
        border-radius: 10px;
        transition: background .18s,color .18s;
    }

    .dt-header__nav > ul > li.hav > a:after {
        content: '';
        width: 5px;
        height: 5px;
        border-right: 1.5px solid;
        border-bottom: 1.5px solid;
        transform: rotate(45deg);
        flex-shrink: 0;
    }

    .dt-header__nav > ul > li:hover > a, .dt-header__nav > ul > li:focus-within > a {
        color: #ffe787;
        background: #ffffff12;
    }

    .dt-header__nav .drop {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        min-width: max-content;
        max-width: max-content;
        padding: 8px;
        border: 1px solid #deebf5;
        border-top: 3px solid #ffd761;
        border-radius: 0 0 16px 16px;
        background: #fff;
        box-shadow: 0 16px 36px #14385d26;
        z-index: 10;
    }

    .dt-header__nav li:hover > .drop, .dt-header__nav li:focus-within > .drop {
        display: block;
    }

    .dt-header__nav > ul > li:nth-last-child(-n+2) .drop {
        left: auto;
        right: 0;
    }

    .dt-header__nav .drop a {
        display: block;
        padding: 10px 12px;
        min-height: 44px;
        color: var(--dt-ink);
        font-size: 15px;
        line-height: 1.5;
        border-radius: 8px;
        overflow-wrap: anywhere;
    }

        .dt-header__nav .drop a:hover, .dt-header__nav .drop a:focus {
            background: #edf6fd;
            color: var(--dt-blue);
        }

.dt-header__search {
    display: flex;
    flex: 0 0 240px;
    align-items: center;
    background: #fff;
    border: 2px solid transparent;
    border-radius: 13px;
    height: 42px;
    overflow: hidden;
}

    .dt-header__search:focus-within {
        border-color: #ffd761;
    }

.dt-header .dt-header__search input {
    position: static;
    flex: 1;
    float: none;
    width: 100%;
    min-width: 0;
    height: 38px;
    margin: 0;
    padding: 8px 10px;
    border: 0;
    outline: 0;
    box-shadow: none;
    background: transparent;
    color: #173c60;
    font: 16px 'Montserrat-Regular',Arial,sans-serif;
}

.dt-header__submit {
    display: grid;
    place-items: center;
    width: 42px;
    min-width: 42px;
    height: 38px;
    color: var(--dt-blue);
}

.dt-header__toggle {
    display: none;
}

.dt-header__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.dt-header :is(a,button):focus-visible, .dt-mobile-menu :is(a,button,[tabindex]):focus-visible {
    outline: 3px solid #e5aa00;
    outline-offset: 3px;
}

.dt-header #search-result {
    position: absolute;
    top: 100%;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(100% - 32px,1000px);
    max-height: 65vh;
    overflow: auto;
    z-index: 20;
    background: #fff;
    color: #173c60;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 14px 35px #14385d33;
}

/* This class is only applied by the shared header controller. Legacy login is untouched. */
.dt-mobile-menu.dt-menu-ready {
    display: block !important;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    background: #102d50a3;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s,visibility .2s;
}

    .dt-mobile-menu.dt-menu-ready.show {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .dt-mobile-menu.dt-menu-ready .my-menu-container {
        position: absolute;
        top: 0;
        right: 0;
        left: auto;
        width: min(390px,calc(100% - 32px));
        height: 100%;
        max-height: none;
        overflow: auto;
        overscroll-behavior: contain;
        margin: 0;
        padding: 22px 20px max(28px,env(safe-area-inset-bottom));
        background: #fff;
        border-radius: 24px 0 0 24px;
        transform: translateX(100%);
        transition: transform .2s;
        background: url(/Design/img/TieuHocDucThang/dt-back.png) no-repeat;
        background-size: cover;
        background-position: right;
    }

    .dt-mobile-menu.dt-menu-ready.show .my-menu-container {
        transform: translateX(0);
    }

    .dt-mobile-menu.dt-menu-ready .my-menu-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 6px 10px;
        border-bottom: 1px solid #e1ebf5;
        margin-bottom: 12px;
        /* background: #f4f9fd; */
        border-radius: 12px;
    }

    .dt-mobile-menu.dt-menu-ready .my-menu-logo {
        display: block;
        order: -1;
        width: 68px;
        height: 68px;
    }

        .dt-mobile-menu.dt-menu-ready .my-menu-logo img {
            width: 100%;
            height: 100%;
            object-fit: contain;
        }

    .dt-mobile-menu.dt-menu-ready .dt-menu-close {
        display: grid !important;
        place-items: center;
        width: 46px;
        height: 46px;
        border: 0;
        border-radius: 14px;
        background: #edf5fc;
        color: #0755a5;
        font: 30px Arial,sans-serif;
        cursor: pointer;
    }

    .dt-mobile-menu.dt-menu-ready .rs-nav-list {
        padding: 0;
        margin: 0;
        list-style: none;
    }

    .dt-mobile-menu.dt-menu-ready .rs-nav-item {
        display: block;
        position: relative;
        padding: 0;
        border: 0;
        border-bottom: 1px solid #edf2f7;
    }

    .dt-mobile-menu.dt-menu-ready .rs-nav-link {
        display: flex;
        gap: 12px;
        align-items: center;
        min-height: 54px;
        margin: 0;
        padding: 12px 48px 12px 8px;
        color: #173c60;
        font: 17px/1.5 'Montserrat-SemiBold',Arial,sans-serif;
    }

        .dt-mobile-menu.dt-menu-ready .rs-nav-link img {
            width: 24px;
            height: 24px;
            object-fit: contain;
        }

    .dt-mobile-menu.dt-menu-ready .btn-drop:not(.none) {
        display: grid;
        place-items: center;
        position: absolute;
        top: 5px;
        right: 0;
        width: 44px;
        height: 44px;
        margin: 0;
        border: 0;
        border-radius: 12px;
        background: #edf6fc;
        color: #0755a5;
        cursor: pointer;
    }

    .dt-mobile-menu.dt-menu-ready .rs-nav-drop {
        display: none;
        margin: 0 0 12px;
        padding: 5px 8px 5px 20px;
        background: #eef8ff;
        border-radius: 12px;
        list-style: none;
    }

    .dt-mobile-menu.dt-menu-ready .active > .rs-nav-drop {
        display: block;
    }

    .dt-mobile-menu.dt-menu-ready .rs-nav-drop a {
        display: block;
        min-height: 44px;
        padding: 8px 8px;
        color: #254c70;
        font-size: 16px;
        line-height: 1.5;
    }

    .dt-mobile-menu.dt-menu-ready .header-bottom-hotline {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
        margin-top: 20px;
        padding: 8px 10px;
        color: #14613e;
        background: #eaf7ee;
        border-radius: 14px;
        font-size: 13px;
    }

        .dt-mobile-menu.dt-menu-ready .header-bottom-hotline .icon {
            padding: 8px 9px;
            background: #168452;
            border-radius: 50%;
        }

        /* Cancel decorative legacy rules (some use !important) only inside this drawer. */
        .dt-mobile-menu.dt-menu-ready .my-menu-container:before, .dt-mobile-menu.dt-menu-ready .my-menu-container:after, .dt-mobile-menu.dt-menu-ready .my-menu-top:before, .dt-mobile-menu.dt-menu-ready .my-menu-top:after, .dt-mobile-menu.dt-menu-ready .my-menu-logo:before, .dt-mobile-menu.dt-menu-ready .my-menu-logo:after, .dt-mobile-menu.dt-menu-ready .header-bottom-hotline:before, .dt-mobile-menu.dt-menu-ready .header-bottom-hotline:after {
            content: none !important;
        }

    .dt-mobile-menu.dt-menu-ready .my-menu-top {
        flex-direction: row !important;
        height: auto !important;
        min-height: 87px;
    }

    .dt-mobile-menu.dt-menu-ready .my-menu-logo {
        width: 88px !important;
        height: 88px !important;
        margin: 0 !important;
        padding: 0 !important;
        background: none !important;
    }

        .dt-mobile-menu.dt-menu-ready .my-menu-logo img {
            display: block !important;
            position: static !important;
            width: 100% !important;
            height: 100% !important;
            border-radius: 50px;
        }

    .dt-mobile-menu.dt-menu-ready .rs-nav-link {
        color: #173c60 !important;
        background: transparent !important;
    }

    .dt-mobile-menu.dt-menu-ready .btn-drop:not(.none) {
        background: #edf6fc !important;
        color: #0755a5 !important;
    }

    .dt-mobile-menu.dt-menu-ready .header-bottom-hotline {
        color: #14613e !important;
        border: 0;
    }

        .dt-mobile-menu.dt-menu-ready .header-bottom-hotline span, .dt-mobile-menu.dt-menu-ready .header-bottom-hotline strong {
            color: #14613e !important;
        }

@media (max-width: 1199px) {
    .dt-header__identity {
        min-height: 100px;
    }

    .dt-header.dt-header--fixed .dt-header__identity {
        min-height: 76px;
    }

    .dt-header__actions {
        display: none;
    }

    .dt-header__toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 4px;
        margin-left: auto;
        min-width: 48px;
        min-height: 48px;
        border: 0;
        border-radius: 14px;
        background: #edf6fc;
        color: #0755a5;
        font: 11px 'Montserrat-SemiBold',Arial,sans-serif;
        cursor: pointer;
    }

        .dt-header__toggle i {
            font-size: 20px;
        }

    .dt-header__nav, .dt-header__home {
        display: none;
    }

    .dt-header__navigation {
        min-height: 54px;
        justify-content: flex-end;
    }

    .dt-header__search {
        flex: 1;
        height: 40px;
    }

    .dt-header__bar {
        background: #eef6fc;
        border-bottom: 2px solid #ffdf69;
        display: none;
    }
}

@media (max-width: 599px) {
    .dt-header__container {
        width: calc(100% - 28px);
    }

    .dt-header__identity {
        gap: 12px;
        min-height: 88px;
        padding: 12px 0;
    }

    .dt-header.dt-header--fixed .dt-header__identity {
        min-height: 70px;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .dt-header__logo {
        width: 76px;
        height: 76px;
        flex-basis: 76px;
        border-radius: 17px;
    }

    .dt-header__department {
        font-size: 10px;
        letter-spacing: 0;
    }

    .dt-header__school h1 {
        font-size: 19px;
        line-height: 1.3;
        margin-top: 2px;
    }

        .dt-header__school h1 span {
            display: block;
            font-size: 22px;
        }

    .dt-header__toggle {
        min-width: 44px;
    }

    .dt-header__navigation {
        min-height: 50px;
    }

    .dt-header.dt-header--fixed .dt-header__navigation {
        min-height: 46px;
    }
}

.dt-header__time {
    font-variant-numeric: tabular-nums;
}

.dt-header__nav .drop {
    transform-origin: top center;
    animation: dt-submenu-reveal .2s ease-out;
}

    .dt-header__nav .drop a,
    .dt-mobile-menu.dt-menu-ready .rs-nav-drop a {
        display: flex;
        align-items: center;
        gap: 9px;
        position: relative;
        border-radius: 12px;
        transition: background .2s ease, color .2s ease, box-shadow .2s ease;
    }

.dt-submenu-label {
    flex: 1;
    min-width: 0;
    transition: transform .2s ease;
    font-weight: 600;
}

.dt-submenu-icon {
    display: inline-grid;
    place-items: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: #eaf3ff;
    color: #0755a5;
    font-size: 15px;
    transition: transform .2s ease, background .2s ease, color .2s ease;
}

.dt-header__nav .drop li:nth-child(3n + 2) .dt-submenu-icon,
.dt-mobile-menu .rs-nav-drop li:nth-child(3n + 2) .dt-submenu-icon {
    background: #e9f7ee;
    color: #16734e;
}

.dt-header__nav .drop li:nth-child(3n) .dt-submenu-icon,
.dt-mobile-menu .rs-nav-drop li:nth-child(3n) .dt-submenu-icon {
    background: #fff4cf;
    color: #936407;
}

.dt-header__nav .drop a:hover,
.dt-header__nav .drop a:focus-visible,
.dt-mobile-menu.dt-menu-ready .rs-nav-drop a:hover,
.dt-mobile-menu.dt-menu-ready .rs-nav-drop a:focus-visible {
    background: linear-gradient(110deg, #edf6ff, #f1fbf5);
    color: #0755a5;
    box-shadow: inset 3px 0 0 #36a778;
}

.dt-header__nav .drop a:is(:hover, :focus-visible) .dt-submenu-icon,
.dt-mobile-menu .rs-nav-drop a:is(:hover, :focus-visible) .dt-submenu-icon {
    transform: rotate(-7deg) scale(1.06);
    background: #0755a5;
    color: #fff;
}

.dt-header__nav .drop a:is(:hover, :focus-visible) .dt-submenu-label,
.dt-mobile-menu .rs-nav-drop a:is(:hover, :focus-visible) .dt-submenu-label {
    transform: translateX(3px);
}

.dt-header__nav > ul > li > a {
    position: relative;
}

    .dt-header__nav > ul > li > a:before {
        content: '';
        position: absolute;
        left: 12px;
        right: 12px;
        bottom: 5px;
        height: 3px;
        border-radius: 3px;
        background: #ffdc66;
        transform: scaleX(0);
        transition: transform .2s ease;
    }

.dt-header__nav > ul > li:is(:hover, :focus-within) > a:before {
    transform: scaleX(1);
}

@keyframes dt-submenu-reveal {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

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

@media (prefers-reduced-motion:reduce) {
    .dt-header, .dt-header *, .dt-mobile-menu.dt-menu-ready, .dt-mobile-menu.dt-menu-ready .my-menu-container {
        transition: none !important;
        animation: none !important;
    }

    .dt-header__nav .drop {
        animation: none;
    }

    .dt-header__nav > ul > li > a:before,
    .dt-submenu-label, .dt-submenu-icon {
        transition: none !important;
    }
}