/* Sanhui Consulting - Main Styles */

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
}

a { color: #1a5a8a; text-decoration: none; }
a:hover { color: #0d3d5e; }

img { max-width: 100%; height: auto; }

/* Container */
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 800px; }

/* Header */
.site-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0 0;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.site-logo { display: flex; align-items: center; }
.site-name { font-size: 22px; font-weight: 700; color: #1a5a8a; }

.nav-menu { display: flex; list-style: none; gap: 18px; }
.nav-menu a { font-size: 14px; color: #333; font-weight: 500; white-space: nowrap; }
.nav-menu a:hover { color: #1a5a8a; }

.mobile-menu-toggle { display: none; background: none; border: none; cursor: pointer; }
.mobile-menu-toggle span { display: block; width: 24px; height: 2px; background: #333; margin: 5px 0; }

/* Hero */
.hero {
    background: linear-gradient(135deg, #1a5a8a 0%, #0d3d5e 100%);
    color: #fff;
    padding: 80px 0;
    text-align: center;
}

.hero h1 { font-size: 40px; margin-bottom: 16px; line-height: 1.3; }
.hero h1 span { font-size: 28px; font-weight: 400; opacity: 0.9; }
.hero-subtitle { font-size: 18px; opacity: 0.85; max-width: 600px; margin: 0 auto 30px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.btn-primary { background: #fff; color: #1a5a8a; border-color: #fff; }
.btn-primary:hover { background: #f0f0f0; color: #0d3d5e; }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.5); }
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,0.1); }

/* Sections */
.section { padding: 60px 0; }
.section-alt { background: #f7f8fa; }
.section-title {
    text-align: center;
    font-size: 28px;
    margin-bottom: 40px;
    color: #1a1a1a;
}

/* Grid */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* Cards */
.card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 24px;
    transition: box-shadow 0.2s;
}
.card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.card-icon { font-size: 36px; margin-bottom: 12px; }
.card h3 { font-size: 18px; margin-bottom: 8px; color: #1a1a1a; }
.card h4 { font-size: 16px; margin-bottom: 6px; }
.card p { font-size: 14px; color: #666; line-height: 1.6; }
.card-thumb { margin-bottom: 12px; overflow: hidden; border-radius: 6px; }
.card-thumb img { width: 100%; height: 180px; object-fit: cover; }
.card-body { padding: 0; }
.card-meta { font-size: 12px; color: #999; margin-bottom: 6px; }

.card-mini {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}
.card-mini h4 { font-size: 16px; color: #1a5a8a; margin-bottom: 6px; }
.card-mini p { font-size: 13px; color: #666; }

/* Post List */
.post-list { margin: 20px 0; }
.post-item { padding: 20px 0; border-bottom: 1px solid #eee; }
.post-item h2 { font-size: 20px; margin-bottom: 6px; }
.post-item h2 a { color: #1a1a1a; }
.post-item h2 a:hover { color: #1a5a8a; }
.post-meta { font-size: 13px; color: #999; margin-bottom: 8px; }
.post-meta .cat-links { margin-left: 12px; }

/* Article */
.site-content { padding: 40px 0; }
.entry-header { margin-bottom: 24px; }
.entry-header h1 { font-size: 32px; line-height: 1.3; margin-bottom: 12px; }
.entry-meta { font-size: 14px; color: #999; }
.entry-meta .cat-links { margin-left: 12px; }
.post-thumbnail { margin-bottom: 24px; border-radius: 8px; overflow: hidden; }
.entry-content { font-size: 16px; line-height: 1.8; }
.entry-content p { margin-bottom: 16px; }
.entry-content h2, .entry-content h3 { margin: 24px 0 12px; }
.entry-content img { max-width: 100%; height: auto; }
.entry-content table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; }
.entry-content th, .entry-content td { padding: 10px; border: 1px solid #e5e7eb; }
.tags-links { margin-top: 24px; padding-top: 16px; border-top: 1px solid #eee; font-size: 14px; }

.single-consult-cta {
    margin-top: 34px;
    padding: 28px;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(135deg, #123a5a 0%, #071827 100%);
}

.single-consult-cta h2 {
    font-size: 24px;
    line-height: 1.35;
    margin-bottom: 10px;
}

.single-consult-cta p {
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 18px;
}

.single-consult-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.single-consult-phone {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.56);
}

/* Related */
.related-posts { padding: 40px 0; border-top: 1px solid #eee; }
.related-posts h3 { font-size: 20px; margin-bottom: 20px; }

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { margin-bottom: 20px; padding: 20px; background: #fff; border-radius: 8px; border: 1px solid #eee; }
.faq-item h4 { font-size: 16px; margin-bottom: 8px; color: #1a1a1a; }
.faq-item p { font-size: 14px; color: #666; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-info p { margin-bottom: 8px; font-size: 15px; }

/* Footer */
.site-footer { background: #1a1a2e; color: #ccc; padding: 40px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 12px; }
.footer-col p { font-size: 13px; line-height: 1.6; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 6px; }
.footer-col a { color: #aaa; font-size: 13px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #333; padding-top: 16px; text-align: center; font-size: 13px; color: #888; }
.footer-icp { margin-top: 6px; }
.footer-icp a { color: inherit; text-decoration: none; }
.footer-icp a:hover { color: #fff; }
.footer-menu { list-style: none; }
.footer-menu li { margin-bottom: 6px; }
.footer-menu a { color: #aaa; font-size: 13px; }

/* Pagination */
.pagination { margin: 30px 0; text-align: center; }
.pagination .nav-links { display: flex; gap: 8px; justify-content: center; }
.pagination a, .pagination span { padding: 8px 14px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; }
.pagination .current { background: #1a5a8a; color: #fff; border-color: #1a5a8a; }

/* 404 */
.error-404 { text-align: center; padding: 80px 0; }
.error-404 h1 { font-size: 80px; color: #ddd; margin-bottom: 16px; }
.error-404 p { font-size: 18px; color: #666; margin-bottom: 24px; }

/* Empty hint */
.empty-hint { grid-column: 1 / -1; text-align: center; color: #999; padding: 40px 0; }

/* Responsive */
@media (max-width: 768px) {
    html.sanhui-theme-menu-open,
    body.sanhui-theme-menu-open {
        overflow: hidden !important;
        overscroll-behavior: none;
        touch-action: none;
    }

    body.sanhui-theme-menu-open .site-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1002;
    }

    body.admin-bar.sanhui-theme-menu-open .site-header {
        top: 46px;
    }

    .nav-menu { display: none; }
    .nav-menu.is-open {
        display: flex;
        flex-direction: column;
        gap: 0;
        position: fixed;
        top: 70px;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: none;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        background: #ffffff;
        padding: 16px 20px calc(94px + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
        z-index: 1001;
    }
    body.admin-bar .nav-menu.is-open {
        top: 116px;
    }
    .nav-menu.is-open a {
        display: block;
        padding: 12px 0;
        white-space: normal;
    }
    .mobile-menu-toggle { display: block; }
    .mobile-menu-toggle.is-active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .mobile-menu-toggle.is-active span:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-toggle.is-active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
    .hero h1 { font-size: 28px; }
    .hero h1 span { font-size: 20px; }
    .grid-4, .grid-3 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .hero-actions { flex-direction: column; align-items: center; }
    .entry-header h1 { font-size: 26px; }
    .entry-meta .cat-links { display: block; margin: 6px 0 0; }
    .single-consult-cta { padding: 22px 18px; }
    .single-consult-actions { display: grid; grid-template-columns: 1fr; }
    .single-consult-actions .btn { width: 100%; text-align: center; }
}
