/* ========== 基础变量 ========== */
:root {
    --primary: #14ae7b;
    --primary-dark: #059669;
    --primary-light: #d1fae5;
    --gradient-start: #a7f3d0;
    --gradient-end: #fde68a;
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --bg: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
    --radius: 8px;
    --radius-lg: 16px;
}

* { 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;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: color 0.2s; }

/* 容器加宽，padding加大留呼吸感 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ========== 按钮 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary-light);
}

/* ========== Logo方块 ========== */
.logo-box {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), #34d399);
    color: var(--white);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 1px;
    flex-shrink: 0;
}

/* ========== 头部 ========== */
.main-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    gap: 32px;
}

/* 左侧Logo —— 关键：固定宽度，禁止压缩 */
.brand {
    flex-shrink: 0;
    min-width: 180px;
}

.brand > a {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.logo-text strong {
    font-size: 18px;
    color: var(--text);
    font-weight: 700;
    white-space: nowrap;
}

.logo-text span {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 3px;
    white-space: nowrap;  /* 防止被挤成竖排 */
}

/* 中间导航 —— 自适应，可滚动 */
.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
    overflow-x: auto;
    scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
    display: none;
}

.nav-item {
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-item:hover {
    color: var(--primary-dark);
    background: var(--primary-light);
}

.nav-item.active {
    color: var(--primary-dark);
    background: var(--primary-light);
    font-weight: 600;
}

/* 右侧操作区 —— 关键：固定宽度，禁止压缩 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* 搜索框 */
.search-box {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 3px 3px 3px 14px;
    width: 230px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.search-box:focus-within {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 13px;
    flex: 1;
    color: var(--text);
    min-width: 0;
}

.search-box input::placeholder {
    color: #94a3b8;
}

.search-btn {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.search-btn:hover {
    background: var(--primary-dark);
}

/* 登录注册 */
.auth-links {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
    color: var(--text-secondary);
    flex-shrink: 0;
    white-space: nowrap;
}

.auth-links a:hover {
    color: var(--primary-dark);
}

/* ========== 页面内容区 ========== */
.page-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 40px;
    min-height: 600px;
}

/* ========== 尾部（与头部同宽同padding） ========== */
.site-footer {
    background: var(--bg);
    border-top: 1px solid var(--border);
    margin-top: 60px;
}

.footer-main {
    padding: 56px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2.2fr 1fr 1fr 1fr 1.5fr;
    gap: 48px;
}

.footer-col h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 20px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
    font-size: 14px;
}

.footer-col ul li a {
    color: var(--text-secondary);
}

.footer-col ul li a:hover {
    color: var(--primary-dark);
}

/* 关于我们列 */
.footer-about {
    padding-right: 20px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-brand strong {
    font-size: 16px;
    color: var(--text);
    display: block;
    font-weight: 700;
}

.footer-brand span {
    font-size: 12px;
    color: var(--text-muted);
}

.about-text {
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.notice-box {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    font-size: 12px;
    line-height: 1.8;
    color: var(--text-muted);
    box-shadow: var(--shadow);
}

/* 联系信息 */
.footer-contact ul li {
    line-height: 1.7;
    color: var(--text-secondary);
    font-size: 13px;
}

.footer-contact .label {
    font-weight: 600;
    color: var(--text);
}

.footer-contact a {
    color: var(--text-secondary);
}

.footer-contact a:hover {
    color: var(--primary-dark);
}

/* 底部版权栏 */
.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 20px 0;
    background: var(--white);
}

.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copyright {
    font-size: 13px;
    color: var(--text-muted);
}

.beian-link {
    font-size: 13px;
    color: var(--text-muted);
}

.beian-link:hover {
    color: var(--primary-dark);
}

/* ========== 首页横幅 ========== */
.hero-banner {
    background: linear-gradient(135deg, #a7f3d0 0%, #fde68a 100%);
    border-radius: var(--radius-lg);
    padding: 56px 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    margin-bottom: 48px;
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    filter: blur(60px);
}

.hero-content {
    max-width: 640px;
    position: relative;
    z-index: 1;
}

.hero-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #0f4c3a;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.hero-content h1 {
    font-size: 36px;
    line-height: 1.3;
    color: #0f4c3a;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-content p {
    font-size: 15px;
    line-height: 1.8;
    color: #1e5f4a;
    max-width: 520px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.btn-white {
    background: var(--white);
    color: var(--text);
    padding: 12px 32px;
    font-size: 15px;
    box-shadow: var(--shadow-md);
    border-radius: 24px;
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.25);
    color: #0f4c3a;
    padding: 12px 32px;
    font-size: 15px;
    border: 1px solid rgba(15, 76, 58, 0.2);
    backdrop-filter: blur(4px);
    border-radius: 24px;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* ========== 服务卡片网格 ========== */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.service-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all 0.3s;
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 18px;
    color: var(--text);
    margin-bottom: 10px;
    font-weight: 600;
}

.service-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ========== 响应式 ========== */
@media (max-width: 1280px) {
    .container {
        padding: 0 32px;
    }
    
    .page-content {
        padding: 40px 32px;
    }
    
    .header-inner {
        gap: 24px;
    }
    
    .nav-item {
        padding: 9px 12px;
        font-size: 13px;
    }
    
    .search-box {
        width: 200px;
    }
    
    .btn {
        padding: 8px 14px;
        font-size: 13px;
    }
}

@media (max-width: 1100px) {
    .header-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 14px 0;
        gap: 12px;
    }
    
    .brand {
        order: 1;
    }
    
    .header-actions {
        order: 2;
        margin-left: auto;
    }
    
    .main-nav {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        padding: 4px 0;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
    
    .footer-about {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .page-content {
        padding: 32px 20px;
    }
    
    .header-actions {
        flex-wrap: wrap;
        width: 100%;
        justify-content: flex-end;
        gap: 8px;
    }
    
    .search-box {
        width: 100%;
        order: 3;
    }
    
    .auth-links {
        order: 4;
    }
    
    .hero-banner {
        flex-direction: column;
        padding: 40px 28px;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 26px;
    }
    
    .hero-actions {
        width: 100%;
        justify-content: center;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .footer-bottom-inner {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}