/* Banner区域 */
.banner {
    height: 100vh;
    min-height: 600px;
    position: relative;
    overflow: hidden;
}

.banner .swiper-container {
    width: 100%;
    height: 100%;
}

.banner .swiper-wrapper {
    width: 100%;
    height: 100%;
}

.banner .swiper-slide {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.banner .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 视频容器样式 */
.video-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    background: #000;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 添加遮罩层，使文字更清晰 */
.banner .swiper-slide .video-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
    pointer-events: none;
}

/* 轮播导航按钮样式 */
.banner .swiper-button-prev,
.banner .swiper-button-next {
    color: #fff;
    width: 50px;
    height: 50px;
    background: rgba(0,0,0,0.3);
    border-radius: 50%;
    transition: all 0.3s;
}

.banner .swiper-button-prev:hover,
.banner .swiper-button-next:hover {
    background: var(--primary-color);
}

.banner .swiper-button-prev:after,
.banner .swiper-button-next:after {
    font-size: 24px;
}

/* 分页器样式 */
.banner .swiper-pagination {
    bottom: 30px;
}

.banner .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: rgba(255,255,255,0.7);
    opacity: 1;
}

.banner .swiper-pagination-bullet-active {
    background: var(--primary-color);
}

.banner-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    z-index: 2;
    width: 100%;
    padding: 0 20px;
}

.banner-text h2 {
    font-size: 48px;
    margin-bottom: 20px;
}

.banner-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.btn {
    padding: 12px 30px;
    border: 2px solid #fff;
    border-radius: 4px;
    transition: all 0.3s;
}

.btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* 产品应用 */
.products {
    padding: 80px 0;
    background: #fff;
}

.product-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

.product-item {
    position: relative;
    overflow: hidden;
    background: none;
    box-shadow: none;
    transition: all 0.3s;
    border: 1px solid #eee;
    cursor: pointer;
}

.product-img {
    overflow: hidden;
    height: 300px;
    position: relative;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-item:hover .product-img img {
    transform: scale(1.1);
}

.product-item:hover .product-info {
    background: rgba(0, 102, 204, 0.8);
}

.product-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    text-align: center;
    transition: background-color 0.3s;
}

.product-info h3 {
    font-size: 20px;
    margin-bottom: 0;
    color: #fff;
    font-weight: bold;
    position: relative;
    display: inline-block;
}

.product-info h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #fff;
    transform: translateX(-50%);
    transition: width 0.3s;
}

.product-item:hover .product-info h3::after {
    width: 100%;
}

/* 导航菜单 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: #fff;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 移动端菜单按钮 */
.menu-btn {
    display: none !important;
    position: relative;
    z-index: 101;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 20px;
}

.menu-btn span {
    width: 20px;
    height: 2px;
    background: #fff;
    transition: all 0.3s ease;
}

.menu-btn.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.menu-btn.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* 导航菜单 */
.nav {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: calc(100vh - 80px);
    background: var(--primary-color);
    padding: 60px 20px;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
    z-index: 99;
    display: none;
}

.nav.active {
    transform: translateX(0);
    display: block;
}

/* 主导航列表布局 */
.nav > ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.nav-item {
    width: calc(50% - 20px);  /* 一行两个，减去间距 */
    text-align: center;
    display: flex;
    flex-direction: column;
    
    gap: 20px;
}

/* 主菜单项样式 */
.nav-item > a {
    display: inline-block;
    text-align: left;
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
}

/* 子菜单样式 */
.sub-menu {
    display: flex;
    flex-wrap: wrap;
    /* justify-content: center; */
    gap: 15px;
    width: 100%;
    margin-bottom: 20px;  /* 添加底部间距 */
}

.sub-menu li {
    list-style: none;
}

.sub-menu li a {
    display: inline-block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    padding: 8px 0;
    white-space: nowrap;
}

/* 响应式布局 */
@media screen and (max-width: 1200px) {
    .container {
        padding: 0 15px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .product-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-img {
        height: 250px;
    }
}

@media screen and (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .menu-btn {
        display: flex !important;
    }

    .header-nav {
       display: none !important;
    }
    
    .banner-text h2 {
        font-size: 32px;
    }
    
    .product-list {
        grid-template-columns: 1fr;
    }
    
    .product-img {
        height: 200px;
    }
    .banner {
        max-height: 500px;
    }
    
    /* 研发中心移动端布局 */
    .rd-center .product-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .rd-center .product-item {
        margin-bottom: 0;
    }
    
    .rd-center .product-img {
        height: 150px;
    }
    
    .rd-center .product-info h3 {
        font-size: 16px;
    }

    .rd-item:nth-child(3), .rd-item:nth-child(5), .rd-item:nth-child(7) {
        height: auto !important;
    }
}

/* 发展历程 */
.timeline {
    padding: 80px 0;
    background: url('../images/timeline-bg.png') no-repeat center/cover;
    color: #fff;
    overflow: hidden;
}

.timeline .section-title {
    color: #fff;
    margin-bottom: 80px;
}

.timeline-content {
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.timeline-items {
    position: relative;
    z-index: 2;
    display: flex;
    min-width: max-content;
    margin-bottom: 37px;
}

/* 时间点单元样式 */
.timeline-point {
    min-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    height: 500px;
}

/* 垂直连接线 */
.point-line {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-50%);
}

/* 内容区域容器 */
.timeline-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    left: calc(50% + 15px);
    /* 根据垂直线的高度定位到顶部 */
    bottom: calc(100% - 40px);
}

/* 日期 */
.point-date {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    white-space: nowrap;
    margin-bottom: 10px;
}

/* 内容文本 */
.point-content {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    text-align: left;
    width: 180px;
}

/* 随机时间线长度 */
.timeline-point:nth-child(1) .point-line { height: 450px; }
.timeline-point:nth-child(2) .point-line { height: 320px; }
.timeline-point:nth-child(3) .point-line { height: 200px; }
.timeline-point:nth-child(4) .point-line { height: 440px; }
.timeline-point:nth-child(5) .point-line { height: 250px; }
.timeline-point:nth-child(6) .point-line { height: 400px; }
.timeline-point:nth-child(7) .point-line { height: 180px; }
.timeline-point:nth-child(8) .point-line { height: 450px; }
.timeline-point:nth-child(9) .point-line { height: 300px; }
.timeline-point:nth-child(10) .point-line { height: 400px; }

/* 调整内容容器位置，跟随垂直线高度 */
.timeline-point:nth-child(1) .timeline-content-wrapper { bottom: 450px; }
.timeline-point:nth-child(2) .timeline-content-wrapper { bottom: 320px; }
.timeline-point:nth-child(3) .timeline-content-wrapper { bottom: 200px; }
.timeline-point:nth-child(4) .timeline-content-wrapper { bottom: 440px; }
.timeline-point:nth-child(5) .timeline-content-wrapper { bottom: 250px; }
.timeline-point:nth-child(6) .timeline-content-wrapper { bottom: 400px; }
.timeline-point:nth-child(7) .timeline-content-wrapper { bottom: 180px; }
.timeline-point:nth-child(8) .timeline-content-wrapper { bottom: 430px; }
.timeline-point:nth-child(9) .timeline-content-wrapper { bottom: 300px; }
.timeline-point:nth-child(10) .timeline-content-wrapper { bottom: 400px; }

/* 小圆点 */
.point-line::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    width: 8px;
    height: 8px;
    background: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    transform: translateX(-50%);
}

/* 底部时间轴 */
.timeline-line {
    position: absolute;
    bottom: 40px;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
}

/* 底部时间点 */
.time-points {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: flex-start;
}

.time-points span {
    position: relative;
    padding-top: 15px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    min-width: 200px;
    text-align: center;
    white-space: nowrap;
}

.time-points span::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
}

@media screen and (max-width: 768px) {
    .timeline-point {
        min-width: 160px;
        height: 400px;
    }
    
    /* 移动端调整垂直线高度 */
    .timeline-point:nth-child(1) .point-line { height: 360px; }
    .timeline-point:nth-child(2) .point-line { height: 320px; }
    .timeline-point:nth-child(3) .point-line { height: 380px; }
    .timeline-point:nth-child(4) .point-line { height: 340px; }
    .timeline-point:nth-child(5) .point-line { height: 370px; }
    .timeline-point:nth-child(6) .point-line { height: 330px; }
    .timeline-point:nth-child(7) .point-line { height: 350px; }
    .timeline-point:nth-child(8) .point-line { height: 310px; }
    .timeline-point:nth-child(9) .point-line { height: 340px; }
    .timeline-point:nth-child(10) .point-line { height: 360px; }
    
    .point-date {
        font-size: 16px;
        left: calc(50% + 10px);
    }
}

/* 研发中心 */
.rd-center {
    padding: 80px 0;
    background: #fff;
}

.rd-center .container {
    padding: 0;
}

/* 研发中心标题区域 */
.rd-header {
    text-align: center;
    margin-bottom: 60px;
}

.rd-header .section-title {
    margin-bottom: 20px;
    color: #333;
}

.rd-header .section-desc {
    max-width: 800px;
    margin: 0 auto;
    color: #666;
    line-height: 1.8;
}

/* 图片网格布局 */
.rd-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto auto auto;
    gap: 2px;
    /* max-width: 1400px; */
    margin: 0 auto;
    background: #f5f5f5;
    padding: 2px;
}

/* 定义每个格子的大小和位置 */
.rd-item:nth-child(1) { grid-area: 1 / 1 / 2 / 2; }
.rd-item:nth-child(2) { grid-area: 1 / 2 / 2 / 3; }
.rd-item:nth-child(3) { grid-area: 1 / 3 / 2 / 5; } /* 跨两列 */
.rd-item:nth-child(4) { grid-area: 2 / 1 / 3 / 2; } /* 一份宽度 */
.rd-item:nth-child(5) { grid-area: 2 / 2 / 3 / 4; } /* 两份宽度 */
.rd-item:nth-child(6) { grid-area: 2 / 4 / 3 / 5; } /* 一份宽度 */
.rd-item:nth-child(7) { grid-area: 3 / 1 / 4 / 3; } /* 两份宽度 */
.rd-item:nth-child(8) { grid-area: 3 / 3 / 4 / 4; } /* 一份宽度 */
.rd-item:nth-child(9) { grid-area: 3 / 4 / 4 / 5; } /* 一份宽度 */

.rd-item {
    position: relative;
    overflow: hidden;
    background: #fff;
}

/* 设置图片容器高度 */
.rd-item {
    height: 300px; /* 基础高度 */
}

/* 跨两列的项目加宽 */
.rd-item:nth-child(3),
.rd-item:nth-child(5),
.rd-item:nth-child(7) {
    height: 300px;
}

/* 第二行项目减半高度 */
.rd-item:nth-child(4),
.rd-item:nth-child(5),
.rd-item:nth-child(6) {
    height: 150px;
}

.rd-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.rd-item:hover img {
    transform: scale(1.1);
}

/* 响应式布局 */
@media screen and (max-width: 1400px) {
    .rd-grid {
        max-width: 1200px;
    }
    
    .rd-item {
        height: 250px;
    }
    
    .rd-item:nth-child(4),
    .rd-item:nth-child(5),
    .rd-item:nth-child(6) {
        height: 125px;
    }
}

@media screen and (max-width: 768px) {
    .rd-grid {
        grid-template-columns: repeat(1, 1fr);
        grid-template-rows: auto;
        gap: 1px;
    }

    .rd-item {
        height: 200px;
        grid-area: auto !important;
    }

    .rd-item:nth-child(4),
    .rd-item:nth-child(5),
    .rd-item:nth-child(6) {
        height: 200px;
    }
}

/* 荣誉资质 */
.certificates {
    padding: 80px 0;
    background: url('../images/index-rrzs-bj.png') no-repeat center/cover;
    position: relative;
}

.certificates::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.certificates .container {
    max-width: 1400px;
    position: relative;
    z-index: 1;
}

.certificates .section-title {
    margin-bottom: 40px;
}

.certificates .swiper-container {
    padding: 20px 0;
    overflow: hidden;
}

.cert-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.cert-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

.cert-img {
    position: relative;
    padding-top: 140%;
    overflow: hidden;
}

.cert-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

/* Swiper导航按钮 */
.certificates .swiper-button-prev,
.certificates .swiper-button-next {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.certificates .swiper-button-prev:hover,
.certificates .swiper-button-next:hover {
    background: var(--primary-color);
    color: #fff;
}

/* Swiper分页器 */
.certificates .swiper-pagination {
    bottom: -30px;
}

.certificates .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
}

.certificates .swiper-pagination-bullet-active {
    background: #fff;
    width: 20px;
    border-radius: 5px;
}

/* 响应式布局 */
@media screen and (max-width: 1200px) {
    .certificates .container {
        max-width: 960px;
    }
}

@media screen and (max-width: 768px) {
    .certificates {
        padding: 60px 0;
    }
    
    .cert-item {
        margin: 0 10px;
    }
    
    .cert-info {
        padding: 15px;
    }
    
    .cert-info h3 {
        font-size: 16px;
    }
    
    .cert-info p {
        font-size: 13px;
    }
    
    .certificates .swiper-button-prev,
    .certificates .swiper-button-next {
        display: none;
    }
}

/* 合作伙伴 */
.partners {
    padding: 80px 0;
}

.partner-circle {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 50px 0;
}

.center-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--primary-color);
}

.partner-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.partner-item {
    width: 120px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: grayscale(1);
    transition: all 0.3s;
}

.partner-item:hover {
    filter: grayscale(0);
}

.partner-item img {
    max-width: 100%;
    max-height: 100%;
}

/* 响应式调整 */
@media screen and (max-width: 768px) {
    .timeline-content {
        padding: 20px 10px;
    }
    
    .point-date {
        font-size: 16px;
        top: 15px;
        padding: 3px 10px;
    }
    
    .point-content {
        font-size: 13px;
        max-width: 140px;
    }
    
    .timeline-point {
        padding: 0 20px;
        padding-top: 50px;
        margin-top: 30px;
        min-width: 160px;
    }
    
    .time-points span {
        min-width: 160px;
        font-size: 11px;
    }
}

.section-title {
    font-size: 32px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 40px;
}

/* 添加副标题样式 */
.section-desc {
    text-align: center;
    color: #666;
    max-width: 800px;
    margin: -20px auto 40px;
    line-height: 1.8;
}

@media screen and (max-width: 768px) {
    .section-title {
        font-size: 28px;
    }
    
    .section-desc {
        font-size: 13px;
        margin: -15px auto 30px;
        padding: 0 15px;
    }
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #0052a3;
    transform: translateY(-3px);
}

.back-to-top svg {
    color: #fff;
    stroke-width: 2px;  /* 加粗线条 */
}

@media screen and (max-width: 768px) {
    .back-to-top {
        right: 15px;
        bottom: 15px;
        width: 30px;
        height: 30px;
    }
}

/* 证书全屏查看 */
.cert-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.cert-viewer.active {
    display: flex;
}

.cert-viewer img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
}

.cert-viewer .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.cert-viewer .close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.cert-viewer .close-btn::before,
.cert-viewer .close-btn::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: #fff;
}

.cert-viewer .close-btn::before {
    transform: rotate(45deg);
}

.cert-viewer .close-btn::after {
    transform: rotate(-45deg);
}

/* 添加证书点击样式 */
.cert-item {
    cursor: pointer;
}



/* 响应式调整 */
@media screen and (max-width: 576px) {
    .nav-item {
        width: 100%;  /* 每行1个 */
    }
    
    .nav {
        padding: 40px 20px;
    }
    
    .nav > ul {
        gap: 30px;
    }
}

/* 确保logo在导航之上 */
.logo {
    position: relative;
    z-index: 101;
}

/* 移动端样式 */
@media screen and (max-width: 768px) {
    .sub-menu {
        display: flex;  /* 确保在移动端也是显示状态 */
        width: 100%;
    }
    .timeline-point:nth-child(1) .timeline-content-wrapper {
         bottom: 325px;
    }
    .timeline-point:nth-child(3) .timeline-content-wrapper {
         bottom: 300px;
    }
    .timeline-point:nth-child(4) .timeline-content-wrapper {
         bottom: 313px;
    }
    .timeline-point:nth-child(6) .timeline-content-wrapper {
         bottom: 290px;
    }
    .timeline-point:nth-child(8) .timeline-content-wrapper {
         bottom: 300px;
    }
} 