/* ============ 模板七 头部样式（上品牌栏 + 下主题色导航） ============ */
:root {
    --idx7-theme: #1F3A91;
}

/* 全局去掉 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;
}

.header7 {
    width: 100%;
    position: relative;
    z-index: 100;
}

/* ---------- 上：白底品牌栏 ---------- */
.header7-brand {
    width: 100%;
    background: #fff;
}

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

.header7-logo {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    flex: 1;
    text-decoration: none;
}

.header7-logo img {
    max-height: 64px;
    width: auto;
    display: block;
    flex-shrink: 0;
}

.header7-platform {
    font-size: 20px;
    font-weight: 700;
    color: var(--idx7-theme);
    line-height: 1.3;
    white-space: nowrap;
}

.header7-brand-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.header7-phone {
    font-size: 16px;
    color: var(--idx7-theme);
    font-weight: 600;
    white-space: nowrap;
}

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

.header7-login-btn {
    background: var(--idx7-theme);
    color: #fff;
    font-size: 15px;
    padding: 8px 22px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.header7-login-btn:hover {
    background: color-mix(in srgb, var(--idx7-theme) 75%, #000);
}

.header7-login-menu {
    display: none;
    position: absolute;
    top: calc(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: color-mix(in srgb, var(--idx7-theme) 8%, #fff);
    color: var(--idx7-theme);
}

/* ---------- 下：主题色导航栏 ---------- */
.header7-nav {
    width: 100%;
    background: var(--idx7-theme);
}

.header7-nav-inner {
    width: 1200px;
    max-width: 96%;
    margin: 0 auto;
}

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

.header7-nav-item {
    position: relative;
    flex: 1;
    text-align: center;
}

.header7-nav-item > a {
    display: block;
    padding: 14px 10px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.2s ease;
}

.header7-nav-item > a:hover {
    transform: scale(1.12);
}

/* 二级导航 */
.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: 0 0 4px 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: color-mix(in srgb, var(--idx7-theme) 8%, #fff);
    color: var(--idx7-theme);
}

/* 移动端适配 */
@media (max-width: 1023px) {
    .header7-brand-inner {
        min-height: auto;
        padding: 10px 0;
        flex-wrap: wrap;
        gap: 10px;
    }

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

    .header7-platform {
        display: none;
    }

    .header7-brand-right {
        width: 100%;
        justify-content: space-between;
        gap: 10px;
    }

    .header7-phone {
        font-size: 13px;
    }

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

    .header7-nav-inner {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .header7-nav-list {
        width: max-content;
        min-width: 100%;
        justify-content: flex-start;
    }

    .header7-nav-item {
        flex: 0 0 auto;
    }

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