/* 全局样式重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0066cc;
    --secondary-color: #004d99;
    --accent-color: #00b3b3;
    --text-dark: #333;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --border-color: #e0e0e0;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 102, 204, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* 顶部栏 */
.top-bar {
    background: var(--bg-light);
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

.contact-info span {
    color: var(--text-light);
    font-size: 14px;
}

.language-switch a {
    color: var(--text-light);
    font-size: 14px;
    margin: 0 5px;
}

.language-switch a.active,
.language-switch a:hover {
    color: var(--primary-color);
}

/* 头部和导航 */
.header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo img {
    height: 70px;
    width: auto;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 28px;
    font-weight: bold;
}

.logo p {
    color: var(--text-light);
    font-size: 12px;
    letter-spacing: 2px;
}

.navbar ul {
    display: flex;
    gap: 30px;
}

.navbar a {
    color: var(--text-dark);
    font-weight: 500;
    padding: 10px 0;
    position: relative;
}

.navbar a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.navbar a:hover::after,
.navbar a.active::after {
    width: 100%;
}

.navbar a:hover,
.navbar a.active {
    color: var(--primary-color);
}

.mobile-menu-btn {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--primary-color);
}

/* 轮播图区域 */
.hero-slider {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #1a1a1a;
}

.hero-slider .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;
}

.hero-slider .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.hero-slider .slide.active {
    opacity: 1;
    z-index: 1;
}

.slide-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
}

.slide-content p {
    font-size: 20px;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease 0.2s both;
}

.slide-content .btn {
    background: var(--white);
    color: var(--primary-color);
    animation: fadeInUp 1s ease 0.4s both;
}

/* 轮播图指示器 */
.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 12px;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid white;
}

.slider-dot.active {
    background: white;
    transform: scale(1.2);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 通用区块样式 */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 36px;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.section-title p {
    color: var(--primary-color);
    font-size: 18px;
    letter-spacing: 3px;
}

.section-desc {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 40px;
    font-size: 16px;
}

/* 关于我们 */
.about-section {
    background: var(--white);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.about-text h3 {
    color: var(--primary-color);
    font-size: 32px;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 20px;
}

.about-text h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.company-intro {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 25px;
    padding: 20px 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    text-align: left;
}

.about-text p {
    color: var(--text-light);
    line-height: 2;
    margin-bottom: 20px;
    font-size: 16px;
    text-align: justify;
}


.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    min-height: 300px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: bold;
}

.about-image img::before {
    content: '公司图片';
}

.company-certs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.cert-item {
    padding: 30px;
    background: var(--bg-light);
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.cert-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.cert-item h4 {
    color: var(--primary-color);
    font-size: 20px;
    margin-bottom: 10px;
}

.cert-item p {
    color: var(--text-light);
}

/* 产品展示 */
.products-section {
    background: var(--bg-light);
}

.category-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 25px;
    border: 2px solid var(--border-color);
    background: var(--white);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab-btn:hover,
.tab-btn.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: var(--white);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
    min-height: 750px; /* 固定高度：2行产品 (约340px * 2 + 30px gap + 40px margin) */
    align-content: start;
}

.product-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 360px; /* 固定卡片高度 */
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.product-image {
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: bold;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

/* 图片加载失败时的样式 */
.product-image img[src=""], .product-image img:not([src]) {
    display: none;
}

.product-image::before {
    content: '产品图片';
    position: absolute;
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
}

.product-info {
    padding: 20px;
    flex: 1; /* 占据剩余空间 */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.product-info h4 {
    color: var(--text-dark);
    font-size: 16px;
    margin-bottom: 10px;
}

.product-info .category {
    color: var(--accent-color);
    font-size: 14px;
}

.view-more {
    text-align: center;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 40px;
    padding: 20px 0;
}

.page-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-color);
}

.page-dot:hover {
    background: rgba(0, 102, 204, 0.3);
    transform: scale(1.15);
}

.page-dot.active {
    background: var(--primary-color);
    transform: scale(1.25);
    box-shadow: 0 0 8px rgba(0, 102, 204, 0.5);
}

/* 质量管理 */
.quality-section {
    background: var(--white);
}

.quality-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.quality-card {
    text-align: center;
    padding: 40px 30px;
    background: var(--bg-light);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.quality-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.quality-icon {
    font-size: 60px;
    margin-bottom: 20px;
    line-height: 1;
}

.quality-card h3 {
    color: var(--primary-color);
    font-size: 22px;
    margin-bottom: 15px;
}

.quality-card p {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.8;
}

.quality-card .link {
    color: var(--primary-color);
    font-weight: 600;
}

.quality-card .link:hover {
    color: var(--accent-color);
}

/* 新闻中心 */
.news-section {
    background: var(--bg-light);
}

.news-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.news-tab {
    padding: 12px 35px;
    border: none;
    background: var(--white);
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.news-tab:hover,
.news-tab.active {
    background: var(--primary-color);
    color: var(--white);
}

.news-list {
    max-width: 900px;
    margin: 0 auto 40px;
}

.news-item {
    display: flex;
    gap: 30px;
    padding: 30px;
    background: var(--white);
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.news-item:hover {
    transform: translateX(10px);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
}

.news-date {
    text-align: center;
    min-width: 100px;
}

.news-date .day {
    display: block;
    font-size: 36px;
    color: var(--primary-color);
    font-weight: bold;
}

.news-date .month {
    display: block;
    color: var(--text-light);
    font-size: 14px;
}

.news-content h3 {
    color: var(--text-dark);
    font-size: 20px;
    margin-bottom: 10px;
}

.news-content p {
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.6;
}

.news-content .read-more {
    color: var(--primary-color);
    font-weight: 600;
}

/* 联系我们 */
.contact-section {
    background: var(--white);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.info-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.info-item .icon {
    font-size: 40px;
    color: var(--primary-color);
}

.info-item h4 {
    color: var(--text-dark);
    font-size: 18px;
    margin-bottom: 5px;
}

.info-item p {
    color: var(--text-light);
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* 页脚 */
.footer {
    background: #1a1a1a;
    color: var(--white);
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    color: var(--white);
    font-size: 20px;
    margin-bottom: 20px;
}

.footer-section p {
    color: #aaa;
    line-height: 1.8;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #aaa;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #333;
    color: #aaa;
}

.footer-bottom p {
    margin-bottom: 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-slider {
        height: 400px;
    }
    
    .slide-content h2 {
        font-size: 24px;
    }
    
    .slide-content p {
        font-size: 16px;
    }
    
    .navbar ul {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-slider {
        padding: 60px 20px;
    }
    
    .slide-content h2 {
        font-size: 28px;
    }
    
    .about-content,
    .company-certs,
    .quality-grid,
    .contact-content,
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
        min-height: auto; /* 移动端不固定高度 */
    }
    
    .news-item {
        flex-direction: column;
    }
    
    .news-date {
        min-width: auto;
        text-align: left;
    }
}

@media (max-width: 480px) {
    .category-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        width: 100%;
    }
    
    .news-tabs {
        flex-direction: column;
    }
    
    .news-tab {
        width: 100%;
    }
}
