/* style.css */
:root {
    --primary-color: #0056b3;
    --secondary-color: #007bff;
    --text-color: #333;
    --bg-color: #f8f9fa;
    --white-color: #ffffff;
    --border-color: #dee2e6;
    --header-height: 70px;
}

body {
    font-family: 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* --- 全局图片默认样式 START --- */
/* 确保所有图片默认不超过其父容器，并保持宽高比 */
img {
    max-width: 100%;
    height: auto; /* 保持图片宽高比 */
    display: block; /* 移除图片底部可能存在的间隙 */
}
/* --- 全局图片默认样式 END --- */


/* Header & Navigation */
header {
    background-color: var(--white-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
}

nav li a {
    display: block;
    padding: 25px 15px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s, background-color 0.3s;
}

nav li a:hover, nav li a.active {
    color: var(--white-color);
    background-color: var(--primary-color);
}

/* Main Content */
main {
    padding-top: 20px;
}

.section {
    background-color: var(--white-color);
    padding: 40px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.section-title {
    text-align: center;
    font-size: 2.2em;
    color: var(--primary-color);
    margin-bottom: 30px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 10px auto 0;
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 10px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9em;
}
.breadcrumbs a {
    text-decoration: none;
    color: var(--secondary-color);
}
.breadcrumbs span {
    margin: 0 5px;
    color: #6c757d;
}

/* Product & Article Lists */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.grid-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: var(--white-color);
    transition: box-shadow 0.3s, transform 0.3s;
    display: flex;
    flex-direction: column;
}
.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* --- 产品网格项图片优化 START --- */
.grid-item img {
    width: 100%;
    height: 250px; /* 固定高度，确保所有卡片视觉统一 */
    object-fit: contain; /* 确保图片完整显示，不裁剪，留白 */
    padding: 10px; /* 增加内边距 */
    box-sizing: border-box; /* 确保内边距包含在高度内 */
    background-color: #fdfdfd; /* 填充背景色以凸显 contain 效果 */
    margin: 0 auto; /* 水平居中 */
}
/* --- 产品网格项图片优化 END --- */

.grid-item-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.grid-item-content h3 {
    margin-top: 0;
    color: var(--primary-color);
}
.grid-item-content a {
    text-decoration: none;
    color: inherit;
}
.grid-item-content p {
    flex-grow: 1;
    font-size: 0.9em;
    color: #555;
}
.read-more-btn {
    display: inline-block;
    padding: 8px 15px;
    background-color: var(--secondary-color);
    color: var(--white-color);
    text-decoration: none;
    border-radius: 5px;
    margin-top: 10px;
    align-self: flex-start;
    transition: background-color 0.3s;
}
.read-more-btn:hover {
    background-color: var(--primary-color);
}

.list-item {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}
.list-item h3 {
    margin: 0 0 5px 0;
}
.list-item .date {
    font-size: 0.85em;
    color: #6c757d;
    margin-bottom: 10px;
}
.list-item p {
    margin: 0 0 10px 0;
}

/* Product Detail Page */
.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
    align-items: flex-start;
}
.product-image-gallery {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    background-color: #fdfdfd;
    text-align: center; /* 居中图片 */
}

/* --- 产品详情页主图优化 START --- */
.product-image-gallery img {
    max-width: 100%; /* 确保不超过容器宽度 */
    max-height: 450px; /* 限制最大高度 */
    width: auto; /* 允许图片根据自身比例调整宽度 */
    height: auto; /* 允许图片根据自身比例调整高度 */
    object-fit: contain; /* 确保图片完整显示，不裁剪，留白 */
    display: inline-block; /* 配合 text-align: center; 居中 */
    margin: 0 auto; /* 再次强调水平居中 */
}
/* --- 产品详情页主图优化 END --- */

.product-info h1 {
    margin-top: 0;
    color: var(--primary-color);
}
.product-info .model {
    font-weight: bold;
    color: #555;
    margin-bottom: 20px;
}
.product-tabs {
    margin-top: 30px;
    border-top: 2px solid var(--primary-color);
}
.tab-content {
    padding: 20px;
    background-color: var(--white-color);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
}
.tab-content h3 {
    margin-top: 0;
}
.spec-table {
    width: 100%;
    border-collapse: collapse;
}
.spec-table td {
    padding: 10px;
    border: 1px solid var(--border-color);
}
.spec-table tr:nth-child(odd) {
    background-color: #f2f2f2;
}


/* Footer */
footer {
    background-color: #343a40;
    color: var(--white-color);
    padding: 40px 20px;
    margin-top: 30px;
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}
.footer-col h4 {
    color: var(--white-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}
.footer-col ul {
    list-style: none;
    padding: 0;
}
.footer-col li a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s;
}
.footer-col li a:hover {
    color: var(--white-color);
}
.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #495057;
    font-size: 0.9em;
    color: #adb5bd;
}


/* Hero Carousel Section (首页轮播图) */
.hero-carousel {
    position: relative;
    width: 100%;
    height: 500px; /* 轮播图固定高度 */
    background-size: cover; /* 确保背景图覆盖整个区域 */
    background-position: center; /* 背景图居中 */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white-color);
    text-align: center;
    margin-bottom: 20px;
}
.hero-carousel::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5); /* 黑色半透明遮罩，让文字更清晰 */
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}
.hero-content h1 {
    font-size: 3.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}
.hero-content p {
    font-size: 1.2em;
    margin-bottom: 20px;
}
.hero-button {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--secondary-color);
    color: var(--white-color);
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.3s;
}
.hero-button:hover {
    background-color: var(--primary-color);
    transform: scale(1.05);
}

/* Enhanced News Section Layout (新闻列表页和首页新闻模块) */
.news-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 30px;
}
.news-item {
    display: flex;
    flex-direction: column;
    background-color: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.3s;
}
.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* --- 新闻列表项图片优化 START --- */
.news-item img {
    width: 100%;
    height: 220px; /* 固定高度 */
    object-fit: cover; /* 覆盖整个区域，可能裁剪边缘 */
    margin: 0 auto; /* 居中 */
}
/* --- 新闻列表项图片优化 END --- */

.news-item-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.news-item-content h3 {
    margin-top: 0;
}
.news-item-content p.date {
    font-size: 0.85em;
    color: #6c757d;
    margin-bottom: 10px;
}
.news-item-content p.summary {
    flex-grow: 1;
}

/* Article Detail Page (文章内页，如 News-1571428.html, article-3704633.html) */

/* --- 文章头图优化 START --- */
.article-lead-image {
    width: 100%;
    height: auto;
    max-height: 450px; /* 限制最大高度 */
    object-fit: cover; /* 覆盖整个区域，可能裁剪边缘 */
    border-radius: 8px;
    margin-bottom: 30px;
    margin-left: auto; /* 确保水平居中 */
    margin-right: auto; /* 确保水平居中 */
}
/* --- 文章头图优化 END --- */

.article-body h2 {
    font-size: 1.8em;
    color: var(--primary-color);
    margin-top: 40px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.article-body h3 {
    font-size: 1.4em;
    color: var(--primary-color);
    margin-top: 25px;
}

.article-body p {
    font-size: 1.05em;
    line-height: 1.8;
}

.article-body ul {
    line-height: 1.8;
    padding-left: 25px;
}

.article-inline-section {
    display: grid;
    grid-template-columns: 1fr 2fr; /* 默认两栏 */
    gap: 30px;
    align-items: flex-start; /* 顶部对齐 */
    margin: 40px 0;
}

/* --- 文章内嵌图片优化 START --- */
.article-inline-section img {
    max-width: 100%; /* 确保不超过容器宽度 */
    max-height: 300px; /* 限制最大高度，适用于竖图 */
    width: auto; /* 允许图片根据自身比例调整宽度 */
    height: auto; /* 允许图片根据自身比例调整高度 */
    object-fit: contain; /* 确保图片完整显示，不裁剪，留白 */
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin: 0 auto; /* 水平居中 */
}
/* --- 文章内嵌图片优化 END --- */

/* 移动端适配：单列显示 */
@media (max-width: 768px) {
    .article-inline-section {
        grid-template-columns: 1fr; /* 移动端变为单列 */
    }
    /* 移动端图片调整 */
    .article-inline-section img {
        max-height: 250px; /* 移动端内嵌图高度适当减小 */
        margin-bottom: 15px; /* 增加与下方文本的间距 */
    }
}
/* style.css (为产品中心页等内页新增的部分) */

.page-banner {
    position: relative;
    width: 100%;
    height: 350px; /* 内页横幅高度 */
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white-color);
    text-align: center;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}

.page-banner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6); /* 遮罩可以比首页稍深，突出文字 */
}

.page-banner-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.page-banner-content h1 {
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

.page-banner-content p {
    font-size: 1.1em;
}
/* style.css (为联系我们页面新增的部分) */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr; /* 左侧信息，右侧地图 */
    gap: 50px;
    align-items: flex-start;
}

.contact-info-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.contact-info-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
    font-size: 1.05em;
}

.contact-info-list .icon {
    font-size: 1.5em;
    margin-right: 20px;
    color: var(--primary-color);
    width: 30px; /* 固定图标宽度，确保对齐 */
    text-align: center;
}

.contact-info-list .info-text strong {
    display: block;
    color: var(--text-color);
    font-size: 1.1em;
    margin-bottom: 3px;
}

.contact-info-list .info-text span {
    color: #555;
}

.contact-map img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Contact Form Styles */
.contact-form {
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
    padding-top: 40px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
    font-size: 1em;
    box-sizing: border-box; /* 确保 padding 不会撑大宽度 */
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.submit-btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--secondary-color);
    color: var(--white-color);
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s, transform 0.3s;
}

.submit-btn:hover {
    background-color: var(--primary-color);
    transform: scale(1.05);
}

/* 移动端适配 */
@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr; /* 单列显示 */
    }
    .contact-map {
        margin-top: 30px;
    }
}
/* style.css (为关于我们页面新增的部分) */

.about-intro-section {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    align-items: center;
    margin-bottom: 50px;
}

.about-intro-section img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
    text-align: center;
}

.advantage-item {
    padding: 25px 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.advantage-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 86, 179, 0.1);
}

.advantage-item .icon {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.advantage-item h3 {
    margin-bottom: 10px;
    font-size: 1.3em;
}

/* Timeline Section */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 50px auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--border-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item.left {
    left: 0;
    padding-right: 30px;
}

.timeline-item.right {
    left: 50%;
    padding-left: 30px;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--white-color);
    border: 4px solid var(--secondary-color);
    top: 20px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item.right::after {
    left: -10px;
}

.timeline-content {
    padding: 20px;
    background-color: var(--white-color);
    position: relative;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.timeline-content h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.timeline-content .year {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .about-intro-section {
        grid-template-columns: 1fr;
    }
    .timeline::after {
        left: 15px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 50px;
        padding-right: 15px;
    }
    .timeline-item.left, .timeline-item.right {
        left: 0;
    }
    .timeline-item::after {
        left: 6px;
    }
}