/* 样式文件 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    background-color: #f6f8fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========== 导航栏 (保持不变) ========== */
.navbar {
    background-color: #ffffff;
    border-bottom: 1px solid #d0d7de;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
    position: relative;
}

/* 左侧 logo + 标题 */
.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-area img {
    width: 36px;
    height: auto;
}

.logo-text h1 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2328;
}

.logo-text h3 {
    font-size: 11px;
    color: #656d76;
    font-weight: normal;
    margin-top: 2px;
}

/* 导航菜单 (桌面端) */
.nav-menu {
    list-style: none;
    display: flex;
    gap: 4px;
    align-items: center;
    transition: all 0.3s ease;
}

.nav-menu li a {
    display: block;
    padding: 8px 12px;
    color: #1f2328;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-menu li a:hover {
    background-color: #f0f2f5;
    color: #0969da;
}

/* 优化导航菜单的动画 */
.nav-menu {
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

/* 汉堡菜单按钮 */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 20;
    position: relative;
    top: 0;
}

.hamburger span {
    width: 100%;
    height: 2.5px;
    background-color: #1f2328;
    border-radius: 4px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger.active span:nth-child(1) {
    transform: translateY(9.5px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-9.5px) rotate(-45deg);
}

/* ========== 移动端样式 (≤768px) ========== */
@media (max-width: 768px) {
    .nav-container { padding: 0 16px; }
    .logo-area img { width: 32px; }
    .logo-text h1 { font-size: 16px; }
    .logo-text h3 { font-size: 10px; }
    .hamburger { display: flex; }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #ffffff;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 16px 20px 24px;
        border-top: 1px solid #d0d7de;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
        transform: translateY(-120%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.25s ease-in-out, opacity 0.2s ease;
        z-index: 99;
    }

    .nav-menu.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-menu li { width: 100%; text-align: center; border-bottom: 1px solid #f0f2f5; }
    .nav-menu li:last-child { border-bottom: none; }
    .nav-menu li a { padding: 14px 12px; font-size: 16px; }
}

/* ========== 页脚 (保持不变) ========== */
.footer {
    margin-top: auto;
    background-color: #ffffff;
    border-top: 1px solid #d0d7de;
    padding: 2rem 24px;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-info { color: #656d76; font-size: 0.85rem; }

.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a { color: #656d76; text-decoration: none; font-size: 0.85rem; transition: color 0.2s; }
.footer-links a:hover { color: #0969da; }

@media (max-width: 768px) {
    .footer-container { flex-direction: column; text-align: center; gap: 0.8rem; }
    .footer-links { justify-content: center; }
}

/* ========== 全局通用设置 (保持居中) ========== */
body {
    font-family: "Microsoft YaHei", sans-serif;
    line-height: 1.8;
    color: #333;
    text-align: center; /* 全局文字默认居中 */
}

.container {
    width: 80%;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    text-align: center; /* 容器内容默认居中 */
}

h2 {
    color: #0056b3;
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
}

h3 { color: #444; margin-bottom: 10px; }
.lead-text { font-size: 1.2rem; font-weight: bold; color: #555; }

/* 特色板块：网格布局 */
.feature-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 40px;
}

/* ========== 卡片样式 (修复冲突版) ========== */
.feature-item {
    /* 布局设置 */
    display: flex;             /* 开启 Flex 布局 */
    align-items: center;       /* 垂直居中 */
    gap: 20px;                 /* 头像和文字的间距 */
    
    /* 尺寸与外观 */
    flex: 1 1 200px;
    padding: 20px 30px;
    background-color: #f9f9f9;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    
    /* 关键修复：强制卡片内部文字靠左，覆盖全局的居中设置 */
    text-align: left; 
    
    /* 动画 */
    transition: all 0.3s ease;
    box-sizing: border-box;
}

/* 悬停效果 */
.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    background-color: #ffffff;
    border-color: #d0d0d0;
}

/* 标题缩放 */
.feature-item:hover h3 {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* ========== 头像样式 ========== */
.avatar-user {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0; /* 防止被压缩 */
}

.avatar-user img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 确保卡片内的内容区域占满剩余空间 */
.feature-item .content {
    flex: 1;
}

/* ========== 按钮样式 (保持不变) ========== */
.btn-group { text-align: center; margin-bottom: 30px; }
.btn {
    padding: 10px 20px;
    cursor: pointer;
    border: 1px solid #ddd;
    background: #f0f0f0;
    border-radius: 4px;
    margin: 0 5px;
    transition: all 0.3s;
}
.btn:hover { background: #e0e0e0; }
.btn.active { background: #007bff; color: white; border-color: #007bff; }

/* 大头像样式 (保持不变) */
.avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    text-align: center;
    margin: 0 auto;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* 内容块显示逻辑 (保持不变) */
.content-item {
    display: none;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fafafa;
    animation: fadeIn 0.5s;
}
.content-item.active { display: block; }

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