/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "微软雅黑", sans-serif;
    color: #333;
    padding-top: 80px; /* 给固定导航留出空间 */
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* 清除浮动类 */
.clearfix::after {
    content: "";
    display: block;
    clear: both;
}

/* 固定导航栏 */
.fixed-nav {
    position: fixed; /* 固定定位 */
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 999; /* 确保在最上层 */
    display: flex;
    align-items: center;
    padding: 0 50px;
    justify-content: space-between;
}

.logo img {
    height: 40px;
}

/* 横向导航 */
.main-nav {
    display: flex;
}

.main-nav li {
    margin: 0 15px;
}

.main-nav a {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    padding: 10px 0;
    position: relative;
}

.main-nav a::after {
    content: "";
    position: absolute; /* 绝对定位 */
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #3498db;
    transition: width 0.3s ease;
}

.main-nav a:hover::after {
    width: 100%;
}

.side-nav {
    display: flex;
}

.side-nav li {
    margin-left: 20px;
}

.side-nav a {
    font-size: 14px;
    color: #666;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.side-nav a:hover {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

/* 横幅区域 */
.banner {
    position: relative; /* 相对定位，作为绝对定位的容器 */
    height: 400px;
    overflow: hidden;
}

.banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-text {
    position: absolute; /* 绝对定位 */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.banner-text h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.banner-text p {
    font-size: 24px;
}

/* 容器 */
.container {
    width: 1200px;
    margin: 50px auto;
    display: flex;
    gap: 30px;
}

/* 侧边栏 */
.sidebar {
    width: 250px;
    flex-shrink: 0;
}

/* 竖向导航 */
.vertical-nav {
    background-color: white;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
}

.vertical-nav li {
    border-bottom: 1px solid #eee;
}

.vertical-nav li:last-child {
    border-bottom: none;
}

.vertical-nav a {
    display: block; /* 块级显示，占满整行 */
    padding: 15px 20px;
    color: #333;
    transition: background-color 0.3s ease;
}

.vertical-nav a:hover {
    background-color: #f5f5f5;
    color: #3498db;
}

/* 定位广告 */
.ad-box {
    position: sticky; /* 粘性定位 */
    top: 100px;
    background-color: #e74c3c;
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.ad-box p:first-child {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
}

/* 主内容区 */
.main-content {
    flex: 1;
}

.main-content h2 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.main-content p {
    line-height: 1.8;
    margin-bottom: 30px;
    color: #666;
}

/* 卡片列表（浮动布局） */
.card-list {
    margin-left: -15px;
    margin-right: -15px;
}

.card {
    width: 33.333%;
    float: left; /* 浮动布局 */
    padding: 0 15px;
    margin-bottom: 30px;
}

.card > div {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 20px;
    height: 100%;
}

.card h3 {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.card p {
    color: #666;
    line-height: 1.6;
}

/* 页脚 */
.footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
}