/* ======================================
   全局样式重置
====================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ======================================
   导航栏 header
====================================== */
header {
    height: 120px;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-around;
    position: relative;
    z-index: 100;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* 汉堡菜单按钮 */
.mobile-menu-button {
    display: none !important;
    cursor: pointer;
    padding: 10px;
    z-index: 1000;
}

.menu-icon {
    width: 24px;
    height: 20px;
    position: relative;
    display: block;
    cursor: pointer;
}

.menu-icon span {
    display: block;
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #BE0110;
    transition: all 0.3s ease;
}

.menu-icon span:nth-child(1) {
    top: 0;
}

.menu-icon span:nth-child(2) {
    top: 9px;
}

.menu-icon span:nth-child(3) {
    bottom: 0;
}

/* 移动端菜单遮罩层 */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

/* 移动端菜单内容 */
.mobile-menu-content {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 80%;
    max-width: 300px;
    z-index: 50;
    background-color: #fff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    overflow-y: auto;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.mobile-menu-header h2 {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    padding: 0;
    line-height: 1;
}

.mobile-menu-nav {
    margin-top: 20px;
}

.mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-item {
    margin-bottom: 10px;
}

.mobile-menu-link {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: #333;
    font-size: 16px;
    font-weight: 500;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.mobile-menu-link:hover {
    background-color: #f5f5f5;
}

.mobile-submenu {
    list-style: none;
    padding: 0;
    margin: 5px 0 10px 20px;
}

.mobile-submenu-item {
    margin-bottom: 5px;
}

.mobile-submenu-link {
    display: block;
    padding: 8px 10px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.mobile-submenu-link:hover {
    background-color: #f5f5f5;
}

/* x-cloak 样式 */
[x-cloak] {
    display: none !important;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 60px;
    margin-right: 10px;
}

.search-box {
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 8px 12px;
    border: 2px solid #E10015;
    border-radius: 4px 0 0 4px;
    outline: none;
}

.search-box button {
    padding: 8px 16px;
    background-color: #E10015;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

/* ======================================
   主菜单 menu（支持二级下拉）
====================================== */
.container {
    max-width: 1920px;
    margin: 0 auto;
}

.menu {
    display: flex;
    list-style: none;
    background-color: #BE0110;
    height: 56px;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 99;
}

.menu li {
    width: 9vw;
    text-align: center;
    position: relative;
}

.menu-item {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s ease;
}

.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 菜单选中高亮 */
.menu-item.active {
    background-color: #A40201;
    font-weight: bold;
}

/* ------------------------------
   二级下拉菜单（新增，不影响原有布局）
------------------------------ */
.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #BE0110;
    list-style: none;
    padding: 0;
    margin: 0;
    display: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.submenu li {
    width: 100%;
    padding: 0;
}

.submenu a {
    display: block;
    padding: 12px 10px;
    color: #fff;
    text-decoration: none;
    transition: background 0.3s;
}

.submenu a:hover {
    background-color: #A40201;
}

.menu li:hover .submenu {
    display: block;
}

/* ======================================
   页脚 footer
====================================== */
footer {
    background-color: #EFEFEF;
}

/* 服务板块 */
.footer-services {
    padding: 40px 0;
    position: relative;
}

.footer-services::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1530px;
    height: 2px;
    background-color: #ccc;
}

.footer-services .container {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    flex-wrap: wrap;
}

.service-item {
    display: flex;
    align-items: center;
    margin: 20px;
}

.service-icon {
    margin-right: 15px;
}

.service-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.service-text h4 {
    margin-bottom: 5px;
    font-size: 16px;
    color: #333;
}

.service-text p {
    font-size: 14px;
    color: #666;
}

/* 手机端适配 */
@media only screen and (max-width: 768px) {
    .footer-services .container {
        flex-direction: row;
        justify-content: space-between;
        padding: 0 10px;
    }
    
    .service-item {
        flex: 0 0 calc(50% - 20px);
        margin: 10px;
        min-width: auto;
        flex-direction: column;
        text-align: center;
    }
    
    .service-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .service-icon img {
        width: 30px;
        height: 30px;
    }
    
    .service-text h4 {
        font-size: 14px;
    }
    
    .service-text p {
        font-size: 12px;
    }
}

/* 主要内容区 */
.footer-main {
    padding: 86px 0;
    position: relative;
}

.footer-main::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1530px;
    height: 2px;
    background-color: #ccc;
}

.footer-main .container {
    display: flex;
    justify-content: space-evenly;
}

.footer-logo {
    display: flex;
    margin-top: 20px;
}

.footer-logo img {
    width: 60px;
    height: 60px;
    margin-right: 15px;
}

.footer-logo span {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.footer-nav {
    display: flex;
    justify-content: space-around;
}

.nav-column {
    margin: 20px;
}

.nav-column h4 {
    margin-bottom: 15px;
    font-size: 14px;
    color: #222;
}

.nav-column ul {
    list-style: none;
}

.nav-column li {
    margin-bottom: 10px;
}

.nav-column a {
    text-decoration: none;
    color: #666;
    font-size: 14px;
    transition: color 0.3s;
}

.nav-column a:hover {
    color: #BE0110;
}

/* 联系我们 */
.nav-column.contact {
    text-align: left;
}

.nav-column.contact p {
    margin: 10px 0;
    font-size: 14px;
    color: #666;
}

.qrcode {
    margin-top: 20px;
    text-align: center;
}

.qrcode img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 10px;
}

.qrcode p {
    font-size: 14px;
    color: #666;
}

/* 底部版权 */
.footer-bottom {
    background-color: #f0f0f0;
    padding: 20px 0;
    text-align: center;
}

.footer-links-bottom {
    margin-bottom: 15px;
}

.footer-links-bottom a {
    text-decoration: none;
    color: #666;
    font-size: 14px;
    margin: 0 15px;
    transition: color 0.3s;
}

.footer-links-bottom a:hover {
    color: #BE0110;
}

.footer-bottom p {
    font-size: 14px;
    color: #666;
}

/* ======================================
   滚动条美化
====================================== */
/* Chrome / Safari */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbcbcb;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b8b8b8;
}

::-webkit-scrollbar-button,
::-webkit-scrollbar-corner {
    display: none;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #cbcbcb transparent;
}

/* ======================================
   响应式适配
====================================== */
@media (max-width: 1024px) {
    header {
        height: auto;
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
    }

    .logo img {
        height: 45px;
    }

    .menu {
        height: auto;
        flex-wrap: wrap;
        padding: 10px 0;
    }

    .menu li {
        width: auto;
        padding: 0 10px;
    }

    .menu-item {
        padding: 10px 15px;
        font-size: 14px;
    }

    .footer-services .container {
        gap: 20px;
    }

    .service-item {
        margin: 10px 0;
    }

    .footer-main .container {
        flex-direction: column;
        padding: 0 20px;
    }

    .footer-nav {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .nav-column {
        flex: 0 0 calc(33.333% - 40px);
        margin: 10px 20px;
    }

    .footer-services::after,
    .footer-main::after {
        width: 90%;
    }
}

@media only screen and (max-width: 768px) {
    header {
        height: auto;
        padding: 20px 15px;
        gap: 15px;
        display: flex;
    }

    .header-right {
        width: 100%;
        justify-content: center;
        align-items: center;
        display: flex;
        position: relative;
    }

    .logo img {
        height: 40px;
    }

    .search-box {
        flex: 1;
        max-width: 300px;
    }

    .search-box input {
        flex: 1;
    }

    /* 显示汉堡菜单按钮 */
    .mobile-menu-button {
        display: block !important;
        position: relative;
        z-index: 1000;
    }

    /* 隐藏桌面端菜单 */
    .container.menu-container {
        display: none !important;
    }

    /* 隐藏原始菜单 */
    .menu {
        display: none !important;
    }

    /* 确保移动端菜单样式 */
    .mobile-menu-content {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 80%;
        max-width: 300px;
        z-index: 999;
        background-color: #fff;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        padding: 20px;
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
    }

    .mobile-menu-content.show {
        transform: translateX(0);
    }

    .mobile-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        padding-bottom: 15px;
        border-bottom: 1px solid #eee;
    }

    .mobile-menu-header h2 {
        font-size: 18px;
        font-weight: bold;
        color: #333;
        margin: 0;
    }

    .mobile-menu-close {
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        color: #333;
        padding: 0;
        line-height: 1;
    }

    .mobile-menu-nav {
        margin-top: 20px;
    }

    .mobile-menu-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .mobile-menu-item {
        margin-bottom: 10px;
    }

    .mobile-menu-link {
        display: block;
        padding: 12px 15px;
        text-decoration: none;
        color: #333;
        font-size: 16px;
        font-weight: 500;
        border-radius: 4px;
        transition: background-color 0.3s ease;
    }

    .mobile-menu-link:hover {
        background-color: #f5f5f5;
    }

    .mobile-submenu {
        list-style: none;
        padding: 0;
        margin: 5px 0 10px 20px;
    }

    .mobile-submenu-item {
        margin-bottom: 5px;
    }

    .mobile-submenu-link {
        display: block;
        padding: 8px 10px;
        text-decoration: none;
        color: #666;
        font-size: 14px;
        border-radius: 4px;
        transition: background-color 0.3s ease;
    }

    .mobile-submenu-link:hover {
        background-color: #f5f5f5;
    }

    .mobile-menu-overlay {
        position: fixed;
        inset: 0;
        z-index: 998;
        background-color: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        opacity: 0;
        transition: opacity 0.3s ease-in-out;
        pointer-events: none;
    }

    .mobile-menu-overlay.show {
        opacity: 1;
        pointer-events: auto;
    }

    .footer-services {
        padding: 30px 0;
    }

    .service-item {
        flex-direction: column;
        text-align: center;
        margin: 15px 0;
    }

    .service-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .footer-main {
        padding: 40px 0;
    }

    .footer-logo {
        justify-content: center;
        margin-bottom: 30px;
    }

    .footer-nav {
        flex-direction: column;
        align-items: center;
    }

    .nav-column {
        width: 100%;
        margin: 15px 0;
    }

    .qrcode {
        align-items: center;
    }

    .footer-links-bottom {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .logo img {
        height: 35px;
    }

    .service-text h4 {
        font-size: 14px;
    }

    .service-text p,
    .nav-column a,
    .nav-column.contact p {
        font-size: 12px;
        display: block;
        width: 100%;
    }

    .footer-bottom p {
        font-size: 11px;
    }
}