/* ===================================================================
   美硕智能 - 前台样式
   主题：红色 #c0392b + 深蓝 #1a1a2e
   =================================================================== */

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: #2c2c2c;
    background: #fff;
    line-height: 1.7;
    font-size: 15px;
}
a { color: #c0392b; text-decoration: none; transition: color .15s; }
a:hover { color: #962d22; }
img { max-width: 100%; display: block; }
ul, ol { padding-left: 1.5em; }

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 15px;
    cursor: pointer;
    transition: all .15s;
    background: none;
}
.btn-primary { background: #c0392b; color: #fff; border-color: #c0392b; }
.btn-primary:hover { background: #962d22; color: #fff; border-color: #962d22; }
.btn-ghost { background: transparent; color: #c0392b; border-color: #c0392b; }
.btn-ghost:hover { background: #c0392b; color: #fff; }
.btn-light { background: #fff; color: #c0392b; }
.btn-light:hover { background: #f0f0f0; }
.btn-block { display: block; width: 100%; text-align: center; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.topbar { background: #1a1a2e; color: #cfcfe0; font-size: 13px; padding: 8px 0; }
.topbar-inner { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.topbar-sep { color: #444; }
.navbar { padding: 16px 0; border-bottom: 1px solid #f0f0f0; }
.navbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; color: #1a1a2e; }
.brand-logo { height: 44px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 20px; color: #1a1a2e; }
.brand-text small { font-size: 12px; color: #888; margin-top: 2px; }
.nav-menu { display: flex; gap: 6px; align-items: center; }
.nav-link {
    color: #1a1a2e;
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
}
.nav-link:hover, .nav-link.active { background: #c0392b; color: #fff; }

.nav-burger { display: none; cursor: pointer; font-size: 24px; padding: 6px 10px; }
.nav-toggle-input:checked ~ .nav-menu { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: #fff; padding: 10px; box-shadow: 0 4px 12px rgba(0,0,0,.1); }

/* Main */
.site-main { min-height: 60vh; padding: 30px 0 60px; }

/* Hero */
.hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #c0392b 100%);
    color: #fff;
    padding: 80px 0;
    text-align: center;
}
.hero-title { font-size: 38px; font-weight: 700; margin-bottom: 16px; letter-spacing: 1px; }
.hero-tagline { font-size: 18px; opacity: .92; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Stats */
.stats { background: #1a1a2e; color: #fff; padding: 40px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat-item { text-align: center; }
.stat-value { font-size: 36px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.stat-label { font-size: 14px; opacity: .85; }

/* Section */
.section { padding: 60px 0; }
.section-alt { background: #f7f7fa; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 30px; border-bottom: 2px solid #c0392b; padding-bottom: 12px; }
.section-title { font-size: 26px; color: #1a1a2e; font-weight: 700; }
.section-more { font-size: 14px; }
.block-title { font-size: 22px; color: #1a1a2e; font-weight: 700; margin-bottom: 20px; padding-left: 12px; border-left: 4px solid #c0392b; }
.block-title.center { text-align: center; padding-left: 0; border-left: none; }

/* Page banner */
.page-banner {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #fff;
    padding: 50px 0;
    text-align: center;
}
.page-banner h1 { font-size: 30px; font-weight: 700; margin-bottom: 6px; }
.page-banner p { opacity: .85; }

/* Product grid */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.product-card { background: #fff; border: 1px solid #eee; border-radius: 6px; overflow: hidden; transition: all .2s; color: inherit; display: block; }
.product-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.08); transform: translateY(-2px); border-color: #c0392b; }
.product-cover { aspect-ratio: 4/3; background: #f5f5f5; overflow: hidden; }
.product-cover img { width: 100%; height: 100%; object-fit: cover; }
.product-cover-ph { display: flex; align-items: center; justify-content: center; height: 100%; color: #aaa; font-size: 14px; background: #f5f5f5; }
.product-meta { padding: 14px; }
.product-cat { display: inline-block; background: #fdf0ee; color: #c0392b; font-size: 12px; padding: 2px 8px; border-radius: 3px; margin-bottom: 8px; }
.product-name { font-size: 16px; color: #1a1a2e; font-weight: 600; margin-bottom: 6px; line-height: 1.4; }
.product-desc { font-size: 13px; color: #777; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* News grid */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-card { background: #fff; border: 1px solid #eee; border-radius: 6px; overflow: hidden; transition: all .2s; color: inherit; display: block; }
.news-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.08); transform: translateY(-2px); }
.news-cover { aspect-ratio: 16/9; background: #f5f5f5; overflow: hidden; }
.news-cover img { width: 100%; height: 100%; object-fit: cover; }
.news-cover-ph { display: flex; align-items: center; justify-content: center; height: 100%; color: #aaa; background: #f5f5f5; }
.news-meta { padding: 14px; }
.news-date { font-size: 12px; color: #999; }
.news-title { font-size: 16px; color: #1a1a2e; margin: 6px 0; font-weight: 600; line-height: 1.4; }
.news-desc { font-size: 13px; color: #777; }

/* News list */
.news-list { display: flex; flex-direction: column; gap: 16px; }
.news-row { display: grid; grid-template-columns: 220px 1fr; gap: 20px; background: #fff; border: 1px solid #eee; border-radius: 6px; overflow: hidden; padding: 0; transition: all .2s; color: inherit; }
.news-row:hover { box-shadow: 0 4px 16px rgba(0,0,0,.06); border-color: #c0392b; }
.news-row .news-cover { aspect-ratio: 16/10; }
.news-body { padding: 16px 16px 16px 0; }
.news-row .news-meta { padding: 0; display: flex; gap: 12px; margin-bottom: 8px; }
.news-row .news-cat { color: #c0392b; font-size: 12px; }
.news-row .news-title { font-size: 18px; margin: 4px 0 8px; }

/* Case list */
.case-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.case-card { display: grid; grid-template-columns: 240px 1fr; gap: 20px; background: #fff; border: 1px solid #eee; border-radius: 6px; overflow: hidden; transition: all .2s; color: inherit; }
.case-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.06); border-color: #c0392b; }
.case-cover { aspect-ratio: 4/3; background: #f5f5f5; overflow: hidden; }
.case-cover img { width: 100%; height: 100%; object-fit: cover; }
.case-meta { padding: 16px 16px 16px 0; }
.case-cat { display: inline-block; background: #fdf0ee; color: #c0392b; font-size: 12px; padding: 2px 8px; border-radius: 3px; margin-bottom: 8px; }
.case-title { font-size: 18px; color: #1a1a2e; font-weight: 600; margin-bottom: 8px; }
.case-tags { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; color: #666; margin-bottom: 8px; }
.case-desc { font-size: 14px; color: #777; margin-bottom: 8px; }
.case-date { font-size: 12px; color: #999; }

/* Filter bar */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.filter-chip {
    padding: 6px 16px;
    background: #f5f5f5;
    color: #555;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all .15s;
}
.filter-chip:hover { background: #fdf0ee; color: #c0392b; }
.filter-chip.active { background: #c0392b; color: #fff; }

/* Detail */
.detail-head { padding: 30px 0; background: #f7f7fa; }
.detail-head-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.detail-cover { background: #fff; border: 1px solid #eee; border-radius: 6px; overflow: hidden; aspect-ratio: 4/3; }
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-title { font-size: 28px; color: #1a1a2e; font-weight: 700; margin: 10px 0; }
.detail-desc { color: #555; margin: 16px 0; }
.highlights { list-style: none; padding: 0; margin: 20px 0; }
.highlights li { padding: 8px 0; border-bottom: 1px dashed #eee; color: #555; }
.highlights strong { color: #1a1a2e; }
.detail-actions { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }

/* Equip tags */
.equip-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.equip-tag { background: #1a1a2e; color: #fff; padding: 6px 16px; border-radius: 4px; font-size: 14px; }

/* Markdown content */
.md-content { font-size: 15px; color: #333; line-height: 1.8; }
.md-content h1, .md-content h2, .md-content h3, .md-content h4 { color: #1a1a2e; margin: 24px 0 12px; font-weight: 700; line-height: 1.4; }
.md-content h1 { font-size: 26px; border-bottom: 2px solid #c0392b; padding-bottom: 8px; }
.md-content h2 { font-size: 22px; border-left: 4px solid #c0392b; padding-left: 12px; }
.md-content h3 { font-size: 18px; }
.md-content h4 { font-size: 16px; }
.md-content p { margin: 12px 0; }
.md-content ul, .md-content ol { padding-left: 2em; margin: 12px 0; }
.md-content li { margin: 4px 0; }
.md-content blockquote {
    border-left: 4px solid #c0392b;
    background: #fdf0ee;
    padding: 12px 16px;
    color: #555;
    margin: 16px 0;
}
.md-content pre {
    background: #1a1a2e;
    color: #e0e0e0;
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 16px 0;
    font-size: 13px;
    line-height: 1.5;
}
.md-content code { background: #f0f0f0; padding: 2px 6px; border-radius: 3px; font-size: 13px; color: #c0392b; }
.md-content pre code { background: none; color: inherit; padding: 0; }
.md-content img { max-width: 100%; border-radius: 6px; margin: 16px 0; }
.md-content hr { border: none; border-top: 1px dashed #ccc; margin: 24px 0; }
.md-content a { color: #c0392b; text-decoration: underline; }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.about-cover { border-radius: 6px; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.about-content { padding: 20px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-list { list-style: none; padding: 0; }
.contact-list li { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px dashed #eee; }
.ci-icon { font-size: 28px; }
.contact-form-wrap { background: #f7f7fa; padding: 30px; border-radius: 6px; }
.contact-form .form-row { margin-bottom: 16px; }
.contact-form label { display: block; font-size: 14px; color: #444; margin-bottom: 6px; font-weight: 500; }
.req { color: #c0392b; }
.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: #c0392b; outline: none; }
.alert { padding: 12px 16px; border-radius: 4px; margin-bottom: 16px; font-size: 14px; }
.alert-success { background: #e7f7ed; color: #1e7e34; border: 1px solid #b7e4c7; }
.alert-error { background: #fdecea; color: #c0392b; border: 1px solid #f5c2c0; }

/* CTA */
.cta {
    background: linear-gradient(135deg, #c0392b, #962d22);
    color: #fff;
    padding: 50px 0;
    text-align: center;
}
.cta-inner h2 { font-size: 26px; margin-bottom: 12px; }
.cta-inner p { opacity: .9; margin-bottom: 20px; }
.cta-phone { display: block; margin-top: 16px; font-size: 14px; opacity: .85; }

/* Empty state */
.empty-state { text-align: center; padding: 60px 20px; color: #888; }
.empty-state h3 { font-size: 20px; color: #555; margin-bottom: 8px; }

/* News detail */
.news-detail-container { max-width: 820px; margin: 0 auto; }
.news-detail-head { text-align: center; margin-bottom: 30px; }
.news-detail-title { font-size: 28px; color: #1a1a2e; margin: 12px 0; }
.news-detail-cover { margin-bottom: 30px; border-radius: 6px; overflow: hidden; }
.news-detail-foot { margin-top: 30px; padding-top: 20px; border-top: 1px solid #eee; }

/* Footer */
.site-footer { background: #1a1a2e; color: #cfcfe0; padding: 40px 0 0; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; padding-bottom: 30px; }
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 14px; }
.footer-col p { font-size: 13px; margin-bottom: 6px; opacity: .85; }
.footer-col a { color: #cfcfe0; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #2a2a45; padding: 16px 0; text-align: center; font-size: 13px; }
.footer-bottom .container { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.footer-sep { opacity: .5; }
.footer-bottom a { color: #cfcfe0; }

/* ===================== 响应式 ===================== */
@media (max-width: 1024px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .news-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    /* 手机隐藏顶部条 */
    .topbar { display: none; }

    .nav-burger { display: block; }
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        padding: 10px;
        box-shadow: 0 4px 12px rgba(0,0,0,.1);
    }
    .nav-toggle-input:checked ~ .nav-menu { display: flex; }

    .brand-text small { display: none; }
    .hero-title { font-size: 26px; }
    .hero-tagline { font-size: 14px; }
    .hero { padding: 50px 0; }
    .section { padding: 40px 0; }
    .section-title { font-size: 22px; }

    .product-grid { grid-template-columns: 1fr; }
    .news-grid { grid-template-columns: 1fr; }
    .case-list { grid-template-columns: 1fr; }
    .case-card { grid-template-columns: 1fr; }
    .case-cover { aspect-ratio: 16/9; }
    .case-meta { padding: 16px; }
    .news-row { grid-template-columns: 1fr; }
    .news-row .news-cover { aspect-ratio: 16/9; }
    .news-row .news-body { padding: 16px; }

    .detail-head-grid { grid-template-columns: 1fr; gap: 20px; }
    .about-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; }
    .page-banner h1 { font-size: 22px; }
}
