/* ===== 港签合规助手 - 主样式表 ===== */
/* CSS Variables */
:root {
    --primary: #1a56db;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary: #0e7490;
    --secondary-light: #06b6d4;
    --accent-green: #07c160;
    --accent-orange: #f59e0b;
    --accent-red: #ef4444;
    --bg: #f0f4f8;
    --surface: #ffffff;
    --text: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --max-width: 1200px;
    --transition: all 0.25s ease;
}

/* Reset & Base */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }
ul, ol { list-style: none; }

/* Container */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ===== Navigation ===== */
.nav {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}
.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-brand {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
    white-space: nowrap;
}
.nav-brand span { color: var(--secondary); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
    padding: 8px 14px;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.nav-link:hover { background: var(--bg); color: var(--primary); }
.nav-link.active { color: var(--primary); font-weight: 600; }
.nav-cta {
    margin-left: 8px;
    padding: 8px 20px;
    background: var(--accent-green);
    color: #fff;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
}
.nav-cta:hover { background: #06ad56; color: #fff; transform: translateY(-1px); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; font-size: 1.5rem; color: var(--text); }

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 14px rgba(26,86,219,0.35); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(26,86,219,0.4); }
.btn-secondary { background: var(--secondary); color: #fff; box-shadow: 0 4px 14px rgba(14,116,144,0.35); }
.btn-secondary:hover { background: #0c5a72; color: #fff; transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-wechat { background: var(--accent-green); color: #fff; box-shadow: 0 4px 15px rgba(7,193,96,0.4); }
.btn-wechat:hover { background: #06ad56; color: #fff; transform: translateY(-2px); }

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, #1a56db 0%, #0e7490 100%);
    color: #fff;
    padding: 80px 0 70px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
}
.hero-container { position: relative; z-index: 1; text-align: center; }
.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    backdrop-filter: blur(5px);
}
.hero-title {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}
.hero-subtitle {
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 680px;
    margin: 0 auto 32px;
    line-height: 1.7;
}
.hero-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-btn {
    padding: 14px 36px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1.05rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-align: center;
}
.hero-btn-wechat { background: var(--accent-green); color: #fff; box-shadow: 0 4px 15px rgba(7,193,96,0.4); }
.hero-btn-wechat:hover { background: #06ad56; color: #fff; transform: translateY(-2px); }
.hero-btn-outline { background: rgba(255,255,255,0.15); color: #fff; border: 2px solid rgba(255,255,255,0.4); backdrop-filter: blur(5px); }
.hero-btn-outline:hover { background: rgba(255,255,255,0.25); color: #fff; transform: translateY(-2px); }

/* ===== Sections ===== */
.section { padding: 60px 0; }
.section-alt { background: var(--surface); }
.section-header { text-align: center; margin-bottom: 44px; }
.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 12px;
    letter-spacing: -0.3px;
}
.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Identity Type Cards ===== */
.identity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}
.identity-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}
.identity-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--gradient, linear-gradient(90deg, var(--primary), var(--secondary)));
}
.identity-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.identity-card:nth-child(1)::before { background: linear-gradient(90deg, #1a56db, #3b82f6); }
.identity-card:nth-child(2)::before { background: linear-gradient(90deg, #0e7490, #06b6d4); }
.identity-card:nth-child(3)::before { background: linear-gradient(90deg, #7c3aed, #a78bfa); }
.identity-card:nth-child(4)::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.identity-card:nth-child(5)::before { background: linear-gradient(90deg, #ef4444, #f87171); }
.identity-icon { font-size: 2.5rem; margin-bottom: 16px; display: block; }
.identity-title { font-size: 1.2rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.identity-desc { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; }
.identity-link {
    display: inline-block;
    margin-top: 14px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--primary);
}

/* ===== Question Grid ===== */
.question-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}
.question-card {
    background: var(--surface);
    border-radius: var(--radius-sm);
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.question-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--primary-light); }
.question-card .q-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 2px; }
.question-card a { color: var(--text); font-weight: 500; font-size: 0.95rem; line-height: 1.5; }
.question-card a:hover { color: var(--primary); }

/* ===== Tool Section ===== */
.tool-section {
    background: linear-gradient(135deg, #f0f4f8 0%, #e0f2fe 100%);
    border-radius: var(--radius-lg);
    padding: 48px;
    text-align: center;
}
.tool-badge {
    display: inline-block;
    background: var(--accent-green);
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 16px;
}
.tool-title { font-size: 1.8rem; font-weight: 800; margin-bottom: 12px; }
.tool-desc { font-size: 1.05rem; color: var(--text-secondary); max-width: 560px; margin: 0 auto 28px; }
.tool-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    max-width: 800px;
    margin: 0 auto 32px;
}
.tool-feature {
    background: var(--surface);
    border-radius: var(--radius-sm);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}
.tool-feature .tf-icon { font-size: 1.8rem; margin-bottom: 8px; }
.tool-feature .tf-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 4px; }
.tool-feature .tf-desc { font-size: 0.82rem; color: var(--text-secondary); }

/* ===== Case Grid ===== */
.case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.case-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
}
.case-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.case-card-body { padding: 24px; }
.case-tag {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 12px;
}
.case-tag.green { background: #d1fae5; color: #065f46; }
.case-tag.blue { background: #dbeafe; color: #1e40af; }
.case-tag.orange { background: #fef3c7; color: #92400e; }
.case-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.case-desc { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; }
.case-result { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 0.85rem; color: var(--accent-green); font-weight: 600; }

/* ===== FAQ ===== */
.faq-section { max-width: 800px; margin: 0 auto; }
.faq-item {
    background: var(--surface);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
}
.faq-question {
    padding: 18px 24px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    color: var(--text);
}
.faq-question:hover { background: var(--bg); }
.faq-question .faq-icon { font-size: 1.2rem; transition: var(--transition); color: var(--primary); }
.faq-item.open .faq-question .faq-icon { transform: rotate(45deg); }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 24px;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.7;
}
.faq-item.open .faq-answer { max-height: 400px; padding: 0 24px 18px; }

/* ===== Page Layout (for inner pages) ===== */
.page-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px 24px;
}
.page-main { min-width: 0; }
.page-sidebar { position: sticky; top: 88px; align-self: start; }

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep { color: var(--text-light); }

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #fff;
    padding: 50px 0 40px;
}
.page-header .container { text-align: center; }
.page-header h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 10px; }
.page-header p { font-size: 1.1rem; opacity: 0.9; max-width: 600px; margin: 0 auto; }

/* Article Content */
.article-content { background: var(--surface); border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow); }
.article-content h2 { font-size: 1.6rem; font-weight: 700; margin: 32px 0 16px; color: var(--text); padding-bottom: 10px; border-bottom: 2px solid var(--border); }
.article-content h2:first-child { margin-top: 0; }
.article-content h3 { font-size: 1.25rem; font-weight: 700; margin: 24px 0 12px; color: var(--primary-dark); }
.article-content p { margin-bottom: 16px; color: var(--text); line-height: 1.8; font-size: 1rem; }
.article-content ul, .article-content ol { margin: 12px 0 20px 20px; }
.article-content ul li, .article-content ol li { margin-bottom: 8px; color: var(--text); line-height: 1.7; position: relative; padding-left: 4px; }
.article-content ul li::marker { color: var(--primary); }
.article-content ol li::marker { color: var(--primary); font-weight: 600; }
.article-content strong { color: var(--text); font-weight: 700; }
.article-content blockquote {
    border-left: 4px solid var(--primary);
    background: var(--bg);
    padding: 16px 20px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 20px 0;
    color: var(--text-secondary);
}
.article-content table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.article-content th, .article-content td { padding: 12px 16px; border: 1px solid var(--border); text-align: left; font-size: 0.92rem; }
.article-content th { background: var(--bg); font-weight: 700; color: var(--text); }
.article-content tr:nth-child(even) { background: var(--bg); }

/* Info Box */
.info-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-sm);
    padding: 20px;
    margin: 20px 0;
}
.info-box-title { font-weight: 700; color: var(--primary-dark); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.info-box.warning { background: #fffbeb; border-color: #fde68a; }
.info-box.warning .info-box-title { color: #92400e; }
.info-box.success { background: #ecfdf5; border-color: #a7f3d0; }
.info-box.success .info-box-title { color: #065f46; }
.info-box p { margin-bottom: 0; font-size: 0.92rem; color: var(--text); }

/* CTA Box */
.cta-box {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    color: #fff;
    margin: 32px 0;
}
.cta-box h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: 10px; color: #fff; }
.cta-box p { opacity: 0.9; margin-bottom: 20px; font-size: 0.95rem; }
.cta-box .btn-wechat { font-size: 1.05rem; padding: 14px 36px; }

/* Sidebar */
.sidebar-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}
.sidebar-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; color: var(--text); padding-bottom: 10px; border-bottom: 2px solid var(--border); }
.sidebar-card ul li { margin-bottom: 10px; }
.sidebar-card ul li a { font-size: 0.9rem; color: var(--text-secondary); display: block; padding: 6px 0; transition: var(--transition); }
.sidebar-card ul li a:hover { color: var(--primary); padding-left: 6px; }
.sidebar-cta {
    background: linear-gradient(135deg, var(--accent-green), #06ad56);
    color: #fff;
    text-align: center;
}
.sidebar-cta h3 { color: #fff; border-bottom: none; }
.sidebar-cta p { font-size: 0.88rem; opacity: 0.9; margin-bottom: 16px; }
.sidebar-cta .btn { background: #fff; color: var(--accent-green); width: 100%; }

/* Tags */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    background: #eff6ff;
    color: var(--primary);
}

/* Steps */
.steps { counter-reset: step; margin: 24px 0; }
.step-item {
    position: relative;
    padding: 16px 0 16px 56px;
    border-left: 2px solid var(--border);
    margin-left: 20px;
}
.step-item::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: -15px;
    top: 16px;
    width: 30px;
    height: 30px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}
.step-item h4 { font-weight: 700; margin-bottom: 6px; font-size: 1rem; }
.step-item p { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 0; }

/* Footer */
.footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 48px 0 28px;
    margin-top: 60px;
}
.footer-container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}
.footer-brand h3 { color: #fff; font-size: 1.3rem; margin-bottom: 12px; }
.footer-brand p { font-size: 0.88rem; line-height: 1.7; opacity: 0.7; }
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; font-weight: 600; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: #94a3b8; font-size: 0.88rem; transition: var(--transition); }
.footer-col ul li a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    text-align: center;
    font-size: 0.82rem;
    opacity: 0.6;
}
.footer-bottom p { margin-bottom: 4px; }

/* ===== Responsive ===== */
@media (max-width: 968px) {
    .page-layout { grid-template-columns: 1fr; }
    .page-sidebar { position: static; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 16px; box-shadow: var(--shadow); border-top: 1px solid var(--border); }
    .nav-links.show { display: flex; }
    .nav-toggle { display: block; }
    .hero-title { font-size: 1.8rem; }
    .hero-subtitle { font-size: 1rem; }
    .section-title { font-size: 1.5rem; }
    .tool-section { padding: 28px 20px; }
    .tool-title { font-size: 1.4rem; }
    .article-content { padding: 24px 20px; }
    .article-content h2 { font-size: 1.3rem; }
    .page-header h1 { font-size: 1.6rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .identity-grid { grid-template-columns: 1fr 1fr; }
    .hero-buttons { flex-direction: column; align-items: stretch; }
    .hero-btn { width: 100%; }
}
@media (max-width: 480px) {
    .identity-grid { grid-template-columns: 1fr; }
    .question-grid { grid-template-columns: 1fr; }
    .case-grid { grid-template-columns: 1fr; }
}

/* Logo */
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; flex-shrink: 0; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.footer-brand { display: flex; align-items: flex-start; gap: 12px; }
.footer-logo { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.footer-brand-text { flex: 1; }
.footer-brand-text h3 { color: #fff; font-size: 1.3rem; margin-bottom: 12px; }
.footer-brand-text p { font-size: 0.88rem; line-height: 1.7; opacity: 0.7; }
