/* ===================================
   高校科研管理网站 - 主样式文件
   风格：学院风、学术严谨、简洁大气
   色彩：蓝白为主色调，辅以浅灰、淡绿
   =================================== */

/* ---------- 思源黑体字体定义 ---------- */
@font-face {
  font-family: 'SourceHanSansCN';
  src: url('../font/SourceHanSansCN/SourceHanSansCN-Regular.otf') format('opentype');
  font-weight: 400;
}
@font-face {
  font-family: 'SourceHanSansCN';
  src: url('../font/SourceHanSansCN/SourceHanSansCN-Medium.otf') format('opentype');
  font-weight: 500;
}
@font-face {
  font-family: 'SourceHanSansCN';
  src: url('../font/SourceHanSansCN/SourceHanSansCN-Bold.otf') format('opentype');
  font-weight: 700;
}

/* ---------- CSS变量定义 ---------- */
:root {
  --primary-color: #1a5694;       /* 主蓝色 */
  --primary-dark: #134a75;        /* 深蓝色 */
  --primary-light: #2a7ab8;       /* 浅蓝色 */
  --secondary-color: #f0f5fa;    /* 浅灰蓝背景 */
  --accent-green: #4a9f7e;        /* 淡绿色 */
  --accent-yellow: #d4a84b;       /* 淡黄色 */
  --accent-purple: #7b5aa6;       /* 淡紫色 */
  --accent-pink: #d4727a;         /* 粉色 */
  --text-primary: #333333;        /* 主要文字 */
  --text-secondary: #666666;      /* 次要文字 */
  --text-light: #999999;          /* 辅助文字 */
  --border-color: #e0e6ed;        /* 边框色 */
  --bg-light: #f8fafc;           /* 浅背景 */
  --white: #ffffff;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --transition: all 0.3s ease;
}

/* ---------- 基础重置 ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'SourceHanSansCN', 'Microsoft YaHei', 'PingFang SC', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--secondary-color);
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ---------- 顶部导航栏 ---------- */
.top-bar {
  background: linear-gradient(to right, #1a5a9c, #2a6fa8);
  padding: 20px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.main-content .container {
  background-color: #ffffff;
  padding: 20px;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  height: 48px;
}

.logo img {
  height: 100%;
  width: auto;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.school-name-main {
  font-family: "KaiTi", "SimKai", "STKaiti", serif;
  font-size: 26px;
  color: #fff;
  font-weight: bold;
  letter-spacing: 4px;
  line-height: 1.3;
}

.school-subtitle {
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 16px;
  color: rgba(255,255,255,0.85);
  letter-spacing: 2px;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.search-box {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 4px;
  padding: 5px 12px;
  transition: var(--transition);
}

.search-box:hover {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.5);
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  width: 180px;
  font-size: 13px;
  color: #fff;
}

.search-box input::placeholder {
  color: rgba(255,255,255,0.7);
}

.search-box button {
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  font-size: 14px;
  opacity: 0.8;
  padding: 0;
}

.top-links {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #fff;
}

.top-links a {
  color: #fff;
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 3px;
  transition: var(--transition);
}

.top-links a:hover {
  background: rgba(255,255,255,0.2);
}

.top-links .divider {
  color: rgba(255,255,255,0.5);
}

.auth-buttons {
  display: flex;
  gap: 10px;
}

.btn {
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-login {
  background: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-login:hover {
  background: var(--primary-color);
  color: var(--white);
}

.btn-register {
  background: var(--primary-color);
  border: 1px solid var(--primary-color);
  color: var(--white);
}

.btn-register:hover {
  background: var(--primary-dark);
}

/* ---------- 主导航菜单 ---------- */
.main-nav {
  background: var(--primary-color) !important;
  position: relative;
  z-index: 100;
}

.main-nav .nav-menu {
  display: flex;
  justify-content: space-around;
  gap: 5px;
}

.main-nav .nav-item {
  position: relative;
  padding: 14px 20px;
}

.main-nav .nav-item > a {
  color: var(--white) !important;
  font-size: 15px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none !important;
  background: transparent !important;
}

.main-nav .nav-item:hover {
  background: var(--primary-dark) !important;
}

/* 下拉菜单 */
.nav-item .dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  min-width: 180px;
  box-shadow: var(--shadow-md);
  display: none;
  overflow: hidden;
}

.nav-item:hover .dropdown {
  display: block;
}

.dropdown li a {
  display: block;
  padding: 10px 16px;
  color: var(--text-primary);
  font-size: 14px;
  border-bottom: 1px solid var(--border-color);
}

.dropdown li a:hover {
  background: var(--secondary-color);
  color: var(--primary-color);
}

/* ---------- 主体内容区 ---------- */
.main-content {
  padding: 0;
  overflow: hidden;
  width: 100%;
}

/* 上下布局 */
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}

/* 顶部：轮播图+科技动态（6:4） */
.top-section {
  display: flex;
  gap: 20px;
}

.carousel-wrapper {
  flex: 6;
  display: flex;
  flex-direction: column;
  position: relative;
}

.carousel-wrapper .carousel-section {
  width: 100%;
  min-height: 0;
}

.tech-news-wrapper {
  flex: 4;
}

.tech-news-wrapper .info-module {
  width: 100%;
  height: 100%;
}

/* 右侧列：通知公告 + 办事流程（垂直排列） */
.right-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.right-column .info-module {
  width: 100%;
}

.right-column .guide-section {
  width: 100%;
}

/* 通知公告和办事流程同一行样式 */
.info-row {
  display: flex;
  gap: 20px;
  width: 100%;
  align-items: stretch;
}

.info-row .half-width {
  flex: 1;
  width: 50%;
  display: flex;
  flex-direction: column;
}

.info-row .half-width .module-content {
  flex: 1;
}

/* 同一行内的卡片容器调整 */
.info-row .guide-cards-vertical {
  gap: 12px;
}

.info-row .guide-card-vertical {
  padding: 20px 16px;
}

.info-row .guide-card-icon {
  width: 32px;
  height: 32px;
  margin-right: 12px;
}

.info-row .guide-card-icon svg {
  width: 18px;
  height: 18px;
}

/* 左侧/右侧模块通用样式 */
.info-module {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.link-info {
  box-shadow: none;
}
.link-info .module-content {
  padding: 15px 0;
}
.lczn {
  box-shadow: none;
}
.lczn .module-content {
  padding: 15px 0 0 0;
}

.module-header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: var(--white);
  padding: 12px 20px;
  font-size: 16px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.module-header .more {
  font-size: 12px;
  font-weight: normal;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
}

.module-header .more:hover {
  color: var(--white);
}

.module-content {
  padding: 5px 15px;
}

.news-item {
  padding: 6px 0;
  border-bottom: 1px dashed var(--border-color);
  cursor: pointer;
  transition: var(--transition);
}

.news-item:hover .news-title {
  color: var(--primary-color);
}

.news-item:last-child {
  border-bottom: none;
}

.news-title {
  font-size: 16px;
  color: var(--text-primary);
  font-weight: bold;
  display: block;
}

.news-summary {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-meta {
  font-size: 14px;
  color: var(--text-light);
  display: block;
}

/* 通知公告简单列表样式 */
.notice-list {
  display: flex;
  flex-direction: column;
}

.notice-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
}

.notice-item:last-child {
  border-bottom: none;
}

.notice-item:hover {
  color: var(--primary-color);
}

/* 列表展示样式（科技动态用） */
.news-section {
  margin-bottom: 15px;
}

.news-section:last-child {
  margin-bottom: 0;
}

.news-section .section-title {
  font-size: 14px;
  font-weight: bold;
  color: var(--primary-color);
  padding: 8px 0;
  border-bottom: 2px solid var(--primary-color);
  margin-bottom: 10px;
}

.news-section .news-list {
  padding-left: 0;
}

/* 可折叠内容 */
.news-group {
  border-bottom: 1px solid var(--border-color);
}

.news-group:last-child {
  border-bottom: none;
}

.group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  cursor: pointer;
  font-weight: 500;
  color: var(--primary-color);
}

.group-header::after {
  content: "▼";
  font-size: 10px;
  transition: var(--transition);
}

.group-header.collapsed::after {
  transform: rotate(-90deg);
}

.group-content {
  display: block;
}

.group-content.collapsed {
  display: none;
}

/* 中间轮播图区域 */
.carousel-section {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: relative;
}

.carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 8 / 5;
}

.carousel .carousel-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
}

.carousel .carousel-item:first-child {
  display: block;
}

.carousel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-indicators {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.carousel-indicators span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: var(--transition);
}

.carousel-indicators span.active {
  background: var(--white);
  transform: scale(1.2);
}

/* 缩略图列表 */
.carousel-thumbnails {
  display: flex;
  gap: 10px;
  padding: 10px;
  background: rgba(32,32,32,0.5);
  flex-shrink: 0;
  position: absolute;
  bottom: 0;
  width: 100%;
}

.carousel-thumbnails .thumbnail {
  width: 80px;
  height: 50px;
  cursor: pointer;
  opacity: 0.6;
  transition: var(--transition);
  overflow: hidden;
  border: 2px solid transparent;
}

.carousel-thumbnails .thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-thumbnails .thumbnail:hover {
  opacity: 0.9;
}

.carousel-thumbnails .thumbnail.active {
  opacity: 1;
  border-color: var(--primary-color);
}

/* ---------- 办事流程指南 ---------- */
.guide-section {
  margin-bottom: 20px;
}

.guide-section .section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-color);
}

.guide-cards-vertical {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guide-card-vertical {
  display: flex;
  align-items: center;
  padding: 15px 18px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.guide-card-vertical:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 浅蓝卡片 */
.guide-card-vertical.blue {
  background: linear-gradient(135deg, #e8f4fc 0%, #d4e9f7 100%);
  border-left: 4px solid #3498db;
}

/* 浅绿卡片 */
.guide-card-vertical.green {
  background: linear-gradient(135deg, #e8f9f0 0%, #d0f0e3 100%);
  border-left: 4px solid #2ecc71;
}

/* 浅黄卡片 */
.guide-card-vertical.yellow {
  background: linear-gradient(135deg, #fef9e8 0%, #fcf0c8 100%);
  border-left: 4px solid #f1c40f;
}

/* 浅紫卡片 */
.guide-card-vertical.purple {
  background: linear-gradient(135deg, #f3e8fd 0%, #e8d4f5 100%);
  border-left: 4px solid #9b59b6;
}

/* 浅橙卡片 */
.guide-card-vertical.orange {
  background: linear-gradient(135deg, #fef3e8 0%, #fce8d0 100%);
  border-left: 4px solid #e67e22;
}

/* 浅粉卡片 */
.guide-card-vertical.pink {
  background: linear-gradient(135deg, #fce8f0 0%, #f5d0e0 100%);
  border-left: 4px solid #e91e8b;
}

.guide-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  flex-shrink: 0;
}

.blue .guide-card-icon { background: #3498db; }
.green .guide-card-icon { background: #2ecc71; }
.yellow .guide-card-icon { background: #f1c40f; }
.purple .guide-card-icon { background: #9b59b6; }
.orange .guide-card-icon { background: #e67e22; }
.pink .guide-card-icon { background: #e91e8b; }

.guide-card-icon svg {
  width: 18px;
  height: 18px;
  fill: white;
}

.guide-card-content {
  flex: 1;
}

.guide-card-title {
  font-size: 15px;
  font-weight: 400;
  color: var(--text-primary);
}

.guide-card-desc {
  font-size: 12px;
  color: var(--text-light);
}

/* ---------- 常用链接 ---------- */
.links-section {
  margin-bottom: 20px;
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.link-card {
  background: var(--white);
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition);
}

.link-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.link-card.blue .link-icon { background: #e3f2fd; color: #1976d2; }
.link-card.green .link-icon { background: #e8f5e9; color: #388e3c; }
.link-card.pink .link-icon { background: #fce4ec; color: #c2185b; }
.link-card.orange .link-icon { background: #fff3e0; color: #f57c00; }

.link-icon {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}

.link-icon img {
  width: 16px;
  height: 16px;
}

.link-info h5 {
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.link-info p {
  font-size: 12px;
  color: var(--text-light);
}

/* ---------- 页脚区域 ---------- */
.footer {
  background: var(--primary-color);
  color: var(--white);
  padding: 30px 0 20px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.footer-logo {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-logo img {
  height: 100%;
}

.footer-school-name {
  font-family: "KaiTi", "SimKai", serif;
  font-size: 18px;
  font-weight: bold;
}

.contact-info {
  margin-top: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.8);
}

.footer-right {
  text-align: right;
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  margin-top: 10px;
}

.footer-right .copyright {
  font-size: 14px;
  margin-bottom: 8px;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.2);
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}

.back-to-top {
  position: fixed;
  right: 30px;
  bottom: 30px;
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  font-size: 18px;
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

/* ---------- 响应式布局 ---------- */
@media (max-width: 1400px) {
  .container {
    max-width: 1200px;
  }

  .content-wrapper {
    grid-template-columns: 1fr 360px;
  }
}

@media (max-width: 1200px) {
  .container {
    max-width: 960px;
  }

  .content-wrapper {
    grid-template-columns: 1fr 320px;
  }
}

@media (max-width: 992px) {
  .content-wrapper {
    grid-template-columns: 1fr;
  }

  .left-column {
    flex-direction: column;
  }

  .left-column .info-module {
    width: 100%;
  }

  .right-column {
    flex-direction: column;
  }

  .right-column .guide-section {
    width: 100%;
  }

  .guide-cards-vertical {
    flex-direction: column;
  }

  .links-section {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .top-bar-inner {
    flex-direction: column;
    gap: 15px;
  }

  .top-right {
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-menu {
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-item {
    padding: 10px 15px;
  }

  .guide-cards-vertical {
    flex-direction: column;
  }

  .links-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-left, .footer-right {
    text-align: center;
  }

  .search-box {
    width: 100%;
  }

  .search-box input {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .school-name {
    font-size: 16px;
  }

  .auth-buttons {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .nav-item > a {
    font-size: 13px;
  }

  .carousel {
    height: 200px;
  }
}

/* ================================
   搜索页面样式
   ================================ */

/* 搜索头部区域 */
.search-header {
  padding: 25px 20px;
  background: linear-gradient(135deg, var(--secondary-color) 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border-color);
}

.search-input-wrapper {
  display: flex;
  gap: 10px;
  max-width: 700px;
  margin: 0 auto 15px;
}

.search-input {
  flex: 1;
  padding: 14px 20px;
  font-size: 16px;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(26, 86, 148, 0.1);
}

.search-btn {
  padding: 14px 30px;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.search-btn:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 86, 148, 0.3);
}

.search-tips {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
}

.search-tips span {
  margin-right: 10px;
}

.search-tips a {
  display: inline-block;
  padding: 4px 12px;
  margin: 0 4px;
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 13px;
  transition: var(--transition);
}

.search-tips a:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--white);
  text-decoration: none;
}

/* 搜索工具栏 */
.search-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: var(--bg-light);
  border-bottom: 1px solid var(--border-color);
}

.result-count {
  font-size: 14px;
  color: var(--text-secondary);
}

.result-count span {
  color: var(--primary-color);
  font-weight: 600;
}

.sort-options {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 14px;
  color: var(--text-secondary);
}

.sort-link {
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 4px;
  transition: var(--transition);
}

.sort-link:hover {
  color: var(--primary-color);
  background: rgba(26, 86, 148, 0.05);
}

.sort-link.active {
  color: var(--white);
  background: var(--primary-color);
}

/* 搜索结果列表 */
.article-list .list-item-summary {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 10px;
}

.article-list .meta-category {
  display: inline-block;
  padding: 2px 8px;
  background: var(--secondary-color);
  border-radius: 3px;
  font-size: 12px;
  color: var(--primary-color);
}

/* 空结果状态 */
.no-results {
  padding: 60px 20px;
  text-align: center;
}

.no-results-icon {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.no-results-text {
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.no-results-tips {
  text-align: left;
  max-width: 300px;
  margin: 0 auto;
  padding: 20px;
  background: var(--bg-light);
  border-radius: 8px;
}

.no-results-tips p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.no-results-tips ul {
  list-style: disc;
  padding-left: 20px;
}

.no-results-tips li {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.8;
}

/* 响应式 */
@media (max-width: 768px) {
  .search-input-wrapper {
    flex-direction: column;
  }

  .search-btn {
    width: 100%;
  }

  .search-toolbar {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .sort-options {
    flex-wrap: wrap;
  }
}