/* ========================================
   企业CMS - 前台样式
   ======================================== */

/* 基础重置 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif; font-size: 14px; color: #333; line-height: 1.6; background: #fff; }
a { color: #0d3b66; text-decoration: none; transition: color 0.3s; }
a:hover { color: #00d2d3; }
img { max-width: 100%; height: auto; }
ul { list-style: none; }

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

/* 顶部导航 */
.site-header { background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.08); position: sticky; top: 0; z-index: 1000; }
.site-header .container { padding: 0 20px; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 80px; }
.logo h1 { font-size: 24px; color: #0d3b66; font-weight: 600; }
.logo img { height: 50px; }
.header-nav { display: flex; gap: 30px; }
.header-nav a { font-size: 15px; color: #333; padding: 8px 0; position: relative; }
.header-nav a:hover, .header-nav a.active { color: #00d2d3; }
.header-nav a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: #00d2d3; transition: width 0.3s; }
.header-nav a:hover::after, .header-nav a.active::after { width: 100%; }
.header-search { display: flex; }
.header-search input { width: 180px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 20px 0 0 20px; outline: none; }
.header-search button { padding: 8px 15px; border: 1px solid #00d2d3; background: #00d2d3; color: #fff; border-radius: 0 20px 20px 0; cursor: pointer; }

/* 幻灯片 */
.hero-section { background: linear-gradient(135deg, #0d3b66 0%, #1a5a8a 100%); padding: 30px 0; }
.hero-slider { position: relative; border-radius: 12px; overflow: hidden; }
.slides { display: flex; transition: transform 0.5s; }
.slide-item { min-width: 100%; position: relative; }
.slide-item img { width: 100%; height: 400px; object-fit: cover; }
.slide-caption { position: absolute; bottom: 0; left: 0; right: 0; padding: 20px 30px; background: linear-gradient(transparent, rgba(0,0,0,0.7)); color: #fff; font-size: 18px; }
.slide-placeholder { height: 300px; display: flex; align-items: center; justify-content: center; background: #1a5a8a; color: rgba(255,255,255,0.7); }
.slide-nav span { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 60px; background: rgba(0,0,0,0.5); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 20px; border-radius: 4px; }
.slide-nav .prev { left: 10px; }
.slide-nav .next { right: 10px; }
.slide-nav span:hover { background: rgba(0,0,0,0.7); }

/* 核心优势 */
.features-section { padding: 50px 0; background: #fff; }
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.feature-item { text-align: center; padding: 30px 20px; border-radius: 12px; background: #f8f9fa; transition: transform 0.3s, box-shadow 0.3s; }
.feature-item:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.feature-icon { font-size: 48px; margin-bottom: 15px; }
.feature-item h3 { font-size: 18px; color: #0d3b66; margin-bottom: 10px; }
.feature-item p { font-size: 14px; color: #666; }

/* 通用区块 */
.section { padding: 60px 0; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; padding-bottom: 15px; border-bottom: 2px solid #00d2d3; }
.section-header h2 { font-size: 24px; color: #0d3b66; }
.section-header .more { color: #00d2d3; font-size: 14px; }

/* 新闻列表 */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.news-item { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.06); transition: transform 0.3s; }
.news-item:hover { transform: translateY(-5px); }
.news-pic { height: 180px; overflow: hidden; }
.news-pic img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.news-item:hover .news-pic img { transform: scale(1.05); }
.news-content { padding: 20px; }
.news-content h3 { font-size: 16px; margin-bottom: 10px; line-height: 1.4; }
.news-content h3 a { color: #333; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-content h3 a:hover { color: #00d2d3; }
.news-meta { display: flex; gap: 15px; color: #999; font-size: 12px; margin-bottom: 10px; }
.news-desc { color: #666; font-size: 13px; }

/* 产品展示 */
.products-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; }
.product-item { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.product-pic { position: relative; height: 200px; overflow: hidden; }
.product-pic img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.product-item:hover .product-pic img { transform: scale(1.05); }
.product-pic .no-pic { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: #f0f0f0; color: #999; }
.product-price { position: absolute; bottom: 10px; right: 10px; background: #e74c3c; color: #fff; padding: 5px 12px; border-radius: 20px; font-size: 14px; font-weight: 600; }
.product-info { padding: 15px; }
.product-info h3 { font-size: 15px; margin-bottom: 8px; }
.product-info h3 a { color: #333; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.product-info p { font-size: 13px; color: #666; }

/* 空状态 */
.empty-state { grid-column: 1 / -1; text-align: center; padding: 60px 0; color: #999; }

/* 底部 */
.site-footer { background: #0d3b66; color: rgba(255,255,255,0.8); padding: 50px 0 20px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; margin-bottom: 40px; }
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 20px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: rgba(255,255,255,0.7); }
.footer-col ul li a:hover { color: #00d2d3; }
.qr-code { width: 100px; height: 100px; background: rgba(255,255,255,0.1); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 12px; color: rgba(255,255,255,0.5); }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 13px; }
.footer-bottom p { margin-bottom: 5px; }
.footer-bottom a { color: rgba(255,255,255,0.6); }
.footer-bottom a:hover { color: #00d2d3; }

/* 统计代码 */
.stat-code { display: none; }

/* 响应式 */
@media (max-width: 1024px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .news-grid { grid-template-columns: repeat(2, 1fr); }
    .products-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .header-inner { flex-wrap: wrap; height: auto; padding: 15px 0; }
    .header-nav { order: 3; width: 100%; justify-content: center; gap: 15px; flex-wrap: wrap; margin-top: 10px; }
    .header-search { order: 2; }
    .header-search input { width: 150px; }
    .features-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .news-grid { grid-template-columns: 1fr; }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .slide-item img { height: 250px; }
}

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 8px; margin: 30px 0; }
.pagination a { padding: 8px 14px; border: 1px solid #ddd; border-radius: 4px; color: #333; transition: all 0.3s; }
.pagination a:hover { border-color: #00d2d3; color: #00d2d3; }
.pagination a.active { background: #00d2d3; border-color: #00d2d3; color: #fff; }
.pagination .ellipsis { padding: 8px; color: #999; }