/* --- styles.css --- */
:root {
    /* 核心配色：深空蓝黑背景 + 科技蓝/商务紫点缀 */
    --bg-color: #0B1120;
    --text-main: #E2E8F0;
    --text-secondary: #94A3B8;
    --accent-primary: #0EA5E9; /* 亮蓝 - 用于强调 */
    --accent-glow: rgba(14, 165, 233, 0.4);
    --accent-secondary: #6366F1; /* 蓝紫 - 用于渐变 */
    --card-bg: #1E293B;
    --nav-bg: rgba(11, 17, 32, 0.95);
    --section-spacing: 100px;
}

/* 全局重置 */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif; }
body { background-color: var(--bg-color); color: var(--text-main); line-height: 1.7; overflow-x: hidden; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; display: block; border-radius: 8px; }

/* 导航栏 */
header {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    background: var(--nav-bg);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(12px);
}
.nav-container {
    max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 72px;
    display: flex; justify-content: space-between; align-items: center;
}
.logo { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; background: linear-gradient(to right, #fff, var(--accent-primary)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; gap: 64px; }
.nav-links a { font-size: 15px; font-weight: 500; color: var(--text-secondary); }
.nav-links a.active { color: var(--accent-primary); font-weight: 700; }
.nav-links a:hover { color: #fff; }

.cta-btn {
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
    padding: 10px 24px; border-radius: 50px; font-weight: 600; color: #fff; font-size: 14px;
    box-shadow: 0 4px 15px var(--accent-glow);
}
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 25px var(--accent-glow); }

/* 通用布局与排版 */
section { padding: var(--section-spacing) 24px; max-width: 1200px; margin: 0 auto; }

.page-header {
    padding: 140px 24px 60px; text-align: center;
    background: radial-gradient(circle at 50% 0%, #1a2c4e 0%, var(--bg-color) 70%);
}
.page-header h1 { font-size: 3rem; margin-bottom: 20px; font-weight: 800; }
.page-header p { color: var(--text-secondary); max-width: 640px; margin: 0 auto; font-size: 1.1rem; }

.section-title { font-size: 2.2rem; margin-bottom: 50px; text-align: center; font-weight: 700; }
.section-title span { color: var(--accent-primary); }

/* 网格系统 */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 32px; }

/* 卡片样式 */
.card {
    background: var(--card-bg); padding: 40px; border-radius: 16px; 
    border: 1px solid rgba(255,255,255,0.05); transition: 0.3s ease;
    display: flex; flex-direction: column; height: 100%;
}
.card:hover { transform: translateY(-8px); border-color: var(--accent-primary); box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.card h3 { font-size: 1.4rem; margin-bottom: 12px; color: #fff; }
.card p { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 24px; flex-grow: 1; }
.icon { font-size: 2.5rem; margin-bottom: 20px; color: var(--accent-primary); }
.card-link { color: var(--accent-primary); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }

/* 首页 Hero */
.hero { 
    height: 88vh; display: flex; align-items: center; justify-content: center; text-align: center; 
    padding: 0 24px; position: relative; overflow: hidden;
}
.hero h1 { font-size: 4rem; line-height: 1.1; margin-bottom: 24px; font-weight: 800; }
.hero h1 span { color: var(--accent-primary); display: inline-block; }
.hero-desc { font-size: 1.25rem; color: var(--text-secondary); max-width: 700px; margin: 0 auto 40px; }

/* 案例列表 */
.case-item { 
    display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; 
    margin-bottom: 100px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 60px; 
}
.case-item:last-child { border-bottom: none; }
.case-img-box { 
    background: #2d3748; height: 360px; border-radius: 12px; overflow: hidden; 
    display: flex; align-items: center; justify-content: center; position: relative;
}
.case-tag { 
    display: inline-block; padding: 6px 16px; background: rgba(14, 165, 233, 0.15); 
    color: var(--accent-primary); border-radius: 20px; font-size: 0.85rem; font-weight: 600; margin-bottom: 20px; 
}
.data-box { display: flex; gap: 40px; margin-top: 30px; }
.data-box strong { font-size: 2rem; color: #fff; display: block; line-height: 1.2; }
.data-box span { font-size: 0.9rem; color: var(--text-secondary); }

/* FAQ */
.faq-item { background: var(--card-bg); border-radius: 12px; padding: 24px; margin-bottom: 16px; cursor: pointer; transition: 0.3s; }
.faq-item:hover { background: #26334D; }
.faq-q { font-weight: 600; font-size: 1.1rem; display: flex; justify-content: space-between; }
.faq-a { margin-top: 15px; color: var(--text-secondary); display: none; padding-top: 15px; border-top: 1px solid rgba(255,255,255,0.1); }
.faq-item:hover .faq-a { display: block; animation: fadeIn 0.4s; }

/* Footer */
footer { background: #020617; padding: 80px 24px 30px; border-top: 1px solid rgba(255,255,255,0.05); }
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; }
.footer-col h4 { margin-bottom: 24px; color: #fff; font-size: 1.1rem; }
.footer-col ul li { margin-bottom: 12px; color: var(--text-secondary); font-size: 0.95rem; }
.footer-col ul li a:hover { color: var(--accent-primary); }
.copyright { text-align: center; margin-top: 80px; color: #475569; font-size: 0.85rem; }

/* 移动端适配 */
@media (max-width: 768px) {
    .nav-links { display: none; } /* 移动端临时隐藏菜单，可根据需求增加汉堡菜单脚本 */
    .hero h1 { font-size: 2.5rem; }
    .case-item { grid-template-columns: 1fr; gap: 30px; }
    .page-header { padding-top: 100px; }
    .page-header h1 { font-size: 2.2rem; }
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* 表单模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    /* display: flex; */
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--card-bg);
    margin: 5vh auto;
    padding: 30px;
    border-radius: 12px;
    width: 90vw;
    max-width: 600px;
    position: relative;
    animation: modalFadeIn 0.3s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 15px;
    top: 10px;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #fff;
}

.modal-header {
    margin-bottom: 20px;
}

.modal-header h2 {
    color: var(--accent-primary);
    font-size: 1.5rem;
    margin: 0;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    color: #fff;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    background-color: #2d3748;
    color: #fff;
    font-size: 0.9rem;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.form-group input.error,
.form-group textarea.error,
.form-group select.error {
    border-color: #ef4444;
}

.form-group .error-message {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 2px;
    display: none;
}

.form-group .error-message.show {
    display: block;
}

.modal-footer {
    margin-top: 20px;
    text-align: right;
}

.submit-btn {
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.modal-body {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 10px;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 3px;
}

/* 确保在小屏幕上也能正常显示 */
@media (max-width: 768px) {
    .modal-content {
        width: 95vw;
        margin: 2.5vh auto;
        padding: 20px;
        max-height: 95vh;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
}

.textarea-large {
    min-height: 100px;
    resize: vertical;
}