/* ==========================================================================
   seobole.com 头部导航样式（重设计版）
   主色：#1296db
   ========================================================================== */

/* ---------- 整体 ---------- */
.hd {
    background: #fff;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .06);
    margin-bottom: 14px;
}

/* ---------- 顶栏 ---------- */
.hd-top {
    height: 36px;
    line-height: 36px;
    background: #1f2a33;
    font-size: 13px;
    color: #a8b3bd;
}
.hd-welcome em {
    font-style: normal;
    color: #1296db;
    font-weight: 600;
}
.hd-user a {
    color: #a8b3bd;
    transition: color .2s;
}
.hd-user a:hover {
    color: #fff;
}
.hd-divider {
    margin: 0 8px;
    color: #4a5763;
}
.hd-name {
    color: #fff;
    margin-right: 10px;
}
.hd-coin {
    display: inline-block;
    padding: 1px 8px;
    margin-right: 10px;
    font-size: 12px;
    color: #1296db;
    background: rgba(18, 150, 219, .12);
    border-radius: 10px;
    line-height: 18px;
}

/* ---------- 主栏 ---------- */
.hd-main {
    height: 72px;
}
.hd-logo {
    height: 72px;
    line-height: 72px;
}
.hd-logo a {
    display: inline-block;
    font-size: 26px;
    font-weight: 700;
    color: #1296db;
    letter-spacing: .5px;
    line-height: 72px;
}

/* ---------- 主导航 ---------- */
.hd-nav {
    height: 72px;
    margin-left: 36px;
}
.hd-nav ul.menu {
    padding: 0;
    height: 72px;
}
.hd-nav ul.menu li {
    display: block;
    float: left;
    height: 72px;
    position: relative;
}
.hd-nav ul.menu li a {
    display: block;
    height: 72px;
    line-height: 72px;
    padding: 0 18px;
    font-size: 15px;
    color: #444;
    transition: color .2s;
}
/* 悬停下划线 */
.hd-nav ul.menu li a::after {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 16px;
    height: 2px;
    border-radius: 2px;
    background: #1296db;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .25s;
}
.hd-nav ul.menu li a:hover {
    color: #1296db;
}
.hd-nav ul.menu li a:hover::after {
    transform: scaleX(1);
}

/* ---------- 搜索框 ---------- */
.hd-search {
    height: 72px;
    display: flex;
    align-items: center;
}
.hd-search form {
    display: flex;
    height: 38px;
    border: 1px solid #dfe3e8;
    border-radius: 19px;
    overflow: hidden;
    background: #f7f8fa;
    transition: border-color .2s, background .2s, box-shadow .2s;
}
.hd-search form:focus-within {
    border-color: #1296db;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(18, 150, 219, .1);
}
.hd-search input {
    width: 190px;
    height: 38px;
    line-height: 38px;
    padding: 0 6px 0 16px;
    margin: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: #333;
    float: none;
    box-sizing: border-box;
}
.hd-search input::placeholder {
    color: #aab2ba;
}
.hd-search button {
    width: 46px;
    height: 38px;
    padding: 0;
    border: none;
    outline: none;
    background: transparent;
    color: #98a3ad;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .2s;
    float: none;
    box-sizing: border-box;
}
.hd-search button:hover {
    color: #1296db;
}

/* ---------- 移动端 ---------- */
.nav-mobile {
    display: none;
}
.nav-icon {
    width: 36px;
    height: 36px;
    margin-top: 18px;
    padding: 8px 6px;
    box-sizing: border-box;
    cursor: pointer;
}
.nav-icon span {
    display: block;
    height: 2px;
    margin: 4px 0;
    border-radius: 2px;
    background: #444;
}
.menu-mobile {
    display: none;
    position: absolute;
    top: 108px;
    right: 10px;
    width: 180px;
    padding: 8px;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .1);
    z-index: 99999;
    list-style: none;
}
.menu-mobile li {
    margin: 0;
}
.menu-mobile li a {
    display: block;
    padding: 10px 12px;
    font-size: 14px;
    color: #444;
    border-radius: 6px;
    transition: background .2s, color .2s;
}
.menu-mobile li a:hover {
    background: #f2f9fe;
    color: #1296db;
}

@media screen and (max-width: 1200px) {
    .hd-nav {
        margin-left: 16px;
    }
    .hd-nav ul.menu li a {
        padding: 0 11px;
    }
    .hd-nav ul.menu li a::after {
        left: 11px;
        right: 11px;
    }
    .hd-search input {
        width: 140px;
    }
}

@media screen and (max-width: 900px) {
    /* 移动端：隐藏桌面导航与搜索，显示汉堡菜单 */
    .hd-nav,
    .hd-search {
        display: none;
    }
    .nav-mobile {
        display: block;
        position: relative;
    }
    .hd-main {
        height: 64px;
    }
    .hd-logo,
    .hd-logo a {
        height: 64px;
        line-height: 64px;
        font-size: 21px;
    }
    .nav-icon {
        margin-top: 14px;
    }
    .menu-mobile {
        top: 64px;
    }
}
