/* 
 * XINLI METAL PRODUCTS 首页样式文件
 * 更新日期：2025-08-14
 * 描述：首页主要内容样式，已移除顶部和底部导航样式
 */

/* 基础样式 */
.container { max-width: 1600px; margin: 0 auto; padding: 0 20px; }



/* Hero Section - 全屏轮播图设计 */
.hero { 
    height: 80vh; 
    /*width: 100vw;*/
    position: relative;
    overflow: hidden;
    margin-top: 0;
    margin-left: calc(-50vw + 50%);
}
.hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
}
.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}
.hero-slide.active {
    opacity: 1;
}
.hero-slide:nth-child(1) {

    background-size: cover;
    background-position: center;
}
.hero-slide:nth-child(2) {

    background-size: cover;
    background-position: center;
}
.hero-slide:nth-child(3) {

    background-size: cover;
    background-position: center;
}
.hero-slide img{
    width: 100%;
}

/* 轮播指示器 */
.hero-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 1000;
}

.hero-indicators-txt {
    position: absolute;
    top: 35%;
    /*left: 9.5%;*/
    transform: translateX(15%);
    display: flex;
    gap: 15px;
    z-index: 1000;
    width: 100%;
    display: flex;
    text-align: left;
    /*max-width: 1600px;*/
}


.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s;
}
.indicator.active {
    background: #FFD700;
    transform: scale(1.2);
}

.indicators-txt {
    width: 50%;
    font-weight: bold;
    font-size: 58px;
    color: #ffffff;
    line-height: 58px;
    display: none;
}
.indicators-txt.active {
    display: block;
    /*background: #FFD700;*/
    /*transform: scale(1.2);*/
}

/* 轮播箭头 */
.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s;
    z-index: 1000;
}
.hero-nav:hover {
    background: rgba(0,0,0,0.8);
    transform: translateY(-50%) scale(1.1);
}
.hero-prev {
    left: 30px;
}
.hero-next {
    right: 30px;
}
.hero-content h1 { 
    font-size: 3.5rem; font-weight: 300; letter-spacing: 2px; 
    margin-bottom: 10px; text-transform: uppercase;
}
.hero-content h2 { 
    font-size: 4rem; font-weight: bold; color: #007bff; 
    margin-bottom: 30px; text-transform: uppercase;
}
.hero-content p { font-size: 1.2rem; margin-bottom: 40px; }
.cta-button { 
    background: #007bff; color: white; padding: 15px 40px; 
    border: none; border-radius: 5px; font-size: 1.1rem; 
    cursor: pointer; transition: all 0.3s;
}
.cta-button:hover { background: #0056b3; transform: translateY(-2px); }

/* Products Section - 左侧产品+右侧分类菜单 */
.products { padding: 80px 0; background: #ffffff; }
.section-title { 
    text-align: left; font-size: 2.5rem; margin-bottom: 50px; 
    color: #333; font-weight: bold;
}
.section-subtitle {
    text-align: left; color: #666; margin-bottom: 60px;
    font-size: 1.1rem;
}
.products-layout {
    display: grid; grid-template-columns: 2fr 0.5fr; gap: 60px;
    max-width: 1600px; margin: 0 auto;
}
.products-grid { 
    display: grid; grid-template-columns: repeat(3, 1fr); 
    gap: 30px;
}
.product-card { 
    
    background: white; border-radius: 8px; overflow: hidden; 
    transition: all 0.3s;
    text-align: center; 
    /*padding: 20px;*/
}
/*.product-card:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.15); }*/
.product-image { 
    width: 100%; 
    border: 1px solid #eeeeee;
    /*height: 200px; background: #e9ecef; */
    border-radius: 5px; margin-bottom: 15px; 
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; color: #666;
    overflow: hidden;
}
.product-image img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.3s ease;
}
.product-card:hover .product-image img {
    transform: scale(1.05);
}


.product-card h3 { font-size: 1.1rem;  color: #333; }
.product-card p { color: #666; font-size: 0.9rem; }

/* 产品分类菜单 */
.product-categories {
    border-radius: 8px;
    height: fit-content;
}
.categories-title {
    font-size: 1.3rem; margin-bottom: 25px; color: #333;
    font-weight: 600;
}
.category-list {
    list-style: none;
}
.category-item {
    padding: 12px 15px; margin-bottom: 8px;
    background: #f8f9fa; border-radius: 5px;
    cursor: pointer; transition: all 0.3s;
    font-size: 0.95rem; color: #555;
}

.category-item a{
    color: #666;
}
.category-item:hover {
    background: #0a4bbb; color: white;
}
.category-item a:hover {
    color: #ffffff;
}
.category-item.active {
    background: #0a4bbb; color: white;
}
.category-item.active a{
    color: white;
}
/* Company Honors - 金属背景，左侧文字+右侧证书 */
.honors { 
    /*padding: 40px 0; */
    background: #ffffff;
    /*height: 400px;*/
                /*url('https://images.unsplash.com/photo-1586864387967-d02ef85d93e8?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80');*/
    /*background-size: cover; background-position: center;*/
    /*position: relative;*/
}
.honors-content {
    display: grid;
    margin: 0 auto;
    align-items: center;
}
.honors-text {
    color: white;
}
.honors-title { 
    font-size: 2.5rem; margin-bottom: 20px; 
    color: #333333; font-weight: bold; text-transform: uppercase;
    letter-spacing: 1px;
}
.honors-subtitle {
    color: #333333; margin-bottom: 0; font-size: 1rem;
    line-height: 1.6;
}
.certificates-container{
    width: 100%;
    z-index: 999;
}
.certificates-container img{
    width: 100%;
}
.honors-top{
    width: 100%;
    max-width: 1600px; margin: 0 auto; padding: 0 40px;
    display: grid; grid-template-columns: 3fr 1.6fr; gap: 100px;
}
.honors-bottom{
    width: 100%;
    height: 200px;
    margin-top: -9%;
    
}
.honors-bottom img{
    width: 100%;
    height: 100%;
}
/* Why Choose Us */
.features { 
    padding: 80px 0 100px 0;
    background:url('https://enjdxl.long-wen.cn/static/images/xinli/z5.png');
    background-size: cover; background-position: center;
}
.features-title { 
    text-align: center; font-size: 2.5rem; margin-bottom: 15px; 
    color: #333; font-weight: bold;
}
.features-subtitle {
    text-align: center; color: #666; margin-bottom: 60px;
    font-size: 1rem; margin-left: auto; margin-right: auto;
}
.features-grid { 
    display: grid; grid-template-columns: repeat(4, 1fr); 
    gap: 200px; margin: 0 auto;
}
.feature-card { 
    text-align: center; 
    padding: 40px 20px;
    border-radius: 10px; 
    transition: all 0.3s;
}
.feature-card:hover { transform: translateY(-5px); }
.feature-icon { 
    width: 60px; height: 60px; margin: 0 auto 20px;
    background: #f8f9fa; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: #007bff;
}
.feature-card h3 { 
    font-size: 1.2rem; margin-bottom: 15px; color: #333; 
    font-weight: 600;
}
.feature-card p { 
    color: #666; font-size: 0.9rem; line-height: 1.5;
}
.learn-more-btn {
    /*display: block;  padding: 16px 34px;*/
    /*background: #d11b17; color: #333; border: none; border-radius: 25px;*/
    /*cursor: pointer; transition: all 0.3s;*/
    background: #d11b17; /* 金色按钮 */
    display: block;
    color: #ffffff;
    padding: 17px 38px;
    border: none;
    border-radius: 25px;
    font-size: 0.9rem;
    margin: 50px auto 0;
    /*font-weight: 600;*/
    cursor: pointer;
    transition: all 0.3s;
    width: 180px;
    /*display: inline-block;*/
    /*text-decoration: none;*/
}
.learn-more-btn:hover {
    background: #d11b17; transform: translateY(-2px);
}

/* Company Section - 公司介绍部分 */
.company { 
    padding: 0; 
    background-color: #0a4bbb; /* 深蓝色背景，与参考网站一致 */
    overflow: hidden;
    /* position: relative; */
    /*margin-top: 7%;*/
}

/* 公司介绍内容容器 */
.company-wrapper {
    display: flex;
    flex-direction: row;
    min-height: 450px; /* 固定高度，确保视觉效果一致 */
}

/* 左侧文字区域 */
.company-text {
    width: 60%;
    color: white;
    padding: 75px 20px 75px max(20px, calc((100vw - 1600px) / 2 + 15px)); /* 左内边距与stats-container对齐，最小20px */
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0; /* 初始不可见，等待动画触发 */
    transform: translateX(-100px); /* 初始位置向左偏移100像素 */
    transition: all 1s ease-out;
}

/* 当滚动到可视区域时触发动画 */
.company-text.active {
    opacity: 1;
    transform: translateX(0); /* 滑动到原始位置，不再使用百分比 */
}

.company-text h2 { 
    font-size: 3rem; 
    color: white; 
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.2;
}

.company-text p { 
    font-size: 1.2rem; 
    color: white; 
    line-height: 1.8; 
    margin-bottom: 30px;
}

/* Learn more 按钮 */
.learn-more-btn-container {
    margin-top: 20px;
}

.learn-more-btns {
    background: #d11b17; /* 金色按钮 */
    color: #ffffff;
    padding: 17px 38px;
    border: none;
    border-radius: 25px;
    font-size: 0.9rem;
    /*font-weight: 600;*/
    cursor: pointer;
    width: 180px;
    transition: all 0.3s;
    display: inline-block;
    text-decoration: none;
}

.learn-more-btn:hover {
    background: #d11b17;
    transform: translateY(-2px);
}

/* 右侧图片区域 */
.company-image-container {
    width: 42%;
    position: absolute;
    overflow: hidden;
    opacity: 0; /* 初始不可见，等待动画触发 */
    /*transform: translateX(100px);*/
    transition: all 1s ease-out;
    border-top-left-radius: 18%;
    right: 0;
    /*height: 70%;*/
    margin-top: -4%;
}

/* 当滚动到可视区域时触发动画 */
.company-image-container.active {
    opacity: 1;
    transform: translateX(0);
}

.company-building-img { 
    width: 100%;
    height: 100%;
    object-fit: cover; /* 确保图片完全覆盖区域 */
    transition: transform 0.5s ease;
}

/* 数据统计区域 */
.stats-wrapper {
    background-color: #0a4bbb; /* 更深的蓝色，与参考网站一致 */
    padding: 30px 0;
    width: 100%;
}

.stats-container {
    /*display: flex;*/
    justify-content: space-around;
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 120px;
}

.stat {
    text-align: center;
    color: #FFD700; /* 金色数字 */
}

.stat h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat p {
    color: white;
    font-size: 1rem;
    margin-top: 5px;
}

/* 数字统计滚动效果 */
.stats { 
    display: grid; grid-template-columns: repeat(4, 1fr); 
    gap: 40px; text-align: center;
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease-out 0.6s;
}
.stats.animate {
    opacity: 1;
    transform: translateY(0);
}

.stat h3 { 
    font-size: 3rem; color: #ffffff; margin-bottom: 10px;
}
.stat p { font-size: 0.95rem; color: #ffffff;  }

/* 数字滚动动画 */
.counter {
    display: inline-block;
}

/* News Section */
.news { padding: 50px 0; background: #ffffff; }
.news-grid { 
    display: grid; grid-template-columns: repeat(3, 1fr); 
    gap: 60px;
}
.news-card { 
    background: white; border-radius: 10px; overflow: hidden; 
     transition: all 0.3s;border: 1px solid #eeeeee;padding: 20px
}
.news-card:hover { transform: translateY(-5px); }
.news-image { 
    width: 100%;
    display: flex;
    font-size: 0.9rem; color: #666;
}
.news-content {margin-top: 10px; }
.news-content h3 { 
    font-size: 1.2rem; margin-bottom: 15px; color: #333; 
    line-height: 1.4;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2; /* 标准属性，提供更好的兼容性 */
    overflow: hidden;
}
.news-content p { color: #666; font-size: 0.95rem; line-height: 1.6; }
.news-date { color: #999; font-size: 0.85rem; margin-top: 15px; }
.news-dates { color: #333; font-size: 1rem; margin-top: 15px; 
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3; /* 标准属性，提供更好的兼容性 */
    overflow: hidden;
}

/* Contact Section - 按照参考图片重新设计 */
.contact { 
    /*background: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8)), */
    /*            url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%23333" width="1200" height="600"/></svg>');*/
    background-size: cover; background-position: center;
    color: white; padding: 60px 0 0;
}
.contact .container {
    max-width: 1400px; margin: 0 auto; padding: 0 40px;
}
.contact-header {
    text-align: center; padding-bottom: 40px;
}
.contact-title { 
    font-size: 2.2rem; margin-bottom: 10px; font-weight: 400;
    color: white;
}
.contact-subtitle {
    color: rgba(255,255,255,0.8); font-size: 1rem;
    margin-bottom: 40px;
}

/* 手机端响应式样式优化 - 与responsive.css配合使用 */
@media (max-width: 768px) {
    /* Hero轮播图区域手机端优化 */
    .hero {
        height: 50vh; /* 手机端降低高度 */
        margin-left: 0; /* 取消负边距 */
    }
    
    .hero-slide {
        height: 100%;
    }
    
    .hero-slide img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* 确保图片完全覆盖且不变形 */
    }
    
    .hero-nav {
        width: 35px;
        height: 35px;
        font-size: 16px;
        background: rgba(0,0,0,0.6);
    }
    
    .hero-indicators-txt {
        font-size: 0.75rem;
        bottom: 50px;
        padding: 0 10px;
        text-align: center;
        line-height: 1.2;
    }
    
    .hero-indicators {
        bottom: 20px;
    }
    
    /* 产品网格手机端优化 */
    .products {
        padding: 40px 0;
    }
    
    .products-grid {
        grid-template-columns: 1fr; /* 手机端单列显示 */
        gap: 20px;
    }
    
    .product-card {
        padding: 15px;
        margin: 0 auto;
        max-width: 300px; /* 限制最大宽度 */
    }
    
    .product-card a {
        font-size: 0.9rem;
        line-height: 1.3;
    }
    
    /* 公司介绍区域手机端优化 */
    .company {
        padding: 40px 0;
    }
    
    .company-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .company-text {
        width: 100%;
        position: relative;
        padding: 0 10px;
    }
    
    .company-text h2 {
        font-size: 1.6rem;
        margin-bottom: 20px;
        line-height: 1.3;
    }
    
    .company-text p {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 20px;
    }
    
    .learn-more-btns {
        padding: 14px 30px;
        font-size: 0.85rem;
        width: 140px;
    }
    
    .company-image-container {
        position: relative;
        width: 90%;
        margin: 0 auto;
        margin-top: 0;
        border-top-left-radius: 10%;
    }
    
    /* 统计数据区域手机端优化 */
    .stats-wrapper {
        padding: 30px 0;
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr); /* 手机端2列显示 */
        gap: 30px;
    }
    
    .stat h3 {
        font-size: 1.8rem;
    }
    
    .stat p {
        font-size: 0.85rem;
    }
    
    /* 新闻区域手机端优化 */
    .news {
        padding: 40px 0;
    }
    
    .news-grid {
        grid-template-columns: 1fr; /* 手机端单列显示 */
        gap: 25px;
    }
    
    .news-card {
        padding: 18px;
        max-width: 350px;
        margin: 0 auto;
    }
    
    .news-content h3 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
    
    .news-content p {
        font-size: 0.9rem;
    }
    
    .news-dates {
        font-size: 0.85rem;
        margin-top: 12px;
    }
    
    /* 通用标题手机端优化 */
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 15px;
        line-height: 1.3;
    }
    
    .section-subtitle {
        font-size: 0.95rem;
        margin-bottom: 30px;
        line-height: 1.4;
        padding: 0 10px;
    }
    
    /* Footer移动端适配保持不变 */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px; 
        text-align: center;
    }
    
    .products-column .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .contact-form {
        flex-direction: column; 
        gap: 15px;
    }
    
    .form-input, .form-textarea {
        width: 100%; 
        max-width: 300px;
    }
    
    .contact-info-bar {
        flex-direction: column; 
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column; 
        text-align: center;
        gap: 15px;
    }
    
    .contact-quick {
        flex-direction: column; 
        gap: 15px;
    }
}

/* 小屏幕手机额外优化 */
@media (max-width: 480px) {
    .hero {
        height: 45vh;
    }
    
    .hero-nav {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .hero-indicators-txt {
        font-size: 0.7rem;
        bottom: 45px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-subtitle {
        font-size: 0.85rem;
    }
    
    .company-text h2 {
        font-size: 1.4rem;
    }
    
    .company-text p {
        font-size: 0.85rem;
    }
    
    .learn-more-btns {
        padding: 12px 25px;
        font-size: 0.8rem;
        width: 120px;
    }
    
    .stats-container {
        gap: 20px;
    }
    
    .stat h3 {
        font-size: 1.5rem;
    }
    
    .stat p {
        font-size: 0.8rem;
    }
}
