:root {
    --primary-color: #e74c3c; /* 主色调：红 */
    --text-dark: #333333;
    --text-gray: #666666;
    --bg-light: #f9f9f9;
    --border-color: #eeeeee;
    --nav-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background-color: #f0f2f5;
    color: var(--text-dark);
}

/* --- 导航栏容器 --- */
.navbar {
    background-color: #fff;
    height: var(--nav-height);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: relative;
    z-index: 1000;
    
    /* 关键修改：Flex 布局，两端对齐 */
    display: flex;
    align-items: center;
    justify-content: space-between; 
    
    padding: 0 40px; /* 两侧留白 */
}

/* Logo 区域 (左侧) */
.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
    /* 确保 Logo 在左侧 */
    flex-shrink: 0; 
}
.logo i { color: var(--primary-color); }

/* --- 中间容器：包含导航菜单和右侧按钮 --- */
.nav-right-section {
    display: flex;
    align-items: center;
    gap: 20px; /* 菜单和按钮之间的间距 */
    height: 100%;
}

/* --- 顶部菜单列表 --- */
.nav-menu {
    list-style: none;
    display: flex;
    height: 100%;
    margin: 0;
}

.nav-item {
    position: static; 
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 16px;
    font-weight: 500;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
}

/* 顶部菜单 Hover 效果 */
.nav-item:hover .nav-link {
    color: var(--primary-color);
    background-color: #fff5f5;
}

/* 激活状态 */
.nav-item.active .nav-link {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}

/* --- 全屏下拉菜单 (核心样式) --- */
.mega-menu {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    width: 100vw; /* 强制占满视口宽度 */
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-top: 1px solid var(--border-color);
    
    /* 隐藏与显示控制 */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease-in-out;
    z-index: 999;
    
    /* 内容居中限制最大宽度 */
    display: flex;
    justify-content: center; 
}

/* 鼠标移入显示 */
.nav-item:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 下拉内容容器 */
.mega-menu-content {
    width: 100%;
    max-width: 1200px; /* 内容最大宽度 */
    padding: 40px 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4列布局 */
    gap: 30px;
}

/* 列样式 */
.menu-column {
    list-style: none;
}

.column-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

.menu-item {
    margin-bottom: 12px;
}

.menu-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-gray);
    font-size: 14px;
    padding: 8px 10px;
    border-radius: 6px;
    transition: all 0.2s;
}

.menu-link i {
    width: 24px;
    text-align: center;
    margin-right: 10px;
    color: #999;
    transition: color 0.2s;
}

/* 下拉项 Hover 效果 */
.menu-link:hover {
    background-color: #fff5f5;
    color: var(--primary-color);
    transform: translateX(5px);
}

.menu-link:hover i {
    color: var(--primary-color);
}

/* 右侧按钮样式 */
.cta-button {
    background: var(--primary-color);
    color: white;
    padding: 10px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s;
    white-space: nowrap;
}
.cta-button:hover {
    background: #c0392b;
}

/* 页面内容占位 */
.page-content {
    padding: 60px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

h1 { margin-bottom: 20px; color: var(--text-dark); }
p { line-height: 1.6; color: var(--text-gray); }
