/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", Arial, sans-serif;
}
body {
    color: #333;
    line-height: 1.6;
    font-size: 16px;
}
a {
    text-decoration: none;
    color: #333;
}
ul {
    list-style: none;
}
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* 头部样式 */
header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 999;
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    position: relative;
}
.logo a {
    display: block;
}
.logo img {
    height: 50px;
    width: auto;
}

/* 汉堡按钮样式 - 仅中小屏显示 */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    cursor: pointer;
    z-index: 1000;
}
.hamburger .bar {
    width: 100%;
    height: 3px;
    background: #333;
    border-radius: 3px;
    transition: all 0.1s ease;
}
.hamburger.active .bar:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}
.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}
.hamburger.active .bar:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

.nav-main {
    display: flex;
}
.nav-main > li {
    position: relative;
    margin: 0 20px;
}

/* 一级导航头部容器*/
.nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 52px;
    padding: 14px 0;
    position: relative;
}
.nav-header > a {
    font-size: 16px;
    font-weight: 400;
    display: block;
    line-height: 24px;
}

.arrow-icon {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    border: solid #666;
    border-width: 0 2px 2px 0;
    transition: transform 0.1s ease;
    flex-shrink: 0;
    display: none;
    user-select: none;
    pointer-events: auto;
    cursor: pointer;
    z-index: 10;
}
.arrow-icon.up {
    transform: translateY(-50%) rotate(-135deg);
}


.nav-main > li > a {
    font-size: 16px;
    font-weight: 400;
    padding: 14px 0;
    min-height: 52px;
    display: block;
    line-height: 24px;
}

/* 二级导航基础样式 */
.nav-sub {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 10px 0;
    min-width: 160px;
    display: none;
    border-radius: 4px;
    z-index: 999;
}
.nav-sub li {
    padding: 0 20px;
}
.nav-sub li a {
    padding: 8px 0;
    display: block;
    font-size: 16px;
    line-height: 1.5;
}

@media (hover: hover) and (pointer: fine) and (min-width: 769px) {
    .nav-header {
        min-height: 44px;
        padding: 10px 0;
    }
    .nav-header > a {
        font-size: 18px;
        font-weight: 500;
        line-height: 24px;
    }
    .nav-main > li > a {
        font-size: 18px;
        font-weight: 500;
        min-height: 44px;
        padding: 10px 0;
        line-height: 24px;
    }

    .nav-header > a:hover,
    .nav-main > li > a:hover {
        color: #0066cc;
        transition: color 0.3s ease;
    }
    .nav-sub li a:hover {
        color: #0066cc;
        background: #f5f8fa;
        transition: all 0.3s ease;
    }
    /* 大屏悬停展开二级菜单 */
    .nav-main > li:hover .nav-sub {
        display: block;
    }
    .hero-btn:hover {
        background: #0052a3;
        transition: background 0.3s ease;
    }
    .back-to-top:hover {
        background: #0052a3;
    }
    .footer-col ul li a:hover {
        color: #0066cc;
        transition: color 0.3s ease;
    }
    .patent-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
}

.hero {
    height: 500px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    position: relative;
}
.hero::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}
.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 20px;
}
.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
}
.hero p {
    font-size: 20px;
    margin-bottom: 30px;
}
.hero-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #0066cc;
    color: #fff;
    border-radius: 5px;
    font-size: 18px;
    font-weight: 500;
}

/* 页面内容区域 */
.page-content {
    padding: 80px 0;
}
.page-title {
    font-size: 36px;
    text-align: center;
    margin-bottom: 50px;
    color: #333;
}
.content-box {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    line-height: 1.8;
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 10px;
}
.content-box h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #0066cc;
}
.content-box h3 {
    font-size: 20px;
    margin: 15px 0;
    color: #0052a3;
}

/* 图文行容器 */
.content-row {
    display: flex;
    align-items: center;
    gap: 30px;
    width: 100%;
    flex-wrap: wrap;
}
.content-text {
    flex: 1;
    min-width: 300px;
    font-size: 16px;
}
.content-img {
    width: 280px;
    height: 190px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}
.content-box.reverse .content-row {
    flex-direction: row-reverse;
}

/* 首页联系方式 */
.contact-section {
    padding: 80px 0;
    background: #f5f8fa;
}
.contact-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
}
.contact-item {
    flex: 1;
    min-width: 300px;
    text-align: center;
    padding: 20px;
}
.contact-item h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #0066cc;
}
.contact-item p {
    font-size: 16px;
    margin-bottom: 10px;
}

/* 专利图片展示区 */
.patent-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.patent-item {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}
.patent-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.patent-item p {
    padding: 15px;
    text-align: center;
}

/* 页脚样式 */
footer {
    background: #333;
    color: #fff;
    padding: 20px 0 15px;
}
.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 15px;
}
.footer-col {
    flex: 1;
    min-width: 250px;
}
.footer-col h3 {
    font-size: 18px;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #0066cc;
}
.footer-col ul li {
    margin-bottom: 6px;
}
.footer-col ul li a {
    color: #ccc;
}
.copyright {
    text-align: center;
    padding-top: 12px;
    border-top: 1px solid #444;
    color: #999;
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #0066cc;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}
.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    /* 头部适配 */
    .header-inner {
        flex-direction: row;
        padding: 10px 20px;
        justify-content: space-between;
        align-items: center;
    }
    
    .hamburger {
        display: flex;
    }
    nav {
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: #fff;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
        z-index: 999;
        height: 0;
        overflow: hidden;
        transition: height 0.1s ease;
    }
    nav.active {
        height: auto;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    /* 中小屏导航垂直布局 */
    .nav-main {
        flex-direction: column;
        width: 100%;
        padding: 0;
    }

    .nav-main > li {
        margin: 0;
        border-bottom: 1px solid #f5f5f5;
        padding: 0 20px;
        width: 100%;
        min-height: 52px;
    }
    .nav-main > li:last-child {
        border-bottom: none;
    }

    .nav-header > a:hover,
    .nav-main > li > a:hover {
        color: #333 !important;
        background: none !important;
    }
    .nav-sub li a:hover {
        color: #666 !important;
        background: none !important;
    }
    .arrow-icon:hover {
        border-color: #666 !important;
        transform: translateY(-50%) rotate(45deg) !important;
    }
    .arrow-icon.up:hover {
        transform: translateY(-50%) rotate(-135deg) !important;
    }
    
    /* 显示箭头 */
    .arrow-icon {
        display: block;
    }
    
    /* 中小屏二级导航样式*/
    .nav-sub {
        position: static;
        box-shadow: none;
        padding: 0 0 14px 16px;
        min-width: auto;
        display: none;
        border-radius: 0;
    }
    .nav-sub.active {
        display: block !important;
    }
    .nav-sub li {
        padding: 0;
        margin: 8px 0;
        border-bottom: none;
        min-height: auto;
    }
    .nav-sub li a {
        padding: 6px 0;
        font-size: 14px;
        color: #666;
        line-height: 1.5;
        min-height: auto;
    }
    
    /* 英雄区适配 */
    .hero {
        height: 400px;
    }
    .hero h1 {
        font-size: 36px;
    }
    .hero p {
        font-size: 18px;
    }
    
    /* 页面标题适配 */
    .page-title {
        font-size: 28px;
    }
    
    /* 页脚适配 */
    .footer-inner {
        display: none !important;
        margin-bottom: 0;
    }
    .copyright {
        border-top: none;
        padding: 20px 0;
        font-size: 14px;
    }
    footer {
        padding: 0;
    }
}