/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Microsoft YaHei", sans-serif;
  color: #333;
  line-height: 1.6;
  background-color: #fff;
}
ul {
  list-style: none;
}
a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* 头部导航 */
.main-header {
  background-color: #004294;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}
/* Header 背景：深蓝渐变 + 装饰性几何纹理 */
.site-header {
  width: 100%;
  height: 140px; /* 根据图示比例调整高度 */
  background-image: url("../img/site-header-bg.png");
  background-size: cover;
  background-position: center center;
  color: white;
  display: flex;
  align-items: center;
  position: relative;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header-container {
  width: 1200px;
  height: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

/* --- 左侧品牌区 --- */
.brand-area {
  display: flex;
  align-items: center;
}

.main-logo {
  height: 100px;
  margin-right: 15px;
}

.title-group {
  border-left: 1px solid rgba(255, 255, 255, 0.3);
  padding-left: 15px;
}

.uni-name {
  display: flex;
  flex-direction: column;
  margin-bottom: 2px;
}

.uni-name .cn {
  font-size: 24px;
  font-weight: bold;
  letter-spacing: 2px;
  line-height: 1.2;
}

.uni-name .en {
  font-size: 10px;
  letter-spacing: 0.5px;
  opacity: 0.8;
}

.dept-name {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 3px;
  margin-top: 2px;
}

/* --- 右侧操作区 --- */
.action-area {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-top: -32px;
}

/* 搜索框样式：半透明胶囊 */
.search-wrapper {
  margin-bottom: 10px;
}

.search-bar {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 4px 15px;
  display: flex;
  align-items: center;
  width: 220px;
  transition: all 0.3s;
}

.search-bar:hover,
.search-bar:focus-within {
  background: rgba(255, 255, 255, 0.25);
  width: 260px;
}

.search-bar input {
  background: none;
  border: none;
  color: white;
  font-size: 13px;
  width: 100%;
  outline: none;
}

.search-bar input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.search-bar i {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin-left: 5px;
  cursor: pointer;
}

/* 导航菜单样式 */
.nav-list {
  display: flex;
  list-style: none;
}

.nav-list > li {
  margin-left: 40px;
  position: relative;
  display: flex;
  align-items: stretch;
}

.nav-list > li > a {
  color: white;
  text-decoration: none;
  font-size: 18px;
  font-weight: 400;
  display: flex;
  align-items: center;
  padding: 10px 0;
  transition: opacity 0.3s;
}

.nav-list > li > a:hover {
  opacity: 0.8;
}

/* 当前激活项的下划线 */
.nav-list > li > a.active {
  border-bottom: 2px solid #fff;
}

/* --- 二级下拉菜单样式 --- */
.submenu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  min-width: 140px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  margin-top: 15px;
  padding: 10px 0;
  display: none; /* 默认隐藏 */
  z-index: 100;
}

.submenu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -15px;
  height: 15px;
}


/* 小三角 */
.submenu::after {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid white;
}

.submenu li a {
  display: block;
  padding: 10px 20px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
}

.submenu li a:hover {
  background-color: #f5f5f5;
  color: #004a91;
}

/* 顶部导航：鼠标从一级移动到二级时保持展开 */
.has-submenu:hover .submenu,
.submenu:hover {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* --- 三级下拉菜单：从二级右侧展开 --- */
.submenu li {
  position: relative;
}

.submenu-3 {
  position: absolute;
  top: 0;
  left: 100%;
  margin-left: 2px;
  background: #ffffff;
  min-width: 150px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.18);
  border-radius: 4px;
  padding: 6px 0;
  display: none;
  z-index: 110;
}

.submenu-3 li a {
  padding: 8px 18px;
  font-size: 13px;
}

/* 鼠标覆盖在二级 li 或三级菜单本身时保持显示 */
.has-submenu-3:hover > .submenu-3,
.submenu-3:hover {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, 10px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}
/* Banner */
.banner {
  position: relative;
  height: 450px;
  overflow: hidden;
}
.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.banner-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}
.dot.active {
  background: #fff;
  width: 25px;
  border-radius: 5px;
}

/* 轮播图外层容器 */
.banner-container {
  width: 100%;
  height: 650px;
  position: relative;
  overflow: hidden;
}

.swiper {
  width: 100%;
  height: 100%;
}

.swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 自定义箭头颜色 */
.swiper-button-next,
.swiper-button-prev {
  color: #ffffff !important; /* 设置箭头颜色为白色 */
}

.swiper-button-prev {
  margin-left: calc((100% - 1200px) / 2) !important;
}

.swiper-button-next {
  margin-right: calc((100% - 1200px) / 2) !important;
}

/* --- 自定义分页器 (关键：参照设计图) --- */
.pagination-wrapper {
  height: 40px;
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  /* 胶囊状半透明背景 */
  background: rgba(0, 0, 0, 0.2);
  padding: 6px 30px;
  border-radius: 20px;
  display: flex;
  align-items: center;
}

/* 覆盖 Swiper 默认的分页器容器样式 */
.swiper-pagination {
  position: relative !important; /* 取消绝对定位 */
  bottom: 0 !important;
  display: flex;
  gap: 8px;
}

/* 未激活的小圆点 */
.swiper-pagination-bullet {
  width: 10px !important;
  height: 10px !important;
  background: #004294 !important;
  opacity: 1 !important;
  margin: 0 !important;
}

/* 激活的小圆点 (上海大学蓝) */
.swiper-pagination-bullet-active {
  background: #c3c3c3 !important;
  opacity: 1 !important;
  transform: scale(1.2); /* 稍微放大一点点 */
  border: 3px solid #004294; /* 加上上海大学蓝的边框 */
}

/* 新闻公告区 */
/* 容器布局 */
.info-section {
  display: flex;
  justify-content: space-between;
  padding: 60px 0;
  gap: 60px;
}

.info-column {
  flex: 1;
}

/* 栏目头部样式 */
.column-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 25px;
  padding-bottom: 10px;
}

.column-title {
  font-size: 22px;
  color: #004294; /* 上大蓝 */
  position: relative;
  z-index: 2;
  font-weight: bold;
}

.bg-text {
  position: absolute;
  left: -5px;
  bottom: 0;
  transform: translateY(35%); /* 英文字位于中文的中下部 */
  font-size: 48px;
  font-weight: 800;
  background: linear-gradient(to bottom, #ffffff, #004a91); /* 从上到下白色到蓝色渐变 */
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  z-index: 1;
  letter-spacing: 2px;
  opacity: 0.6;
}

.more-link {
  font-size: 13px;
  color: #004294;
  text-decoration: none;
  z-index: 2;
}

/* 红色 NEWS 标签 */
.tag-news {
  color: #e60012;
  font-size: 10px;
  font-weight: bold;
  vertical-align: super;
  margin-left: 5px;
}

/* --- 新闻动态列表样式 --- */
.news-list {
  list-style: none;
}

.news-item {
  padding: 15px 0 15px 20px;
  border-bottom: 1px dotted #ccc; /* 虚线分隔 */
  position: relative;
}

/* 列表左侧小圆点 */
.news-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  width: 6px;
  height: 6px;
  background-color: #8da9c4;
  border-radius: 50%;
}

.news-title {
  display: block;
  font-size: 15px;
  color: #333;
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.3s;
}

.news-item:hover .news-title {
  color: #004294;
}

.news-date {
  font-size: 13px;
  color: #999;
}

/* --- 通知公告列表样式 --- */
.notice-list {
  display: flex;
  flex-direction: column;
}

.notice-item {
  display: flex;
  align-items: flex-start;
  padding: 15px 0;
  border-bottom: 1px dotted #eee;
}

/* 日期盒子 */
.date-box {
  width: 50px;
  height: 50px;
  background-color: #e6effb; /* 默认浅蓝色 */
  color: #004294;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.date-box .day {
  font-size: 20px;
  font-weight: bold;
  line-height: 1.1;
}

.date-box .divider {
  width: 60%;
  height: 1px;
  background-color: #5e93c0;
  margin: 2px 0;
  margin-bottom: 4px;
}

.date-box .month {
  font-size: 13px;
  line-height: 1;
  font-weight: bold;
  color: #5e93c0;
}

/* 首项日期盒子加深 */
.notice-item:hover .date-box {
  background-color: #004294;
  color: #fff;
}

.notice-text {
  flex: 1;
  padding-left: 15px;
  height: 50px;
  display: flex;
  align-items: center;
}

.notice-item:hover .notice-text {
  background-color: #e6effb;
}

.notice-text a {
  font-size: 15px;
  color: #333;
  text-decoration: none;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notice-item:hover .notice-text a {
  color: #004294;
}

/* 内设机构 */
.dept-section {
  /* background: #f9f9f9; */
  padding: 60px 0;
  background-image: url("../img/jigou_bg.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}
.center-title {
  text-align: center;
  margin-bottom: 40px;
}
/* 内设机构：与新闻动态同款标题样式，中文居中 */
.center-title-inner {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: flex-end;
}
.center-title-inner .bg-text {
  font-size: 24px;
  left: 50%;
  transform: translate(-50%, 35%);
  white-space: nowrap; /* 内设机构英文不换行 */
}
.center-title-inner .column-title {
  position: relative;
  z-index: 2;
}

.dept-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.dept-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.dept-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.5s;
}
.dept-label {
  width: 100%;
  height: 80px;
  background: #004294d9;
  color: #fff;
  text-align: center;
  padding: 12px;
  font-size: 21px;
  line-height: 46px;
}

.dept-card:nth-of-type(2),
.dept-card:nth-of-type(4) {
  /* 用位移而不是外边距，避免卡片内容被“挤压”导致看起来变矮 */
  transform: translateY(25px);
}

.dept-card:nth-of-type(2n) {
  flex-direction: column-reverse;
}

/* 业务系统 */
.system-section {
  padding: 60px calc((100vw - 1200px) / 2);
  background-image: url("../img/ywxt_bg.png");
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: 100% auto;
}
.system-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 30px;
}
.system-item {
  text-align: center;
  cursor: pointer;
}
.icon-circle {
  width: 155px;
  height: 155px;
  margin: 0 auto 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
}
.icon-circle img {
  width: 100%;
  height: 100%;
}
.system-item:hover .icon-circle .icon {
  display: none;
}
.system-item:hover .icon-circle .icon-active {
  display: block;
}
.system-item span {
  font-size: 19px;
  color: #004294;
  display: block;
  line-height: 1.3;
}
.system-item .icon-active {
  display: none;
}
.system-item:hover .icon-circle {
  transform: translateY(-5px);
}

/* 页脚 */
.main-footer {
  background: #002b66;
  color: rgb(255, 255, 255);
  padding: 40px 0;
  text-align: center;
  font-size: 13px;
}
.main-footer p {
  margin-bottom: 2px;
}