/* 企业官网 CMS - 前端样式 */

/* ========== Reset ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif; color: #333; background: #fff; line-height: 1.7; font-size: 15px; }
a { color: var(--primary, #2563eb); text-decoration: none; }
a:hover { color: var(--primary-dark, #1e40af); }
img { max-width: 100%; height: auto; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ========== Header ========== */
.site-header { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.08); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; }
.logo-img { max-height: 40px; }
.logo-text { font-size: 22px; font-weight: 700; color: #1a1a2e; }

.site-nav ul { display: flex; list-style: none; gap: 4px; }
.site-nav a { display: block; padding: 8px 18px; font-size: 15px; color: #555; border-radius: 6px; transition: all .2s; }
.site-nav a:hover, .site-nav a.active { color: #fff; background: var(--primary, #2563eb); }

.menu-toggle { display: none; background: none; border: none; font-size: 26px; cursor: pointer; color: #333; padding: 4px 8px; }

/* ========== Hero ========== */
.hero { background: linear-gradient(135deg, var(--primary, #2563eb), var(--primary-dark, #1e40af)); padding: 80px 0; text-align: center; color: #fff; }
.hero h1 { font-size: 40px; margin-bottom: 16px; font-weight: 700; }
.hero-desc { font-size: 18px; opacity: 0.9; max-width: 600px; margin: 0 auto; }

/* ========== Sections ========== */
.section { padding: 60px 0; }
.section.bg-gray { background: #f7f8fa; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: 30px; color: #1a1a2e; margin-bottom: 8px; }
.section-subtitle { font-size: 15px; color: #777; }
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }

/* ========== Breadcrumb ========== */
.breadcrumb { font-size: 13px; color: #999; margin-bottom: 24px; }
.breadcrumb a { color: #666; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: #333; }

/* ========== Page Banner ========== */
.page-banner { background: linear-gradient(135deg, var(--primary, #2563eb), var(--primary-dark, #1e40af)); padding: 50px 0; text-align: center; color: #fff; }
.page-banner h1 { font-size: 32px; margin-bottom: 8px; }
.page-banner p { font-size: 15px; opacity: 0.85; }

/* ========== Buttons ========== */
.btn { display: inline-block; padding: 10px 24px; border-radius: 6px; font-size: 15px; cursor: pointer; border: 2px solid transparent; transition: all .2s; text-align: center; }
.btn-primary { background: var(--primary, #2563eb); color: #fff; border-color: var(--primary, #2563eb); }
.btn-primary:hover { background: var(--primary-dark, #1e40af); border-color: var(--primary-dark, #1e40af); color: #fff; text-decoration: none; }
.btn-outline { background: transparent; color: var(--primary, #2563eb); border-color: var(--primary, #2563eb); }
.btn-outline:hover { background: var(--primary, #2563eb); color: #fff; text-decoration: none; }

/* ========== Content Body ========== */
.content-body { line-height: 1.9; color: #444; }
.content-body p { margin-bottom: 16px; }
.content-body h1, .content-body h2, .content-body h3, .content-body h4 { margin-top: 28px; margin-bottom: 12px; color: #1a1a2e; }
.content-body h2 { font-size: 24px; }
.content-body h3 { font-size: 20px; }
.content-body img { max-width: 100%; height: auto; border-radius: 8px; margin: 16px 0; }
.content-body ul, .content-body ol { margin-bottom: 16px; padding-left: 24px; }
.content-body li { margin-bottom: 6px; }

/* ========== Product Grid ========== */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.product-card { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.06); transition: transform .2s, box-shadow .2s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); }
.product-card-img { height: 200px; overflow: hidden; }
.product-card-img img { width: 100%; height: 100%; object-fit: cover; }
.product-card-body { padding: 20px; }
.product-card-body h3 { margin-bottom: 10px; font-size: 18px; }
.product-card-body h3 a { color: #1a1a2e; }
.product-card-body h3 a:hover { color: var(--primary); }
.product-card-body p { color: #666; font-size: 14px; margin-bottom: 16px; line-height: 1.6; }

/* ========== News Grid ========== */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.news-card { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.06); transition: transform .2s; }
.news-card:hover { transform: translateY(-3px); }
.news-card-img { height: 180px; overflow: hidden; }
.news-card-img img { width: 100%; height: 100%; object-fit: cover; }
.news-card-body { padding: 20px; }
.news-date { font-size: 12px; color: #999; }
.news-card-body h3 { margin: 8px 0; font-size: 17px; }
.news-card-body h3 a { color: #1a1a2e; }
.news-card-body h3 a:hover { color: var(--primary); }
.news-card-body p { color: #666; font-size: 14px; line-height: 1.6; }

/* ========== News List ========== */
.news-list-item { display: flex; gap: 24px; padding: 24px 0; border-bottom: 1px solid #eee; }
.news-list-img { width: 200px; height: 140px; flex-shrink: 0; border-radius: 8px; overflow: hidden; }
.news-list-img img { width: 100%; height: 100%; object-fit: cover; }
.news-list-body { flex: 1; }
.news-list-body h3 { font-size: 19px; margin-bottom: 8px; }
.news-list-body h3 a { color: #1a1a2e; }
.news-list-body h3 a:hover { color: var(--primary); }
.news-meta { font-size: 13px; color: #999; margin-bottom: 10px; display: flex; gap: 16px; }
.news-list-body p { color: #666; font-size: 14px; margin-bottom: 12px; }

/* ========== Product Detail ========== */
.product-detail { display: grid; grid-template-columns: 1fr; gap: 30px; }
.product-detail-img { border-radius: 10px; overflow: hidden; }
.product-detail-img img { width: 100%; }

/* ========== Article Detail ========== */
.article-detail { max-width: 800px; margin: 0 auto; }
.article-title { font-size: 28px; color: #1a1a2e; margin-bottom: 16px; line-height: 1.4; }
.article-meta { font-size: 13px; color: #999; margin-bottom: 24px; display: flex; gap: 20px; }
.article-image { border-radius: 10px; overflow: hidden; margin-bottom: 24px; }
.article-image img { width: 100%; }
.article-nav { display: flex; justify-content: space-between; margin-top: 40px; padding-top: 24px; border-top: 1px solid #eee; }
.article-nav-link { color: #555; font-size: 14px; max-width: 45%; }
.article-nav-link:hover { color: var(--primary); }

/* ========== Contact ========== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 40px; align-items: start; }
.contact-info h2, .contact-form-wrap h2 { font-size: 24px; margin-bottom: 24px; color: #1a1a2e; }
.contact-info-item { margin-bottom: 20px; }
.contact-info-item h3 { font-size: 15px; color: #888; margin-bottom: 4px; }
.contact-info-item p { font-size: 16px; color: #333; }

.contact-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.contact-tile { text-align: center; padding: 30px 20px; background: #fff; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.contact-icon { font-size: 32px; display: block; margin-bottom: 12px; }
.contact-tile h3 { font-size: 15px; color: #888; margin-bottom: 6px; }
.contact-tile p { font-size: 15px; color: #333; }

/* ========== Form ========== */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14px; color: #444; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 10px 14px; border: 1px solid #d9d9d9; border-radius: 8px;
    font-size: 14px; font-family: inherit; transition: border-color .2s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none; border-color: var(--primary, #2563eb); box-shadow: 0 0 0 2px rgba(37,99,235,0.1);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }
.alert-success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.alert-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }

/* ========== Pagination ========== */
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 36px; }
.page-num, .page-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 12px; border-radius: 6px; font-size: 14px; color: #555; background: #f5f5f5; }
.page-num.active { background: var(--primary, #2563eb); color: #fff; }
.page-num:hover:not(.active), .page-btn:hover { background: #e5e5e5; color: #333; }
.page-dots { padding: 0 4px; color: #999; }

/* ========== About Preview ========== */
.about-preview { max-width: 800px; margin: 0 auto; }

/* ========== Empty State ========== */
.empty-state { text-align: center; padding: 60px 0; color: #999; }

/* ========== Footer ========== */
.site-footer { background: #1a1a2e; color: #ccc; padding-top: 40px; }
.footer-inner { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; padding-bottom: 30px; }
.footer-info h3, .footer-links h3 { color: #fff; font-size: 18px; margin-bottom: 14px; }
.footer-info p { font-size: 14px; margin-bottom: 6px; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: #aaa; font-size: 14px; }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 16px 0; text-align: center; font-size: 13px; color: #888; }
.footer-bottom a { color: #888; }

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .site-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
    .site-nav.open { display: block; }
    .site-nav ul { flex-direction: column; }
    .site-nav a { border-radius: 0; padding: 14px 20px; }
    .menu-toggle { display: block; }
    .hero h1 { font-size: 28px; }
    .hero { padding: 50px 0; }
    .section { padding: 40px 0; }
    .section-title h2 { font-size: 24px; }
    .product-grid, .news-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .contact-tiles { grid-template-columns: 1fr; }
    .news-list-item { flex-direction: column; }
    .news-list-img { width: 100%; height: 180px; }
    .footer-inner { grid-template-columns: 1fr; gap: 24px; }
    .form-row { grid-template-columns: 1fr; }
    .article-title { font-size: 22px; }
}
