/* 前台公用顶栏 / 搜索 / 主导航（令牌见 hke-site-base.css） */

.hke-header a,
.hke-header a:hover,
.hke-header a:focus,
.hke-mobile-bar a,
.hke-mobile-bar a:hover,
.hke-mobile-bar a:focus,
#hkeMobileNav a,
#hkeMobileNav a:hover,
#hkeMobileNav a:focus {
    text-decoration: none;
}

@media (min-width: 992px) {
    .hke-site { min-width: var(--hke-scroll-min); }

    .hke-topbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1060;
        width: 100%;
        box-sizing: border-box;
    }

    .hke-header {
        padding-top: var(--hke-topbar-h, 36px);
    }
}

.hke-topbar {
    background: #f5f5f5;
    border-bottom: 1px solid #e8e8e8;
    font-size: var(--hke-font-topbar);
    color: #666;
}

.hke-topbar__inner {
    display: flex;
    align-items: center;
    min-height: var(--hke-topbar-h, 36px);
    gap: 12px;
}

.hke-topbar__city {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.hke-topbar__city-btn {
    border: 0;
    background: none;
    padding: 0;
    cursor: pointer;
    color: #666;
    font: inherit;
}

.hke-topbar__city-btn i { color: var(--hke-primary); margin-right: 4px; }

.hke-topbar__enter { color: var(--hke-primary); }

.hke-topbar__enter em {
    font-style: normal;
    font-weight: 600;
}

.hke-topbar__quick-nav {
    display: inline-flex;
    align-items: center;
    gap: 22px;
    margin-left: 14px;
}

.hke-topbar__quick-nav a {
    color: #666;
    text-decoration: none;
}

.hke-topbar__quick-nav a:hover { color: var(--hke-primary); }

.hke-topbar__spring { flex: 1; }

.hke-topbar__auth {
    display: inline-flex;
    align-items: center;
    gap: 22px;
}

.hke-topbar__auth a {
    color: #666;
    text-decoration: none;
}

.hke-topbar__auth a:hover { color: var(--hke-primary); }

.hke-topbar__auth-account {
    display: inline-flex;
    align-items: center;
}

.hke-topbar__sep { margin: 0 4px; color: #ccc; }

.hke-header-mid { padding: 10px 0 12px; background: #fff; }

.hke-header-mid__row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
}

.hke-header-mid__brand {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.hke-header-mid__brand img {
    display: block;
    max-height: 85px;
    width: auto;
    height: auto;
}

.hke-header-mid__search-wrap {
    margin-left: auto;
    flex: 1 1 420px;
    min-width: 360px;
    max-width: 590px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 24px;
    justify-content: flex-end;
}

.hke-search { flex: 1; min-width: 0; }

.hke-search__form {
    display: flex;
    height: 42px;
    border: 1px solid var(--hke-primary);
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.hke-search__type {
    position: relative;
    flex-shrink: 0;
}

.hke-search__type-btn {
    display: flex;
    align-items: center;
    height: 42px;
    padding: 0 28px 0 14px;
    border: 0;
    background: var(--hke-primary-soft);
    border-right: 1px solid #c9dbeb;
    color: var(--hke-primary);
    font-size: var(--hke-font-search);
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.hke-search__type-btn i {
    position: absolute;
    right: 10px;
    font-size: 10px;
}

.hke-search__input {
    flex: 1;
    min-width: 0;
    border: 0;
    padding: 0 12px;
    font-size: var(--hke-font-search);
    outline: none;
}

.hke-search__submit {
    flex-shrink: 0;
    border: 0;
    background: var(--hke-primary);
    color: #fff;
    padding: 0 18px;
    font-size: var(--hke-font-search);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hke-search__submit:hover { background: var(--hke-primary-hover); }

.hke-search__hot {
    margin-top: 8px;
    font-size: 12px;
    color: #b0b0b0;
}

.hke-search__hot a {
    margin-right: 10px;
    color: #b0b0b0;
}

.hke-search__help {
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 42px;
    padding: 0 14px;
    border: 1px solid var(--hke-primary);
    border-radius: 6px;
    color: var(--hke-primary);
    font-size: var(--hke-font-search);
    line-height: 1;
    white-space: nowrap;
}

.hke-search__help i {
    font-size: var(--hke-font-search);
    line-height: 1;
}

.hke-search__help:hover {
    background: var(--hke-primary);
    color: #fff;
}

.hke-nav { 
    background: #fff; 
    border-bottom: 2px solid #2968b5;
}

.hke-nav__row {
    display: flex;
    align-items: center;
    min-height: 48px;
}

.hke-nav__links {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    list-style: none;
    margin: 0;
    gap: 4px;
}

.hke-nav__links li { margin: 0; }

.hke-nav__links a {
    display: block;
    position: relative;
    padding: 12px 18px 28px;
    font-size: var(--hke-font-nav);
    color: #333;
    font-weight: 500;
    text-decoration: none;
}

.hke-nav__links li:first-child a {
    padding-left: 0;
}

.hke-nav__links a:hover,
.hke-nav__links a:focus {
    color: var(--hke-primary);
    text-decoration: none;
}

.hke-nav__links a.is-active {
    color: var(--hke-primary);
    font-weight: 700;
}

.hke-nav__links a.is-active::after {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 14px;
    height: 2px;
    background: var(--hke-primary);
    border-radius: 1px;
}

.hke-nav__links li:first-child a.is-active::after {
    left: 0;
}

.hke-nav__icons {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    padding: 0 0 16px;
}

.hke-nav__icon-btn {
    position: relative;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    border-radius: 4px;
}

.hke-nav__icon-btn i {
    font-size: 22px;
    line-height: 1;
}

.hke-nav__icon-btn:hover { background: #f5f5f5; color: var(--hke-primary); }

.hke-nav__badge {
    position: absolute;
    top: 4px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--hke-primary);
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
}

.hke-header--inner .hke-nav {
    border-bottom: 1px solid #e8e8e8;
}

/* 内页沿用首页导航：课程领域默认收起，悬停展开 */
.hke-header--dept-flyout {
    position: relative;
    z-index: 40;
}

.hke-header--dept-flyout .hke-nav__row {
    align-items: center;
    min-height: 54px;
}

.hke-header--dept-flyout .hke-nav__dept {
    position: relative;
    z-index: 5;
    width: var(--hke-nav-col);
    flex: 0 0 var(--hke-nav-col);
}

.hke-header--dept-flyout .hke-nav__dept-head {
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 54px;
    margin: 0;
    padding: 0 16px;
    background: #fff;
    color: #333;
    font-size: var(--hke-font-nav);
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    border-radius: 8px 8px 0 0;
    border: 1px solid #f0f0f0;
    border-bottom: 0px;
    /* box-shadow: 4px 0 22px rgba(0, 0, 0, 0.1), 0 10px 36px rgba(0, 0, 0, 0.06); */
    box-sizing: border-box;
    cursor: default;
}

.hke-header--dept-flyout .hke-nav__dept-head::after {
    content: "";
    position: absolute;
    left: var(--hke-divider-inset);
    right: var(--hke-divider-inset);
    bottom: 0;
    z-index: 2;
    height: 1px;
    /* background: #e8ecef; */
    pointer-events: none;
}

.hke-header--dept-flyout .hke-nav__links {
    align-items: center;
    justify-content: flex-end;
    margin: 0 0 0 auto;
    padding: 0 8px;
    min-height: 54px;
    box-sizing: border-box;
}

.hke-header--dept-flyout .hke-nav__links a {
    display: inline-flex;
    align-items: center;
    height: 54px;
    padding: 0 18px;
    box-sizing: border-box;
    font-size: var(--hke-font-nav);
    line-height: 1.2;
}

.hke-header--dept-flyout .hke-nav__links li:first-child a {
    padding-left: 18px;
}

.hke-header--dept-flyout .hke-nav__links a.is-active {
    font-weight: 500;
}

.hke-header--dept-flyout .hke-nav__links a.is-active::after {
    display: none;
}

.hke-header--dept-flyout .hke-nav__icons {
    align-items: center;
    align-self: center;
    margin-left: 0;
    min-height: 54px;
    padding: 0 4px 0 0;
    box-sizing: border-box;
}

.hke-header--dept-flyout .hke-nav__dept-panel {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    background: #fff;
    border: 1px solid #e0e4e8;
    border-top: none;
    box-shadow: 4px 0 22px rgba(0, 0, 0, 0.1), 0 10px 36px rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
}

.hke-header--dept-flyout .hke-nav__dept:hover .hke-nav__dept-panel,
.hke-header--dept-flyout .hke-nav__dept:focus-within .hke-nav__dept-panel {
    display: block;
}

.hke-dept-panel__block {
    position: relative;
    padding: 16px 16px 14px;
    text-align: left;
}

.hke-dept-panel__block::after {
    content: "";
    position: absolute;
    left: var(--hke-divider-inset);
    right: var(--hke-divider-inset);
    bottom: 0;
    height: 1px;
    background: #e8ecef;
    pointer-events: none;
}

.hke-dept-panel__block--last::after {
    display: none;
}

.hke-dept-panel__city {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
    padding-bottom: 18px;
    text-align: center;
}

.hke-dept-panel__city-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 14px;
    font-size: 16px;
    font-weight: 600;
    color: #222;
}

.hke-dept-panel__city-row i {
    color: var(--hke-primary);
    font-size: 18px;
}

.hke-dept-panel__station {
    display: block;
    width: 100%;
    max-width: 188px;
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid var(--hke-primary);
    background: var(--hke-primary-soft);
    color: var(--hke-primary);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
}

.hke-dept-panel__station:hover {
    background: #dce8f6;
    color: var(--hke-primary-hover);
}

.hke-dept-panel__title {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
    color: #222;
    text-align: left;
}

.hke-dept-panel__title i {
    font-size: 15px;
    color: var(--hke-primary);
    line-height: 1;
}

.hke-dept-panel__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px 8px;
    font-size: 13px;
    text-align: left;
}

.hke-dept-panel__grid a {
    color: #555;
    text-decoration: none;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hke-dept-panel__grid a:hover {
    color: var(--hke-primary);
}

.hke-dept-panel__grid a.more {
    color: #888;
}

.hke-mobile-bar {
    display: none;
    padding: 10px 15px;
    border-bottom: 1px solid var(--hke-border);
    align-items: center;
    justify-content: space-between;
    background: #fff;
}

.hke-mobile-bar img { max-height: 36px; }

.hke-mobile-nav__links li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.hke-mobile-nav__links li:last-child {
    border-bottom: 0;
}

.hke-mobile-nav__links a {
    display: block;
    font-size: 15px;
    color: #333;
}

.hke-mobile-nav__links a.is-active {
    color: var(--hke-primary, #0066cc);
    font-weight: 600;
}

@media (max-width: 991.98px) {
    .hke-topbar,
    .hke-header-mid,
    .hke-nav { display: none !important; }

    .hke-mobile-bar { display: flex; }

    .hke-header-mid__search-wrap { min-width: 0; }
}
