/* Logo区域 */
.header-top {
    background: rgba(0, 0, 0, 0.5);
    padding: 0;
    height: 80px;
    position: fixed;  /* 固定定位 */
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;  /* 确保在最上层 */
    transition: background 0.3s ease;
}

.header-top-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    height: 100%;
}

.logo a {
    display: flex;
    align-items: center;
    height: 100%;
    text-decoration: none;
    gap: 12px;  /* logo和文字之间的间距 */
}

.logo img {
    height: 70px;
    width: auto;
    object-fit: contain;
    transition: filter 0.3s ease;
}

/* 公司名称样式 */
.company-name {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.name-primary {
    color: #003366;  /* 主要品牌色 */
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
}

.name-secondary {
    color: #666;
    font-size: 14px;
    font-weight: 400;
}

/* 导航区域 */
.main-header {
    background: rgba(0, 0, 0, 0.5);
    position: fixed;
    left: 0;
    right: 0;
    z-index: 999;
    transition: background 0.3s ease;
    display: block;  /* 确保导航栏始终显示 */
}

.header-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding:  10px;
    display: flex;
    justify-content: center;
}

.main-nav {
    height: 100%;
}

.main-nav ul {
    display: flex;
    height: 100%;
    margin: 0;
    padding-top: 20px;
    list-style: none;
    font-weight: 700 ;
}

.main-nav li {
    height: 100%;
    position: relative;
}

.main-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    padding: 0 35px;
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
    min-width: 120px;
    width: fit-content;
    justify-content: center;
    box-sizing: border-box;
    transition: background-color 0.3s ease;
}

.has-submenu > a::after {
    content: '▼';
    font-size: 10px;
    margin-left: 5px;
}

/* 添加新的悬停效果 */
.main-nav li:hover > a {
    background: rgba(255, 255, 255, 0.1);
    color: #000;
}

/* About Us 选中状态 */


/* 子菜单基础样式 */
.submenu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    min-width: 280px;  /* 增加宽度以适应缩进 */
    width: max-content;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 998;
    padding: 10px 0;
    display: none;
}

.submenu ul {
    display: block;
    height: auto;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* 子菜单项样式 */
.submenu li {
    position: relative;
    border-bottom: none;  /* 移除边框 */
    width: 100%;
    height: auto;
}

.submenu a {
    color: #333;
    padding: 12px 20px;
    font-size: 14px;
    display: block;
    text-align: left;
    transition: background-color 0.3s, color 0.3s;
    white-space: nowrap;
    width: 100%;
    box-sizing: border-box;
    height: auto;
}

.submenu a::after {
    content: '';  /* 移除默认箭头 */
}

.product-submenu a {
    position: relative;
    padding-right: 45px;  /* 为箭头留出空间 */
}

.submenu a:hover {
    background: #003366;
    color: #fff;
}

.submenu-content {
    display: flex;
    gap: 40px;
}

.submenu-links {
    flex: 1;
    max-width: 300px;
}

.submenu-image {
    flex: 2;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    height: 300px;
}

.submenu-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.submenu-image:hover img {
    transform: scale(1.05);
}

.submenu-image-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
}

.submenu-image-text h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.submenu-image-text p {
    font-size: 14px;
    opacity: 0.8;
}

.header-actions {
    position: static;
    transform: none;
}

.header-actions button {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
}

.header-actions img {
    width: 24px;
    height: 24px;
}

/* 移动端菜单按钮 */
.menu-btn {
    display: none;
}

/* 移动端导航菜单 */
.mobile-nav {
    display: none;
    position: fixed;
    top: 110px;  /* header-top + main-header 的高度 */
    left: 0;
    width: 100%;
    height: calc(100vh - 110px);
    background: #fff;
    z-index: 998;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-nav.active {
    transform: translateX(0);
}

.mobile-nav ul {
    list-style: none;
    padding: 20px;
    margin: 0;
}

.mobile-nav li:first-child a {
    color: white;
    font-weight: 600;
}

.mobile-nav li {
    border-bottom: 1px solid #eee;
}

.mobile-nav a {
    display: block;
    padding: 16px;
    color: #000;
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
}

/* 移动端菜单样式调整 */
@media (max-width: 768px) {
    .mobile-nav li.active > a {
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
    }
}

/* 响应式设计 */
@media (max-width: 1440px) {
    .header-inner {
        max-width: 100%;
        padding: 15px;
    }
}

@media (max-width: 1024px) {
    .header-inner {
        padding: 0 20px;
    }

    .main-nav {
        display: none;
    }

    .menu-btn {
        display: block;
    }

    .mobile-nav {
        display: block;
    }
}

@media (max-width: 768px) {
    .header-top {
        height: 0px;
    }

    .header-top-inner {
        padding: 0 15px;
        justify-content: space-between;
        position: relative;
    }

    /* 隐藏联系信息 */
    .header-top-right .contact-info {
        display: none !important;
    }

    /* 调整 logo 位置 */
    .logo {
        flex: 1;
    }

    /* 菜单按钮样式 */
    .menu-toggle {
        display: block;
        width: 30px;
        height: 30px;
        padding: 0;
        border: none;
        background: none;
        cursor: pointer;
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1001;
    }

    /* 菜单图标样式 */
    .menu-toggle span {
        display: block;
        width: 24px;
        height: 2px;
        background: #fff;
        margin: 5px auto;
        transition: all 0.3s ease;
    }

    /* 激活状态的菜单按钮样式 */
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    /* 移动导航样式 */
    .mobile-nav {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        height: calc(100vh - 60px);
        background: #003366;
        z-index: 999;
        overflow-y: auto;
    }

    /* 移动端子菜单样式 */
    .mobile-nav .submenu {
        display: none;
        background: rgba(0, 0, 0, 0.2);
        padding: 0;
        position: static;
        transform: none;
        box-shadow: none;
        min-width: auto;
    }

    .mobile-nav .has-submenu.active .submenu {
        display: block;
    }

    .mobile-nav .has-submenu > a::after {
        content: '▼';
        float: right;
        font-size: 10px;
        transition: transform 0.3s;
    }

    .mobile-nav .has-submenu.active > a::after {
        transform: rotate(180deg);
    }

    .mobile-nav .submenu ul ul {
        padding-left: 20px;
    }

    .mobile-nav .submenu a {
        padding: 12px 20px;
        color: #fff;
        font-size: 14px;
    }

    .mobile-nav .submenu ul ul a {
        padding: 10px 20px;
        font-size: 13px;
        color: rgba(255, 255, 255, 0.8);
    }

    /* 隐藏桌面导航 */
    .main-nav {
        display: none;
    }

    .logo img {
        height: 50px;
    }

    /* 调整右侧按钮 */
    .contact-info {
        display: flex;
        font-size: 13px;
        gap: 10px;
    }

    .contact-item {
        font-size: 13px;
    }

    .contact-item img {
        width: 16px;
        height: 16px;
    }

    .name-secondary {
        display: none;  /* 在移动端隐藏副标题 */
    }
    
    .name-primary {
        font-size: 20px;
    }

    .header-top {
        height: 0px;
    }

    .main-header {
        top: 60px;  /* 移动端 header-top 的高度 */
        position: fixed;  /* 确保导航栏固定 */
        display: block;  /* 确保导航栏显示 */
    }

    main {
        width: 100%;
        overflow-x: hidden;
    }
}

/* 产品分类菜单样式 */
.category-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 40px;
    z-index: 100;
}

.category-section {
    margin-bottom: 30px;
}

.category-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #000;
}

.category-section ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.category-section a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.category-section a:hover {
    color: #000;
}

/* 显示菜单 */
.main-nav li:hover .category-menu {
    display: block;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .category-menu {
        position: static;
        box-shadow: none;
        padding: 20px;
    }

    .category-section ul {
        grid-template-columns: 1fr;
    }

    .category-section a {
        padding: 8px 0;
        display: block;
        border-bottom: 1px solid #eee;
    }
}

/* mobile 下拉菜单样式 */
.has-submenu {
    position: relative;
}

.products-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100vw;
    background: #fff;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    padding: 40px;
    z-index: 1000;
    transform: translateX(-50%);
    left: 50%;
}

.has-submenu:hover .products-menu {
    display: flex;
    gap: 40px;
}

.menu-section {
    flex: 1;
}

.menu-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #000;
}

.menu-section ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
}

.menu-section li {
    list-style: none;
}

.menu-section a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 0;
    display: block;
    transition: color 0.3s;
}

.menu-section a:hover {
    color: #000;
}

/* 移动端样式 */
@media (max-width: 768px) {
    .products-menu {
        position: static;
        box-shadow: none;
        padding: 0 16px;
        transform: none;
        display: none;
    }

    .has-submenu.active .products-menu {
        display: block;
    }

    .menu-section {
        margin-bottom: 24px;
    }

    .menu-section ul {
        grid-template-columns: 1fr;
    }

    .menu-section a {
        padding: 12px 0;
        border-bottom: 1px solid #eee;
    }
}

/* 右侧按钮区域 */
.header-top-right {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

/* 联系方式样式 */
.contact-info {
    align-items: center;
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.3s ease;
}

.contact-item:hover {
    text-decoration: underline;
}

.contact-item img {
    width: 20px;
    height: 20px;
}

/* 调整下拉箭头 */
.has-submenu > a::after {
    content: '▼';
    font-size: 10px;
    margin-left: 5px;
}

/* 悬浮显示下拉菜单 */
.has-submenu:hover .submenu {
    display: block !important;  /* 强制显示 */
}

/* 移动端菜单样式 */
@media (max-width: 768px) {
    .menu-btn {
        display: block;
        background: none;
        border: none;
        padding: 8px;
        cursor: pointer;
    }

    .mobile-nav {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        background: #003366;
        z-index: 999;
    }

    .mobile-nav ul {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .mobile-nav li {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .mobile-nav a {
        color: #fff;
        text-decoration: none;
        padding: 15px 20px;
        display: block;
        font-size: 14px;
    }

    .mobile-nav .has-submenu > a::after {
        content: '▼';
        float: right;
        font-size: 10px;
    }

    .mobile-nav .submenu {
        display: none;
        background: rgba(0,0,0,0.2);
    }

    .mobile-nav .submenu ul {
        padding-left: 20px;
    }

    .mobile-nav .submenu li {
        border-bottom: none;
    }

    .mobile-nav .submenu a {
        padding: 10px 20px;
        font-size: 13px;
    }

    .mobile-nav li.active > a {
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
    }

    /* 隐藏桌面导航 */
    .main-nav {
        display: none;
    }

    /* 调整 logo 区域 */
    .header-top {
        height: 60px;
    }

    .header-top-inner {
        padding: 0 15px;
    }

    .logo img {
        height: 50px;
    }

    /* 调整右侧按钮 */
    .contact-info {
        display: flex;
        font-size: 13px;
        gap: 10px;
    }

    .contact-item {
        font-size: 13px;
    }

    .contact-item img {
        width: 16px;
        height: 16px;
    }
}

/* 调整主体内容的位置 */
main {
    width: 100%;
    overflow-x: hidden;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .header-top {
        height: 60px;
    }

    .main-header {
        top: 0px;  /* 移动端 header-top 的高度 */
        position: fixed;  /* 确保导航栏固定 */
        display: block;  /* 确保导航栏显示 */
    }

    main {
        width: 100%;
        overflow-x: hidden;
    }
}

/* 二级菜单样式 */
.product-submenu li ul {
    display: block;  /* 改为默认显示 */
    padding-left: 20px;
}

/* 一级菜单项样式 */
.product-submenu > ul > li > a {
    font-weight: 500;
    position: relative;
    color: #000;
    background: #fff;
}

/* 二级菜单项样式 */
.product-submenu ul ul li a {
    font-weight: normal;
    padding-left: 35px;
    font-size: 13px;
    color: #666;
    padding-top: 8px;
    padding-bottom: 8px;
    transition: background-color 0.3s, color 0.3s;
}

/* 一级菜单悬浮效果 */
.product-submenu > ul > li:hover > a {
    background: #fff;
    color: #000;
}

/* 二级菜单悬浮效果 */
.product-submenu ul ul li a:hover {
    background: #fff;
    color: #000;
}

/* 菜单打开时显示导航 */
.mobile-nav.active {
    display: block;
}

/* 透明状态下的文字颜色调整 */
.header-top.transparent .contact-item {
    color: #fff;
}

.header-top.transparent .menu-toggle span {
    background: #fff;
}

/* 滚动状态下的文字颜色 */
.header-top.scrolled .contact-item {
    color: #000;
}

.header-top.scrolled .menu-toggle span {
    background: #003366;
}

/* Logo在滚动状态下的样式 */
.header-top.scrolled .logo img {
    filter: none;  /* 恢复原始颜色 */
}

/* 移动端菜单按钮样式 */
.menu-toggle {
    display: none;  /* 默认隐藏 */
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    position: relative;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    margin: 5px auto;
    transition: all 0.3s ease;
}

/* 激活状态的菜单按钮样式 */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* 移动端样式 */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;  /* 在移动端显示菜单按钮 */
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
    }

    .main-nav {
        display: none;  /* 隐藏主导航 */
    }

    /* 调整头部布局 */
    .header-inner {
        position: relative;
        justify-content: flex-start;
        padding: 10px 15px;
    }

    /* 确保 logo 在移动端正确显示 */
    .logo {
        margin-right: auto;
    }
} 