/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft YaHei", "微软雅黑", sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}
svg {
    fill: currentColor;
}
/* 容器 */
.container {
    max-width: 90vw;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部导航 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* 滚动后的头部导航样式 */
.header.scrolled {
    background: rgba(255, 255, 255, 1);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 80vw;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: opacity 0.3s ease;
    height: 4.8vw;
    overflow: hidden;
}

.logo:hover {
    opacity: 0.8;
}

.logo-img {
    width: 5vw;
    height: 5vw;
    object-fit: contain;
    object-position: center;
    display: block;
    transition: all 0.3s ease;
    background: transparent;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2vw;
    font-family: 宋体;
    position: relative;
}

/* 动态下划线指示器 */
.nav-menu::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: var(--indicator-width, 0);
    height: 0.2vw;
    background: #ffffff;
    transform: translateX(var(--indicator-left, 0));
    transition: transform 0.3s cubic-bezier(0.25, 0.1, 0.25, 1),
                width 0.3s cubic-bezier(0.25, 0.1, 0.25, 1),
                background 0.3s ease;
    z-index: 1;
    will-change: transform, width;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.header.scrolled .nav-menu::after {
    background: #2d1c0f;
}

.nav-link {
    text-decoration: none;
    color: #ffffff;
    font-size: 1.25vw;
    font-weight: bold;
    transition: color 0.3s ease;
    position: relative;
}

.header.scrolled .nav-link {
    color: #5e4028;
}

.nav-link:hover {
    color: #2d1c0f;
}

/* 默认状态下的 active（顶部时，保持白色） */
.nav-link.active {
    color: #ffffff;
}

.nav-link.active:hover {
    color: #2d1c0f;
}

.header.scrolled .nav-link:hover {
    color: #2d1c0f;
}

/* 滚动后的 active */
.header.scrolled .nav-link.active {
    color: #2d1c0f;
}

.header.scrolled .nav-link.active:hover {
    color: #2d1c0f;
}

/* 移除每个链接的 ::after，改用统一的指示器 */
.nav-link.active::after {
    display: none;
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: #28170a;
}

/* 移动端菜单切换按钮 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #ffffff;
    transition: color 0.3s ease;
}

.header.scrolled .menu-toggle {
    color: #3d2817;
}

/* 首页板块 */
#home {
    min-height: 115vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background-image: url('../images/home-bg.jpg');
    background-size: cover;
    background-position: center -36vh;
    background-repeat: no-repeat;
    background-attachment: scroll;
    color: #fff;
    text-align: center;
    padding-top: 25vh;
    position: relative;
}

/* #home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(2, 7, 17, 0.4);
    z-index: 1;
} */

#home .hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 4vw;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 3vw;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease 0.2s both;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    opacity: 0.95;
}

.btn {
    display: inline-block;
    padding: 1.5vw 5vw;
    font-size: 1.5vw;
    background: #304fdf;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    animation: fadeInUp 1s ease 0.4s both;
    font-weight: bold;
}

.btn:hover {
    background: #1a4c81;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(48, 79, 223, 0.3);
}

.btn-primary {
    background: #304fdf;
}

/* 通用板块样式 */
section {
    padding: 0;
    margin-bottom: 5vh;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    color: #020711;
    font-weight: 600;
}

.section-subtitle {
    text-align: center;
    color: #a6a6a6;
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

/* 关于我们板块 */
#about {
    background: #ffffff;
}

/* 联系我们板块 */
#contact {
    background: #f5f5f5;
}

.contact-header {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 4rem;
}

.contact-title-group {
    text-align: right;
}

.contact-title-en {
    font-size: 2.5vw;
    font-weight: 600;
    color: #304fdf;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.contact-title-cn {
    font-size: 2vw;
    font-weight: 500;
    color: #020711;
    margin: 0;
    line-height: 1.2;
}

.contact-content {
    display: flex;
    justify-content: center;
    align-items: start;
}

.contact-info-grid {
    display: flex;
    align-items: stretch;
    gap: 2rem;
    width: 100%;
    flex-direction: row;
}

.contact-info-item {
    border: 2px solid #e4e4e4;
    border-radius: 10px;
    padding: 2rem 1.5rem;
    background: #ffffff;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    cursor: pointer;
}

.contact-info-item:hover {
    border-color: #6f360d;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(48, 79, 223, 0.2);
    color:#6f360d;
}

.contact-info-icon {
    width: 7vw;
    height:7vw;
    margin-bottom: 1vw;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-info-icon .bi {
    font-size: 4vw;
    line-height: 1;
    color: inherit;
}

.contact-info-title {
    font-size: 1.2vw;
    font-weight: 600;
    margin: 0 0 1vh 0;
}

.contact-info-item:hover .contact-info-content {
    color: #6f360d;
}

.contact-info-content {
    font-size: 1vw;
    line-height: 1.8;
    color: #666;
    margin: 0;
    word-break: break-word;
    flex: 1;
}

.about-header {
    display: flex;
    justify-content: flex-end;
}

.about-title-group {
    text-align: right;
}

.about-title-en {
    font-size: 2.5vw;
    font-weight: 600;
    color: #304fdf;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.about-title-cn {
    font-size: 2vw;
    font-weight: 500;
    color: #020711;
    margin: 0;
    line-height: 1.2;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-image img {
    width: 100%;
    max-width: 30vw;
    height: auto;
    object-fit: contain;
}

.about-text {
    font-size: 1.5vw;
    line-height: 2;
    color: #020711;
}

.about-text p {
    margin: 0;
    text-align: justify;
}

/* 服务项目板块 */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
}

.service-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.service-item h3 {
    padding: 1rem;
    margin: 0;
    color: #020711;
}

.service-item p {
    padding: 0 1rem 1.5rem;
    color: #666;
    line-height: 1.8;
}

/* 产品展示板块 */
#products {
    background: #ffffff;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.product-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    text-align: center;
}

.product-item:hover {
    transform: translateY(-5px);
}

.product-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-item h3 {
    padding: 1rem;
    margin: 0;
    color: #020711;
}

.product-item p {
    padding: 0 1rem;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.8;
}

.product-price {
    padding: 1rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: #304fdf;
}

/* 新闻动态板块 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.news-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.news-item:hover {
    transform: translateY(-5px);
}

.news-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-content {
    padding: 1.5rem;
}

.news-content h3 {
    margin-bottom: 0.5rem;
    color: #020711;
}

.news-date {
    display: block;
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.news-content p {
    color: #666;
    line-height: 1.8;
}

/* 联系我们板块 */
#contact {
    background: #ffffff;
}


.contact-info {
    font-size: 1.1rem;
    line-height: 2;
}

.contact-info p {
    margin-bottom: 1rem;
}

.contact-map img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* 页脚 */
.footer {
    background-image: url(../images/bg-footer.jpg);
    background-size: 100% 100%;
    background-position: center top;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    padding: 5vw 0 1vw;
    width: 100vw;
    height: 16vw;
    text-align: center;
    color: #ffffff;
    font-size: 1vw;
}


.footer p {
    color: #ffffff;
    margin: 1vw 0;
    line-height: 1.5;
}

.footer a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 0.5rem;
    transition: opacity 0.3s ease;
}

.footer a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.footer .beian-link {
    color: #ffffff;
}

.footer .beian-link:hover {
    opacity: 0.8;
}

/* 动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content{
        padding: 0;
    }
    .logo{
        height: 4rem;
    }

    .logo-img{
        width: 5rem;
        height: 5rem;
    }
    .menu-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 4rem;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 2rem;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        padding: 1rem 0;
        border-bottom: 1px solid #e4e4e4;
        color: #3d2817;
        font-size: 1.5rem;
    }
    
    .nav-menu .nav-link:hover,
    .nav-menu .nav-link.active {
        color: #321c0a;
    }
    
    #home {        
        background-attachment: scroll;
        min-height: 30rem;
        background-position: center -8rem;
        padding-top: 5rem;
        background-size: cover;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1.2rem;
    }
    
    .about-header {
        justify-content: center;
        margin-bottom: 2rem;
    }
    
    .about-title-group {
        text-align: center;
    }
    
    .about-title-en {
        font-size: 2rem;
    }
    
    .about-title-cn {
        font-size: 1.5rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-image {
        order: 2;
    }

    .about-image img{
        max-width: 15rem;
    }
    
    .about-text {
        order: 1;
        font-size: 1.5rem;
    }
    
    .contact-header {
        justify-content: center;
        margin-bottom: 2rem;
    }
    
    .contact-title-group {
        text-align: center;
    }
    
    .contact-title-en {
        font-size: 2rem;
    }
    
    .contact-title-cn {
        font-size: 1.5rem;
    }
    
    .contact-info-grid {
        flex-wrap: wrap;
    }
    
    .contact-info-item {
        flex: 1 1 calc(50% - 1rem);
        min-width: 0;
    }
    .contact-info-icon{
        width: 7rem;
        height: 7rem;
    }

    .contact-info-icon .bi{
        font-size: 4rem;
    }

    .contact-info-title{
        font-size: 1.2rem;
    }

    .contact-info-content{
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .services-grid,
    .products-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }
    .footer{
        font-size: 0.75rem;
        width: 100%;
        height: 9rem;
        padding: 5rem 0 3rem;
        line-height: 1;
    }
    .footer p{
        line-height: 1;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .btn {
        padding: 10px 24px;
        font-size: 0.9rem;
    }
    
    section {
        padding: 0;
        margin-bottom: 2rem;
    }
    
    .contact-info-item {
        flex: 1 1 100%;
    }
}

