/* 盒模型重置 - 让所有元素使用border-box */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 解决div>img空白问题 */
div > img {
  display: block;
  max-width: 100%;
  height: auto;
  vertical-align: top;
}

/* 或者使用更通用的解决方案 */
img {
  display: block;
  max-width: 100%;
  height: auto;
  vertical-align: top;
}

/* 全局CSS变量定义 */
:root {
  --primary-color: #71216e;
  --primary1-color: #944489;
  --secondary-color: #fd7e14;
  --accent-color: #20c997;
  --dark-color: #343a40;
  --light-color: #f8f9fa;
  --gradient-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --medical-gradient: linear-gradient(
    135deg,
    #667eea 0%,
    #764ba2 50%,
    #f093fb 100%
  );
}

/* 全局body样式 */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  padding-top: 80px; /* 为固定导航栏留空间 */
  color: var(--dark-color);
  margin: 0;
}

/* 自定义Container宽度*/
.container {
  width: 1400px;
  margin: 0 auto;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
  cursor: pointer;
}

/* 全局显示工具类 */
.d-none {
  display: none !important;
}
.d-block {
  display: block !important;
}
.d-inline {
  display: inline !important;
}
.d-inline-block {
  display: inline-block !important;
}
.d-flex {
  display: flex !important;
}

/* 全局对齐工具类 */
.text-left {
  text-align: left !important;
}
.text-center {
  text-align: center !important;
}
.text-right {
  text-align: right !important;
}

.justify-content-start {
  justify-content: flex-start !important;
}
.justify-content-center {
  justify-content: center !important;
}
.justify-content-end {
  justify-content: flex-end !important;
}
.justify-content-between {
  justify-content: space-between !important;
}

.align-items-start {
  align-items: flex-start !important;
}
.align-items-center {
  align-items: center !important;
}
.align-items-end {
  align-items: flex-end !important;
}

/* 全局颜色工具类 */
.text-primary {
  color: var(--primary-color) !important;
}
.text-secondary {
  color: var(--secondary-color) !important;
}
.text-dark {
  color: var(--dark-color) !important;
}
.text-light {
  color: var(--light-color) !important;
}
.text-muted {
  color: #6c757d !important;
}
.text-white {
  color: white !important;
}

.cursor_pointer {
  cursor: pointer;
}

.flex_between_center {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex_column_between {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.flex_column_center {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.flex_end {
  display: flex;
  justify-content: flex-end;
}

.flex_center_center {
  display: flex;
  justify-content: center;
  align-items: center;
}
/* 生成一个文本超出内容宽度，超出部分用省略号表示的通用样式 */

/* 文本省略号通用样式 start */
/* 单行文本省略号 */
.text-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 多行文本省略号 - 2行 */
.text-ellipsis-2 {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
  color: #333;
}

/* 多行文本省略号 - 3行 */
.text-ellipsis-3 {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

/* 多行文本省略号 - 4行 */
.text-ellipsis-4 {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

/* 多行文本省略号 - 4行 */
.text-ellipsis-5 {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

/* 自定义行数的文本省略号（通过CSS变量控制） */
.text-ellipsis-custom {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: var(--line-clamp, 2);
  -webkit-box-orient: vertical;
  word-break: break-word;
}
/* 文本省略号通用样式 end */

/* 分页器样式 */
.pagination {
  display: flex;
  justify-content: flex-end;
  padding-right: 50px;
  margin-top: 40px;
  padding-top: 40px;
  margin-bottom: 20px;
  /* 添加这个属性让分页始终在底部 */
  margin-top: auto;
}

.pagination ul {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 5px;
}

.pagination li {
  margin: 0;
}

.pagination a,
.pagination span {
  display: block;
  padding: 8px 12px;
  text-decoration: none;
  color: #666;
  border: 1px solid #ddd;
  border-radius: 4px;
  transition: all 0.3s ease;
  font-size: 14px;
  min-width: 35px;
  text-align: center;
}

.pagination a:hover {
  background-color: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

.pagination .current {
  background-color: var(--primary-color) !important;
  color: #fff !important;
  border-color: var(--primary-color) !important;
}

.pagination li.active span.current {
  background-color: var(--primary-color) !important;
  color: #fff !important;
  border-color: var(--primary-color) !important;
}

.pagination .prev,
.pagination .next {
  font-weight: bold;
}

.pagination .disabled {
  color: #ccc;
  cursor: not-allowed;
  border-color: #eee;
}

.pagination .disabled:hover {
  background-color: transparent;
  color: #ccc;
  border-color: #eee;
}

.pagination li.disabled a,
.pagination li.disabled span {
  color: #ccc;
  cursor: not-allowed;
  border-color: #eee;
}

.pagination li.disabled a:hover,
.pagination li.disabled span:hover {
  background-color: transparent;
  color: #ccc;
  border-color: #eee;
}
