/* ================= 全局重置与变量 ================= */
:root {
	--primary-red: #b30000;
	/* 主色调红 */
	--dark-red: #8a0000;
	/* 深红，用于导航和底部 */
	--text-color: #333333;
	--text-light: #666666;
	--border-color: #e5e5e5;
	--bg-gray: #f8f8f8;
	--container-width: 1200px;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
	color: var(--text-color);
	line-height: 1.6;
	background-color: #ffffff;
}

a {
	text-decoration: none;
	color: inherit;
	transition: color 0.3s;
}

a:hover {
	color: var(--primary-red);
}

ul,
ol {
	list-style: none;
}

.container {
	width: 100%;
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 0 15px;
}

/* ================= 公共头部与导航 ================= */
/* 顶栏 */
/* ================= 公共头部与导航 (合并版) ================= */
/* 合并后的顶部背景区 */
.header-top-bg {
    /* 优先使用背景图，加载失败或未设置时使用红橙色渐变作为后备 */
    /* background: linear-gradient(135deg, #b30000 0%, #e65100 50%, #b30000 100%); */
	/* background-image: url("../tw_pic/top_bg.jpg") ; */   
	background: url("../tw_pic/top_bg.png") no-repeat center / cover;
    padding-bottom: 0; /* 原为 10px，改为 0 */
    position: relative;
}

/* 2. 注释掉或删除底部的波浪装饰伪元素（如果有间隙，这个5px高度也会造成视觉上的分离感） */
/* 
.header-top-bg::after {
    content: '';
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.2);
}
*/

/* 顶栏（修改背景为透明） */
.top-bar {
    background-color: transparent;
    color: #ffffff;
    font-size: 12px;
    padding: 10px 0;
}

.top-bar .container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
}

.top-bar-links {
    display: flex;
    gap: 15px;
}

.top-bar-links a {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #ffffff;
}

.search-box {
    display: flex;
    background: rgba(255, 255, 255, 0.25); /* 在深色背景上使用半透明白 */
    border-radius: 15px;
    padding: 2px 10px;
    align-items: center;
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 12px;
    width: 120px;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

/* Logo 区域（修改背景为透明，文字颜色调整为白色以适应深色背景） */
.header-main {
    padding-bottom: 55px; /* 原为 10px 0 20px，将底部20px改为10px（或者改为0，完全贴合） */
    background-color: transparent;
}

.header-main .container {
    display: flex;
    justify-content: flex-start; /* 根据设计图，Logo通常靠左，也可居中 */
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 26px;
    font-weight: bold;
    color: #ffffff; /* 文字改为白色，适配深色背景图 */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); /* 增加文字阴影提升可读性 */
}

.logo img {
    height: 50px;
    /* background: #fff; /* 如果Logo是透明底，这里提供一个白色底色便于显示（可选） */ */
    border-radius: 50%;
    padding: 2px;
}

/* 主导航：设计图深红底 + 当前项上凸高亮 Tab */
.main-nav {
	--nav-bg: #a50300;
	--nav-active: #be211f;
	--nav-height: 48px;
	--nav-tab-rise: 8px;
	background-color: var(--nav-bg);
	margin-top: 0;
	padding-top: 0;
	position: relative;
	z-index: 20;
	overflow: visible;
}

.main-nav .container {
	display: flex;
	justify-content: center;
	align-items: stretch;
	height: var(--nav-height);
	overflow: visible;
}

.nav-list {
	display: flex;
	width: 100%;
	height: 100%;
	align-items: stretch;
}

.nav-list li {
	flex: 1;
	text-align: center;
	position: relative;
}

.nav-list a {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: #ffffff;
	font-size: 16px;
	font-weight: bold;
	white-space: nowrap;
}

.nav-list li:hover,
.nav-list li.active,
.nav-list li:has(a.active) {
	background-color: var(--nav-active);
}

/* 当前页 / 悬停：顶部伪元素向上延伸，形成凸出 Tab */
.nav-list li.active::before,
.nav-list li:hover::before,
.nav-list li:has(a.active)::before {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	top: calc(var(--nav-tab-rise) * -1);
	height: var(--nav-tab-rise);
	background-color: var(--nav-active);
}

.mobile-menu-btn {
	display: none;
	background: none;
	border: none;
	color: #fff;
	font-size: 24px;
	cursor: pointer;
}

/* Banner 区域 */
.banner {
	width: 100%;
	height: 300px;
	/* 使用渐变色模拟设计图中的红黄波浪背景 */
	background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 50%, #b30000 100%);
	position: relative;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* 首页Banner轮播 */
.banner-slider {
	width: 100%;
	height: 100%;
	position: relative;
}

.banner-slide {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	transition: opacity 0.5s;
	display: flex;
	justify-content: center;
	align-items: flex-end;
}

.banner-slide.active {
	opacity: 1;
}

.banner-slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.banner-dots {
	position: absolute;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 10px;
	z-index: 10;
}

.banner-dots span {
	width: 30px;
	height: 5px;
	background: rgba(255, 255, 255, 0.5);
	cursor: pointer;
}

.banner-dots span.active {
	background: #ffffff;
}

/* ================= 公共底部 ================= */
.site-footer {
	background-color: var(--dark-red);
	color: #ffffff;
	padding: 30px 0;
	font-size: 14px;
}

.site-footer .container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 20px;
}

.footer-logo img {
	height: 60px;
}

.footer-info {
	line-height: 1.8;
}

.footer-qr {
	text-align: center;
}

.footer-qr img {
	width: 100px;
	height: 100px;
	background: #fff;
	padding: 5px;
}

/* ================= 首页专属样式 ================= */
/* 新闻版块 */
.section-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	margin: 40px 0 20px;
	border-bottom: 2px solid var(--border-color);
	padding-bottom: 10px;
}

.section-title {
	font-size: 24px;
	color: var(--primary-red);
	position: relative;
	padding-left: 15px;
}

.section-title::before {
	content: '';
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 5px;
	height: 20px;
	background-color: var(--primary-red);
}

.section-title span {
	font-size: 14px;
	color: var(--text-light);
	margin-left: 10px;
	font-weight: normal;
}

.view-more {
	font-size: 14px;
	color: var(--text-light);
}

.view-more:hover {
	color: var(--primary-red);
}

.news-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
	margin-bottom: 40px;
}

.news-card {
	border: 1px solid var(--border-color);
	border-radius: 4px;
	overflow: hidden;
	background: #fff;
}

.news-card img {
	width: 100%;
	height: 150px;
	object-fit: cover;
}

.news-card-content {
	padding: 15px;
}

.news-card-title {
	font-size: 15px;
	font-weight: bold;
	margin-bottom: 10px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	height: 44px;
}
.news-card-title a {
    color: inherit;
}
.news-card-title a:hover {
    color: var(--primary-red);
}
.news-card-date {
	font-size: 13px;
	color: var(--text-light);
}

/* 双栏版块 */
.dual-section {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
	margin-bottom: 50px;
}

.list-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 0;
	border-bottom: 1px dashed var(--border-color);
	font-size: 15px;
}

.list-item::before {
	content: '•';
	color: var(--primary-red);
	margin-right: 10px;
}

.list-item-text {
    display: block; /* 必须添加，否则 a 标签无法正常显示省略号 */
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 20px;
    color: var(--text-color); /* 继承默认字体颜色 */
}

.list-item-text:hover {
    color: var(--primary-red); /* 鼠标悬停变红 */
}

.list-item-date {
	color: var(--text-light);
	font-size: 14px;
}

/* 社团风采特色布局 */
.club-feature {
	display: flex;
	gap: 15px;
	margin-bottom: 15px;
}

.club-feature img {
	width: 150px;
	height: 100px;
	object-fit: cover;
}

.club-feature-text {
	font-size: 14px;
	color: var(--text-light);
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* 快速通道 */
.quick-links {
	background-color: var(--bg-gray);
	padding: 30px 0;
}

.quick-links .container {
	display: flex;
	align-items: center;
	gap: 30px;
}

.quick-title {
	font-size: 20px;
	color: var(--primary-red);
	font-weight: bold;
}

.quick-logos {
	display: flex;
	gap: 20px;
	flex: 1;
}

.quick-logos img {
	height: 40px;
}

/* ================= 栏目页 & 内容页专属样式 ================= */
.page-layout {
	display: grid;
	grid-template-columns: 250px 1fr;
	gap: 40px;
	margin: 40px auto;
}

/* 侧边栏 */
.sidebar-menu {
	background-color: #f2f2f2;
}

.sidebar-title {
	background-color: var(--primary-red);
	color: #fff;
	font-size: 20px;
	font-weight: bold;
	padding: 15px;
	text-align: center;
}

.sidebar-list {
	padding: 10px 0;
}

.sidebar-list li {
	text-align: center;
	padding: 12px 0;
	border-bottom: 1px solid #e0e0e0;
}

.sidebar-list a {
	color: var(--text-color);
	font-size: 16px;
}

.sidebar-list a:hover {
	color: var(--primary-red);
	font-weight: bold;
}

/* 主内容区 */
.content-area {
	min-width: 0;
	/* 防止溢出 */
}

.breadcrumb {
	font-size: 14px;
	color: var(--text-light);
	margin-bottom: 20px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--border-color);
}

.content-title {
	font-size: 22px;
	color: var(--primary-red);
	font-weight: bold;
	margin-bottom: 20px;
	padding-left: 15px;
	position: relative;
}

.content-title::before {
	content: '';
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 5px;
	height: 20px;
	background-color: var(--primary-red);
}

/* 文章列表 */
.article-list {
	margin-top: 20px;
}

.article-list .list-item {
	padding: 15px 0;
}

/* 分页 */
.pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
	margin-top: 40px;
}

.pagination a,
.pagination span {
	display: inline-block;
	padding: 5px 15px;
	border: 1px solid var(--border-color);
	color: var(--text-color);
	font-size: 14px;
}

.pagination a:hover,
.pagination span.active {
	background-color: var(--primary-red);
	color: #fff;
	border-color: var(--primary-red);
}

/* 文章详情内容 */
.article-content {
	font-size: 16px;
	line-height: 2;
	color: var(--text-color);
}

.article-content p {
	margin-bottom: 15px;
	text-indent: 2em;
}

.article-content h3 {
	font-size: 18px;
	margin: 20px 0 10px;
	text-indent: 0;
}

/* ================= 响应式设计 (移动端适配) ================= */
@media (max-width: 992px) {
	.news-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.dual-section {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 768px) {

	/* 顶部栏与导航 */
	.top-bar .container {
		flex-direction: column;
		gap: 10px;
		align-items: flex-end;
	}

	.header-main .container {
		flex-direction: column;
		gap: 15px;
	}

	.main-nav {
		--nav-tab-rise: 0px;
	}

	.main-nav .container {
		flex-direction: column;
		align-items: flex-start;
		position: relative;
		height: auto;
		min-height: var(--nav-height);
	}

	.mobile-menu-btn {
		display: block;
		position: absolute;
		right: 15px;
		top: 50%;
		transform: translateY(-50%);
		padding: 10px;
		z-index: 1;
	}

	.nav-list {
		display: none;
		flex-direction: column;
		width: 100%;
		height: auto;
	}

	.nav-list.show {
		display: flex;
	}

	.nav-list li {
		text-align: left;
		border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	}

	.nav-list a {
		justify-content: flex-start;
		padding: 12px 20px;
		height: auto;
	}

	/* 布局调整 */
	.news-grid {
		grid-template-columns: 1fr;
	}

	.quick-links .container {
		flex-direction: column;
		align-items: flex-start;
	}

	.quick-logos {
		flex-wrap: wrap;
	}

	.page-layout {
		grid-template-columns: 1fr;
	}

	.site-footer .container {
		flex-direction: column;
		text-align: center;
	}
}