/* ===== CSS Variables ===== */
:root {
    --primary: #1a56db;
    --primary-dark: #1344b0;
    --primary-light: #e8effc;
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --success: #10b981;
    --danger: #ef4444;
    --text: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg: #ffffff;
    --bg-gray: #f9fafb;
    --bg-dark: #111827;
    --border: #e5e7eb;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --shadow: 0 2px 8px rgba(0,0,0,.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,.12);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: .25s ease;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --max-width: 1200px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; overflow-x: hidden; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button, input, textarea, select { font-family: inherit; font-size: inherit; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 16px; }

/* ===== Top Bar ===== */
.top-bar { background: var(--bg-dark); color: #d1d5db; font-size: 13px; padding: 6px 0; }
.top-bar .container { display: flex; justify-content: space-between; align-items: center; }
.top-phone { color: var(--accent); font-weight: 600; display: flex; align-items: center; gap: 4px; }
.top-phone:hover { color: #fbbf24; }

/* ===== Header ===== */
.header { background: var(--bg); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow-sm); }
.header .container { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 20px; color: var(--text); }
.logo:hover { color: var(--primary); }
.logo-icon { color: var(--primary); }
.nav-desktop { display: none; gap: 4px; }
.nav-link { padding: 8px 14px; border-radius: var(--radius); font-size: 14px; font-weight: 500; color: var(--text-secondary); transition: all var(--transition); }
.nav-link:hover, .nav-link.active { color: var(--primary); background: var(--primary-light); }
.nav-cta { background: var(--primary); color: #fff !important; }
.nav-cta:hover { background: var(--primary-dark); }
.nav-toggle { display: flex; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all var(--transition); }
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ===== Mobile Nav ===== */
.nav-mobile { position: fixed; top: 60px; left: 0; right: 0; bottom: 0; background: var(--bg); z-index: 99; display: flex; flex-direction: column; padding: 16px; transform: translateX(100%); transition: transform .3s ease; overflow-y: auto; }
.nav-mobile.open { transform: translateX(0); }
.nav-mobile .nav-link { padding: 14px 16px; font-size: 16px; border-bottom: 1px solid var(--border); color: var(--text); }
.nav-phone-mobile { background: var(--primary); color: #fff !important; border-radius: var(--radius); text-align: center; margin-top: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; border: none !important; }

/* ===== Hero / Banner ===== */
.hero { position: relative; overflow: hidden; }
.hero-slider { position: relative; height: 320px; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; display: flex; align-items: center; justify-content: center; }
.hero-slide.active { opacity: 1; }
.hero-slide-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero-slide-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(26,86,219,.85) 0%, rgba(17,24,39,.7) 100%); }
.hero-content { position: relative; z-index: 2; text-align: center; color: #fff; padding: 20px; max-width: 600px; }
.hero-content h1 { font-size: 28px; font-weight: 800; margin-bottom: 12px; line-height: 1.3; text-shadow: 0 2px 4px rgba(0,0,0,.3); }
.hero-content p { font-size: 16px; opacity: .9; margin-bottom: 20px; }
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 24px; border-radius: var(--radius); font-weight: 600; font-size: 14px; border: none; cursor: pointer; transition: all var(--transition); text-align: center; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); color: #fff; }
.btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.6); }
.btn-outline:hover { background: rgba(255,255,255,.15); color: #fff; border-color: #fff; }
.btn-white { background: #fff; color: var(--primary); }
.btn-white:hover { background: #f0f0f0; color: var(--primary); }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 6px 16px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.hero-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 3; }
.hero-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.4); cursor: pointer; transition: all var(--transition); border: none; }
.hero-dot.active { background: #fff; transform: scale(1.2); }

/* ===== Section ===== */
.section { padding: 48px 0; }
.section-gray { background: var(--bg-gray); }
.section-dark { background: var(--bg-dark); color: #fff; }
.section-header { text-align: center; margin-bottom: 32px; }
.section-header h2 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.section-header p { color: var(--text-secondary); font-size: 15px; }
.section-header .divider { width: 48px; height: 3px; background: var(--primary); margin: 12px auto 0; border-radius: 2px; }

/* ===== Quick Services (Homepage) ===== */
.quick-services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.quick-service-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 16px; text-align: center; transition: all var(--transition); }
.quick-service-card:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-2px); }
.quick-service-icon { width: 48px; height: 48px; margin: 0 auto 12px; background: var(--primary-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--primary); }
.quick-service-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.quick-service-card p { font-size: 13px; color: var(--text-secondary); }

/* ===== Trust Badges ===== */
.trust-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.trust-item { display: flex; align-items: flex-start; gap: 12px; padding: 16px; background: var(--bg); border-radius: var(--radius); border: 1px solid var(--border); }
.trust-icon { flex-shrink: 0; width: 40px; height: 40px; background: var(--primary-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--primary); }
.trust-item h4 { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.trust-item p { font-size: 13px; color: var(--text-secondary); }

/* ===== Service Cards ===== */
.service-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.service-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: all var(--transition); }
.service-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.service-card-img { height: 180px; background: var(--bg-gray); background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; color: var(--text-light); }
.service-card-body { padding: 16px; }
.service-card-body h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.service-card-body p { font-size: 14px; color: var(--text-secondary); margin-bottom: 8px; }
.service-card-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.service-card-meta span { display: flex; align-items: center; gap: 4px; color: var(--primary); font-weight: 500; }
.service-tag { display: inline-block; padding: 2px 8px; background: var(--primary-light); color: var(--primary); border-radius: 4px; font-size: 12px; font-weight: 500; }

/* ===== Case Cards ===== */
.case-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.case-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: all var(--transition); }
.case-card:hover { box-shadow: var(--shadow); }
.case-images { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.case-img { height: 140px; background: var(--bg-gray); background-size: cover; background-position: center; position: relative; display: flex; align-items: center; justify-content: center; color: var(--text-light); font-size: 13px; }
.case-img-label { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.6); color: #fff; padding: 2px 8px; border-radius: 4px; font-size: 11px; }
.case-card-body { padding: 14px; }
.case-card-body h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.case-card-body p { font-size: 13px; color: var(--text-secondary); }

/* ===== Price Table ===== */
.price-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.price-table th { background: var(--primary); color: #fff; padding: 10px 12px; text-align: left; font-weight: 600; }
.price-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.price-table tr:nth-child(even) { background: var(--bg-gray); }
.price-table tr:hover { background: var(--primary-light); }
.price-highlight { color: var(--danger); font-weight: 600; }
.price-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.price-tab { padding: 8px 16px; border-radius: 20px; border: 1px solid var(--border); background: var(--bg); font-size: 14px; cursor: pointer; transition: all var(--transition); color: var(--text-secondary); }
.price-tab:hover, .price-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== Review Cards ===== */
.review-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.review-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }
.review-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.review-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; }
.review-info h4 { font-size: 14px; font-weight: 600; }
.review-stars { color: var(--accent); font-size: 14px; }
.review-content { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }
.review-type { display: inline-block; margin-top: 8px; padding: 2px 8px; background: var(--bg-gray); border-radius: 4px; font-size: 12px; color: var(--text-secondary); }

/* ===== News Cards ===== */
.news-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.news-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: all var(--transition); display: flex; flex-direction: column; }
.news-card:hover { box-shadow: var(--shadow); }
.news-card-img { height: 180px; background: var(--bg-gray); background-size: cover; background-position: center; }
.news-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.news-card-body h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.news-card-body h3 a { color: var(--text); }
.news-card-body h3 a:hover { color: var(--primary); }
.news-card-body p { font-size: 14px; color: var(--text-secondary); flex: 1; }
.news-meta { display: flex; gap: 16px; margin-top: 12px; font-size: 13px; color: var(--text-light); }

/* ===== FAQ ===== */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq-question { padding: 16px; font-weight: 600; font-size: 15px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: background var(--transition); }
.faq-question:hover { background: var(--bg-gray); }
.faq-question::after { content: '+'; font-size: 20px; color: var(--primary); transition: transform var(--transition); }
.faq-item.open .faq-question::after { content: '-'; }
.faq-answer { padding: 0 16px; max-height: 0; overflow: hidden; transition: all .3s ease; font-size: 14px; color: var(--text-secondary); line-height: 1.7; }
.faq-item.open .faq-answer { padding: 0 16px 16px; max-height: 500px; }

/* ===== Contact / Form ===== */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.contact-info-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.contact-info-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.contact-info-item:last-child { border-bottom: none; }
.contact-info-icon { flex-shrink: 0; width: 36px; height: 36px; background: var(--primary-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--primary); }
.contact-info-item h4 { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.contact-info-item p { font-size: 14px; color: var(--text-secondary); }
.contact-info-item a { color: var(--primary); font-weight: 500; }

.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.form-input, .form-select, .form-textarea { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; transition: border-color var(--transition); background: var(--bg); }
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,86,219,.1); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.form-card h3 { font-size: 18px; font-weight: 600; margin-bottom: 16px; }

/* ===== About Page ===== */
.about-hero { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: #fff; padding: 48px 0; text-align: center; }
.about-hero h1 { font-size: 28px; font-weight: 800; margin-bottom: 12px; }
.about-hero p { font-size: 16px; opacity: .9; max-width: 600px; margin: 0 auto; }
.about-section { padding: 40px 0; }
.about-section h2 { font-size: 22px; font-weight: 700; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 2px solid var(--primary); display: inline-block; }
.about-text { font-size: 15px; line-height: 1.8; color: var(--text-secondary); white-space: pre-line; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 24px 0; }
.stat-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; text-align: center; }
.stat-number { font-size: 32px; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 14px; color: var(--text-secondary); margin-top: 4px; }

/* ===== Pagination ===== */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination a, .pagination span { padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; color: var(--text-secondary); transition: all var(--transition); }
.pagination a:hover, .pagination .active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== Breadcrumb ===== */
.breadcrumb { padding: 12px 0; font-size: 13px; color: var(--text-light); }
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 6px; }

/* ===== Page Header ===== */
.page-header { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: #fff; padding: 36px 0; text-align: center; }
.page-header h1 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.page-header p { font-size: 15px; opacity: .85; }

/* ===== FAB ===== */
.fab-group { position: fixed; bottom: 20px; right: 16px; z-index: 90; display: flex; flex-direction: column; gap: 12px; }
.fab { width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: var(--shadow-lg); transition: all var(--transition); }
.fab:hover { transform: scale(1.1); }
.fab-phone { background: var(--success); }
.fab-wechat { background: var(--primary); }

/* ===== Estimate Form ===== */
.estimate-section { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); padding: 40px 0; }
.estimate-form { max-width: 500px; margin: 0 auto; }

/* ===== Category Filter ===== */
.category-filter { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.category-btn { padding: 8px 16px; border-radius: 20px; border: 1px solid var(--border); background: var(--bg); font-size: 14px; cursor: pointer; transition: all var(--transition); color: var(--text-secondary); text-decoration: none; }
.category-btn:hover, .category-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== Article Content ===== */
.article-content { font-size: 15px; line-height: 1.8; }
.article-content h2 { font-size: 20px; font-weight: 700; margin: 24px 0 12px; }
.article-content h3 { font-size: 17px; font-weight: 600; margin: 20px 0 10px; }
.article-content p { margin-bottom: 12px; }
.article-content ul, .article-content ol { margin: 12px 0; padding-left: 24px; }
.article-content li { margin-bottom: 6px; }
.article-content strong { color: var(--text); }

/* ===== Toast ===== */
.toast { position: fixed; top: 80px; left: 50%; transform: translateX(-50%) translateY(-20px); background: var(--bg-dark); color: #fff; padding: 12px 24px; border-radius: var(--radius); font-size: 14px; z-index: 1000; opacity: 0; transition: all .3s ease; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* ===== 404/500 ===== */
.error-page { text-align: center; padding: 80px 20px; }
.error-page h1 { font-size: 72px; font-weight: 800; color: var(--primary); }
.error-page p { font-size: 18px; color: var(--text-secondary); margin: 16px 0 24px; }

/* ===== Desktop Responsive ===== */
@media (min-width: 768px) {
    .nav-desktop { display: flex; }
    .nav-toggle { display: none; }
    .nav-mobile { display: none; }
    .hero-slider { height: 420px; }
    .hero-content h1 { font-size: 38px; }
    .hero-content p { font-size: 18px; }
    .quick-services { grid-template-columns: repeat(4, 1fr); }
    .trust-grid { grid-template-columns: repeat(3, 1fr); }
    .service-grid { grid-template-columns: repeat(2, 1fr); }
    .case-grid { grid-template-columns: repeat(2, 1fr); }
    .review-grid { grid-template-columns: repeat(2, 1fr); }
    .news-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-grid { grid-template-columns: 1fr 1fr; }
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
    .section { padding: 64px 0; }
    .section-header h2 { font-size: 28px; }
    .page-header h1 { font-size: 32px; }
    .about-hero h1 { font-size: 36px; }
}

@media (min-width: 1024px) {
    .hero-slider { height: 480px; }
    .hero-content h1 { font-size: 44px; }
    .service-grid { grid-template-columns: repeat(3, 1fr); }
    .case-grid { grid-template-columns: repeat(3, 1fr); }
    .news-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ===== Footer ===== */
.footer { background: var(--bg-dark); color: #d1d5db; padding: 48px 0 0; margin-top: 48px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
.footer-col h3 { color: #fff; font-size: 20px; margin-bottom: 12px; }
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 12px; }
.footer-col p { font-size: 14px; line-height: 1.6; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: #d1d5db; text-decoration: none; font-size: 14px; transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--accent); }
.footer-desc { font-size: 14px; margin-bottom: 12px; }
.footer-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.footer-badges .badge { background: rgba(255,255,255,.1); color: #d1d5db; padding: 4px 10px; border-radius: 4px; font-size: 12px; }
.footer-contact li { display: flex; align-items: center; gap: 8px; }
.footer-contact li svg { flex-shrink: 0; color: var(--accent); }
.footer-contact li a { color: #d1d5db; text-decoration: none; }
.footer-contact li a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 32px; padding: 20px 0; text-align: center; }
.footer-bottom p { font-size: 13px; color: #9ca3af; margin-bottom: 6px; }
.footer-icp a { color: #9ca3af; text-decoration: none; font-size: 13px; }
.footer-icp a:hover { color: #d1d5db; }

@media (min-width: 768px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.5fr; }
}
