/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background: #f4f4f4;
}

/* 导航栏样式 */
.navbar {
    background: #333;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: background 0.3s;
}

.nav-links a:hover {
    background: #4CAF50;
}

/* 页脚样式 */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 1rem;
    position: fixed;
    bottom: 0;
    width: 100%;
}
/* ---------- 公共内容区样式 ---------- */
.content {
    padding: 2rem 5%;
    min-height: calc(100vh - 120px); /* 确保内容区高度 */
    margin-bottom: 60px; /* 防止页脚覆盖 */
}

/* ---------- 首页专属样式 ---------- */
/* 特色区域 */
.featured-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.featured-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    overflow: hidden; /* 防止放大时溢出 */
}

.featured-card:hover {
    transform: translateY(-5px);
}
.featured-card img {
    width: 100%;
    height: 250px; /* 增加高度 */
    object-fit: contain; /* 替换为contain显示完整图片 */
    border-radius: 4px;
    margin-bottom: 1rem;
    transition: transform 0.3s ease; /* 添加过渡动画 */
}

.featured-card:hover img {
    transform: scale(1.05); /* 悬停时轻微放大 */
}

/* 新闻列表 */
.news-list {
    list-style: none;
    margin-top: 1rem;
}

.news-list li {
    padding: 0.8rem;
    border-bottom: 1px solid #eee;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        text-align: center;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 1rem;
    }

    .featured-section {
        grid-template-columns: 1fr;
    }
}
/* 超链接样式 */
a {
    color: #4CAF50;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 伪类修饰 */
a:visited {
    color: #45a049;
}

.read-more {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.3rem 1rem;
    background: #4CAF50;
    color: white !important;
    border-radius: 4px;
}
@media (max-width: 480px) {
    .featured-card img {
        height: 180px; /* 移动端适当降低高度 */
    }
}
@media (min-width: 1200px) {
    .hero {
        background-position: center 30% !important; /* 桌面端重点显示图片上半部分 */
    }
}
.hero {
    background-attachment: fixed;
}


                 /* 产品中心专用样式 */
.products-main {
    padding: 2rem 5%;
}

.filter-section {
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: #f0f0f0;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active {
    background: #4CAF50;
    color: white;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem; /* ✅ 添加间距 */
    padding: 1rem; /* 可选：增加容器内边距 */
}

.product-card {
    width: 100%; /* ✅ 自适应网格列宽 */
    max-width: 350px; /* 可选：限制最大宽度 */
}

.product-card img {
    width: 100%;
    height: 250px; /* 固定高度 */
    object-fit: cover; /* 保持比例填充 */
    border-radius: 8px 8px 0 0;
}

                              /* 新闻中心专用样式 */
.news-timeline {
    position: relative;
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.news-item {
    background: white;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
}

.news-item::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 24px;
    width: 12px;
    height: 12px;
    background: #4CAF50;
    border-radius: 50%;
}

@media (min-width: 768px) {
    .news-timeline::before {
        content: '';
        position: absolute;
        left: 50%;
        width: 2px;
        height: 100%;
        background: #ddd;
    }

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr; /* 单列显示 */
    }
    
    .product-card {
        margin-bottom: 1rem; /* 增加底部间距 */
    }
}

    .news-item {
        width: calc(50% - 40px);
    }

    .news-item:nth-child(odd) {
        margin-left: auto;
    }

    .news-item::before {
        left: -34px;
    }

    .news-item:nth-child(even)::before {
        left: auto;
        right: -34px;
    }
}

                                            /* 认证表单通用样式 */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.auth-box {
    background: white;
    padding: 2rem 3rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 500px;
}

.form-logo {
    width: 30px;
    vertical-align: middle;
    margin-right: 10px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #666;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: #4CAF50;
    outline: none;
}

.error-msg {
    color: #ff4444;
    font-size: 0.85rem;
    height: 1.2rem;
    display: block;
    opacity: 0;
    transition: opacity 0.3s;
}

.error-msg.show {
    opacity: 1;
}

.submit-btn {
    background: #4CAF50;
    color: white;
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.submit-btn:hover {
    background: #45a049;
}

.form-links {
    margin-top: 1rem;
    text-align: center;
}

.form-links a {
    color: #666;
    margin: 0 0.5rem;
}
                                  /* 产品详情页样式 */
.product-detail {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr 1fr;
}

.gallery {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.gallery img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: none;
}

.gallery img.active {
    display: block;
}

.gallery-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
}

.gallery-controls button {
    font-size: 40px;
    width: 50px;
    height: 50px;
    padding: 10px;
    border: none;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
/* 新增居中代码 */
    display: flex;          /* 启用弹性布局 */
    align-items: center;    /* 垂直居中 */
    justify-content: center;/* 水平居中 */
    padding: 0;             /* 移除内边距干扰 */
}

.gallery-controls button:hover {
    background: rgba(0, 0, 0, 0.6);
}

/* 悬停效果 */
.gallery-controls button:hover {
    background: rgba(0, 0, 0, 0.6); /* 加深背景 */
}

.product-info {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.color-picker label {
    display: inline-block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 1rem;
    cursor: pointer;
    border: 2px solid transparent;
}

input[type="radio"]:checked + label {
    border-color: #4CAF50;
}

/* 技术规格表格 */
.spec-table {
    margin-top: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.spec-row {
    display: flex;
    border-bottom: 1px solid #eee;
    padding: 1rem;
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-title {
    width: 120px;
    font-weight: bold;
    color: #666;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr;
    }
    
    .gallery img {
        height: 300px;
    }
}

                          /* 新闻详情页样式 */
.news-detail {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.news-detail header img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin: 1rem 0;
}

.meta {
    color: #666;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.highlight {
    background: #f8f9fa;
    padding: 1.5rem;
    border-left: 4px solid #4CAF50;
    margin: 2rem 0;
}

.related-news {
    margin-top: 3rem;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.news-card {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.news-card h4 {
    padding: 1rem;
    margin: 0;
}

                      /* 产品2详情页版本选择器样式 */
.version-select label {
    display: block;
    padding: 0.8rem;
    margin: 0.5rem 0;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

input[type="radio"]:checked + label {
    border-color: #4CAF50;
    background: #f8fff8;
}

                                        /* ===== 公司简介页样式 ===== */
.about-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.mission-banner {
    height: 400px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3rem;
    position: relative;
}

.mission-banner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
}

.mission-text {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
}

.mission-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.white-line {
    width: 80px;
    border: 2px solid white;
    margin: 1rem auto;
}

/* 内容区块通用样式 */
.about-section {
    margin-bottom: 3rem;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.about-section h3 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: center;
}

.section-content img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.highlight-list {
    list-style: none;
    margin-top: 1rem;
}

.highlight-list li {
    padding: 0.8rem;
    background: #f8f9fa;
    margin-bottom: 0.5rem;
    border-left: 3px solid #4CAF50;
}

/* 时间线样式 */
.timeline-items {
    position: relative;
    padding-left: 30px;
    border-left: 2px solid #4CAF50;
    min-height: 200px; /* 控制最小高度 */
    height: auto !important; /* 取消固定高度 */
}

.timeline-item {
    position: relative;
    margin-bottom: 1.2rem; /* 减少间距 */
    padding-left: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 5px;
    width: 12px;
    height: 12px;
    background: #4CAF50;
    border-radius: 50%;
}

.year {
    font-weight: bold;
    color: #4CAF50;
    margin-bottom: 0.5rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .section-content {
        grid-template-columns: 1fr;
    }
    
    .mission-text h2 {
        font-size: 1.8rem;
    }
    
    .about-section {
        padding: 1rem;
    }
}


                               /* 领导团队模块 */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.member-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s;
}

.member-card:hover {
    transform: translateY(-5px);
}

.member-photo {
    height: 300px; /* 固定容器高度 */
    overflow: hidden;
    position: relative;
}

.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保持比例裁剪 */
    transition: transform 0.3s;
}

.member-photo:hover img {
    transform: scale(1.05);
}

.member-info {
    padding: 1.5rem;
    text-align: center;
}

.member-info h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.member-info p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .member-photo {
        height: 250px;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
    }
}