:root {
--primary-color: #003366;
--secondary-color: #ffcc00;
--accent-color: #004080;
--light-color: #f8f9fa;
--dark-color: #212529;
--gray-color: #6c757d;
--success-color: #28a745;
--font-main: 'Roboto', 'Microsoft YaHei', sans-serif;
--box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
--transition: all 0.3s ease;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: var(--font-main);
color: var(--dark-color);
line-height: 1.6;
background-color: #f9f9f9;
overflow-x: hidden;
}
a {
text-decoration: none;
color: inherit;
}
img {
max-width: 100%;
vertical-align: middle;
}
ul {
list-style: none;
}
.container {
width: 100%;
max-width: 1200px;
margin: 0 auto;
padding: 0 15px;
}
/* 顶部信息栏 */
.top-info-bar {
background-color: var(--primary-color);
color: white;
padding: 8px 0;
font-size: 14px;
}
.top-info-content {
display: flex;
justify-content: space-between;
align-items: center;
}
.top-contact-info span {
margin-right: 20px;
}
.top-contact-info i {
margin-right: 5px;
color: var(--secondary-color);
}
.social-links a {
margin-left: 15px;
color: white;
transition: var(--transition);
}
.social-links a:hover {
color: var(--secondary-color);
}
/* 导航栏 */
header {
background-color: white;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
position: sticky;
top: 0;
z-index: 1000;
}
.header-content {
display: flex;
justify-content: space-between;
align-items: center;
padding: 15px 0;
}
.logo {
display: flex;
align-items: center;
}
.logo-img {
width: 70px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
margin: 0 10px;
color: white;
font-weight: bold;
font-size: 12px;
}
.logo-text h2 {
font-size: 18px;
font-weight: 700;
color: var(--primary-color);
line-height: 1.2;
}
.logo-text .subtitle {
font-size: 13px;
color: var(--gray-color);
}
nav ul {
display: flex;
}
nav ul li {
position: relative;
}
nav ul li a {
display: block;
padding: 10px 18px;
font-weight: 500;
color: var(--dark-color);
transition: var(--transition);
position: relative;
}
nav ul li a:after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
width: 0;
height: 3px;
background-color: var(--secondary-color);
transition: var(--transition);
transform: translateX(-50%);
}
nav ul li a:hover, nav ul li a.active {
color: var(--primary-color);
}
nav ul li a:hover:after, nav ul li a.active:after {
width: 80%;
}
.nav-cta {
margin-left: 20px;
}
/* 移动端菜单按钮 */
.mobile-menu-btn {
display: none;
flex-direction: column;
justify-content: space-around;
width: 30px;
height: 25px;
background: transparent;
border: none;
cursor: pointer;
padding: 0;
}
.mobile-menu-btn span {
width: 30px;
height: 3px;
background-color: var(--primary-color);
border-radius: 2px;
transition: var(--transition);
}
/* 面包屑导航 */
.breadcrumb {
padding: 15px 0;
background-color: var(--light-color);
font-size: 14px;
}
.breadcrumb-content {
display: flex;
flex-wrap: wrap;
}
.breadcrumb-item {
color: var(--gray-color);
}
.breadcrumb-item:not(:last-child):after {
content: '/';
margin: 0 10px;
color: var(--gray-color);
}
.breadcrumb-item a:hover {
color: var(--primary-color);
}
.breadcrumb-item.active {
/*color: var(--primary-color); */
font-weight: 500;
}
/* 新闻详情区域 */
.news-detail {
padding: 60px 0;
background-color: white;
}
.news-detail-wrapper {
display: grid;
grid-template-columns: 3fr 1fr;
gap: 30px;
}
.news-main-content {
width: 100%;
}
.news-header {
margin-bottom: 30px;
}
.news-title {
font-size: 1rem;
color: var(--primary-color);
margin-bottom: 20px;
line-height: 1.3;
}
.news-meta {
display: flex;
flex-wrap: wrap;
gap: 20px;
color: var(--gray-color);
margin-bottom: 25px;
padding-bottom: 20px;
border-bottom: 1px solid #eee;
font-size: 14px;
}
.news-meta-item {
display: flex;
align-items: center;
}
.news-meta-item i {
margin-right: 8px;
color: var(--primary-color);
}
.news-featured-image {
width: 100%;
border-radius: 8px;
overflow: hidden;
margin-bottom: 30px;
box-shadow: var(--box-shadow);
}
.news-featured-image img {
width: 100%;
height: auto;
object-fit: cover;
}
.news-content {
font-size: 1.05rem;
line-height: 1.8;
}
.news-content p {
margin-bottom: 20px;
font-size: 14px;
}
.news-content strong {
font-size: 16px;
}
.news-content h2, .news-content h3 {
color: var(--primary-color);
margin: 30px 0 15px;
}
.news-content img {
max-width: 100%;
height: auto;
border-radius: 8px;
margin: 20px auto;
/* box-shadow: var(--box-shadow); */
display: block;
}
.news-content blockquote {
border-left: 4px solid var(--secondary-color);
padding: 15px 20px;
margin: 20px 0;
background-color: var(--light-color);
border-radius: 0 4px 4px 0;
}
.news-tags {
margin: 40px 0;
padding: 20px;
background-color: var(--light-color);
border-radius: 8px;
}
.news-tags h3 {
font-size: 1.1rem;
margin-bottom: 15px;
color: var(--primary-color);
}
.tags-list {
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.tag {
display: inline-block;
padding: 6px 15px;
background-color: white;
border: 1px solid #ddd;
border-radius: 20px;
font-size: 0.9rem;
transition: var(--transition);
}
.tag:hover {
background-color: var(--primary-color);
color: white;
border-color: var(--primary-color);
}
.news-share {
margin-bottom: 40px;
padding-bottom: 20px;
border-bottom: 1px solid #eee;
}
.news-share h3 {
font-size: 1.1rem;
margin-bottom: 15px;
color: var(--primary-color);
}
.share-buttons {
display: flex;
gap: 10px;
}
.share-btn {
display: flex;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
border-radius: 50%;
background-color: var(--light-color);
color: var(--primary-color);
transition: var(--transition);
}
.share-btn:hover {
background-color: var(--primary-color);
color: white;
transform: translateY(-3px);
}
/* 相关新闻和相关产品通用样式 */
.related-news, .related-products {
margin-top: 60px;
}
.section-title {
margin-bottom: 30px;
}
.section-title h2 {
font-size: 1.8rem;
color: var(--primary-color);
margin-bottom: 15px;
position: relative;
display: inline-block;
padding-bottom: 10px;
}
.section-title h2:after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 60px;
height: 3px;
background-color: var(--secondary-color);
}
.related-news-grid, .related-products-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 25px;
}
.news-card, .product-card {
background-color: white;
border-radius: 8px;
overflow: hidden;
transition: var(--transition);
box-shadow: var(--box-shadow);
}
.news-card:hover, .product-card:hover {
transform: translateY(-5px);
box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}
.news-card-img, .product-card-img {
width: 100%;
overflow: hidden;
}
.news-card-img img, .product-card-img img {
width: 100%;
height: 100%;
object-fit: cover;
transition: var(--transition);
}
.news-card:hover .news-card-img img, .product-card:hover .product-card-img img {
transform: scale(1.05);
}
.news-card-content, .product-card-content {
padding: 20px;
}
.news-card-date {
font-size: 0.9rem;
color: var(--gray-color);
margin-bottom: 10px;
display: flex;
align-items: center;
}
.news-card-date i {
margin-right: 5px;
font-size: 0.8rem;
}
.product-card-model {
font-size: 0.9rem;
color: var(--primary-color);
font-weight: 500;
margin-bottom: 5px;
}
.news-card-title, .product-card-title {
font-size: 1.2rem;
margin-bottom: 10px;
color: var(--primary-color);
line-height: 1.3;
}
.news-card-excerpt, .product-card-desc {
color: var(--gray-color);
margin-bottom: 15px;
font-size: 0.95rem;
}
.news-card-link, .product-card-link {
color: var(--primary-color);
font-weight: 500;
display: inline-flex;
align-items: center;
font-size: 0.95rem;
}
.news-card-link i, .product-card-link i {
margin-left: 5px;
transition: var(--transition);
}
.news-card-link:hover i, .product-card-link:hover i {
transform: translateX(5px);
}
.article-tags {display: block;justify-content: center;flex-wrap: wrap;gap: 10px;margin-top: 20px;font-size: 14px;}
.article-tags a {
color: var(--emerson-blue);
/* padding: 5px 12px; */
border-radius: 30px;
font-size: 14px;
text-decoration: none;
transition: var(--transition);
}
.article-tag:hover {
background: var(--emerson-blue);
color: var(--white);
}
/* 右侧边栏 */
.news-sidebar {
width: 100%;
}
.sidebar-section {
background-color: var(--light-color);
border-radius: 8px;
padding: 20px;
margin-bottom: 25px;
box-shadow: var(--box-shadow);
}
.sidebar-title {
font-size: 1.2rem;
color: var(--primary-color);
margin-bottom: 15px;
padding-bottom: 10px;
border-bottom: 2px solid var(--secondary-color);
position: relative;
}
.sidebar-title:after {
content: '';
position: absolute;
width: 30%;
height: 2px;
background-color: var(--primary-color);
bottom: -2px;
left: 0;
}
/* 新闻分类 */
.news-categories {
margin-bottom: 15px;
}
.category-item {
padding: 8px 0;
border-bottom: 1px dashed #eee;
transition: var(--transition);
}
.category-item:last-child {
border-bottom: none;
}
.category-item:hover {
padding-left: 8px;
}
.category-item a {
display: flex;
justify-content: space-between;
align-items: center;
}
.category-item i {
color: var(--secondary-color);
transition: var(--transition);
}
.category-item:hover i {
transform: translateX(5px);
}
.category-item.active {
color: var(--primary-color);
font-weight: 500;
}
.category-count {
background-color: var(--primary-color);
color: white;
padding: 2px 8px;
border-radius: 10px;
font-size: 0.8rem;
}
/* 热门新闻 */
.hot-news-item {
display: flex;
padding: 12px 0;
border-bottom: 1px dashed #eee;
transition: var(--transition);
}
.hot-news-item:last-child {
border-bottom: none;
}
.hot-news-item:hover {
transform: translateY(-3px);
}
.hot-news-img {
width: 80px;
height: 60px;
border-radius: 4px;
margin-right: 12px;
overflow: hidden;
flex-shrink: 0;
}
.hot-news-img img {
width: 100%;
height: 100%;
object-fit: cover;
}
.hot-news-info {
flex-grow: 1;
}
.hot-news-info h4 {
font-size: 0.9rem;
margin-bottom: 5px;
line-height: 1.3;
}
.hot-news-date {
font-size: 0.8rem;
color: var(--gray-color);
display: flex;
align-items: center;
}
.hot-news-date i {
margin-right: 5px;
font-size: 0.7rem;
}
/* 热门产品 */
.hot-product-item {
display: flex;
padding: 12px 0;
border-bottom: 1px dashed #eee;
transition: var(--transition);
}
.hot-product-item:last-child {
border-bottom: none;
}
.hot-product-item:hover {
transform: translateY(-3px);
}
.hot-product-img {
width: 80px;
height: 60px;
border-radius: 4px;
margin-right: 12px;
overflow: hidden;
flex-shrink: 0;
}
.hot-product-img img {
width: 100%;
height: 100%;
object-fit: cover;
}
.hot-product-info {
flex-grow: 1;
}
.hot-product-info h4 {
font-size: 0.9rem;
margin-bottom: 5px;
line-height: 1.3;
color: var(--primary-color);
}
.hot-product-model {
font-size: 0.8rem;
color: var(--gray-color);
margin-bottom: 3px;
}
.hot-product-price {
font-size: 0.85rem;
color: #e74c3c;
font-weight: 500;
}
/* 标签云 */
.tag-cloud {
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.cloud-tag {
display: inline-block;
padding: 6px 12px;
background-color: white;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 0.9rem;
transition: var(--transition);
}
.cloud-tag:hover {
background-color: var(--primary-color);
color: white;
border-color: var(--primary-color);
}
/* 相关产品 */
.related-products {
padding: 60px 0;
background-color: #f5f7fa;
}
.section-title {
text-align: center;
margin-bottom: 50px;
}
.section-title h2 {
font-size: 2.2rem;
color: var(--primary-color);
margin-bottom: 15px;
position: relative;
display: inline-block;
padding-bottom: 15px;
}
.section-title h2:after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 80px;
height: 3px;
background-color: var(--secondary-color);
}
.section-title p {
color: var(--gray-color);
font-size: 1.1rem;
max-width: 700px;
margin: 0 auto;
}
/* 核心方案：宽屏强制4列，窄屏自动降级 */
.products-grid {
display: grid;
/* 基础设置：默认4列，每列平均分配 */
grid-template-columns: repeat(4, 1fr);
gap: 25px;
width: 100%;
/* 关键：移除可能限制宽度的max-width，或设置足够大的值 */
max-width: 1400px; /* 确保能容纳4列+间距 */
margin: 0 auto;
padding: 0 15px;
box-sizing: border-box;
}
/* 确保卡片内容不影响布局 */
.product-card {
width: 100%;
}
.product-img img {
width: 100%;
height: auto;
display: block;
}
.product-content {
padding: 10px;
font-size: 14px;
}
.product-content h3 {
font-size: 0.7rem;
margin-bottom: 10px;
color: var(--primary-color);
}
.product-content p {
color: var(--gray-color);
margin-bottom: 15px;
}
.product-link {
color: var(--primary-color);
font-weight: 500;
display: inline-flex;
align-items: center;
}
.product-link i {
margin-left: 5px;
transition: var(--transition);
}
.product-link:hover i {
transform: translateX(5px);
}
/* 询价表单 */
.inquiry-form-section {
padding: 60px 0;
background-color: #f5f7fa;
}
.inquiry-form-container {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 40px;
align-items: center;
}
.inquiry-info h2 {
font-size: 2rem;
color: var(--primary-color);
margin-bottom: 20px;
}
.inquiry-info p {
margin-bottom: 30px;
line-height: 1.8;
}
.inquiry-contact {
background-color: var(--light-color);
padding: 25px;
border-radius: 8px;
}
.inquiry-contact h3 {
color: var(--primary-color);
margin-bottom: 20px;
}
.contact-detail {
display: flex;
margin-bottom: 20px;
}
.contact-icon {
width: 50px;
height: 50px;
background-color: white;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin-right: 15px;
color: var(--primary-color);
font-size: 20px;
box-shadow: var(--box-shadow);
}
.contact-text h4 {
font-size: 1.1rem;
margin-bottom: 5px;
color: var(--primary-color);
}
.contact-text p {
margin-bottom: 0;
}
.contact-form {
background-color: var(--light-color);
padding: 30px;
border-radius: 8px;
}
.contact-form h3 {
font-size: 1.5rem;
color: var(--primary-color);
margin-bottom: 25px;
}
.form-group {
margin-bottom: 20px;
}
.form-group label {
display: block;
margin-bottom: 8px;
font-weight: 500;
color: var(--dark-color);
}
.form-control {
width: 100%;
padding: 12px 15px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 16px;
transition: var(--transition);
}
.form-control:focus {
border-color: var(--primary-color);
outline: none;
box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}
textarea.form-control {
min-height: 120px;
resize: vertical;
}
.form-btn {
background-color: var(--primary-color);
color: white;
border: none;
padding: 12px 25px;
border-radius: 4px;
font-size: 16px;
font-weight: 500;
cursor: pointer;
transition: var(--transition);
}
.form-btn:hover {
background-color: var(--accent-color);
}
/* 按钮样式 */
.btn {
display: inline-block;
padding: 12px 28px;
border-radius: 4px;
font-weight: 500;
transition: var(--transition);
cursor: pointer;
text-align: center;
}
.btn-primary {
background-color: var(--secondary-color);
color: var(--primary-color);
border: none;
}
.btn-primary:hover {
background-color: #e6b800;
transform: translateY(-3px);
box-shadow: var(--box-shadow);
}
/* 页脚 */
footer {
background-color: var(--primary-color);
color: white;
padding: 60px 0 20px;
}
.footer-content {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 40px;
margin-bottom: 40px;
}
.footer-column h3 {
font-size: 1.3rem;
margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-column p {
margin-bottom: 15px;
opacity: 0.8;
}
.footer-column ul li {
margin-bottom: 10px;
}
.footer-column ul li a {
opacity: 0.8;
transition: var(--transition);
}
.footer-column ul li a:hover {
opacity: 1;
color: var(--secondary-color);
padding-left: 5px;
}
.footer-bottom {
text-align: center;
padding-top: 20px;
border-top: 1px solid rgba(255, 255, 255, 0.1);
font-size: 14px;
opacity: 0.8;
}
/* 响应式设计 */
@media (max-width: 992px) {
.news-detail-wrapper {
grid-template-columns: 1fr;
}
.inquiry-form-container {
grid-template-columns: 1fr;
}
.products-grid {
grid-template-columns: repeat(3, 1fr);
}
nav ul {
display: none;
flex-direction: column;
position: absolute;
top: 100%;
left: 0;
right: 0;
background-color: white;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
padding: 20px;
}
nav ul.show {
display: flex;
}
.mobile-menu-btn {
display: flex;
}
}
@media (max-width: 768px) {
.top-info-content {
flex-direction: column;
gap: 10px;
text-align: center;
}
.related-news-grid, .related-products-grid {
grid-template-columns: 1fr;
}
.news-title {
font-size: 1rem;
}
.news-meta {
flex-direction: column;
gap: 10px;
align-items: flex-start;
}
.products-grid {
grid-template-columns: repeat(2, 1fr);
}
}
@media (max-width: 480px) {
/* 手机显示1列 */
.products-grid {
grid-template-columns: 1fr;
}
}
/* 动画效果 */
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.fade-in {
animation: fadeIn 1s ease forwards;
}