/* 清除默认样式的代码 */
/* 去除常见标签默认的 margin 和 padding */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
li,
dl,
dt,
dd,
input {
	margin: 0;
	padding: 0;
}

/* 內减模式 */
* {
	-webkit-box-sizing: border-box;
	/* Safari 3.0+ */
	-moz-box-sizing: border-box;
	/* Firefox 1.0+ */
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	/* Safari 滚动优化 */
	scroll-padding-top: 80px;
}

/* 设置网页统一的字体大小、行高、字体系列相关属性 */
body {
	font: 16px/1.5 "Helvetica Neue", Helvetica, Arial, "Microsoft Yahei",
		"Hiragino Sans GB", "Heiti SC", "WenQuanYi Micro Hei", sans-serif;
	color: #333;
	background-color: #eef0f4;
	padding-top: 60px;
	-webkit-font-smoothing: antialiased;
	/* Safari 字体平滑 */
	-moz-osx-font-smoothing: grayscale;
	/* Firefox 字体平滑 */
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-weight: 400;
}

/* 去除列表默认样式 */
ul,
ol {
	list-style: none;
}

/* Keep <i> for icons (FontAwesome), allow <em> for italics */
i {
  font-style: normal;
}
em {
  font-style: italic;
}

/* 去除a标签默认下划线，并设置默认文字颜色 */
a {
	text-decoration: none;
	color: #333;
	-webkit-tap-highlight-color: transparent;
	/* Safari/Chrome 点击高亮 */
}

/* 设置img的垂直对齐方式为居中对齐，去除img默认下间隙 */
img {
	max-width: 100%;
	/* 更好的响应式处理 */
	height: auto;
	vertical-align: middle;
	-webkit-user-select: none;
	/* Safari 禁止选中 */
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

/* 去除input默认样式 */
input {
	border: none;
	outline: none;
	color: #333;
	-webkit-appearance: none;
	/* Safari 移除默认样式 */
	-moz-appearance: none;
	appearance: none;
	border-radius: 0;
	/* Safari 移除圆角 */
}

/* 左浮动 */
.fl {
	float: left;
}

/* 右浮动 */
.fr {
	float: right;
}

/* 双伪元素清除法 */
.clearfix::before,
.clearfix::after {
	content: "";
	display: table;
}

.clearfix::after {
	clear: both;
}

button {
	border: none;
	-webkit-appearance: none;
	/* Safari 移除默认样式 */
	-moz-appearance: none;
	appearance: none;
	background: none;
	padding: 0;
	cursor: pointer;
}

.one-overflow-space {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.hoverImg {
	overflow: hidden;
	object-fit: cover;
	width: 100%;
	height: 100%;
	-webkit-transition: -webkit-transform 0.3s ease;
	/* Safari 前缀 */
	transition: transform 0.3s ease;
}

/* .hoverImg:hover {
	transform: translateY(-5px);
} */

.hoverImg img {
	width: 100%;
	height: auto;
	-webkit-transition: -webkit-transform 0.5s ease;
	transition: transform 0.5s ease;
	-webkit-backface-visibility: hidden;
	/* Safari 修复图片闪烁 */
	backface-visibility: hidden;
}

.hoverImg:hover img {
	-webkit-transform: scale(1.05);
	transform: scale(1.05);
}

.w{
  width: 125ch;      /* 固定字符宽度 */
  max-width: 125ch;
  min-width: 0;      /* 取消原来的 52rem 限制 */
  margin-left: auto;
  margin-right: auto;
}

.bgText {
	color: #d73470;
}

:target {
	outline: none;
	background-color: transparent;
}

header {
	/* Safari 渐变兼容性 */
	background: -webkit-linear-gradient(left, #dceaf7, #5096d9);
	/* Safari 5.1-6.0 */
	background: -o-linear-gradient(right, #dceaf7, #5096d9);
	/* Opera 11.1-12.0 */
	background: -moz-linear-gradient(right, #dceaf7, #5096d9);
	/* Firefox 3.6-15 */
	background: linear-gradient(90deg, #dceaf7, #5096d9);
	/* 标准语法 */

	height: 40px;
	width: 100%;
	position: fixed;
	/* 始终固定定位 */
	top: 0;
	left: 0;
	z-index: 1000;
	border-bottom: 3px solid #527bbd;
	-webkit-transform: translateZ(0);
	/* Safari 硬件加速 */
	transform: translateZ(0);
	-webkit-backface-visibility: hidden;
	/* Safari 修复渲染问题 */
	backface-visibility: hidden;
}

.cHnav {
	-webkit-box-pack: justify;
	/* Safari 兼容 */
	-webkit-justify-content: space-between;
	justify-content: space-between;
	-webkit-box-align: center;
	-webkit-align-items: center;
	align-items: center;
	display: -webkit-box;
	/* Safari 旧版兼容 */
	display: -webkit-flex;
	display: flex;
	/* width: 65%;
	min-width: 1140px; */

	width: 100%;
	padding: 0 20px;

	height: 100%;
	min-width: 900px;
	margin: auto;
}

/* ===============================
   Desktop Navigation Width Limit
   =============================== */
/* @media (min-width: 900px){
  .cHnav{
    max-width: 125ch;
    margin-left: auto;
    margin-right: auto;
  }
} */

.logo {
	height: 28px;
}

.logo img {
	height: 100%;
	max-width: 165px;
	-webkit-user-drag: none;
	/* Safari 禁止拖动 */
	-khtml-user-drag: none;
	-moz-user-drag: none;
	-o-user-drag: none;
	user-drag: none;
}

.nav {
	display: -webkit-box;
	display: -webkit-flex;
	display: flex;
}

.nav li {
	padding: 0 15px;
}

.nav li a {
	font-size: 18px;
	display: inline-block;
	/* Safari 更好的点击区域 */
	position: relative;
}

/* Safari 特定修复 */
@media not all and (min-resolution:.001dpcm) {
	@supports (-webkit-appearance:none) {

		/* Safari 滚动行为回退 */
		html {
			scroll-behavior: auto;
		}

		/* Safari 按钮点击效果优化 */
		button,
		.nav li a,
		input[type="button"],
		input[type="submit"] {
			-webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
		}

		/* Safari 弹性布局优化 */
		.cHnav {
			display: -webkit-flex !important;
		}

		/* Safari 渐变优化 */
		header {
			background: -webkit-linear-gradient(left, #dceaf7 0%, #5096d9 100%);
		}
	}
}

/* 针对 Safari 15+ 的优化 */
@supports (-webkit-touch-callout: none) {

	/* iOS Safari 特定优化 */
	body {
		-webkit-touch-callout: none;
		/* 禁止长按菜单 */
	}

	/* iOS 安全区域适配 */
	@supports (padding: max(0px)) {
		header {
			padding-top: env(safe-area-inset-top);
			padding-bottom: env(safe-area-inset-bottom);
		}
	}

	/* 改善 Safari 中的滚动性能 */
	html,
	body {
		-webkit-overflow-scrolling: touch;
		overscroll-behavior-y: none;
	}

	/* 禁用 Safari 文本选择 */
	.nav li a,
	button {
		-webkit-user-select: none;
		user-select: none;
	}
}

/* 高分辨率屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi),
(min-resolution: 2dppx) {

	/* 为 Retina 屏幕优化 */
	.hoverImg img {
		image-rendering: -webkit-optimize-contrast;
		image-rendering: crisp-edges;
	}

	/* 更清晰的边框 */
	header {
		border-bottom-width: 1.5px;
		/* Retina 屏幕上的半像素边框 */
	}
}

/* 打印样式优化 */
@media print {
	header {
		position: static;
		background: none !important;
		border-bottom: 1px solid #527bbd;
	}

	.hoverImg:hover img {
		-webkit-transform: none;
		transform: none;
	}

}
