/* ============================================================
   reset.css - 重置样式
   重置浏览器默认样式，建立统一的基础样式基线
   ============================================================ */

/* 盒模型统一为border-box */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* HTML5 块级元素默认显示为块 */
article, aside, details, figcaption, figure,
footer, header, hgroup, main, menu, nav, section {
  display: block;
}

html {
  font-size: 14px;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  line-height: 1.6;
  color: var(--color-text-regular);
  background-color: var(--color-bg-page);
  font-family: "Source Han Sans CN", "思源黑体", "PingFang SC",
               "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
}

/* 列表样式重置 */
ul, ol {
  list-style: none;
}

/* 链接样式重置 */
a {
  color: inherit;
  text-decoration: none;
  background-color: transparent;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--color-secondary);
}

/* 图片重置 */
img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
  border-style: none;
}

/* 表格重置 */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* 表单元素重置 */
button, input, optgroup, select, textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  margin: 0;
}

button {
  cursor: pointer;
  background: none;
  border: none;
  outline: none;
}

input {
  outline: none;
}

textarea {
  overflow: auto;
  resize: vertical;
  outline: none;
}

/* 标题重置 */
h1, h2, h3, h4, h5, h6 {
  font-weight: normal;
  font-size: 100%;
}

/* 引用重置 */
blockquote, q {
  quotes: none;
}

blockquote::before, blockquote::after,
q::before, q::after {
  content: '';
  content: none;
}

/* 清除浮动 */
.clearfix::after {
  content: '';
  display: block;
  clear: both;
  height: 0;
  visibility: hidden;
}

/* 文字溢出省略 */
.text-ellipsis {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.text-ellipsis-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.text-ellipsis-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
