/**
 * 主导航菜单项宽度设置
 * 强制将每个导航菜单项宽度设置为200px，使用!important确保样式优先级最高
 * 确保所有导航项均匀分布，不会因内容长短不一而导致宽度不一致
 */
.energy-menu-body .energy-menu-item {
  width: 200px !important;
}

/* 杨家坪首页主要样式 */
.small-box {
  width: 1200px;
  margin: 0 auto;
  padding: 20px 0;
}

/* 标题样式 */
.title-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  border-bottom: 1px solid #2d9eee;
}

.title {
  position: relative;
  font-weight: 500;
  font-size: 24px;
  color: #2f2e2e;
  line-height: 33px;
  padding-bottom: 10px;
}

.title::before {
  position: absolute;
  content: '';
  display: inline-block;
  width: 150px;
  height: 4px;
  background-color: #046ccc;
  bottom: 0;
  left: 0;
}

.more {
  font-weight: 500;
  font-size: 16px;
  color: #666;
  line-height: 22px;
  text-align: left;
  cursor: pointer;
}

.more:hover {
  color: #b90513;
}

/* 热点新闻区域 */
.el-row {
  display: flex;
  margin-bottom: 20px;
  justify-content: space-between;
}

.el-col {
  /* padding: 0 10px; */
  box-sizing: border-box;
}

.el-col-24 {
  width: 100%;
}

.el-col-17 {
  width: 850px;
}

.el-col-12 {
  width: 50%;
}

/**
 * 右侧栏宽度设定
 * 将右侧栏（el-col-7）宽度固定为300px，覆盖默认的百分比宽度设置
 * 这确保了右侧通知公告等模块保持固定宽度，不会随窗口大小变化而变形
 */
.el-col-7 {
  width: 300px;
}

/* 轮播图区域样式 */
.hot-news-swiper {
  width: 100%;
  height: 284px !important; /* 固定高度，与提供的图片一致 */
  background: #fff;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 20px;
  position: relative;
}

/* 热点新闻链接样式 */
.hot-news-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.hot-news-link:hover .hot-news-title {
  color: #2d9eee; /* 悬停时标题变为绿色 */
  transition: color 0.3s;
}

.hot-news-link:hover .hot-news-img {
  transform: scale(1.05); /* 悬停时图片轻微放大 */
  transition: transform 0.5s;
}

.swiper-slide {
  display: flex;
  height: 100%;
}

.hot-news-item {
  display: flex;
  width: 100%;
  height: 100%;
}

.hot-news-img-col {
  width: 50%;
  height: 100%;
  overflow: hidden;
}

.hot-news-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hot-news-content-col {
  width: 50%;
  padding: 25px 20px;
  background-color: #fff;
  height: 100%;
  box-sizing: border-box;
}

.hot-news-title {
  font-family: PingFangSC, PingFang SC;
  font-weight: 500;
  font-size: 22px;
  color: #333;
  line-height: 42px;
  text-align: left;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 30px;
}

.hot-news-summary {
  margin-top: 20px;
  font-family: PingFangSC, PingFang SC;
  font-weight: 400;
  font-size: 20px;
  color: #999;
  line-height: 28px;
  text-align: left;
  font-style: normal;
  display: -webkit-box;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.hot-news-text {
  flex: 1;
}

.hot-news-date {
  font-family: PingFangSC, PingFang SC;
  font-weight: 400;
  font-size: 16px;
  color: #999;
  line-height: 1.5;
  text-align: left;
  font-style: normal;
  margin-top: auto;
}

/* Swiper 分页器样式 - 移到右下角 */
.swiper-pagination {
  position: absolute;
  bottom: 15px;
  right: 15px;
  left: auto;
  transform: none;
  display: flex;
  justify-content: flex-end;
  z-index: 10;
  width: 95% !important;
}

.swiper-pagination-bullet {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.2);
  opacity: 1;
  margin: 0 3px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.swiper-pagination-bullet-active {
  background-color: #046ccc;
}

/* 通知公告区域 */
.card-box {
  height: 95%;
  background: #fff;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-top {
  background-color: #2d9eee;
  color: #fff;
  padding: 12px 15px;
  font-size: 18px;
  font-weight: 500;
  display: flex;
  align-items: center;
}

.horn-box {
  margin-right: 8px;
  display: flex;
  align-items: center;
}

.horn-box img {
  width: 24px;
  height: 24px;
}

.card-bottom {
  flex: 1;
  padding: 15px;
}

.trade-box {
  list-style: none;
  padding: 0;
  margin: 0;
}

.trade-item {
  padding: 9px 0 !important;
  border-bottom: 1px dashed #eee;
  position: relative;
  padding-left: 15px !important;
}

.trade-item::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #ff7300;
  margin-right: 15px;
  vertical-align: middle;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.trade-top {
  font-size: 18px;
  line-height: 21px;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.trade-top:hover {
  color: #b90513;
}

/* 关于我院和单位简介区域 */
.information-box {
  margin-bottom: 20px;
  box-shadow: none;
  border-radius: 0;
}

.information-box .title-box {
  border-bottom: 1px solid #2d9eee;
  box-shadow: none;
  margin-bottom: 30px;
}

.information-title {
  position: relative;
  font-weight: 500;
  font-size: 24px;
  color: #2f2e2e;
  line-height: 33px;
  padding-bottom: 10px;
  display: flex;
  align-items: center;
}

.information-title::before {
  position: absolute;
  content: '';
  display: inline-block;
  width: 150px;
  height: 4px;
  background-color: #046ccc;
  bottom: 0;
  left: 0;
}

.information-title {
  padding-left: 0;
}

.round {
  width: 7px;
  height: 7px;
  background-color: #2d9eee;
  border-radius: 50%;
  margin-left: 20px;
  margin-right: 20px;
  display: inline-block;
}

/**
 * 信息模块副标题样式
 * 设置"单位简介"、"康复医疗简介"等副标题的统一样式
 * 使用加粗(500)字重和较大字号(20px)增强可读性
 * 采用与主标题相同的深灰色(#2f2e2e)保持色调一致性
 * 设置行高为28px确保多行文本的良好间距
 */

.information-right {
  /* 这是一个元素,元素里面的字体就会应用下面的设置 */
  /* 设置字体加粗  */
  font-weight: 500;
  /* 设置字体大小 */
  font-size: 20px;
  /* 设置字体颜色 */
  color: #2f2e2e;
  /* 设置行高 */
  line-height: 28px;
}

.detail-box {
  padding: 20px;
  height: auto;
  min-height: 300px;
  background: #fff;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

.el-scrollbar {
  height: 100%;
  position: relative;
  overflow: hidden;
}

.el-scrollbar__wrap {
  overflow-y: auto;
  height: 260px;
  max-height: 100%;
}

.el-scrollbar__wrap--hidden-default {
  scrollbar-width: none;
}

.el-scrollbar__wrap--hidden-default::-webkit-scrollbar {
  display: none;
}

.el-scrollbar__view {
  height: 100%;
}

.el-scrollbar__view p:first-child {
  /* font-weight: 500;
  font-size: 20px;
  text-align: center;
  margin-bottom: 20px;
  color: #333; */
}

.el-scrollbar__view p {
  /* margin-bottom: 15px;
  line-height: 1.8;
  font-size: 15px;
  color: #555;
  text-indent: 2em; */
}

/* 联系我们区域 */
.contact {
  height: auto;
  margin-bottom: 20px;
}

.contact .title-box {
  border-bottom: 1px solid #2d9eee;
  box-shadow: none;
  margin-bottom: 30px;
}

.detail-box-son {
  padding: 20px;
  min-height: 300px;
  background: #fff;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

/* 自定义介绍内容样式，替代内联样式 */
.institution-intro p:first-child {
  text-align: center;
  font-weight: 500;
  font-size: 20px;
  margin-bottom: 20px;
  color: #333;
}

.institution-intro p {
  text-indent: 2em;
  text-align: justify;
  margin-bottom: 15px;
  line-height: 1.8;
  font-size: 15px;
  color: #555;
}

/**
 * 导航菜单背景颜色设置
 * 为整个导航菜单区域设置背景色为亮绿色rgb(45, 158, 238)/#2d9eee
 * 这一鲜明的色彩能够凸显导航区域，增强用户体验
 */
.energy-menu {
  background-color: rgb(45, 158, 238);
}

/**
 * 导航菜单主体样式
 * 包含所有菜单项的容器，保持与整体导航相同背景色
 */
.energy-menu-body {
  background-color: rgb(45, 158, 238);
  display: flex;
  justify-content: space-around;
}

/**
 * 导航菜单项激活状态样式
 * 当菜单项被选中或处于当前页面时，使用深绿色rgb(4, 108, 204)/#046ccc
 * 深绿色提供了明显的视觉对比，帮助用户识别当前所在位置
 */
.energy-menu-item a.active {
  background-color: rgb(4, 108, 204) !important;
  color: #fff;
}

/**
 * 导航菜单项悬停效果
 * 当用户将鼠标悬停在菜单项上时，背景变为深绿色rgb(4, 108, 204)/#046ccc
 * 提供明确的交互反馈，增强用户体验
 */
.energy-menu-item a:hover {
  background-color: rgb(4, 108, 204);
  color: #fff;
}

@media screen and (max-width: 768px) {
  .small-box {
    width: 95%;
    /* padding: 10px; */
    margin: 0 auto;
  }

  .el-row {
    flex-direction: column;
  }

  .el-col-17 {
    width: 100%;
  }

  .el-col-12 {
    width: 100%;
  }

  /* Swiper 移动端适配 */
  .hot-news-swiper {
    width: 100%;
    height: auto;
    margin-bottom: 15px;
  }

  /* 移动端链接悬停效果优化 */
  .hot-news-link:hover .hot-news-img {
    transform: none; /* 移动端不需要图片放大效果，避免布局问题 */
  }

  .swiper-slide {
    flex-direction: column; /* 移动端图片和文字垂直堆叠 */
    height: auto;
  }

  .hot-news-item {
    flex-direction: column;
    height: auto;
  }

  .hot-news-img-col {
    width: 100%;
  }

  .hot-news-content-col {
    width: 100%;
    padding: 15px;
    height: auto;
  }

  .hot-news-title {
    font-size: 16px;
    line-height: 1.4;
    -webkit-line-clamp: 2; /* 移动端最多显示2行 */
    margin-bottom: 8px;
  }

  .hot-news-date {
    font-size: 14px;
    margin-top: 0;
  }

  /* 移动端分页器位置调整 */
  .swiper-pagination {
    bottom: 10px;
    right: 10px;
  }

  .el-col-7 {
    width: 100%;
    margin-top: 20px;
  }

  /* 通知公告区域 */
  .card-box {
    margin-top: 10px;
    height: auto; /* 移动端高度自适应 */
  }

  .card-top {
    padding: 15px;
  }

  .card-bottom {
    padding: 15px;
  }

  .trade-item {
    padding: 10px 0;
  }

  .trade-top {
    font-size: 16px;
    line-height: 1.4;
  }

  .information-box {
    margin-top: 10px;
  }

  .information-title {
    font-size: 18px;
  }

  .information-right {
    font-size: 16px;
  }

  .detail-box {
    padding: 15px;
  }

  .institution-intro p {
    font-size: 16px;
    line-height: 1.6;
  }

  .contact {
    margin-top: 10px;
  }

  .energy-header .energy-search-container {
    display: block;
    order: 3;
    width: 100%;
    padding: 10px;
  }

  .energy-search-container .energy-search {
    width: 100%;
    justify-content: center;
  }

  .energy-search-container .energy-wechat {
    display: none;
  }

  .energy-menu {
    display: none; /* 隐藏PC端菜单 */
  }

  .energy-header .energy-logo-section {
    flex-direction: column;
    align-items: center;
  }

  .energy-header .energy-info {
    text-align: center;
    margin-top: 10px;
  }

  /* 确保页脚在移动端居中 */
  .energy-footer {
    text-align: center;
    padding: 15px;
  }

  .energy-footer-content p {
    font-size: 14px;
  }
  .trade-item::before {
    display: none;
  }
}

/* 分页圆点 Swiper 兼容 */
.news-carousel-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 2px;
  margin-top: auto;
  position: absolute;
  right: 20px;
  bottom: 20px !important;
  left: auto;
  z-index: 2;
  width: auto !important;
}

.news-carousel-dot,
.news-carousel-pagination .swiper-pagination-bullet {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: rgba(135,185,231, 1);
  transition: background 0.2s, border 0.2s;
  cursor: pointer;
  margin: 0 4px;
  box-sizing: border-box;
}

.news-carousel-dot.active,
.news-carousel-pagination .swiper-pagination-bullet-active {
  background: rgba(4,108,204, 1);
}
