/* ============================================
   csplan.cn 企业官网样式
   设计参考：芯烨官网 xprinter.net
   主色：#0066cc  深色：#1a2a4a
   ============================================ */

/* ===== 基础重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif; color: #333; line-height: 1.6; background: transparent; }
body.home { background: transparent !important; }
a { color: #0066cc; text-decoration: none; transition: color 0.3s; }
a:hover { color: #004999; }
img { max-width: 100%; height: auto; }
/* 内容区域内的图片自动缩放 */
.page-content img, .product-content img, .news-content img, .about-text img { max-width: 100%; height: auto; border-radius: 4px; margin: 10px 0; }
ul { list-style: none; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* ===== 顶部信息条 ===== */
.top-bar { background: transparent; color: #fff; font-size: 13px; padding: 8px 0; }
.top-bar-inner { display: flex; justify-content: space-between; align-items: center; }
.top-bar-left span { margin-right: 20px; }
.top-bar-left i { margin-right: 5px; color: #4da6ff; }
.top-bar-right a { color: #fff; margin-left: 15px; font-size: 16px; }
.top-bar-right a:hover { color: #4da6ff; }

/* ===== 主导航（全透明，无渐变背景） ===== */
.main-header { padding: 15px 0; box-shadow: none !important; position: sticky; top: 0; z-index: 1000; background: transparent !important; }
body.home .main-header { position: absolute; top: 0; left: 0; right: 0; z-index: 1000; }
.main-nav a { color: #444 !important; }
.main-nav a:hover, .main-nav .active a { color: #FF6A00 !important; }
body.home .main-nav a { color: #fff !important; }
body.home .main-nav a:hover, body.home .main-nav .active a { color: #FF6A00 !important; }
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.logo a { display: flex; align-items: center; }
.logo img { max-height: 40px; max-width: 200px; width: auto; height: auto; object-fit: contain; }
.logo-text { font-size: 24px; font-weight: bold; color: #0066cc; }
body.home .logo-text { color: #fff !important; }
body.home .header-phone,
body.home .header-phone a,
body.home .header-phone i { color: #fff !important; }
body.home .header-phone .phone-label { color: rgba(255,255,255,0.7) !important; }
.main-nav ul { display: flex; gap: 30px; }
.main-nav a { color: #333; font-size: 15px; padding: 8px 0; display: block; position: relative; }
.main-nav a:hover, .main-nav .active a { color: #FF6A00; }
.main-nav li { position: relative; }
.main-nav .sub-menu { display: none; position: absolute; top: 100%; left: 0; background: #fff; box-shadow: 0 8px 30px rgba(0,0,0,0.12); min-width: 180px; z-index: 100; }
.main-nav li:hover .sub-menu { display: block; }
.sub-menu a { padding: 10px 20px; border-bottom: 1px solid #f0f0f0; list-style: disc; padding-left: 30px; }
.sub-menu a:hover { background: #FF6A00 !important; color: #fff !important; }
body:not(.home) .sub-menu a:hover { background: #f5f9ff; color: #FF6A00 !important; }
.header-phone { display: flex; align-items: center; gap: 10px; }
.header-phone i { font-size: 20px; color: #0066cc; }
.phone-label { font-size: 12px; color: #888; display: block; }
.header-phone a { font-size: 18px; font-weight: bold; color: #0066cc; }
.mobile-menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 5px; }
.mobile-menu-toggle span { display: block; width: 25px; height: 3px; background: #333; margin: 5px 0; transition: 0.3s; }

/* ===== 幻灯片 ===== */
.slider { position: relative; height: 100vh; min-height: 600px; overflow: hidden; }
.slider .swiper-container { width: 100%; height: 100%; }
.slider .swiper-slide { position: relative; width: 100%; height: 100%; overflow: hidden; }
.slider .swiper-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slider .banner-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.35); z-index: 1; pointer-events: none; }
.slider .banner-placeholder { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.slider .banner-text {
    position: absolute;
    bottom: 60px;
    right: 40px;
    text-align: right;
    color: #fff;
    padding: 0 20px;
    max-width: 500px;
    width: 100%;
    z-index: 2;
}
.slider .banner-text.banner-text-right {
    bottom: 60px;
    right: 40px;
    text-align: right;
}
.slider .banner-title-link { color: #fff; text-decoration: none; display: block; }
.slider .banner-title-link:hover { color: #4da6ff; }
.slider .banner-text h2 { font-size: 28px; font-weight: 600; margin-bottom: 0; line-height: 1.4; text-shadow: 0 2px 20px rgba(0,0,0,0.6); letter-spacing: 1px; color: #ddd; }
.slider .banner-text p { font-size: 16px; margin-bottom: 20px; opacity: 0.95; line-height: 1.6; }
.slider .banner-text .btn-primary,
.slider .banner-text .btn-outline { display: inline-block; padding: 15px 40px; border-radius: 4px; font-size: 16px; margin: 0 10px; transition: 0.3s; }
.slider .banner-text .btn-primary { background: #0066cc; color: #fff; }
.slider .banner-text .btn-primary:hover { background: #004999; }
.slider .banner-text .btn-outline { border: 2px solid #fff; color: #fff; }
.slider .banner-text .btn-outline:hover { background: #fff; color: #0066cc; }
.slider .swiper-pagination { bottom: 30px; }
.slider .swiper-pagination-bullet { background: #fff; opacity: 0.5; width: 12px; height: 12px; }
.slider .swiper-pagination-bullet-active { opacity: 1; background: #fff; }
.slider .swiper-button-prev,
.slider .swiper-button-next { color: #fff; background: rgba(0,0,0,0.3); width: 50px; height: 50px; border-radius: 50%; }
.slider .swiper-button-prev:after,
.slider .swiper-button-next:after { font-size: 20px; }

/* ===== 快速导航条 ===== */
.quick-nav { background: #0066cc; padding: 20px 0; }
.quick-nav-inner { display: flex; justify-content: center; gap: 40px; }
.quick-nav-item { text-align: center; color: #fff; }
.quick-nav-item i { font-size: 28px; display: block; margin-bottom: 8px; }
.quick-nav-item span { font-size: 14px; }

/* ===== 数据统计 ===== */
.stats-section { background: #f8f9fa; padding: 60px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; text-align: center; }
.stat-item h3 { font-size: 42px; font-weight: bold; margin-bottom: 10px; color: #0066cc; }
.stat-item p { font-size: 16px; color: #666; }

/* ===== 通用区块 ===== */
.section { padding: 80px 0; }
.section-light { background: #fff; }
.section-title { text-align: center; margin-bottom: 50px; }
.section-title h2 { font-size: 36px; color: #0066cc; margin-bottom: 15px; }
.section-title p { color: #666; font-size: 16px; }
.btn { display: inline-block; padding: 12px 30px; border-radius: 4px; font-size: 15px; transition: 0.3s; cursor: pointer; border: none; }
.btn-primary { background: #0066cc; color: #fff; }
.btn-primary:hover { background: #004999; color: #fff; }
.btn-outline { border: 2px solid #0066cc; color: #0066cc; background: transparent; }
.btn-outline:hover { background: #0066cc; color: #fff; }

/* ===== 产品展示 ===== */
.products-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.product-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.08); transition: transform 0.3s, box-shadow 0.3s; }
.product-card:hover { transform: translateY(-5px); box-shadow: 0 8px 30px rgba(0,0,0,0.12); }
.product-card img { width: 100%; height: 200px; object-fit: cover; }
.product-card-body { padding: 20px; }
.product-card h3 { font-size: 18px; margin-bottom: 10px; }
.product-card p { color: #666; font-size: 14px; margin-bottom: 15px; }
.product-card .price { color: #e53935; font-size: 20px; font-weight: bold; }

/* ===== 关于我们 ===== */
.about-section { background: #fff; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.about-text h2 { font-size: 36px; color: #0066cc; margin-bottom: 20px; }
.about-text p { color: #555; line-height: 1.8; margin-bottom: 20px; }
.about-image img { width: 100%; max-height: 400px; object-fit: cover; border-radius: 8px; }

/* ===== 新闻资讯 ===== */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.news-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.news-card img { width: 100%; height: 200px; object-fit: cover; }
.news-card-body { padding: 20px; }
.news-card .date { color: #999; font-size: 13px; margin-bottom: 10px; }
.news-card h3 { font-size: 18px; margin-bottom: 10px; line-height: 1.4; }
.news-card h3 a { color: #333; }
.news-card h3 a:hover { color: #0066cc; }
.news-card p { color: #666; font-size: 14px; }

/* ===== CTA区块 ===== */
.cta-section { background: #333; padding: 60px 0; text-align: center; color: #fff; }
.cta-section h2 { font-size: 36px; margin-bottom: 20px; }
.cta-section p { font-size: 18px; margin-bottom: 30px; color: #ccc; }

/* ===== 页脚 ===== */
.site-footer { background: #222; color: #aaa; padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; margin-bottom: 40px; }
.footer-widget h3 { color: #fff; font-size: 18px; margin-bottom: 20px; position: relative; padding-bottom: 10px; }
.footer-widget h3::after { content: ''; position: absolute; bottom: 0; left: 0; width: 40px; height: 3px; background: #0066cc; }
.footer-widget ul li { margin-bottom: 10px; }
.footer-widget ul a { color: #aaa; }
.footer-widget ul a:hover { color: #0066cc; }
.footer-contact p { margin-bottom: 12px; font-size: 14px; }
.footer-contact i { margin-right: 8px; color: #0066cc; }
.qrcode-placeholder { text-align: center; }
.qrcode-box { width: 120px; height: 120px; background: #fff; margin: 0 auto; display: flex; align-items: center; justify-content: center; border-radius: 8px; color: #999; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 20px 0; text-align: center; font-size: 14px; color: #888; }
.footer-bottom a { color: #0066cc; }

/* ===== 回到顶部 ===== */
.back-to-top { position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px; background: #0066cc; color: #fff; border: none; border-radius: 50%; font-size: 20px; cursor: pointer; opacity: 0; visibility: hidden; transition: 0.3s; z-index: 1000; }
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: #004999; }

/* ===== 响应式 ===== */
@media (max-width: 992px) {
    .products-grid, .news-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .about-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .mobile-menu-toggle { display: block; }
    .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; box-shadow: 0 8px 30px rgba(0,0,0,0.12); }
    .main-nav.active { display: block; }
    .main-nav ul { flex-direction: column; padding: 20px; }
    .main-nav .sub-menu { position: static; box-shadow: none; padding-left: 20px; }
    .header-phone { display: none; }
    .slider { height: 300px; }
    .banner-text h2 { font-size: 28px; }
    .banner-text p { font-size: 14px; }
    .quick-nav-inner { flex-wrap: wrap; gap: 20px; }
    .products-grid, .news-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; }
}
