/* ============================================
   燧桐GEO官网 - 全局样式
   ============================================ */

:root {
    --primary: #1a56db;
    --primary-dark: #1e40af;
    --primary-light: #dbeafe;
    --accent: #f59e0b;
    --text: #1f2937;
    --text-light: #6b7280;
    --bg: #ffffff;
    --bg-light: #f9fafb;
    --bg-alt: #f3f4f6;
    --border: #e5e7eb;
    --success: #10b981;
    --danger: #ef4444;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --max-width: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--bg);
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }

/* ========== Header ========== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow 0.3s;
}
.site-header.scrolled, .site-header.scrolled-admin {
    box-shadow: var(--shadow-md);
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.logo { font-size: 1.25rem; font-weight: 700; color: var(--primary); }
.logo-text { color: var(--primary); }
.main-nav { display: flex; gap: 8px; }
.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    transition: all 0.2s;
}
.nav-link:hover { background: var(--primary-light); color: var(--primary); }
.nav-cta {
    background: var(--primary);
    color: white !important;
}
.nav-cta:hover { background: var(--primary-dark); }
.mobile-menu-btn {
    display: none;
    background: none;
    border: 1px solid var(--border);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: var(--radius);
}

/* ========== Hero ========== */
.hero {
    padding: 80px 0 60px;
    text-align: center;
    background: linear-gradient(135deg, #eff6ff 0%, #fefce8 100%);
}
.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 16px;
}
.hero-title .highlight {
    color: var(--primary);
    position: relative;
}
.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 12px;
}
.hero-desc {
    max-width: 700px;
    margin: 0 auto 32px;
    color: var(--text-light);
    font-size: 1rem;
}
.hero-cta {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 32px;
}
.hero-trust {
    display: flex;
    gap: 24px;
    justify-content: center;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Page Hero */
.page-hero {
    padding: 60px 0 40px;
    text-align: center;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
}
.page-hero h1 { font-size: 2rem; font-weight: 700; margin-bottom: 8px; }
.page-hero p { color: var(--text-light); }

/* ========== Buttons ========== */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}
.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover { background: var(--primary-dark); color: white; }
.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; color: white; }

/* ========== Sections ========== */
.section { padding: 64px 0; }
.section-title { font-size: 1.8rem; font-weight: 700; text-align: center; margin-bottom: 12px; }
.section-subtitle { text-align: center; color: var(--text-light); margin-bottom: 40px; }
.bg-light { background: var(--bg-light); }

/* ========== Cards ========== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}
.card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.card-body { padding: 24px; }
.card-badge {
    display: inline-block;
    padding: 3px 10px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 10px;
}
.card-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; }
.card-excerpt {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-meta { font-size: 0.8rem; color: var(--text-light); margin-bottom: 10px; display: flex; gap: 16px; }
.card-link { font-weight: 600; font-size: 0.9rem; }

/* ========== Steps ========== */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
.step-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: box-shadow 0.2s;
}
.step-card:hover { box-shadow: var(--shadow-md); }
.step-num {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-light);
    margin-bottom: 8px;
}
.step-card h3 { font-size: 1rem; margin-bottom: 8px; }
.step-card p { font-size: 0.85rem; color: var(--text-light); }

/* ========== Advantages ========== */
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}
.adv-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}
.adv-item h3 { font-size: 1.05rem; margin-bottom: 8px; }
.adv-item p { font-size: 0.9rem; color: var(--text-light); }

/* ========== FAQ ========== */
.faq-group { margin-bottom: 40px; }
.faq-group-title {
    font-size: 1.3rem;
    font-weight: 700;
    padding-bottom: 8px;
    border-bottom: 3px solid var(--primary);
    margin-bottom: 16px;
    display: inline-block;
}
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
    background: var(--bg);
}
.faq-question {
    padding: 16px 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}
.faq-question::after { content: '+'; font-size: 1.3rem; color: var(--primary); }
.faq-item.active .faq-question::after { content: '−'; }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.faq-item.active .faq-answer { max-height: 2000px; }
.faq-answer p { padding: 0 20px 16px; color: var(--text-light); font-size: 0.95rem; }
.faq-detailed { padding: 0 20px 16px; }
.faq-detailed p { font-size: 0.9rem; color: var(--text-light); line-height: 1.7; padding: 4px 0; }

/* ========== CTA Section ========== */
.cta-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: white;
}
.cta-title { color: white; }
.cta-subtitle { color: rgba(255,255,255,0.85); text-align: center; margin-bottom: 24px; }
.inline-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.inline-form input, .inline-form textarea, .inline-form select {
    padding: 12px 16px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: var(--radius);
    font-size: 0.95rem;
    background: rgba(255,255,255,0.95);
    width: 100%;
}

/* ========== Content Page ========== */
.content-page { max-width: 800px; margin: 0 auto; }
.article-meta { display: flex; gap: 16px; align-items: center; margin-bottom: 24px; }
.content-body { line-height: 1.8; }
.content-body h3 { margin: 24px 0 12px; font-size: 1.2rem; }
.content-body .block { margin-bottom: 24px; }
.content-body .highlight-block {
    background: var(--primary-light);
    padding: 20px;
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
}
.content-cover { margin-bottom: 24px; }
.content-cover img { width: 100%; border-radius: var(--radius); }
.content-cta {
    margin-top: 48px;
    padding: 32px;
    background: var(--bg-light);
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid var(--border);
}
.content-cta h3 { margin-bottom: 8px; }
.content-cta p { color: var(--text-light); margin-bottom: 16px; }

/* ========== Contact ========== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}
.contact-info h2 { margin-bottom: 24px; }
.contact-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 20px;
}
.contact-icon { font-size: 1.5rem; }
.contact-item strong { display: block; margin-bottom: 2px; }
.contact-item p { color: var(--text-light); }
.contact-form-box {
    background: var(--bg-light);
    padding: 32px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.contact-form-box h2 { margin-bottom: 8px; }
.contact-form-desc { color: var(--text-light); margin-bottom: 20px; font-size: 0.9rem; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.9rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* ========== Footer ========== */
.site-footer {
    background: #111827;
    color: #d1d5db;
    padding: 48px 0 24px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}
.footer-col h3, .footer-col h4 { color: white; margin-bottom: 12px; }
.footer-col h3 { font-size: 1.1rem; }
.footer-col h4 { font-size: 1rem; }
.footer-desc { font-size: 0.9rem; color: #9ca3af; }
.footer-col a {
    display: block;
    color: #9ca3af;
    padding: 4px 0;
    font-size: 0.9rem;
}
.footer-col a:hover { color: white; }
.footer-col p { font-size: 0.9rem; padding: 2px 0; }
.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid #374151;
    text-align: center;
    font-size: 0.8rem;
    color: #6b7280;
}

/* ========== Admin Login ========== */
.admin-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a5f 0%, #1a56db 100%);
}
.login-container { width: 100%; max-width: 420px; padding: 20px; }
.login-card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
}
.login-card h1 { font-size: 1.5rem; margin-bottom: 4px; }
.login-subtitle { color: var(--text-light); margin-bottom: 24px; }
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 0.9rem;
}
.alert-error { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: var(--success); border: 1px solid #bbf7d0; }

/* ========== Admin Layout ========== */
.admin-body { background: var(--bg-light); }
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 220px;
    background: #1f2937;
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 50;
}
.sidebar-brand {
    padding: 20px;
    font-size: 1.1rem;
    font-weight: 700;
    border-bottom: 1px solid #374151;
}
.sidebar-nav { padding: 12px 0; }
.sidebar-link {
    display: block;
    padding: 10px 20px;
    color: #9ca3af;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.sidebar-link:hover { background: #374151; color: white; }
.sidebar-link.active { background: var(--primary); color: white; }
.sidebar-logout { margin-top: 20px; border-top: 1px solid #374151; padding-top: 16px; color: #ef4444; }
.sidebar-logout:hover { color: #fca5a5; }

.admin-main {
    flex: 1;
    margin-left: 220px;
    padding: 0;
}
.admin-topbar {
    background: white;
    padding: 16px 32px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 40;
}
.admin-topbar h1 { font-size: 1.3rem; }
.admin-content { padding: 24px 32px; }

/* ========== Admin Components ========== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border);
    text-align: center;
}
.stat-value { font-size: 2rem; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 0.85rem; color: var(--text-light); margin-top: 4px; }
.stat-highlight .stat-value { color: var(--accent); }
.stat-alert .stat-value { color: var(--danger); }
.quick-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.panel {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 24px;
    margin-bottom: 24px;
}
.panel h3 { margin-bottom: 16px; }

.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th {
    text-align: left;
    padding: 12px;
    border-bottom: 2px solid var(--border);
    font-weight: 600;
    color: var(--text-light);
}
.data-table td { padding: 12px; border-bottom: 1px solid var(--border); }
.data-table tr:hover { background: var(--bg-light); }
.data-table .actions { display: flex; gap: 8px; }

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--bg-alt);
}
.badge-published { background: #d1fae5; color: #065f46; }
.badge-draft { background: #fef3c7; color: #92400e; }
.badge-review { background: #dbeafe; color: #1e40af; }
.badge-offline { background: #f3f4f6; color: #6b7280; }
.badge-new { background: #dbeafe; color: #1e40af; }

.edit-form { max-width: 900px; }
.edit-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.lead-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}
.lead-detail-grid strong { font-size: 0.85rem; color: var(--text-light); }
.lead-detail-grid p { font-size: 1rem; font-weight: 500; }

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}
.media-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.media-preview { height: 120px; background: var(--bg-alt); display: flex; align-items: center; justify-content: center; }
.media-icon { font-size: 2rem; }
.media-info { padding: 12px; }
.media-name { font-size: 0.85rem; font-weight: 600; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-info code { font-size: 0.7rem; color: var(--text-light); word-break: break-all; }

.empty-state { padding: 48px 0; color: var(--text-light); }
.empty-state p { margin-bottom: 16px; font-size: 1.1rem; }

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .hero-title { font-size: 1.8rem; }
    .hero-cta { flex-direction: column; align-items: center; }
    .hero-trust { flex-direction: column; gap: 8px; }
    .main-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md);
    }
    .main-nav.open { display: flex; }
    .mobile-menu-btn { display: block; }
    .card-grid { grid-template-columns: 1fr; }
    .steps-grid { grid-template-columns: 1fr; }
    .advantages-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .edit-form .form-row { grid-template-columns: 1fr; }

    .admin-sidebar {
        width: 100%;
        position: relative;
        display: none;
    }
    .admin-main { margin-left: 0; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
