/* ========== 前台 CSS ========== */
:root { --primary: #4f46e5; --text: #1e293b; --text-muted: #64748b; --bg: #f8fafc; --radius: 8px; }

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.header { background: #fff; border-bottom: 1px solid #e2e8f0; padding: 16px 0; position: sticky; top: 0; z-index: 100; }
.header .container { display: flex; justify-content: space-between; align-items: center; }
.logo a { font-size: 24px; font-weight: 700; color: var(--text); }
.logo a:hover { text-decoration: none; }
.nav { display: flex; gap: 24px; }
.nav a { color: var(--text-muted); font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--primary); text-decoration: none; }

/* Filter */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; padding: 20px 0; }
.filter-bar + .filter-bar { padding-top: 4px; padding-bottom: 20px; }
.filter-btn { padding: 6px 16px; border: 1px solid #e2e8f0; border-radius: 20px; color: var(--text-muted); font-size: 13px; background: #fff; transition: all 0.15s; }
.filter-btn:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Project Grid */
.project-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding-bottom: 40px; }
.project-card { background: #fff; border: 1px solid #e2e8f0; border-radius: var(--radius); overflow: hidden; transition: all 0.2s; display: block; }
.project-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); transform: translateY(-2px); text-decoration: none; }
.project-thumb { padding: 1.5rem 1.5rem 0 1.5rem; overflow: hidden; background: #fff; aspect-ratio: 1/1; display: flex; align-items: center; }
.project-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 4px; }
.project-info { padding: 16px; text-align: center; }
.project-info h3 { font-size: 16px; color: var(--text); margin-bottom: 8px; line-height: 1.4; }
.project-category { display: inline-block; padding: 2px 8px; background: #ede9fe; color: var(--primary); border-radius: 12px; font-size: 12px; margin-bottom: 8px; }
.project-tags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.tag { display: inline-block; padding: 2px 8px; background: #f1f5f9; color: var(--text-muted); border-radius: 4px; font-size: 11px; }

/* Video Grid */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; padding-bottom: 40px; }
.video-card { display: block; color: inherit; text-decoration: none; background: #fff; border: 1px solid #e2e8f0; border-radius: var(--radius); overflow: hidden; transition: all 0.2s; }
.video-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.video-thumb { width: 100%; height: 180px; overflow: hidden; background: #1e293b; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-info { padding: 16px; }
.video-info h3 { font-size: 16px; margin-bottom: 8px; }
.view-count { font-size: 13px; color: var(--text-muted); margin-left: 8px; }

/* Project Detail */
.project-detail { padding: 40px 20px; max-width: 900px; }
.detail-thumb { width: 100%; min-height: 300px; border-radius: var(--radius); overflow: hidden; margin-bottom: 24px; background: #f1f5f9; display: flex; align-items: center; justify-content: center; }
.detail-thumb img { max-width: 100%; display: block; }
.detail-title { font-size: 28px; margin-bottom: 20px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; padding: 16px; background: #fff; border-radius: var(--radius); border: 1px solid #e2e8f0; }
.meta-item { font-size: 14px; }
.meta-label { color: var(--text-muted); font-weight: 500; }
.detail-tags { display: flex; gap: 6px; margin-bottom: 24px; }
.detail-content { background: #fff; padding: 24px; border-radius: var(--radius); border: 1px solid #e2e8f0; line-height: 1.8; }
.detail-content img { max-width: 100%; height: auto; border-radius: 4px; }
.back-link { display: inline-block; margin-bottom: 20px; font-size: 15px; }

/* Doc Table */
.doc-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid #e2e8f0; margin-bottom: 40px; }
.doc-table th { background: #f8fafc; padding: 12px 16px; text-align: left; font-weight: 600; }
.doc-table td { padding: 12px 16px; border-top: 1px solid #e2e8f0; }
.doc-table tbody tr:hover { background: #f1f5f9; }

/* Footer */
.footer { text-align: center; padding: 32px 0; color: var(--text-muted); font-size: 14px; border-top: 1px solid #e2e8f0; margin-top: 40px; }

/* Empty */
.empty-state { text-align: center; padding: 80px 20px; color: var(--text-muted); font-size: 18px; }

/* Pagination */
.pagination { display: flex; gap: 6px; justify-content: center; padding-bottom: 40px; }
.pagination .page-btn { padding: 6px 14px; border: 1px solid #e2e8f0; border-radius: 6px; background: #fff; color: var(--text); font-size: 14px; }
.pagination .page-btn:hover { background: #f1f5f9; text-decoration: none; }
.pagination .page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-ellipsis { padding: 6px 4px; color: #94a3b8; font-size: 14px; }

/* Breadcrumbs */
.breadcrumbs { padding: 12px 0; font-size: 13px; color: var(--text-muted); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 2px; padding: 0; }
.breadcrumbs a { color: var(--primary); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs .sep { margin: 0 4px; color: #cbd5e1; }
.breadcrumbs [aria-current="page"] { color: var(--text); }

@media (max-width: 1024px) {
    .project-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .project-grid, .video-grid { grid-template-columns: repeat(2, 1fr); }
    .detail-meta { flex-direction: column; gap: 8px; }
    .nav { gap: 12px; }
}

@media (max-width: 480px) {
    .project-grid, .video-grid { grid-template-columns: 1fr; }
}

/* ========== 导航下拉菜单 ========== */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { cursor: pointer; user-select: none; }
.nav-dropdown-menu { display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.1); min-width: 160px; z-index: 200; padding: 8px 0; }
.nav-dropdown-menu a { display: block; padding: 8px 18px; font-size: 14px; color: #1e293b; white-space: nowrap; transition: background 0.15s; }
.nav-dropdown-menu a:hover { background: #f1f5f9; color: #4f46e5; text-decoration: none; }
/* 透明桥接层：填充hover缝隙，保持鼠标移动时菜单不消失 */
.nav-dropdown::after { content: ''; position: absolute; top: 100%; left: -10px; right: -10px; height: 10px; z-index: 199; }
.nav-dropdown:hover .nav-dropdown-menu, .nav-dropdown:focus-within .nav-dropdown-menu { display: block; }
.nav-dropdown-toggle::after { content: ' ▾'; font-size: 10px; }

/* ========== 解决方案页面共享样式 ========== */
.solution-hero { color: #fff; padding: 60px 20px; text-align: center; border-radius: 16px; margin-bottom: 40px; }
.solution-hero h1 { font-size: 36px; margin-bottom: 12px; }
.solution-hero .subtitle { font-size: 18px; opacity: 0.9; max-width: 600px; margin: 0 auto 24px; }
.solution-hero .hero-cta { display: inline-block; padding: 12px 32px; background: #fff; border-radius: 8px; font-weight: 600; font-size: 16px; }
.solution-hero .hero-cta:hover { text-decoration: none; }
.solution-hero.blue { background: linear-gradient(135deg, #4f46e5, #7c3aed); }
.solution-hero.blue .hero-cta { color: #4f46e5; }
.solution-hero.blue .hero-cta:hover { background: #f1f5f9; }
.solution-hero.green { background: linear-gradient(135deg, #059669, #10b981); }
.solution-hero.green .hero-cta { color: #059669; }
.solution-hero.green .hero-cta:hover { background: #f0fdf4; }
.solution-hero.red { background: linear-gradient(135deg, #dc2626, #ea580c); }
.solution-hero.red .hero-cta { color: #dc2626; }
.solution-hero.red .hero-cta:hover { background: #fef2f2; }
.section-title { text-align: center; font-size: 28px; margin-bottom: 8px; }
.section-desc { text-align: center; color: #64748b; margin-bottom: 32px; font-size: 15px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 50px; }
.feature-card { background: #fff; padding: 28px 20px; border-radius: 12px; border: 1px solid #e2e8f0; text-align: center; transition: all 0.2s; }
.feature-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.08); transform: translateY(-2px); }
.feature-card .fi { font-size: 36px; margin-bottom: 12px; }
.feature-card h3 { font-size: 17px; margin-bottom: 8px; color: #1e293b; }
.feature-card p { font-size: 14px; color: #64748b; line-height: 1.6; }
.card-grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 50px; }
.card-grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 50px; }
.card-item { padding: 24px 16px; border-radius: 12px; text-align: center; border: 1px solid #e2e8f0; }
.card-item.fg { background: #f8fafc; }
.card-item.gg { background: #ecfdf5; border-color: #d1fae5; }
.card-item.rg { background: #fef2f2; border-color: #fecaca; }
.card-item .ci { font-size: 32px; margin-bottom: 8px; }
.card-item h3 { font-size: 16px; margin-bottom: 6px; color: #1e293b; }
.card-item p { font-size: 13px; color: #64748b; }
.card-row { background: #fff; padding: 24px; border-radius: 12px; border: 1px solid #e2e8f0; display: flex; gap: 16px; align-items: flex-start; margin-bottom: 0; }
.card-row .cr-icon { font-size: 32px; flex-shrink: 0; }
.card-row h3 { font-size: 17px; margin-bottom: 6px; color: #1e293b; }
.card-row p { font-size: 14px; color: #64748b; line-height: 1.6; }
.stat-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 50px; }
.stat-item { text-align: center; padding: 24px; background: #fff; border-radius: 12px; border: 1px solid #e2e8f0; }
.stat-item .sn { font-size: 32px; font-weight: 700; color: #4f46e5; margin-bottom: 4px; }
.stat-item .sl { font-size: 14px; color: #64748b; }
.cta-section { text-align: center; padding: 50px 20px; border-radius: 16px; margin-bottom: 40px; }
.cta-section.fg { background: #f8fafc; }
.cta-section.gg { background: #ecfdf5; }
.cta-section.rg { background: #fef2f2; }
.cta-section h2 { font-size: 24px; margin-bottom: 12px; }
.cta-section p { color: #64748b; margin-bottom: 24px; }
.cta-btn { display: inline-block; padding: 14px 36px; border-radius: 8px; font-size: 16px; font-weight: 600; }
.cta-btn.blue { background: #4f46e5; color: #fff; }
.cta-btn.blue:hover { background: #4338ca; }
.cta-btn.green { background: #059669; color: #fff; }
.cta-btn.green:hover { background: #047857; }
.cta-btn.red { background: #dc2626; color: #fff; }
.cta-btn.red:hover { background: #b91c1c; }
.breadcrumb-bar { display: flex; gap: 6px; align-items: center; padding: 12px 0; font-size: 13px; color: #94a3b8; }
.breadcrumb-bar a { color: #4f46e5; }
.process-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 50px; }
.process-step { text-align: center; padding: 24px 12px; background: #fff; border-radius: 12px; border: 1px solid #e2e8f0; }
.process-step .psn { font-size: 28px; font-weight: 700; color: #dc2626; margin-bottom: 8px; }
.process-step h3 { font-size: 16px; margin-bottom: 4px; color: #1e293b; }
.process-step p { font-size: 13px; color: #64748b; }
@media (max-width: 1024px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } .card-grid4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .feature-grid, .card-grid4, .card-grid2, .stat-bar, .process-bar { grid-template-columns: 1fr; } .solution-hero h1 { font-size: 26px; } }
