/* 头部导航栏 */
.header {
	color: #000000;
	z-index: 100;
	width: 100%;
	/* 占满宽度 */
	padding: 20px 0;
	/* 导航栏内边距，控制覆盖高度 */

}

.header-top {
	font-size: 18px;
	margin-bottom: 10px;
	height: 50px;
	display: flex;
	justify-content: space-between;
	/* 左右分布 */
	align-items: center;
	/* 上下居中 */
	padding: 0 80px;
	/* 左右间距 */
}

/* 导航栏容器 */
.nav {
	display: flex;
	gap: 40px;
	/* 导航项间距 */
	height: 50px;
	font-size: 16px;
	/* 字体大小 */
	justify-content: center;
	/* 内容居中 */
	align-items: center;
	/* 上下居中 */
	list-style: none;
	padding: 0;
	margin: 0;
	background-color: transparent;
	position: relative;
}

/* 导航项链接 */
.nav a {
	color: #000000;
	/* 字体白色 */
	text-decoration: none;
	/* 去掉下划线 */
	padding: 8px 0;
	display: block;
}

.nav a:hover {
	text-decoration: none;
	/* 去掉 hover 下划线 */
	border-bottom: 2px solid #ffd700;
	/* 底部边框效果 */

}

/* 导航项容器 */
.nav-item {
	position: relative;
}

/* 选中.nav-item下的第一个a标签 */
.nav-item>a:first-child {
	/* 自定义样式 */
	font-size: 20px;
	/*    font-weight: bold; /* 加粗 */
	padding: 10px 0;
	/* 调整内边距 */
}

#nav-admin-item>a {
	font-size: 20px;
	padding: 10px 0;
	color: #ffd700;
}

#nav-admin-item>a:hover {
	border-bottom-color: #fff8dc;
	color: #fffacd;
}

.nav-login {
	position: relative;
}

/* 选中.nav-item下的第一个a标签 */
.nav-login a {
	/* 自定义样式 */
	font-size: 20px;
	/*    font-weight: bold; /* 加粗 */
	padding: 10px 0;
	/* 调整内边距 */
}

/* 下拉框样式 */
.dropdown {
	/* 替换display: none，使用opacity和visibility实现过渡 */
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	/* 初始向下偏移 */
	position: absolute;
	top: 100%;
	left: 0;
	background-color: rgba(0, 0, 0, 0.8);
	min-width: 200px;
	border-radius: 4px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
	z-index: 999;
	padding: 0;
	margin: 0;
	/* 添加过渡效果 */
	transition:
		opacity 0.5s ease,
		visibility 0.5s ease,
		transform 0.5s ease;
}

.dropdown a {
	padding: 10px 15px;
	color: #fff;
	text-decoration: none;
	display: block;
	border-bottom: none;
	/* 去掉下拉项底部边框 */
}

.dropdown a:hover {
	background-color: #ffffff;
	border-bottom: none;
	/* hover时也无底部边框 */
	color: #000;
}

/* 鼠标悬浮显示下拉框（触发过渡） */
.nav-item:hover .dropdown {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	/* 回到原位 */
}

/* ============ 优化后的响应式适配 ============ */
@media (max-width: 1024px) {

	/* 平板设备适配 */
	.header-top {
		padding: 0 40px;
	}

	.nav {
		gap: 25px;
	}

	.carousel-title {
		font-size: 60px;
	}

	.customs-carousel-container {
		height: 450px;
	}
}

@media (max-width: 768px) {

	/* 移动端适配 */
	.header {
		padding: 10px 0;
	}

	.header-top {
		font-size: 16px;
		height: auto;
		padding: 0 20px;
		flex-direction: row;
		/* 保持横向布局，避免错乱 */
		align-items: center;
		gap: 15px;
	}

	/* 导航栏优化 */
	.nav {
		gap: 15px;
		font-size: 14px;
		flex-wrap: wrap;
		overflow: visible;
		padding: 10px;
		justify-content: center;
		scrollbar-width: none;
	}

	.nav::-webkit-scrollbar {
		display: none;
	}

	.nav-item>a:first-child,
	.nav-login a,
	#nav-admin-item>a {
		font-size: 16px;
		padding: 8px 0;
	}

	/* 轮播图适配 */
	.main-carousel {
		height: 70vh;
		/* 减小高度，避免内容溢出 */
		min-height: 400px;
	}

	.carousel-content {
		max-width: 90%;
		margin-top: 80px;
		padding: 15px;
	}

	.carousel-title {
		font-size: 40px;
		margin-bottom: 15px;
	}

	.carousel-subtitle {
		font-size: 20px;
	}

	.carousel-desc {
		font-size: 16px;
	}

	.carousel-tag {
		font-size: 22px;
	}

	/* 轮播控制按钮 */
	.carousel-control {
		width: 40px;
		height: 40px;
		font-size: 20px;
	}

	.carousel-prev {
		left: 10px;
	}

	.carousel-next {
		right: 10px;
	}

	/* 内容容器适配 */
	.container {
		max-width: 100%;
		padding: 15px;
	}

	/* 春节介绍适配 */
	.intro-section {
		padding: 20px;
		margin-bottom: 20px;
	}

	.section-title {
		font-size: 24px;
	}

	.intro-content {
		flex-direction: column;
		gap: 20px;
	}

	.intro-image img {
		height: 220px;
	}

	/* 习俗轮播适配 */
	.customs-carousel-section {
		padding: 20px;
	}

	.customs-carousel-container {
		height: auto;
		min-height: 400px;
	}

	.customs-slide {
		flex-direction: column;
	}

	.customs-image {
		height: 220px;
	}

	.customs-image img {
		width: 100%;
	}

	.customs-content {
		padding: 20px;
	}

	.customs-title {
		font-size: 26px;
	}

	.customs-desc {
		font-size: 16px;
		margin-bottom: 20px;
	}

	.customs-features {
		grid-template-columns: 1fr;
	}

	/* 非遗项目适配 */
	.heritage-section {
		padding: 20px;
	}

	.heritage-item {
		padding: 12px;
	}

	.heritage-icon {
		width: 50px;
		height: 50px;
		font-size: 20px;
	}

	/* 文化传承适配 */
	.inheritance-section {
		padding: 30px 0;
	}

	.inheritance-title {
		font-size: 26px;
	}

	.inheritance-text {
		font-size: 16px;
	}

	/* 页脚适配 */
	.footer-content {
		padding: 0 15px;
	}

	.footer-column {
		min-width: 45%;
		padding-right: 15px;
	}
}

/* 横屏手机适配 */
@media (max-height: 500px) and (orientation: landscape) {
	.main-carousel {
		height: 100vh;
	}

	.carousel-content {
		margin-top: 20px;
	}

	.carousel-title {
		font-size: 36px;
	}
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;   /* 禁止横向溢出、隐藏左右滚动条 */
  width: 100%;
}
/* ============ 移动端汉堡菜单 ============ */
.nav-toggle {
	display: none;
	background: transparent;
	border: 2px solid rgba(0, 0, 0, 0.55);
	border-radius: 6px;
	padding: 6px 9px;
	cursor: pointer;
	margin: 0 auto;
}
.nav-toggle span {
	display: block;
	width: 22px;
	height: 2px;
	background: #333;
	margin: 5px 0;
	border-radius: 2px;
	transition: transform 0.3s, opacity 0.3s;
}
.header.nav-open .nav-toggle span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}
.header.nav-open .nav-toggle span:nth-child(2) {
	opacity: 0;
}
.header.nav-open .nav-toggle span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
	.nav-toggle {
		display: block;
	}
	.header .nav {
		display: none;
		flex-direction: column;
		height: auto;
		gap: 0;
		padding: 6px 12px;
		background: #fff;
		border-radius: 8px;
		box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
	}
	.header.nav-open .nav {
		display: flex;
	}
	.header .nav-item {
		width: 100%;
		text-align: center;
	}
	.header .nav-item > a:first-child {
		border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	}
	.header .dropdown {
		position: static;
		display: none;
		opacity: 1;
		visibility: visible;
		transform: none;
		transition: none;
		background: #f7f7f7;
		min-width: 100%;
		box-shadow: none;
	}
	.header .dropdown a {
		color: #333;
	}
	.header .dropdown a:hover {
		background: #eee;
		color: #000;
	}
	.header .nav-item.open .dropdown {
		display: block;
	}
	.header .nav-login {
		width: 100%;
		text-align: center;
	}
}
