/* ==================== Site Header ==================== */

.site-header {
    /* height: 157px; */
    position: relative;
    z-index: 2;
    margin: 0 auto;
}

.w1200 {
    width: 1380px;
}
/* ========== PC端：单行布局 ========== */
.header-bar {
    max-width: var(--portal-container-width, 1200px);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    height: var(--portal-header-height, 72px);
    gap: 24px;
}

/* --- Logo --- */
.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    text-decoration: none;
}

.logo-img {
    height: 48px;
    object-fit: contain;
}

.company-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--portal-secondary, #1a3a5c);
    white-space: nowrap;
    letter-spacing: 1px;
}

/* --- Search --- */
.header-search {
    flex: 1;
    max-width: 400px;
    margin: 0 auto;
}

.header-search .el-input__wrapper {
    background: #f5f5f5;
    border-radius: 24px;
    box-shadow: none !important;
    padding: 4px 16px;
}

.header-search .el-input__wrapper:hover,
.header-search .el-input__wrapper.is-focus {
    box-shadow: 0 0 0 1px var(--portal-primary, #c62828) !important;
}

.header-search .el-input__inner {
    font-size: var(--portal-font-size-base, 14px);
    color: var(--portal-text, #333);
}

.header-search .el-input__inner::placeholder {
    color: #999;
}

.header-search .el-input-group__append {
    background: transparent;
    border: none;
    box-shadow: none !important;
    padding: 0 8px;
}

.header-search .search-btn {
    border: none;
    background: transparent;
    padding: 4px;
    color: var(--portal-primary, #c62828);
    cursor: pointer;
}

.header-search .search-btn:hover {
    color: var(--portal-primary-dark, #8e0000);
}

/* --- Utilities --- */
.header-utilities {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-shrink: 0;
}

/* 图标摆动动画 */
@keyframes icon-swing {
    0%   { transform: rotate(0deg); }
    20%  { transform: rotate(30deg); }
    40%  { transform: rotate(-25deg); }
    60%  { transform: rotate(15deg); }
    80%  { transform: rotate(-10deg); }
    100% { transform: rotate(0deg); }
}

.utility-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    transition: var(--portal-transition, all 0.3s ease);
}

.utility-item:hover .utility-icon {
    color: var(--portal-primary-dark, #8e0000);
    animation: icon-swing 0.6s ease-in-out;
    transform-origin: top center;
}

.utility-item:hover .utility-text {
    color: var(--portal-primary, #c62828);
}

.utility-icon {
    color: var(--portal-primary, #c62828);
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--portal-transition, all 0.3s ease);
}

.utility-icon svg {
    display: block;
    fill: currentColor;
}

.utility-text {
    font-size: var(--portal-font-size-sm, 12px);
    color: var(--portal-text, #333);
    white-space: nowrap;
    transition: var(--portal-transition, all 0.3s ease);
}

/* --- Hamburger Button (H5 only) --- */
.hamburger-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--portal-text, #333);
    border-radius: 8px;
    transition: var(--portal-transition, all 0.3s ease);
    flex-shrink: 0;
}

.hamburger-btn:hover {
    background: #f5f5f5;
    color: var(--portal-primary, #c62828);
}

/* ========== 一级导航菜单 ========== */
.main-navigation {
    /*background: linear-gradient(135deg, #1e5bc6 0%, #2979ff 100%);*/
    box-shadow: 0 2px 8px rgba(30, 91, 198, 0.15);
    height: 80px;
     background: #1a4ecc;
    margin-top: 6px;
    padding: 0 20px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: relative;
    z-index: 10;
}

.nav-menu {
    max-width: var(--portal-container-width, 1200px);
    margin: 0 auto;
    padding: 0 20px;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    gap: 0;
}

.nav-item {
    position: relative;
    flex-shrink: 0;
}

.nav-item > a {
    display: block;
    padding: 0 28px;
    line-height: 90px;
    font-size: 20px;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
    transition: var(--portal-transition, all 0.3s ease);
    position: relative;
    letter-spacing: 0.5px;
}

.nav-item > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: #fff;
    transition: var(--portal-transition, width 0.3s ease);
}

.nav-item:hover > a,
.nav-item.active > a {
    background: #D01027;
}

.nav-item:hover > a::after,
.nav-item.active > a::after {
    width: 0%;
}

/* 二级下拉菜单 */
.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 4px 4px;
    list-style: none;
    padding: 8px 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--portal-transition, all 0.3s ease);
    z-index: 1000;
}

.has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu-item {
    display: block;
}

.submenu-item > a {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    color: var(--portal-text, #333);
    text-decoration: none;
    transition: var(--portal-transition, all 0.3s ease);
}

.submenu-item > a:hover {
    background: #f5f5f5;
    color: var(--portal-primary, #c62828);
    padding-left: 24px;
}

/* --- Mobile Drawer --- */
.mobile-nav-drawer .el-drawer__header {
    margin-bottom: 0;
    padding: 16px 20px;
    border-bottom: 1px solid var(--portal-border, #e0e0e0);
    background: var(--portal-primary, #c62828);
    color: #fff;
}

.mobile-nav-drawer .el-drawer__title {
    color: #fff;
    font-size: var(--portal-font-size-lg, 16px);
    font-weight: 600;
}

.mobile-nav-drawer .el-drawer__close-btn {
    color: #fff;
}

.mobile-nav-drawer .el-drawer__body {
    padding: 0;
}

.mobile-nav-drawer .el-menu {
    border-right: none !important;
}

.mobile-nav-drawer .el-menu-item,
.mobile-nav-drawer .el-sub-menu__title {
    height: 48px;
    line-height: 48px;
    font-size: var(--portal-font-size-md, 15px);
}

.mobile-nav-drawer .el-menu-item.is-active {
    color: var(--portal-primary, #c62828) !important;
    background-color: #f9efee !important;
}

.mobile-nav-drawer .el-menu-item:hover,
.mobile-nav-drawer .el-sub-menu__title:hover {
    background-color: #f9efee !important;
}

/* ========== 响应式：平板端（≤1200px） ========== */
@media (max-width: 1200px) {
    /* 平板端：移除固定宽度限制，使用自适应宽度 */
    .w1200 {
        width: 100% !important;
    }

    .header-utilities {
        gap: 16px;
    }

    .company-name {
        font-size: 18px;
    }

    .header-search {
        max-width: 300px;
    }

    /* 一级导航适配 */
    .nav-item > a {
        padding: 0 16px;
        font-size: 15px;
    }

    .submenu {
        min-width: 150px;
    }
}

/* ========== 响应式：H5端（≤768px）—— 三行布局 ========== */
@media (max-width: 768px) {
    /* H5端：移除固定宽度限制，使用自适应宽度 */
    .w1200 {
        width: 100% !important;
    }

    /* H5端：隐藏一级导航菜单，使用抽屉导航 */
    .main-navigation {
        display: none;
    }

    /* H5端：header-bar 变为纵向三行排列 */
    .header-bar {
        flex-wrap: wrap;
        height: auto;
        padding: 0 16px;
        gap: 0;
    }

    /* 第一行：Logo + 汉堡按钮，占满宽度 */
    .header-logo {
        flex: 1;
    }

    .company-name {
        font-size: 15px;
        letter-spacing: 0;
    }

    .logo-img {
        height: 36px;
    }

    /* H5端显示汉堡菜单按钮 */
    .hamburger-btn {
        display: flex;
    }

    /* 第二行：搜索框，占满宽度，独占一行 */
    .header-search {
        max-width: none;
        flex: 0 0 100%;
        order: 10;
        padding: 8px 0 10px;
    }

    /* 第三行：快捷入口，占满宽度，独占一行 */
    .header-utilities {
        flex: 0 0 100%;
        order: 11;
        justify-content: space-around;
        padding-bottom: 12px;
    }

    .utility-item {
        gap: 3px;
    }

    .utility-icon svg {
        width: 22px;
        height: 22px;
    }

    .utility-text {
        font-size: 11px;
    }
}

/* ========== 响应式：小屏手机（≤480px） ========== */
@media (max-width: 480px) {
    /* 小屏手机：移除固定宽度限制，使用自适应宽度 */
    .w1200 {
        width: 100% !important;
    }

    .company-name {
        font-size: 14px;
        letter-spacing: 0;
    }

    .logo-img {
        height: 32px;
    }

    .header-bar {
        padding: 0 12px;
    }

    .utility-icon svg {
        width: 20px;
        height: 20px;
    }

    .utility-text {
        font-size: 10px;
    }
}


