﻿/* ===== 顶部背景区：165px，背景图水平铺满 ===== */
.top-bg {
    width: 100%;
    height: 165px;
    background-image: url('../images/bj1.jpg');
    background-repeat: repeat-x;
    background-position: center top;
    background-size: auto 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* ===== 内容容器：宽度900px，水平居中 ===== */
.content-wrapper {
    width: 900px;
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    background: transparent;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ===== 头部：高120px ===== */
.header {
    height: 120px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 6px 0 0 0;
    position: relative;
    background: transparent;
}

/* 顶栏：电话 + 语言切换 */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}

.header-phone {
    font-size: 13px;
    color: #ffffff;
    font-weight: 400;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

    .header-phone a {
        color: #ffffff;
        text-decoration: none;
    }

        .header-phone a:hover {
            text-decoration: underline;
        }

.header-lang {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 400;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

    .header-lang a {
        color: #ffffff;
        text-decoration: none;
        transition: opacity 0.2s;
        font-weight: 400;
    }

        .header-lang a:hover {
            opacity: 0.75;
            text-decoration: underline;
        }

    .header-lang .divider {
        color: rgba(255, 255, 255, 0.5);
        user-select: none;
    }

/* 底栏：Logo图片 + 标语 */
.header-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}

.header-logo {
    display: flex;
    align-items: flex-end;
    height: 100%;
    margin-bottom: 2px;
    padding-left: 0;
    flex-shrink: 0;
}

    .header-logo img {
        display: block;
        width: auto;
        height: auto;
    }

.header-slogan {
    font-size: 16px;
    font-weight: 500;
    color: #ffffff;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
    text-align: right;
    line-height: 1.4;
    padding-bottom: 4px;
    letter-spacing: 1px;
    flex-shrink: 0;
}

    .header-slogan small {
        display: block;
        font-weight: 300;
        font-size: 13px;
        opacity: 0.85;
    }

/* ===== 导航容器：45px高，占满宽度 ===== */
.nav-wrapper {
    width: 100%;
    background: transparent;
    padding: 0;
    overflow: visible;
    position: relative;
    z-index: 20;
}

.main-nav {
    display: flex;
    align-items: center;
    height: 45px;
    position: relative;
    width: 100%;
    background: transparent;
    border-radius: 0;
    border: none;
    padding: 0;
}

.nav-left {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    height: 100%;
    flex-wrap: nowrap;
    overflow: visible;
    position: relative;
    width: 100%;
    padding: 0;
}

.nav-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 8px;
    font-size: 16px;
    font-weight: 500;
    color: #ffffff;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    flex: 0 1 auto;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

    .nav-item:first-child {
        padding-left: 0;
    }

    .nav-item:last-child {
        padding-right: 0;
    }

    .nav-item > a {
        text-decoration: none;
        color: inherit;
        display: flex;
        align-items: center;
        gap: 4px;
        position: relative;
        z-index: 2;
        font-size: 16px;
    }

    .nav-item .arrow {
        display: none;
    }

    .nav-item::after {
        content: '';
        position: absolute;
        bottom: -3px;
        left: 0;
        width: 100%;
        height: 3px;
        background: transparent;
        border-radius: 2px;
        transition: all 0.3s ease;
        z-index: 1;
    }

    .nav-item:hover::after {
        background: #ffffff;
        box-shadow: 0 -8px 20px rgba(255, 255, 255, 0.9), 0 -16px 40px rgba(255, 255, 255, 0.5), 0 -28px 60px rgba(255, 255, 255, 0.2);
    }

    .nav-item:hover {
        background: transparent;
    }

/* ===== 子导航 ===== */
.sub-nav {
    position: absolute;
    top: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: #006CBF;
    padding: 6px 14px;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    z-index: 100;
    pointer-events: none;
    display: flex;
    gap: 2px;
    white-space: nowrap;
    min-width: auto;
    width: auto;
    border-top: none;
    max-width: 900px;
}

.nav-item.sub-align-left .sub-nav {
    left: 0;
    transform: translateX(0) translateY(6px);
}

.nav-item.sub-align-left:hover .sub-nav {
    transform: translateX(0) translateY(0);
}

.nav-item.sub-align-right .sub-nav {
    left: auto;
    right: 0;
    transform: translateX(0) translateY(6px);
}

.nav-item.sub-align-right:hover .sub-nav {
    transform: translateX(0) translateY(0);
}

.nav-item:hover .sub-nav {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.nav-item.sub-align-left:hover .sub-nav {
    transform: translateX(0) translateY(0);
}

.nav-item.sub-align-right:hover .sub-nav {
    transform: translateX(0) translateY(0);
}

.sub-nav a {
    display: block;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 450;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

    .sub-nav a:hover {
        background: rgba(255, 255, 255, 0.25);
        color: #ffffff;
    }

/* ===== 响应式 ===== */
@media (max-width: 920px) {
    .content-wrapper {
        width: 100%;
        padding: 0 10px;
    }

    .top-bg {
        height: auto;
        min-height: 165px;
        padding: 10px 0;
    }

    .header {
        height: auto;
        min-height: 100px;
        padding: 6px 0 0 0;
        gap: 4px;
    }

    .header-top {
        flex-wrap: wrap;
        gap: 4px;
        padding: 0 12px;
    }

    .header-phone {
        font-size: 12px;
    }

    .header-lang {
        font-size: 12px;
        gap: 6px;
    }

    .header-bottom {
        flex-wrap: wrap;
        gap: 6px;
        align-items: flex-end;
        padding: 0 12px;
    }

    .header-logo img {
        max-height: 48px;
    }

    .header-slogan {
        font-size: 14px;
    }

        .header-slogan small {
            font-size: 11px;
        }

    .main-nav {
        flex-wrap: wrap;
        height: auto;
        padding: 4px 0;
        gap: 2px 0;
        background: transparent;
    }

    .nav-left {
        flex-wrap: wrap;
        height: auto;
        gap: 2px 0;
        width: 100%;
        justify-content: flex-start;
    }

    .nav-item {
        height: 38px;
        padding: 0 10px;
        font-size: 14px;
        flex: 0 0 auto;
    }

        .nav-item:first-child {
            padding-left: 0;
        }

        .nav-item:last-child {
            padding-right: 0;
        }

    .sub-nav {
        top: calc(100% - 2px);
        flex-wrap: wrap;
        left: 0 !important;
        right: auto !important;
        transform: translateX(0) translateY(6px) !important;
        border-radius: 0 0 8px 8px;
        min-width: 160px;
        max-width: 100%;
    }

    .nav-item:hover .sub-nav {
        transform: translateX(0) translateY(0) !important;
    }

    .nav-item.sub-align-right .sub-nav,
    .nav-item.sub-align-left .sub-nav {
        left: 0 !important;
        right: auto !important;
        transform: translateX(0) translateY(6px) !important;
    }

    .nav-item.sub-align-right:hover .sub-nav,
    .nav-item.sub-align-left:hover .sub-nav {
        transform: translateX(0) translateY(0) !important;
    }
}

@media (max-width: 600px) {
    .top-bg {
        min-height: 140px;
    }

    .header {
        min-height: 80px;
        padding: 4px 0 0 0;
    }

    .header-phone {
        font-size: 10px;
    }

    .header-lang {
        font-size: 10px;
        gap: 4px;
    }

    .header-logo img {
        max-height: 38px;
    }

    .header-slogan {
        font-size: 11px;
    }

        .header-slogan small {
            font-size: 9px;
        }

    .nav-item {
        padding: 0 6px;
        font-size: 12px;
        height: 34px;
    }

        .nav-item:first-child {
            padding-left: 0;
        }

        .nav-item:last-child {
            padding-right: 0;
        }

    .sub-nav a {
        font-size: 11px;
        padding: 4px 10px;
    }
}
