/* ===========================================================
   19 站头部 —— 按 index231 稿复刻
   86px 白底 / 独立版心 1600 / 琥珀悬停块 / 白底下拉 / 蓝色药丸热线
   类名 hkd- 前缀 + body 提权，避开 common.css、inpage.css 与首页 hkh- 首屏
   头部宽度独立，不改正文 width-1400.css
   =========================================================== */

body .hkd-header {
    /* 站点 body/.cover/#app 都带 overflow，sticky 在这里不生效；
       改 fixed + 下方等高占位，吸顶行为与参考稿一致，且不动任何全局容器 */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1700;
    width: 100%;
    background: #fff;
    border-bottom: 1px solid #e9edf2;
    font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", Arial, sans-serif;
}
body .hkd-header *,
body .hkd-header *::before,
body .hkd-header *::after {
    box-sizing: border-box;
}
body .hkd-header ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
body .hkd-header a {
    text-decoration: none;
    color: inherit;
}
body .hkd-header button {
    font-family: inherit;
}

/* 头部宽度：照抄 index231 的 .site-header .header-inner，与正文 1400 版心互不干扰 */
body .hkd-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 86px;
    width: calc(100% - 2 * max(16px, 3vw));
    max-width: 1600px;
    margin: 0 auto;
    padding: 0;
    gap: 26px;
}

/* ---- LOGO ---- */
body .hkd-logo {
    display: flex;
    align-items: center;
    gap: 11px;
    flex: 0 0 auto;
    text-decoration: none;
}
body .hkd-logo-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 800;
    letter-spacing: -.4px;
    color: #fff;
    background: linear-gradient(140deg, #1657b8, #0d3f8f);
}
body .hkd-logo-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
body .hkd-logo-cn {
    display: block;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: .04em;
    color: #0a2f6b;
    white-space: nowrap;
}
body .hkd-logo-en {
    display: block;
    font-size: 10.5px;
    line-height: 1.2;
    letter-spacing: .2em;
    color: #5b6472;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ---- 主导航 ---- */
body .hkd-nav {
    margin-left: auto;
    display: flex;
    align-self: stretch;
}
body .hkd-nav-list {
    display: flex;
    align-items: stretch;
    height: 86px;
    list-style: none;
    margin: 0;
    padding: 0;
}
body .hkd-nav-item {
    position: relative;
    display: flex;
    align-items: stretch;
}
body .hkd-nav-link {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 14px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .3s ease, color .3s ease;
}
body .hkd-nav-item:hover > .hkd-nav-link,
body .hkd-nav-item:focus-within > .hkd-nav-link {
    background: #ffa700;
    color: #1a1a1a;
}
body .hkd-nav-link.active {
    color: #0a2f6b;
    font-weight: 600;
    background: transparent;
}
body .hkd-nav-item.has-sub > .hkd-nav-link.active::before {
    border-color: #0a2f6b;
}
/* 下拉箭头：细 chevron，静态不翻转 */
body .hkd-nav-item.has-sub > .hkd-nav-link::before {
    content: "";
    order: 2;
    width: 6px;
    height: 6px;
    margin-left: 8px;
    flex: 0 0 auto;
    border-right: 1.6px solid currentColor;
    border-bottom: 1.6px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    opacity: .55;
    transition: opacity .3s ease;
}
body .hkd-nav-item.has-sub:hover > .hkd-nav-link::before,
body .hkd-nav-item.has-sub:focus-within > .hkd-nav-link::before {
    opacity: .9;
}

/* ---- 下拉面板 ---- */
body .hkd-sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 196px;
    margin: 0;
    padding: 10px 0;
    list-style: none;
    background: #fff;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 10px 15px -2px rgba(0, 0, 0, .2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    z-index: 30;
    transition: opacity .3s ease, transform .3s ease, visibility .3s ease;
}
body .hkd-nav-item:hover > .hkd-sub-menu,
body .hkd-nav-item:focus-within > .hkd-sub-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
}
body .hkd-sub-menu a {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    line-height: 21px;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s ease, color .2s ease;
}
body .hkd-sub-menu a:hover {
    background: #fff6e5;
    color: #b26a00;
}
body .hkd-nav-item:last-child > .hkd-sub-menu {
    left: auto;
    right: 0;
}

/* ---- 右侧热线药丸 ---- */
body .hkd-hotline {
    flex: 0 0 auto;
    margin-left: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 22px;
    background: #1657b8;
    border-radius: 999px;
    text-decoration: none;
    line-height: 1;
    box-shadow: 0 6px 14px -6px rgba(22, 87, 184, .5);
    transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
body .hkd-hotline .hkd-num {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    letter-spacing: .03em;
    white-space: nowrap;
}
body .hkd-hotline:hover {
    background: #0d3f8f;
    transform: translateY(-1px);
}
body .hkd-hotline:focus-visible {
    outline: 2px solid #0a2f6b;
    outline-offset: 3px;
}

/* ---- 汉堡 / 抽屉箭头（仅窄屏出现）---- */
body .hkd-nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    background: none;
    cursor: pointer;
    flex: 0 0 auto;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}
body .hkd-nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #0a2f6b;
}
body .hkd-caret {
    display: none;
}

/* 头部脱离文档流后的等高占位，保证首屏及其它版块位置不变 */
body .hkd-holder {
    height: 87px;
}
@media (max-width: 768px) {
    body .hkd-holder {
        height: 69px;
    }
}

/* 旧演示导航 / 旧内页头部已从 head.php 移除；留兜底防止模板缓存里的旧结构回潮 */
body nav.navBar,
body .inpage-head {
    display: none !important;
}

/* ---- 1470 以下：缩字号与项内边距，保住单行 ---- */
@media (max-width: 1469px) {
    body .hkd-inner {
        gap: 16px;
    }
    body .hkd-nav-link {
        font-size: 15px;
        padding: 0 10px;
    }
    body .hkd-logo {
        gap: 9px;
    }
    body .hkd-logo-mark {
        width: 40px;
        height: 40px;
        border-radius: 9px;
        font-size: 12.5px;
    }
    body .hkd-logo-cn {
        font-size: 18px;
    }
    body .hkd-logo-en {
        font-size: 9.5px;
        letter-spacing: .16em;
    }
    body .hkd-hotline {
        height: 42px;
        padding: 0 17px;
    }
    body .hkd-hotline .hkd-num {
        font-size: 15px;
    }
}

/* ---- 1280 以下：导航收进抽屉，热线留在头部右侧 ---- */
@media (max-width: 1279px) {
    body .hkd-nav-toggle {
        display: flex;
    }
    body .hkd-inner {
        justify-content: flex-start;
        gap: 12px;
    }
    body .hkd-hotline {
        margin-left: auto;
    }
    body .hkd-nav {
        position: fixed;
        top: 86px;
        left: 0;
        right: 0;
        height: auto;
        margin: 0;
        display: block;
        background: #fff;
        padding: 4px 18px 20px;
        box-shadow: 0 14px 28px rgba(0, 0, 0, .14);
        border-top: 1px solid #eef1f6;
        transform: translateY(-160%);
        visibility: hidden;
        transition: transform .35s ease, visibility .35s ease;
        min-height: calc(100vh - 86px);
        max-height: calc(100vh - 86px);
        overflow: auto;
        z-index: 99;
    }
    body .hkd-nav.open {
        transform: none;
        visibility: visible;
    }
    body .hkd-nav-list {
        display: block;
        height: auto;
    }
    body .hkd-nav-item {
        display: block;
        border-bottom: 1px solid #e4e9f0;
    }
    body .hkd-nav-link {
        height: 52px;
        padding: 0 2px;
        font-size: 16px;
        justify-content: flex-start;
    }
    body .hkd-nav-item:hover > .hkd-nav-link,
    body .hkd-nav-item:focus-within > .hkd-nav-link {
        background: none;
        color: #333;
    }
    body .hkd-nav-item.has-sub > .hkd-nav-link::before {
        display: none;
    }
    body .hkd-caret {
        display: flex;
        position: absolute;
        right: 0;
        top: 0;
        width: 52px;
        height: 52px;
        align-items: center;
        justify-content: center;
        border: 0;
        background: none;
        cursor: pointer;
    }
    body .hkd-caret span {
        width: 8px;
        height: 8px;
        border-right: 1.6px solid #8a93a4;
        border-bottom: 1.6px solid #8a93a4;
        transform: translateY(-2px) rotate(45deg);
        transition: transform .3s ease;
    }
    body .hkd-nav-item.open > .hkd-caret span {
        transform: translateY(2px) rotate(-135deg);
        border-color: #1657b8;
    }
    body .hkd-sub-menu {
        position: static;
        min-width: 0;
        display: none;
        padding: 0 0 10px;
        box-shadow: none;
        border-radius: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
    }
    body .hkd-nav-item.open > .hkd-sub-menu {
        display: block;
    }
    body .hkd-sub-menu a {
        padding: 10px 14px;
        font-size: 15px;
        color: #5b6472;
        border-radius: 6px;
    }
}

/* ---- 手机 ---- */
@media (max-width: 768px) {
    body .hkd-inner {
        height: 68px;
        gap: 12px;
        width: calc(100% - 32px);
        padding: 0;
    }
    body .hkd-nav {
        top: 68px;
        min-height: calc(100vh - 68px);
        max-height: calc(100vh - 68px);
    }
    body .hkd-logo-mark {
        width: 38px;
        height: 38px;
        border-radius: 8px;
        font-size: 12px;
    }
    body .hkd-logo-cn {
        font-size: 17px;
    }
    body .hkd-logo-en {
        font-size: 9px;
        letter-spacing: .14em;
    }
    body .hkd-hotline {
        height: 38px;
        padding: 0 14px;
        box-shadow: none;
    }
    body .hkd-hotline .hkd-num {
        font-size: 14px;
        letter-spacing: .02em;
    }
    body .hkd-nav-toggle {
        width: 38px;
        height: 38px;
    }
}
@media (max-width: 400px) {
    body .hkd-logo-cn {
        font-size: 16px;
    }
    body .hkd-hotline {
        padding: 0 11px;
    }
    body .hkd-hotline .hkd-num {
        font-size: 13px;
        letter-spacing: 0;
    }
}
@media (max-width: 359px) {
    body .hkd-inner {
        padding: 0 12px;
        gap: 8px;
    }
    body .hkd-logo-en {
        display: none;
    }
    body .hkd-logo-mark {
        width: 34px;
        height: 34px;
        border-radius: 7px;
        font-size: 11px;
    }
    body .hkd-logo-cn {
        font-size: 15px;
    }
    body .hkd-hotline {
        padding: 0 10px;
    }
    body .hkd-hotline .hkd-num {
        font-size: 12px;
    }
}

/*-- 内页搜索条（原样式只写在 index.css 里，内页没加载 index.css 导致搜索框「看不见、要点好几下」） --*/
/* 2026-11-16 从 index.css:43-59 原样搬过来 */
.searchBar{padding:0.625rem;overflow:hidden;background:#fff;}
.search-keywrod{float:left;width:50%;height:2.625rem;line-height:2.625rem;font-size:0.875rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.search-keywrod span{color:#000;}
.search-keywrod a{display:inline-block;margin-right:0.25rem;color:#000;}
.search-keywrod a:after{content:"、";}
.search-keywrod a:last-child:after{display:none;}
.search-keywrod a:hover{color:#04287e;}
.search-form{position:relative;float:right;padding-right:2.875rem;width:16rem;height:2.625rem;overflow:hidden;border:#d8d8d8 solid 1px;border-radius:3px;box-sizing:border-box;}
.search-form input{display:block;padding:0.75rem;width:100%;height:2.625rem;font-size:0.875rem;border:none;outline:none;box-sizing:border-box;}
.search-form button{display:block;position:absolute;right:0;top:0;width:2.875rem;height:100%;cursor:pointer;border:none;background:#04287e url(../images/search.png) no-repeat center;border-radius:3px;}
.search-form button:hover{background-color:#f7b500;}
@media (max-width:992px){
.search-keywrod{display:none;}
.search-form{float:none;width:100%;}
}
/*-- end 内页搜索条 --*/

/* 搜索条右侧避让：右侧悬浮客服条 .hks-toolbar（fixed right:17px、宽70px、z-index:1800，
   >992px 才显示）正好压在搜索按钮上，点按钮会点到 QQ 图标，表单永远提交不了。
   2026-11-16 实测：按钮 1305~1345，悬浮条 1298~1368，完全重叠。 */
@media (min-width: 993px) {
    body .searchBar .width1200 {
        padding-right: 92px;
        box-sizing: border-box;
    }
}

/* 搜索框空提交时的页内反馈：红框 + 抖动（替代 alert，见 js/common.js 的 hkdSearchCheck） */
.search-form input.hkd-sf-empty {
    box-shadow: inset 0 0 0 2px #e54d42 !important;
    border-radius: 3px;
    animation: hkdSfShake .34s ease;
}
@keyframes hkdSfShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    80% { transform: translateX(-3px); }
}

/* 后台网站LOGO：body 前缀压过全局 img{width:100%} */
body .hkd-logo-img {
    display: block;
    width: auto;
    height: 44px;
    max-width: 300px;
    object-fit: contain;
    object-position: left center;
}
@media (max-width: 1469px) {
    body .hkd-logo-img { height: 40px; max-width: 270px; }
}
@media (max-width: 768px) {
    body .hkd-logo-img { height: 34px; max-width: 50vw; }
}
@media (max-width: 359px) {
    body .hkd-logo-img { height: 30px; max-width: 46vw; }
}
