/* ============ 模板七 头部样式 ============ */
/* 全局去掉 a 点击下划线与焦点边框（覆盖 Bootstrap） */
a,
a:hover,
a:focus,
a:active,
a:visited {
    text-decoration: none;
    outline: none;
}

#ie-warning {
    background: #fff3cd;
    color: #856404;
    padding: 8px 16px;
    text-align: center;
    font-size: 13px;
}

/* 顶部信息条 */
.topbar7 {
    width: 100%;
    background: #f5f6f8;
    border-bottom: 1px solid #ebedf0;
}

.topbar7-inner {
    width: 1200px;
    max-width: 96%;
    margin: 0 auto;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: #666;
}

.topbar7-phone {
    color: #1F3A91;
    font-weight: bold;
}

/* 主导航栏 */
.header7 {
    width: 100%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: relative;
    z-index: 100;
}

.header7-inner {
    width: 1200px;
    max-width: 96%;
    margin: 0 auto;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header7-logo {
    display: block;
    flex-shrink: 0;
    margin-right: 30px;
}

.header7-logo img {
    max-height: 50px;
    display: block;
}

.header7-nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.header7-nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.header7-nav-item {
    position: relative;
}

.header7-nav-item > a {
    display: block;
    padding: 28px 16px;
    font-size: 16px;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s;
}

.header7-nav-item > a:hover,
.header7-nav-item.active > a {
    color: #1F3A91;
    font-weight: bold;
}

.header7-nav-item.active > a {
    position: relative;
}

.header7-nav-item.active > a::after {
    content: '';
    position: absolute;
    left: 50%;
    top: calc(28px + 1em + 20px);
    transform: translateX(-50%);
    width: 35px;
    height: 4px;
    background: #1F3A91;
}

/* 二级导航 */
.header7-subnav {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 140px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border-radius: 4px;
    list-style: none;
    margin: 0;
    padding: 6px 0;
    z-index: 999;
}

.header7-nav-item:hover .header7-subnav {
    display: block;
}

.header7-subnav li a {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    color: #333;
    text-align: center;
    text-decoration: none;
    border-bottom: 1px solid #f2f2f2;
}

.header7-subnav li:last-child a {
    border-bottom: none;
}

.header7-subnav li a:hover,
.header7-subnav li.active a {
    background: #EEF1FA;
    color: #1F3A91;
}

/* 用户登录 */
.header7-login {
    position: relative;
    flex-shrink: 0;
    margin-left: 24px;
}

.header7-login-btn {
    background: #1F3A91;
    color: #fff;
    font-size: 15px;
    padding: 8px 22px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.header7-login-btn:hover {
    background: #16296B;
}

.header7-login-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: -13px;
    min-width: 130px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border-radius: 4px;
    padding: 6px 0;
    z-index: 999;
}

.header7-login:hover .header7-login-menu {
    display: block;
}

.header7-login-menu a {
    display: block;
    padding: 12px 20px;
    font-size: 14px;
    color: #333;
    text-align: center;
    text-decoration: none;
    border-bottom: 1px solid #f2f2f2;
}

.header7-login-menu a:last-child {
    border-bottom: none;
}

.header7-login-menu a:hover {
    background: #EEF1FA;
    color: #1F3A91;
}

/* 移动端适配 */
@media (max-width: 1023px) {
    .topbar7-inner {
        height: auto;
        padding: 5px 0;
        flex-direction: column;
        align-items: flex-start;
    }

    .header7-inner {
        height: auto;
        flex-wrap: wrap;
        padding: 8px 0;
    }

    .header7-logo img {
        max-height: 40px;
    }

    .header7-nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
        justify-content: flex-start;
    }

    .header7-nav-list {
        width: max-content;
    }

    .header7-nav-item > a {
        padding: 12px 10px;
        font-size: 14px;
    }

    .header7-login {
        margin-left: auto;
    }

    .header7-login-btn {
        font-size: 13px;
        padding: 6px 14px;
    }
}
