/* 全局变量 */
:root {
  --primary-red: #8B0000;
  --light-red: #f9dada;
  --dark-red: #660000;
  --text-dark: #333;
  --text-light: #666;
  --bg-white: #fff;
  --bg-light: #f8f9fa;
  --bg-dark: #1a1a1a;
  --border-color: #e9ecef;
  --base-font-size: 1.1rem; /* 基础字体大小，从1rem增加到1.1rem */
  --small-font-size: 0.95rem; /* 小字体大小 */
  --large-font-size: 1.2rem; /* 大字体大小 */
}

/* 深色模式变量 */
@media (prefers-color-scheme: dark) {
  :root {
    --text-dark: #fff;
    --text-light: #ccc;
    --bg-white: #1a1a1a;
    --bg-light: #2d2d2d;
    --border-color: #404040;
  }
}

/* 基础样式 */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-white);
  font-size: var(--base-font-size); /* 使用CSS变量设置基础字体大小 */
}

/* 统一头部容器样式 */
.unified-header {
  background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
  color: white;
  transition: all 0.3s ease;
  width: 100%;
  z-index: 1000;
}

/* 保证 .unified-header.fixed 高度自适应 header+导航栏 */
.unified-header.fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  animation: slideDown 0.3s ease;
  width: 100%;
  max-width: 100vw;
  /* 不设置 height，不设置 overflow，自动包裹内容 */
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

/* body 顶部留出空间，避免内容被遮挡 */
body.has-fixed-header {
  padding-top: 180px; /* 根据实际头部高度调整 */
}
@media (max-width: 768px) {
  body.has-fixed-header {
    padding-top: 160px;
  }
}
@media (max-width: 576px) {
  body.has-fixed-header {
    padding-top: 140px;
  }
}

/* 只让 .top-header、.navbar-collapse、.dropdown-menu 透明，.main-navbar 不再强制透明 */
.top-header,
.unified-header .navbar-collapse,
.unified-header .dropdown-menu {
  background: transparent !important;
  box-shadow: none !important;
}

/* 移除原有 .unified-header.fixed .navbar-collapse 的纯色背景 */
/* 保证下拉菜单、移动端菜单等浮层背景透明或半透明 */
.unified-header .dropdown-menu {
  background: var(--primary-red) !important;
  color: #fff !important;
  box-shadow: none !important;
}

/* 确保固定导航栏不影响其他组件的定位 */
body.has-fixed-header .unified-header {
  /* 防止固定定位影响其他元素的布局 */
  position: fixed;
}

/* 响应式调整固定导航栏的偏移量 */
@media (max-width: 768px) {
  body.has-fixed-header {
    padding-top: 160px;
  }
}

@media (max-width: 576px) {
  body.has-fixed-header {
    padding-top: 140px;
  }
}

/* 确保下拉菜单在固定状态下正常工作 */
.unified-header.fixed .dropdown-menu {
  position: absolute;
  z-index: 1001; /* 确保下拉菜单在固定导航栏之上 */
}

/* 确保移动端汉堡菜单在固定状态下正常工作 */
.unified-header.fixed .navbar-collapse {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--primary-red);
  z-index: 1001;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 确保固定导航栏不影响现有组件的布局 */
.unified-header.fixed + * {
  /* 确保固定导航栏后面的元素不会被影响 */
  position: relative;
  z-index: auto;
}

/* 确保轮播图等组件在固定导航栏下正常显示 */
.carousel-section {
  position: relative;
  z-index: 1; /* 确保在固定导航栏下方 */
}

/* 确保内容区域在固定导航栏下正常显示 */
.content-section {
  position: relative;
  z-index: 1;
}

/* 确保页脚在固定导航栏下正常显示 */
.main-footer {
  position: relative;
  z-index: 1;
}

/* 顶部区域样式 */
.top-header {
  padding: 1rem 0;
  color: white;
  max-height: 100px;
}

.header-logo {
  height: 4rem;
  max-height: 90px;
  width: auto;
  object-fit: contain;
  margin-right: 0.5rem;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: -o-crisp-edges;
  -ms-interpolation-mode: nearest-neighbor;
}

.college-title {
  font-size: 1.8rem;
  font-weight: bold;
  margin: 0;
  color: white;
}

.search-container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.search-form {
  max-width: 300px;
  width: 100%;
}

/* 移动端搜索容器 */
.mobile-search-container {
  position: relative;
  display: none;
  z-index: 1000;
}

/* 移动端搜索切换按钮 */
.mobile-search-toggle {
  background: var(--dark-red);
  border: none;
  border-radius: 50%;
  color: white;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  position: relative;
  z-index: 1001;
  pointer-events: auto;
}

.mobile-search-toggle:hover {
  background: var(--primary-red);
  transform: scale(1.1);
}

.mobile-search-toggle i {
  font-size: 1.1rem;
}

/* 移动端搜索表单 */
.mobile-search {
  position: absolute;
  top: 50px;
  right: 0;
  z-index: 1000;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  padding: 0.5rem;
  min-width: 250px;
  animation: slideDown 0.3s ease;
}

.mobile-search .input-group {
  display: flex;
  align-items: center;
}

.mobile-search .search-input {
  border: 1px solid #ddd;
  border-radius: 4px 0 0 4px;
  padding: 0.5rem;
  font-size: 0.9rem;
}

.mobile-search .btn-search {
  background: var(--primary-red);
  border: none;
  border-radius: 0 4px 4px 0;
  color: white;
  padding: 0.5rem 0.8rem;
  transition: background-color 0.3s;
}

.mobile-search .btn-search:hover {
  background: var(--dark-red);
}

.mobile-search .btn-close-search {
  background: #6c757d;
  border: none;
  border-radius: 4px;
  color: white;
  padding: 0.5rem 0.8rem;
  margin-left: 0.5rem;
  transition: background-color 0.3s;
}

.mobile-search .btn-close-search:hover {
  background: #5a6268;
}

.search-input {
  border: none;
  border-radius: 20px 0 0 20px;
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
}

.btn-search {
  background: var(--dark-red);
  border: none;
  border-radius: 0 20px 20px 0;
  color: white;
  padding: 0.6rem 0.8rem;
  transition: background-color 0.3s;
}

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

/* 导航栏样式 */
.main-navbar {
  padding: 0.5rem 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 确保导航栏在1024px以下时收起 */
@media (max-width: 1199.98px) {
  .main-navbar .navbar-collapse {
    display: none !important;
  }
  
  .main-navbar .navbar-collapse.show {
    display: block !important;
  }
}

/* 1024px以下屏幕的搜索框切换 */
@media (max-width: 1023.98px) {
  .desktop-search {
    display: none !important;
  }
  
  .mobile-search-container {
    display: block !important;
  }
}

/* 汉堡菜单按钮样式 */
.main-navbar .navbar-toggler {
  border: none;
  padding: 0.25rem 0.5rem;
}

.main-navbar .navbar-toggler:focus {
  box-shadow: none;
}

.main-navbar .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* 桌面端导航样式 - 修改断点为1200px */
@media (min-width: 1200px) {
  .main-navbar .navbar-nav {
    gap: 2rem;
  }
  
  .main-navbar .nav-link {
    color: white !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s;
    white-space: nowrap; /* 防止文字换行 */
  }
  
  .main-navbar .nav-link:hover,
  .main-navbar .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: white !important;
  }
}

/* 中等屏幕导航样式 (1024px - 1199px) */
@media (min-width: 1024px) and (max-width: 1199px) {
  .main-navbar .navbar-nav {
    gap: 1rem;
  }
  
  .main-navbar .nav-link {
    color: white !important;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    transition: all 0.3s;
    white-space: nowrap; /* 防止文字换行 */
    font-size: 0.9rem; /* 稍微减小字体 */
    overflow: hidden; /* 防止内容溢出 */
    text-overflow: ellipsis; /* 超出部分显示省略号 */
    max-width: 120px; /* 限制最大宽度 */
  }
  
  .main-navbar .nav-link:hover,
  .main-navbar .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: white !important;
  }
  
  /* 确保下拉菜单按钮不会换行 */
  .main-navbar .dropdown-toggle::after {
    margin-left: 0.3em;
  }
}

/* 移动端导航样式 - 修改断点为1024px以下 */
@media (max-width: 1023.98px) {
  .main-navbar .navbar-nav {
    text-align: center;
    padding: 1rem 0;
  }
  
  .main-navbar .nav-link {
    color: white !important;
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s;
  }
  
  .main-navbar .nav-link:hover,
  .main-navbar .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: white !important;
  }
  
  .main-navbar .dropdown-menu {
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 0;
    margin: 0;
    display: none; /* 移动端默认隐藏，由Bootstrap控制 */
  }
  
  .main-navbar .dropdown-menu.show {
    display: block; /* Bootstrap显示时显示 */
  }
  
  .main-navbar .dropdown-item {
    color: white;
    padding: 0.5rem 1rem;
    text-align: center;
  }
  
  .main-navbar .dropdown-item:hover {
    background: rgba(255,255,255,0.2);
    color: white;
  }
}

/* 下拉菜单样式（桌面端） */
@media (min-width: 1024px) {
  .main-navbar .dropdown-menu {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: none; /* 默认隐藏 */
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    z-index: 1000;
  }
  
  .main-navbar .dropdown-menu.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
  }
  
  .main-navbar .dropdown-item {
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    transition: background-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
  }
  
  .main-navbar .dropdown-item:hover,
  .main-navbar .dropdown-item.active {
    background: var(--bg-light);
    color: var(--primary-red);
  }
}

/* 轮播图样式 */
.carousel-section {
  height: 500px;
  overflow: hidden;
}

.main-carousel {
  height: 100%;
}

.swiper-slide {
  height: 100%;
}

.carousel-content {
  display: flex;
  height: 100%;
  position: relative;
}

.carousel-text {
  width: 30%;
  background: linear-gradient(90deg, var(--primary-red), var(--dark-red));
  color: white;
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 2;
}

/* 轮播图文字区域内的所有段落和文字元素都不需要首行缩进 */
.carousel-text p,
.carousel-text h1,
.carousel-text h2,
.carousel-text h3,
.carousel-text h4,
.carousel-text h5,
.carousel-text h6,
.carousel-text span,
.carousel-text div {
  text-indent: 0;
}

.carousel-title {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 1rem;
  line-height: 1.2;
  text-indent: 0; /* 轮播图标题不需要首行缩进 */
}

.carousel-description {
  font-size: 1rem;
  margin-bottom: 2rem;
  line-height: 1.6;
  opacity: 0.9;
  text-indent: 0; /* 轮播图描述文字不需要首行缩进 */
}

.carousel-button {
  display: inline-block;
  background: white;
  color: var(--primary-red);
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 500;
  transition: all 0.3s;
  align-self: flex-start;
}

.carousel-button:hover {
  background: var(--bg-light);
  color: var(--primary-red);
  transform: translateY(-2px);
}

.carousel-image {
  width: 70%;
  height: 100%;
  position: relative;
  background: linear-gradient(to bottom, #8B0000 0%, #660000 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-image::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 100%;
  background: var(--dark-red);
  z-index: 3;
}

.carousel-image img {
  height: 100%;
  width: auto;
  object-fit: contain;
  object-position: center center;
}

/* Swiper 控制按钮样式 */
.swiper-button-next,
.swiper-button-prev {
  display: none; /* 隐藏默认箭头 */
}

/* 自定义箭头样式 */
.custom-arrow-container {
  position: absolute;
  bottom: 20px;
  right: 2rem;
  z-index: 10;
  display: flex;
  gap: 0.5rem;
}

.custom-arrow {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  color: var(--primary-red);
  font-size: 1rem;
}

.custom-arrow:hover {
  background: white;
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.custom-arrow i {
  font-weight: bold;
}

.swiper-pagination-bullet {
  background: white;
  opacity: 0.7;
}

.swiper-pagination-bullet-active {
  opacity: 1;
  background: var(--primary-red);
}

/* 内容区域样式 */
.content-section {
  padding: 2rem 0;
  background: var(--bg-white);
}

/* 左侧栏样式 */
.left-panel {
  background: var(--bg-dark);
  color: white;
  padding: 1.5rem;
  position: relative;
  height: auto;
  overflow: visible;
}

.content-block {
  margin-bottom: 2rem;
}

.block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid white;
}

.block-header h3 {
  font-size: 1.2rem;
  font-weight: bold;
  margin: 0;
  color: white;
  position: relative;
  padding-right: 20px;
}

.block-header h3::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  width: 0;
  height: 0;
  border-top: 12px solid var(--primary-red);
  border-left: 12px solid transparent;
}

.more-link {
  color: #ccc;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s;
}

.more-link:hover {
  color: var(--primary-red);
}

/* 新闻项样式 */
.news-item {
  margin-bottom: 1rem;
}

.news-item.with-image {
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  overflow: hidden;
}

.news-image {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 宽高比 */
  overflow: hidden;
  background: #f8f9fa;
}

.news-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.news-content {
  padding: 1rem;
}

.news-title {
  color: white;
  text-decoration: none;
  font-weight: 500;
  line-height: 1.4;
  display: block;
  margin-bottom: 0.5rem;
  transition: color 0.3s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

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

.news-date {
  color: #ccc;
  font-size: 0.8rem;
}

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

.news-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  width: 100%;
  box-sizing: border-box;
}

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

.no-content {
  color: #ccc;
  font-style: italic;
  text-align: center;
  padding: 1rem;
}

/* 联系我们按钮样式 */
.contact-button {
  display: block;
  color: white;
  text-decoration: none;
  padding: 0.5rem 0;
  text-align: center;
  font-weight: 500;
  transition: all 0.3s;
}

.contact-button:hover {
  color: rgba(255,255,255,0.8);
  text-decoration: underline;
}

/* 旧版主页按钮样式 */
.old-version-button {
  display: block;
  color: white;
  text-decoration: none;
  padding: 0.5rem 0;
  text-align: center;
  font-weight: 500;
  transition: all 0.3s;
}

.old-version-button:hover {
  color: rgba(255,255,255,0.8);
  text-decoration: underline;
}

/* Footer按钮容器样式 */
.footer-buttons-container {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 3px 0;
  flex-wrap: wrap;
}

.footer-buttons-container .contact-button,
.footer-buttons-container .old-version-button {
  white-space: nowrap;
  min-width: fit-content;
}

.contact-button-section {
  margin-bottom: 0.8rem;
}

/* 主页面Footer样式 */
.main-footer {
  background: var(--primary-red);
  color: white;
  padding: 2.5rem 0;
  margin-top: auto;
}

.footer-content {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 3rem;
  min-height: 80px;
}

.footer-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.footer-item i {
  font-size: 1rem;
  opacity: 0.8;
}

.footer-link {
  color: white;
  text-decoration: none;
  transition: all 0.3s;
}

.footer-link:hover {
  color: rgba(255,255,255,0.8);
  text-decoration: underline;
}

.footer-qr {
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s;
}

.footer-qr:hover {
  opacity: 0.8;
}

.footer-qr .qr-code {
  padding: 0.75rem;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  text-align: center;
  min-width: 60px;
}

.footer-qr .qr-code i {
  font-size: 1.8rem;
  color: white;
  margin-bottom: 0.5rem;
  display: block;
}

.footer-qr .qr-code p {
  margin: 0;
  color: white;
  font-size: 0.85rem;
  line-height: 1.2;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .footer-item {
    justify-content: center;
  }
}

/* 左侧Footer样式 */
.left-footer {
  position: relative;
  background: var(--primary-red);
  padding: 1.5rem;
  margin: 0 -1.5rem -1.5rem -1.5rem;
  overflow: hidden;
}

/* 左侧页脚内容包装器 - 实现左右布局 */
.footer-content-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  min-height: 120px;
}

/* 左侧二维码区域 */
.qr-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
}

/* 右侧联系信息区域 */
.contact-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  height: 100px;
  min-width: 0; /* 防止flex子元素溢出 */
}

/* 响应式设计 - 大屏幕优化 */
@media (min-width: 1200px) {
  .footer-content-wrapper {
    gap: 1.2rem;
    min-height: 130px;
  }
  
  .qr-section {
    width: 110px;
    height: 110px;
  }
  
  .contact-section {
    height: 110px;
  }
}

/* 响应式设计 - 中等屏幕优化 */
@media (min-width: 768px) and (max-width: 1199px) {
  .footer-content-wrapper {
    gap: 1.2rem;
    min-height: 110px;
  }
  
  .qr-section {
    width: 90px;
    height: 90px;
  }
  
  .contact-section {
    height: 90px;
    flex: 1;
  }
  
  .contact-info {
    font-size: 0.75rem;
    gap: 0.1rem;
    text-align: center;
    align-items: center;
  }
  
  .contact-info p {
    line-height: 1.3;
    font-size: 0.7rem;
  }
}

.qr-code {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 100px;
  padding: 1rem;
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.qr-code:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}

.qr-code i {
  font-size: 2.5rem;
  color: white;
  margin-bottom: 0.5rem;
}

.qr-code p {
  margin: 0;
  color: white;
  font-size: 0.85rem;
  font-weight: 500;
}

.qr-label {
  margin-top: 4px;
  margin-bottom: 4px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  text-align: center;
  width: auto;
  display: block;
}

.contact-info {
  color: white;
  font-size: var(--small-font-size); /* 使用CSS变量，从0.8rem增加到0.95rem */
  text-align: left;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.1rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.contact-info p {
  margin: 0 0 0.3em 0;
  text-align: left;
  text-indent: -2.5em;
  padding-left: 2.5em;
  line-height: 1.6;
  word-break: break-all;
  font-size: var(--small-font-size); /* 使用CSS变量，从默认大小增加到0.95rem */
}

/* 中间栏样式 */
.center-panel {
  background: var(--bg-white);
  padding: 1.5rem;
  min-height: auto;
}

.center-panel .block-header {
  border-bottom: 2px solid var(--text-dark);
}

.center-panel .block-header h3 {
  color: var(--text-dark);
}

.center-panel .more-link {
  color: var(--text-light);
}

.center-panel .more-link:hover {
  color: var(--primary-red);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  grid-template-rows: repeat(2, 1fr);
  min-height: auto;
}

/* 新闻网格基础样式 - 列数由JavaScript动态控制 */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 默认3列，JavaScript会根据屏幕尺寸调整 */
  gap: 1rem;
  grid-template-rows: repeat(2, 1fr);
  min-height: auto;
}

.news-grid .card-image {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 宽高比 */
  overflow: hidden;
  background: #f8f9fa;
}

.news-grid .card-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: -o-crisp-edges;
  -ms-interpolation-mode: nearest-neighbor;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.news-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  will-change: transform;
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card-content {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 80px; /* 确保有足够空间容纳两行标题和日期 */
}

.card-image {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 宽高比 */
  overflow: hidden;
  background: #f8f9fa;
}

.card-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: -o-crisp-edges;
  -ms-interpolation-mode: nearest-neighbor;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.card-title {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.5rem;
  transition: color 0.3s;
  /* 确保在不同浏览器中都能正常工作 */
  max-height: calc(1.4em * 2); /* 两行的高度 */
  word-wrap: break-word;
  word-break: break-word;
}

.card-title:hover {
  color: var(--primary-red);
}

.card-date {
  color: var(--text-light);
  font-size: 0.8rem;
  margin-top: auto; /* 将日期推到底部 */
}

/* 右侧栏样式 */
.right-panel {
  background: var(--bg-white);
  padding: 1.5rem;
  min-height: auto;
}

.right-panel .block-header {
  border-bottom: 2px solid var(--text-dark);
}

.right-panel .block-header h3 {
  color: var(--text-dark);
}

.right-panel .more-link {
  color: var(--text-light);
}

.right-panel .more-link:hover {
  color: var(--primary-red);
}

.notice-list {
  list-style: none;
  padding: 0;
  margin: 0;
  height: 100%; /* 确保列表占满容器高度 */
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* 从顶部开始排列 */
}

.notice-list li {
  padding: 0.6rem 0; /* 从0.75rem减少到0.6rem，以容纳更多标题 */
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-shrink: 0; /* 防止列表项被压缩 */
}

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

.notice-title {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  line-height: 1.3; /* 稍微减少行高以节省空间 */
  flex: 1;
  margin-right: 1rem;
  transition: color 0.3s;
  white-space: nowrap; /* 防止标题换行 */
  overflow: hidden; /* 隐藏超出部分 */
  text-overflow: ellipsis; /* 显示省略号 */
  max-width: 100%; /* 确保宽度限制 */
  min-width: 0; /* 允许flex项目收缩 */
}

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

.notice-date {
  color: var(--text-light);
  font-size: 0.75rem; /* 稍微减少字体大小以节省空间 */
  white-space: nowrap;
  flex-shrink: 0; /* 防止日期被压缩 */
  margin-left: 0.5rem; /* 添加左边距，与标题保持适当距离 */
}

/* 右侧栏常用下载样式 */
.right-panel .news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.right-panel .news-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
  width: 100%;
  box-sizing: border-box;
}

.right-panel .news-list li:last-child {
  border-bottom: none;
}

.right-panel .news-list .news-title {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  line-height: 1.4;
  display: block;
  margin-bottom: 0.5rem;
  transition: color 0.3s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.right-panel .news-list .news-title:hover {
  color: var(--primary-red);
}

.right-panel .news-list .news-date {
  color: var(--text-light);
  font-size: 0.8rem;
}

.right-panel .no-content {
  color: var(--text-light);
  font-style: italic;
  text-align: center;
  padding: 1rem;
}

/* 右边栏内容块之间的间距 */
.right-panel .content-block {
  margin-bottom: 6rem; /* 从8rem减少到6rem，为通知公告轮播提供更多空间 */
}

.right-panel .content-block:last-child {
  margin-bottom: 0;
}

/* 通知公告轮播样式 */
.notice-carousel-container {
  position: relative;
  overflow: hidden;
  margin-bottom: 0.5rem; /* 减少底部间距以节省空间 */
}

.notice-carousel {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 320px; /* 增加高度以容纳6个标题 */
  overflow: hidden; /* 确保超出部分隐藏 */
  display: flex; /* 使用flex布局 */
  flex-direction: column; /* 垂直排列 */
  justify-content: flex-start; /* 从顶部开始排列 */
}

.notice-carousel-group {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.5s ease-in-out;
  pointer-events: none;
  visibility: hidden;
  z-index: 1;
  height: 100%; /* 确保轮播组占满容器高度 */
  display: flex; /* 使用flex布局 */
  flex-direction: column; /* 垂直排列 */
  justify-content: flex-start; /* 从顶部开始排列 */
}

.notice-carousel-group.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  visibility: visible;
  z-index: 2;
  display: flex; /* 使用flex布局 */
  flex-direction: column; /* 垂直排列 */
  justify-content: flex-start; /* 从顶部开始排列 */
}

.notice-carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.8rem; /* 稍微减少顶部间距以节省空间 */
  flex-shrink: 0; /* 防止指示器容器被压缩 */
}

.notice-carousel-indicators .indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--border-color);
  cursor: pointer;
  transition: background-color 0.3s ease;
  flex-shrink: 0; /* 防止指示器被压缩 */
}

.notice-carousel-indicators .indicator.active {
  background-color: var(--primary-red);
}

/* 通知公告轮播响应式设计 */
@media (max-width: 768px) {
  .notice-carousel {
    min-height: 280px; /* 移动端稍微减少高度 */
  }
  
  .notice-list li {
    padding: 0.5rem 0; /* 移动端进一步减少padding */
  }
  
  .notice-title {
    line-height: 1.2; /* 移动端减少行高 */
    font-size: 0.9rem; /* 移动端稍微减少字体大小 */
  }
  
  .notice-date {
    font-size: 0.7rem; /* 移动端减少日期字体大小 */
  }
  
  .notice-carousel-indicators {
    margin-top: 0.8rem;
  }

  .notice-carousel-indicators .indicator {
    width: 6px;
    height: 6px;
  }
}

@media (max-width: 576px) {
  .notice-carousel {
    min-height: 260px; /* 小屏幕进一步减少高度 */
  }
  
  .notice-list li {
    padding: 0.45rem 0; /* 小屏幕进一步减少padding */
  }
  
  .notice-title {
    line-height: 1.15; /* 小屏幕进一步减少行高 */
    font-size: 0.85rem; /* 小屏幕进一步减少字体大小 */
  }
  
  .notice-date {
    font-size: 0.65rem; /* 小屏幕进一步减少日期字体大小 */
  }
  
  .notice-carousel-indicators {
    margin-top: 0.6rem;
  }

  .notice-carousel-indicators .indicator {
    width: 5px;
    height: 5px;
  }
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .carousel-text {
    width: 30%;
    padding: 2rem 1.5rem;
  }

  .carousel-image {
    width: 70%;
  }

  .carousel-title {
    font-size: 1.5rem;
  }
}



@media (max-width: 992px) {
  .carousel-section {
    height: 400px;
  }

  .carousel-text {
    width: 40%;
    padding: 1.5rem 1rem;
  }

  .carousel-image {
    width: 60%;
  }

  .carousel-title {
    font-size: 1.3rem;
  }

  .carousel-description {
    font-size: 0.9rem;
  }

  .left-panel {
    margin-bottom: 2rem;
  }

  .left-footer {
    margin: 0 -1.5rem -1.5rem -1.5rem;
  }

  .center-panel,
  .right-panel {
    min-height: auto;
    margin-bottom: 2rem;
  }
}

@media (max-width: 768px) {
  .top-header {
    padding: 0.8rem 0;
    max-height: 80px;
  }

  .college-title {
    font-size: 1.4rem;
  }

  .header-logo {
    height: 3.5rem;
    max-height: 70px;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }

  /* 移动端logo居中显示，移除左边空隙 */
  .top-header .row {
    justify-content: center;
    margin: 0;
  }
  
  .top-header .col-md-8 {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-left: 0;
    padding-right: 0;
    flex: 0 0 auto;
    max-width: none;
    width: auto;
  }

  .top-header .col-md-8 .d-flex {
    justify-content: center;
    width: 100%;
  }
  
  /* 确保logo图片本身居中 */
  .top-header .header-logo {
    margin: 0 auto;
    display: block;
  }

  /* 移动端搜索框靠右对齐 */
  .top-header .col-md-4 {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-left: 0;
    padding-right: 0;
  }

  .search-container {
    justify-content: flex-end;
    margin-top: 0.5rem;
    width: 100%;
  }

  /* 768px以下显示移动端搜索 */
  .desktop-search {
    display: none !important;
  }
  
  .mobile-search-container {
    display: block !important;
  }

  .search-form {
    max-width: 250px;
  }

  .carousel-section {
    height: 300px;
  }

  .carousel-text {
    width: 100%;
    height: 50%;
    padding: 1rem;
  }

  .carousel-image {
    width: 100%;
    height: 100%;
  }

  .carousel-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: center center;
  }

  .carousel-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
  }

  .carousel-description {
    font-size: 0.8rem;
    margin-bottom: 1rem;
  }

  .carousel-content {
    flex-direction: column;
  }

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

  .left-panel,
  .center-panel,
  .right-panel {
    padding: 1rem;
    min-height: auto;
  }
  
  /* 移动端新闻标题优化 */
  .news-title {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .right-panel .news-list .news-title {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .left-footer {
    margin: 0 -1rem -1rem -1rem;
    padding: 1rem;
  }

  /* 移动端左右布局调整 */
  .footer-content-wrapper {
    flex-direction: column;
    gap: 2rem;
    min-height: auto;
    padding: 1rem 0;
  }

  .qr-section {
    width: 80px;
    height: 80px;
    margin: 0 auto;
  }
  
  .qr-code {
    width: 80px;
    height: 80px;
    padding: 0.8rem;
  }

  .contact-section {
    width: 100%;
    height: auto;
    align-items: center;
    text-align: center;
    flex: 1;
  }

  .contact-info {
    text-align: center;
    align-items: center;
    font-size: var(--small-font-size); /* 使用CSS变量，从0.8rem增加到0.95rem */
    gap: 0.2rem;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }

  .contact-info p {
    text-align: center;
    line-height: 1.5;
    font-size: var(--small-font-size); /* 使用CSS变量，从0.75rem增加到0.95rem */
    word-break: normal;
    margin-bottom: 0.2rem;
    padding: 0 0.5rem;
  }
}

@media (max-width: 576px) {
  .college-title {
    font-size: 1.2rem;
  }

  .header-logo {
    height: 3rem;
    max-height: 60px;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }

  .top-header {
    padding: 0.6rem 0;
    max-height: 70px;
  }

  /* 小屏幕下进一步优化logo居中 */
  .top-header .row {
    justify-content: center;
    margin: 0;
  }
  
  .top-header .col-md-8 {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-left: 0;
    padding-right: 0;
    flex: 0 0 auto;
    max-width: none;
    width: auto;
  }

  .top-header .col-md-8 .d-flex {
    justify-content: center;
    width: 100%;
  }
  
  /* 确保logo图片本身居中 */
  .top-header .header-logo {
    margin: 0 auto;
    display: block;
  }

  /* 小屏幕下搜索框靠右对齐 */
  .top-header .col-md-4 {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-left: 0;
    padding-right: 0;
  }

  .search-container {
    justify-content: flex-end;
    width: 100%;
  }

  .search-form {
    max-width: 200px;
  }

  .left-footer {
    margin: 0 -0.8rem -0.8rem -0.8rem;
    padding: 1rem;
  }
  
  /* 小屏幕新闻标题优化 */
  .news-title {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .right-panel .news-list .news-title {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* 小屏幕左侧页脚优化 */
  .footer-content-wrapper {
    gap: 1.2rem;
    padding: 0.8rem 0;
  }

  .qr-section {
    width: 60px;
    height: 60px;
  }
  
  .qr-code {
    width: 60px;
    height: 60px;
    padding: 0.6rem;
  }

  .contact-section {
    flex: 1;
    width: 100%;
  }

  .contact-info {
    font-size: var(--small-font-size); /* 使用CSS变量，从0.75rem增加到0.95rem */
    gap: 0.1rem;
    width: 100%;
    max-width: 260px;
    margin: 0 auto;
  }

  .contact-info p {
    line-height: 1.4;
    margin-bottom: 0.15rem;
    font-size: var(--small-font-size); /* 使用CSS变量，从0.7rem增加到0.95rem */
    word-break: normal;
    padding: 0 0.3rem;
  }

  .carousel-section {
    height: 250px;
  }

  .carousel-text {
    padding: 0.75rem;
  }

  .carousel-title {
    font-size: 1rem;
  }

  .carousel-description {
    font-size: 0.75rem;
  }

  .carousel-button {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .faculty-list-card {
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  .left-panel,
  .center-panel,
  .right-panel {
    min-height: auto;
  }
}

/* 425-480px屏幕优化 */
@media (min-width: 426px) and (max-width: 480px) {
  .footer-content-wrapper {
    gap: 1.5rem; /* 进一步增加间距，让二维码与按钮有更合适的距离 */
    padding: 1rem 0;
  }
  
  .footer-content-wrapper .qr-section {
    margin-bottom: 0.3rem;
  }
  
  .footer-content-wrapper .contact-button,
  .footer-content-wrapper .old-version-button {
    font-size: 0.9rem;
    margin: 0.3rem auto;
    padding: 0.3em 0.8em;
  }
  
  .footer-content-wrapper .contact-info p {
    font-size: 0.9rem !important; /* 与按钮保持一致 */
  }
}

/* 超小屏幕优化 */
@media (max-width: 425px) {
  .notice-carousel {
    min-height: 240px; /* 超小屏幕进一步减少高度 */
  }
  
  .notice-list li {
    padding: 0.4rem 0; /* 超小屏幕进一步减少padding */
  }
  
  .notice-title {
    line-height: 1.1; /* 超小屏幕进一步减少行高 */
    font-size: 0.8rem; /* 超小屏幕进一步减少字体大小 */
  }
  
  .notice-date {
    font-size: 0.6rem; /* 超小屏幕进一步减少日期字体大小 */
  }
  
  .footer-content-wrapper {
    gap: 0.6rem;
    padding: 0.6rem 0;
  }
  
  /* 超小屏幕新闻标题优化 */
  .news-title {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .right-panel .news-list .news-title {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .qr-section {
    width: 50px;
    height: 50px;
  }

  .contact-section {
    flex: 1;
    width: 100%;
  }

  .contact-info {
    font-size: 0.7rem;
    gap: 0.1rem;
    width: 100%;
    max-width: 240px;
    margin: 0 auto;
  }

  .contact-info p {
    line-height: 1.3;
    margin-bottom: 0.1rem;
    font-size: 0.65rem;
    word-break: normal;
    padding: 0 0.2rem;
  }
}

/* 极小屏幕优化 (320px-400px) */
@media (max-width: 400px) {
  .notice-carousel {
    min-height: 220px; /* 极小屏幕进一步减少高度 */
  }
  
  .notice-list li {
    padding: 0.35rem 0; /* 极小屏幕进一步减少padding */
  }
  
  .notice-title {
    line-height: 1.05; /* 极小屏幕进一步减少行高 */
    font-size: 0.75rem; /* 极小屏幕进一步减少字体大小 */
  }
  
  .notice-date {
    font-size: 0.55rem; /* 极小屏幕进一步减少日期字体大小 */
  }
  
  .left-footer {
    margin: 0 -0.8rem -0.8rem -0.8rem;
    padding: 0.8rem;
  }
  
  /* 极小屏幕新闻标题优化 */
  .news-title {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .right-panel .news-list .news-title {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .footer-content-wrapper {
    gap: 0.4rem;
    padding: 0.5rem 0;
  }

  .qr-section {
    width: 45px;
    height: 45px;
  }

  .contact-section {
    flex: 1;
    width: 100%;
  }

  .contact-info {
    font-size: 0.65rem;
    gap: 0.1rem;
    width: 100%;
    max-width: 220px;
    margin: 0 auto;
  }

  .contact-info p {
    line-height: 1.2;
    margin-bottom: 0.08rem;
    font-size: 0.6rem;
    word-break: normal;
    padding: 0 0.15rem;
  }
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
  .center-panel,
  .right-panel {
    background: var(--bg-dark);
    color: var(--text-dark);
  }

  .news-card {
    background: var(--bg-dark);
    border-color: var(--border-color);
  }

  .card-title {
    color: var(--text-dark);
  }

  .notice-title {
    color: var(--text-dark);
  }

  .notice-list li {
    border-color: var(--border-color);
  }
}

/* 其他页面样式 */
.page-content {
  padding: 2rem 0;
  background: var(--bg-white);
}

.page-content .container {
  max-width: 1200px;
  margin: 0 auto;
}

.page-content h1,
.page-content h2,
.page-content h3 {
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.page-content p {
  color: var(--text-dark);
  line-height: 1.8;
  margin-bottom: 1rem;
  text-indent: 2em;
  font-size: var(--base-font-size); /* 使用基础字体大小 */
}

.page-content a {
  color: var(--primary-red);
  text-decoration: none;
}

.page-content a:hover {
  text-decoration: underline;
}

/* 确保其他页面在深色模式下也能正常显示 */
@media (prefers-color-scheme: dark) {
  .page-content {
    background: var(--bg-dark);
  }

  .page-content h1,
  .page-content h2,
  .page-content h3,
  .page-content p {
    color: var(--text-dark);
  }
}

/* 信息页面和新闻页面内容样式 */
.content-container {
  max-width: 80%;
  margin: 0 auto;
  padding: 0 0 0 15%;
}

/* 默认左对齐，允许内联style居中/右对齐 */
.content-body {
  text-align: left;
}
.content-body h1,
.content-body h2,
.content-body h3,
.content-body h4,
.content-body h5,
.content-body h6,
.content-body p {
  text-align: left;
}
.content-body [style*="text-align:center"] {
  text-align: center !important;
}
.content-body [style*="text-align:right"] {
  text-align: right !important;
}

.content-body h1,
.content-body h2,
.content-body h3,
.content-body h4,
.content-body h5,
.content-body h6 {
  text-align: left;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.content-body p {
  text-align: left;
  line-height: 1.8;
  margin-bottom: 1rem;
  color: var(--text-dark);
  text-indent: 2em;
  font-size: var(--base-font-size); /* 使用基础字体大小 */
}

.content-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 居中图片：p标签设置了text-align:center时，img用inline-block */
.content-body p[style*="text-align:center"] > img {
  display: inline-block;
}

/* figure.image 结构下的图片，block并居中 */
.content-body figure.image img {
  display: block;
  margin: 0 auto;
}

/* .content-body figure {
  text-align: center;
  margin: 1rem 0;
} */

/* .content-body figure.image {
  text-align: center;
} */

.content-body figure figcaption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-light);
  font-style: italic;
}

/* CKEditor 居中图片结构支持 */
.content-body figure.image {
  text-align: center;
}

/* 修复：确保block样式的图片正确居中 */
.content-body figure.image.image-style-block {
  display: block;
  margin: 1rem auto;
  text-align: center;
}

.content-body figure.image.image-style-block img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}

/* inline样式的图片 */
.content-body figure.image.image-style-inline {
  display: inline;
  margin: 0;
}

.content-body figure.image.image-style-inline img {
  display: inline-block;
  margin: 0;
  vertical-align: middle;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .content-container {
    max-width: 100%;
    padding: 0 5%;
  }

  .content-body {
    text-align: left;
  }

  .content-body h1,
  .content-body h2,
  .content-body h3,
  .content-body h4,
  .content-body h5,
  .content-body h6,
  .content-body p {
    text-align: left;
  }
}

/* 列表页面特殊样式 */
.content-container .list-group {
  text-align: left;
}

.content-container .list-group-item {
  border: 1px solid var(--border-color);
  margin-bottom: 0.5rem;
  border-radius: 8px;
  transition: all 0.3s;
}

.content-container .list-group-item:hover {
  background-color: var(--bg-light);
  transform: translateX(5px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.content-container .list-group-item a {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.content-container .list-group-item a:hover {
  color: var(--primary-red);
}

/* 统一教师卡片下外边距，优雅覆盖所有屏幕 */
.faculty-list-card {
  margin-bottom: 0.3rem;
}

.carousel-triangle {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 20%;
  height: 100%;
  background: var(--dark-red);
  clip-path: polygon(0 100%,0 0, 100% 100%);
  z-index: 2;
  opacity: 1;
  pointer-events: none;
}

.carousel-triangle-gray {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 22%;
  height: 100%;
  background: rgba(80,80,80,0.5);
  clip-path: polygon(0 100%, 0 0, 30% 0, 100% 100%);
  z-index: 1;
  pointer-events: none;
}


/* 4K大屏幕优化 (2000px以上) */
@media (min-width: 2000px) {
  .carousel-triangle {
    width: 10%;
  }
  .carousel-triangle-gray {
     width: 14%;
  }

  .header-logo {
    height: 5rem;
    max-height: 120px;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }

  .top-header {
    padding: 1.2rem 0;
    max-height: 120px;
  }

  /* 4K大屏幕左侧页脚优化 */
  .footer-content-wrapper {
    gap: 3rem;
    min-height: 150px;
  }

  .qr-section {
    width: 120px;
    height: 120px;
  }

  .contact-section {
    height: 120px;
  }

  .contact-section {
    flex: 1;
  }

  .contact-info {
    font-size: 0.9rem;
    gap: 0.2rem;
  }

  .contact-info p {
    line-height: 1.5;
    font-size: 1rem; /* 与contact-button保持一致 */
  }
  
  /* 大屏幕按钮字体大小设置 */
  .footer-content-wrapper .contact-button,
  .footer-content-wrapper .old-version-button {
    font-size: 1rem; /* 与contact-info p保持一致 */
  }
}


/* 大屏幕优化 (1200px以上) */
@media (min-width: 1200px) and (max-width: 1999px) {
  .carousel-triangle {
    width: 12%;
    /* 在这里添加大屏幕的三角形优化 */
  }
  .carousel-triangle-gray {
    width: 16%;
  }

  .header-logo {
    height: 4.5rem;
    max-height: 100px;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }

  .top-header {
    padding: 1rem 0;
    max-height: 110px;
  }
  
  /* 导航栏优化 - 适应调大后的字体 */
  .main-navbar .navbar-nav {
    gap: 1.2rem; /* 减少间距，为字体留出更多空间 */
  }
  
  .main-navbar .nav-link {
    padding: 0.4rem 0.7rem; /* 减少内边距 */
  }
}

/* 中等屏幕优化 (1025px - 1199px) */
@media (min-width: 1025px) and (max-width: 1199px) {
  .carousel-triangle {
    width: 15%;
  }
  .carousel-triangle-gray {
    width: 19%;
 }
}

/* 1024px及以下隐藏三角形和左侧文字 */
@media (max-width: 1024px) {
  .carousel-triangle {
    display: none;
  }

  .carousel-triangle-gray {
    display: none;
 }
  .carousel-text {
    display: none;
  }

  .carousel-image {
    width: 100% !important;
  }
}

/* 统一头部下拉菜单样式 - 移动端 */
.unified-header .dropdown-menu .dropdown-item,
.unified-header .dropdown-menu .dropdown-item:hover,
.unified-header .dropdown-menu .dropdown-item.active {
  color: #fff !important;
}

.unified-header .dropdown-menu {
  border: none !important;
}

.unified-header .dropdown-menu .dropdown-item {
  color: #fff !important;
  background: transparent !important;
}

.unified-header .dropdown-menu .dropdown-item:hover,
.unified-header .dropdown-menu .dropdown-item.active {
  background: #fff !important;
  color: var(--primary-red) !important;
}

/* 首页左侧栏footer始终贴底 */
.left-panel {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 180px); /* 180px为header+navbar高度，需与你实际高度一致 */
}
.left-footer {
  margin-top: auto;
}
@media (max-width: 768px) {
  .left-panel {
    min-height: calc(100vh - 160px); /* 移动端头部较矮 */
  }
}
@media (max-width: 576px) {
  .left-panel {
    min-height: calc(100vh - 140px);
  }
}

/* 保证 .unified-header.fixed 下所有子元素都不脱离文档流 */
.unified-header.fixed .main-navbar,
.unified-header.fixed .navbar-collapse {
  position: static !important;
}

/* 其他页面Footer响应式优化 */
@media (max-width: 768px) {
  .main-footer .row {
    gap: 1.2rem;
  }

  .main-footer .col-12 {
    padding: 0.5rem 0;
  }

  .main-footer .contact-button,
  .main-footer .old-version-button {
    font-size: 0.9rem;
  }

  .main-footer .qr-section {
    margin: 0 auto;
    max-width: 120px;
  }

  .main-footer .qr-code {
    margin: 0 auto;
  }

  .main-footer .qr-label {
    font-size: 0.85rem;
  }
}

@media (max-width: 576px) {
  .main-footer .row {
    gap: 0.8rem;
  }

  .main-footer .col-12 {
    padding: 0.3rem 0;
  }

  .main-footer .contact-button,
  .main-footer .old-version-button {
    font-size: 0.85rem;
  }

  .main-footer .qr-section {
    max-width: 100px;
  }

  .main-footer .qr-code img {
    width: 60px !important;
    height: 60px !important;
  }

  .main-footer .qr-label {
    font-size: 0.8rem;
  }
}

@media (max-width: 768px) {
  .main-footer .contact-button,
  .main-footer .old-version-button {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    text-align: center !important;
    margin: 0.5em 0 !important;
  }
  .main-footer .contact-button i,
  .main-footer .contact-button .icon,
  .main-footer .old-version-button i,
  .main-footer .old-version-button .icon {
    margin-right: 0.5em !important;
    margin-bottom: 0 !important;
  }
}

/* 强制允许CKEditor内容里的内联字体大小在前台生效 */
.content-body *[style*="font-size"] {
    font-size: unset !important;
}

/* 强制所有.content-body下的标题左对齐，覆盖其他样式 */
.content-body h1,
.content-body h2,
.content-body h3,
.content-body h4,
.content-body h5,
.content-body h6 {
    text-align: left !important;
}

/* CKEditor 字体大小类映射 */
.content-body .text-tiny {
  font-size: 0.7em;
}
.content-body .text-small {
  font-size: 0.85em;
}
.content-body .text-big {
  font-size: 1.25em;
}
.content-body .text-huge {
  font-size: 1.6em;
}

/* --- 左侧页脚小屏纵向堆叠终极修复 begin --- */
@media (max-width: 768px) {
  .footer-content-wrapper {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    padding-bottom: 0.6rem;
    width: 100%;
  }
  .footer-content-wrapper > * {
    margin-bottom: 0.4rem;
    text-align: center !important;
    width: 100%;
  }
  .footer-content-wrapper > *:last-child {
    margin-bottom: 0;
  }
  .footer-content-wrapper .contact-button,
  .footer-content-wrapper .old-version-button {
    display: inline-flex;
    margin: 0.2rem auto;
    font-size: 1rem;
  }
  
  .footer-content-wrapper .footer-buttons-container {
    flex-direction: column;
    gap: 6px;
  }
  .footer-content-wrapper .qr-section {
    margin: 0 auto 0.1rem auto;
  }
  .footer-content-wrapper .qr-label {
    margin-bottom: 0.2rem;
  }
  .footer-content-wrapper .contact-info p {
    text-align: center !important;
    padding-left: 0 !important;
    text-indent: 0 !important;
    word-break: break-all;
    font-size: 1rem !important; /* 与contact-button保持一致 */
  }
  .footer-content-wrapper .copyright {
    margin-top: 0.1rem;
    font-size: 0.85rem;
  }
  
  /* 添加对contact-info的间距控制 */
  .footer-content-wrapper .contact-info {
    margin-top: 0.1rem;
  }
}
/* --- 左侧页脚小屏纵向堆叠终极修复 end --- */

/* --- 左侧页脚极小屏自适应修复 begin --- */
@media (max-width: 425px) {
  .footer-content-wrapper {
    padding-bottom: 0.4rem;
  }
  .footer-content-wrapper > * {
    margin-bottom: 0.4rem;
    font-size: 0.9rem; /* 与按钮保持一致 */
  }
  .footer-content-wrapper .qr-section {
    margin-bottom: 0.2rem;
    width: 70px;
    height: 70px;
  }
  .footer-content-wrapper .qr-code {
    width: 60px;
    height: 60px;
    padding: 0.3rem;
  }
  .footer-content-wrapper .contact-button,
  .footer-content-wrapper .old-version-button {
    font-size: 0.9rem;
    margin: 0.2rem auto;
    padding: 0.3em 0.8em;
  }
  
  .footer-content-wrapper .footer-buttons-container {
    gap: 6px;
  }
  .footer-content-wrapper .contact-info {
    margin-top: 0.1rem;
  }
  .footer-content-wrapper .contact-info p {
    font-size: 0.9rem !important; /* 与contact-button保持一致，使用!important确保优先级 */
  }
  .footer-content-wrapper .copyright {
    margin-top: 0.1rem;
    font-size: 0.85rem;
  }
}
@media (max-width: 375px) {
  .notice-carousel {
    min-height: 200px; /* 375px屏幕进一步减少高度 */
  }
  
  .notice-list li {
    padding: 0.3rem 0; /* 375px屏幕进一步减少padding */
  }
  
  .notice-title {
    line-height: 1.0; /* 375px屏幕进一步减少行高 */
    font-size: 0.7rem; /* 375px屏幕进一步减少字体大小 */
  }
  
  .notice-date {
    font-size: 0.5rem; /* 375px屏幕进一步减少日期字体大小 */
  }
  
  .footer-content-wrapper .qr-code {
    width: 50px;
    height: 50px;
    padding: 0.2rem;
  }
  
  /* 375px屏幕新闻标题优化 */
  .news-title {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .right-panel .news-list .news-title {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .footer-content-wrapper .contact-button,
  .footer-content-wrapper .old-version-button {
    font-size: 0.8rem;
    padding: 0.2em 0.6em;
  }
  
  .footer-content-wrapper .footer-buttons-container {
    gap: 5px;
  }
  .footer-content-wrapper > * {
    font-size: 0.8rem; /* 与按钮保持一致 */
    margin-bottom: 0.25rem;
  }
  .footer-content-wrapper .contact-info {
    margin-top: 0.1rem;
  }
  .footer-content-wrapper .contact-info p {
    font-size: 0.8rem !important; /* 与contact-button保持一致，使用!important确保优先级 */
  }
  .footer-content-wrapper .copyright {
    margin-top: 0.1rem;
  }
}
@media (max-width: 340px) {
  .notice-carousel {
    min-height: 180px; /* 340px屏幕进一步减少高度 */
  }
  
  .notice-list li {
    padding: 0.25rem 0; /* 340px屏幕进一步减少padding */
  }
  
  .notice-title {
    line-height: 0.95; /* 340px屏幕进一步减少行高 */
    font-size: 0.65rem; /* 340px屏幕进一步减少字体大小 */
  }
  
  .notice-date {
    font-size: 0.45rem; /* 340px屏幕进一步减少日期字体大小 */
  }
  
  .footer-content-wrapper .qr-code {
    width: 40px;
    height: 40px;
    padding: 0.1rem;
  }
  
  /* 340px屏幕新闻标题优化 */
  .news-title {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .right-panel .news-list .news-title {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .footer-content-wrapper .contact-button,
  .footer-content-wrapper .old-version-button {
    font-size: 0.75rem;
    padding: 0.1em 0.4em;
  }
  
  .footer-content-wrapper .footer-buttons-container {
    gap: 4px;
  }
  .footer-content-wrapper > * {
    font-size: 0.75rem; /* 与按钮保持一致 */
    margin-bottom: 0.15rem;
  }
  .footer-content-wrapper .contact-info {
    margin-top: 0.08rem;
  }
  .footer-content-wrapper .contact-info p {
    font-size: 0.75rem !important; /* 与contact-button保持一致，使用!important确保优先级 */
  }
  .footer-content-wrapper .copyright {
    margin-top: 0.08rem;
  }
}
/* --- 左侧页脚极小屏自适应修复 end --- */

/* 主footer二维码区域flex弹性居中及自适应尺寸优化 */
.main-footer .qr-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0 auto;
}

.main-footer .qr-code {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  width: 100px;
  height: 100px;
  padding: 0.8em;
  background: #fff;
  border-radius: 8px;
  box-shadow: none;
  margin: 0 auto;
}

.main-footer .qr-code img {
  max-width: 100%;
  max-height: 100%;
  display: block;
  margin: 0 auto;
}

.main-footer .qr-label {
  text-align: center;
  width: 100%;
  margin: 0.5em 0 0 0;
}

/* 断点自适应二维码尺寸和padding */
@media (max-width: 768px) {
  .main-footer .qr-code {
    width: 80px;
    height: 80px;
    padding: 0.6em;
  }
}
@media (max-width: 576px) {
  .main-footer .qr-code {
    width: 60px;
    height: 60px;
    padding: 0.4em;
  }
}
@media (max-width: 425px) {
  .main-footer .qr-code {
    width: 50px;
    height: 50px;
    padding: 0.2em;
  }
}
@media (max-width: 375px) {
  .main-footer .qr-code {
    width: 40px;
    height: 40px;
    padding: 0.1em;
  }
}
@media (max-width: 320px) {
  .main-footer .qr-code {
    width: 32px;
    height: 32px;
    padding: 0;
  }
}

/* 移除原有与二维码尺寸、padding、居中相关的冲突样式（如有） */
@media (max-width: 576px) {
  .main-footer .qr-code img {
    width: auto !important;
    height: auto !important;
  }
}

@media (max-width: 768px) {
  .main-footer .container,
  .main-footer .row {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
  }
  .main-footer .col-12,
  .main-footer .qr-section,
  .main-footer .contact-button,
  .main-footer .old-version-button,
  .main-footer .qr-label {
    width: 100%;
    text-align: center;
    margin: 0.5em 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
}

/* 学术报告轮播标题行布局 */
.report-swiper .report-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 0.5rem 0 0.2rem 0;
  width: 100%;
  min-height: calc(1.4em * 2 + 0.5rem); /* 确保有足够高度容纳两行标题 */
}

/* 白色箭头样式 */
.report-swiper .swiper-button-prev,
.report-swiper .swiper-button-next {
  color: #fff;
  background: rgba(0,0,0,0.3);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: static;
  transform: none;
  font-size: 0.8rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.report-swiper .news-title {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0.5rem;
  text-align: center;
  flex: 1 1 auto;
  text-decoration: none;
  transition: color 0.3s;
  /* 限制为一行并添加省略号 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  max-width: 100%;
}

.report-swiper .news-title:hover {
  color: var(--primary-red, #e74c3c);
}

/* 学术报告轮播图片高度调整 - 动态4:3宽高比 */
.report-swiper .news-image {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 75%; /* 4:3 宽高比 (3/4 = 0.75) */
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.report-swiper .news-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

/* 学术报告轮播图整体布局样式 */
.report-swiper .news-item.with-image {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* 确保学术报告轮播图在不同屏幕尺寸下都能保持4:3比例 */
@media (max-width: 768px) {
  .report-swiper .news-image {
    padding-bottom: 75%; /* 保持4:3比例 */
  }
}

@media (max-width: 576px) {
  .report-swiper .news-image {
    padding-bottom: 75%; /* 保持4:3比例 */
  }
}

.faculty-list-flex-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: flex-start;
}

/* 基础样式 - 移除max-width限制 */
.faculty-list-flex-card {
  flex: 1 1 350px;
  min-width: 260px;
  box-sizing: border-box;
  padding: 1rem;
  margin: 0.5rem;
  min-height: 120px;
  /* 移除了max-width限制，让媒体查询控制 */
}


/* 教师详情页响应式样式 */
.faculty-profile-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

.faculty-profile-header {
  display: flex;
  flex-direction: row;
  gap: 30px;
  align-items: center;
  margin-bottom: 1.5rem !important;
  justify-content: center;
  width: 100%;
}
.faculty-profile-header .faculty-photo {
  flex-shrink: 0;
  width: 180px;
}
.faculty-profile-header .faculty-photo img {
  width: 180px;
  height: auto;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 8px;
}
.faculty-basic-info {
  flex: 1;
  min-width: 0;
  max-width: 250px;
}
.faculty-basic-info h1 {
  font-size: 1.8rem;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}
.faculty-basic-info p {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  text-indent: 0;
}
.faculty-detail-content {
  padding-left: 120px;
  padding-top: 0.75rem;
  max-width: 1100px;
  text-align: left;
}
.faculty-detail-content a {
  word-break: break-all;
  overflow-wrap: break-word;
}

@media (max-width: 767.98px) {
  .faculty-profile-header {
    flex-direction: column;
    gap: 20px;
    align-items: center;
    margin-bottom: 1.5rem !important;
  }
  .faculty-profile-header .faculty-photo {
    width: 200px;
    max-width: 200px;
  }
  .faculty-basic-info {
    text-align: center;
    width: 100%;
  }
  .faculty-basic-info h1 {
    font-size: 1.5rem !important;
    line-height: 1.2 !important;
  }
  .faculty-detail-content {
    padding-left: 12px !important;
    padding-right: 12px !important;
    max-width: 100%;
    text-align: left;
  }
}
@media (max-width: 991.98px) {
  .faculty-profile-header {
    flex-direction: column !important;
    gap: 24px !important;
    align-items: center;
  }
  .faculty-photo {
  margin-bottom: 1rem;
  width: 100%;
  min-width: 40px;
  max-width: 100px;
  height: auto;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 8px;
}
  .faculty-basic-info {
    text-align: left !important;
    margin-bottom: 1.5rem;
  }
  .faculty-detail-content {
    padding-left: 12px !important;
    padding-right: 12px !important;
    max-width: 100%;
    text-align: left;
  }
}

/* 让 faculty_list 页面 email 可换行 */
.faculty-list-flex-card [style*="color:#888"] {
  word-break: break-all;
  overflow-wrap: break-word;
}

/* 移动端缩小教师卡片间距 */
@media (max-width: 991.98px) {
  .faculty-list-flex-row {
    gap: 0rem !important;
  }
  .faculty-list-flex-card {
    margin: 0.3rem !important;
    padding: 0.3rem !important;
  }
  .faculty-list-flex-card * {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }
  .faculty-list-flex-card img {
    display: block !important;
    vertical-align: top !important;
  }
  .department-section {
    margin-bottom: 0.3rem !important;
  }
}

/* 教职工列表页面样式 */

/* 教职工卡片基础样式优化 */
.faculty-list-flex-card {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

/* Swiper 容器样式 */
.faculty-swiper-container {
  width: 100%;
  overflow: hidden;
}

.faculty-swiper-container .swiper-wrapper {
  display: flex;
  align-items: center;
}

.faculty-swiper-container .swiper-slide {
  width: auto;
  flex-shrink: 0;
}

.faculty-photo-container {
  width: 100%;
  max-width: 120px;
  min-width: 80px;
  flex-shrink: 0;
}

.faculty-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.faculty-info {
  flex: 1;
  margin-left: 0.2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.1rem;
}

.faculty-info strong {
  margin-bottom: 0.1rem;
  line-height: 1.2;
}

.faculty-title {
  font-size: 0.95em;
  color: #888;
  font-weight: 500;
  margin-top: 0.2rem;
  line-height: 1.2;
}

/* 基础样式 - 移除max-width限制 */
.faculty-list-responsive-wrapper .faculty-list-flex-card {
  flex: 1 1 350px;
  min-width: 260px;
  box-sizing: border-box;
  padding: 1rem;
  margin: 0.5rem;
  min-height: 120px;
  /* 移除了max-width限制，让媒体查询控制 */
}

/* 教职工列表响应式布局 */
@media (min-width: 2000px) {
  .faculty-list-responsive-wrapper .content-container {
    max-width: none !important;
    width: 100% !important;
  }
  
  .faculty-list-responsive-wrapper .faculty-swiper-container {
    width: 100% !important;
  }
  
  .faculty-list-responsive-wrapper .faculty-list-flex-card {
    max-width: 260px;
    min-width: 230px;
  }
  
  .faculty-list-responsive-wrapper .faculty-photo-container {
    max-width: 90px;
  }
  
  .faculty-list-responsive-wrapper .faculty-photo {
    max-width: 70px;
  }
  
  .faculty-list-responsive-wrapper .faculty-info {
    margin-left: 0.2rem;
  }
}

@media (min-width: 1440px) and (max-width: 1999px) {
  .faculty-list-responsive-wrapper .faculty-list-flex-card {
    max-width: 380px;
    min-width: 240px;
  }
  
  .faculty-list-responsive-wrapper .faculty-photo-container {
    max-width: 100px;
  }
  
  .faculty-list-responsive-wrapper .faculty-photo {
    max-width: 80px;
  }
  
  .faculty-list-responsive-wrapper .faculty-info {
    margin-left: 0.15rem;
  }
  
  /* 1440px-1999px导航栏优化 */
  .main-navbar .navbar-nav {
    gap: 1rem; /* 进一步减少间距 */
  }
  
  .main-navbar .nav-link {
    padding: 0.35rem 0.6rem; /* 进一步减少内边距 */
  }
}

@media (min-width: 1200px) and (max-width: 1439px) {
  .faculty-list-responsive-wrapper .faculty-list-flex-card {
    max-width: 240px;
    min-width: 180px;
  }
  
  .faculty-list-responsive-wrapper .faculty-photo-container {
    max-width: 110px;
  }
  
  .faculty-list-responsive-wrapper .faculty-photo {
    max-width: 90px;
  }
  
  .faculty-list-responsive-wrapper .faculty-info {
    margin-left: 0.15rem;
  }
  
  /* 1200px-1439px导航栏优化 */
  .main-navbar .navbar-nav {
    gap: 0.8rem; /* 进一步减少间距 */
  }
  
  .main-navbar .nav-link {
    padding: 0.3rem 0.5rem; /* 进一步减少内边距 */
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .faculty-list-responsive-wrapper .faculty-list-flex-card {
    max-width: 240px;
    min-width: 180px;
  }
  
  .faculty-list-responsive-wrapper .faculty-photo-container {
    max-width: 120px;
  }
  
  .faculty-list-responsive-wrapper .faculty-photo {
    max-width: 100px;
  }
  
  .faculty-list-responsive-wrapper .faculty-info {
    margin-left: 0.15rem;
  }
}

@media (max-width: 767px) {
  .faculty-list-responsive-wrapper .faculty-list-flex-card {
    max-width: none;
    min-width: 280px;
    padding: 0.8rem;
    margin: 0.3rem;
  }
  
  .faculty-list-responsive-wrapper .faculty-photo-container {
    max-width: 100px;
  }
  
  .faculty-list-responsive-wrapper .faculty-photo {
    max-width: 80px;
  }
  
  .faculty-list-responsive-wrapper .faculty-info {
    margin-left: 0.25rem;
  }
}

@media (max-width: 576px) {
  .faculty-list-responsive-wrapper .faculty-title-row {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  
  .faculty-list-responsive-wrapper .faculty-list-flex-card {
    min-width: 250px;
    padding: 0.6rem;
    margin: 0.2rem;
  }
  
  .faculty-list-responsive-wrapper .faculty-photo-container {
    max-width: 80px;
  }
  
  .faculty-list-responsive-wrapper .faculty-photo {
    max-width: 70px;
  }
  
  .faculty-list-responsive-wrapper .faculty-info {
    margin-left: 0.2rem;
    font-size: 0.9em;
  }
}

/* 全局段落首行缩进 - 覆盖Bootstrap默认样式 */
p {
  text-indent: 2em;
  font-size: var(--base-font-size); /* 使用基础字体大小 */
}

/* 特殊情况下不需要缩进的段落 */
p.no-indent,
p[style*="text-align:center"],
p[style*="text-align:right"] {
  text-indent: 0;
}

/* 新闻页面发布时间不需要首行缩进 */
.content-container p.text-muted {
  text-indent: 0;
}

/* 教师详情页面职称和email不需要首行缩进 */
.faculty-basic-info p.text-muted,
.faculty-basic-info p {
  text-indent: 0;
}

/* 响应式字体大小调整 */
@media (max-width: 768px) {
  :root {
    --base-font-size: 1.05rem; /* 中等屏幕稍微减小 */
    --small-font-size: 0.9rem;
    --large-font-size: 1.15rem;
  }
}

@media (max-width: 576px) {
  :root {
    --base-font-size: 1rem; /* 小屏幕保持1rem */
    --small-font-size: 0.85rem;
    --large-font-size: 1.1rem;
  }
}

@media (min-width: 1200px) {
  :root {
    --base-font-size: 1.15rem; /* 大屏幕稍微增大 */
    --small-font-size: 1rem;
    --large-font-size: 1.25rem;
  }
}

/* 教职工列表页面专用样式 */
.faculty-title-list-page .faculty-list-grid-container {
  display: grid;
  gap: 1rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 600px; /* 确保有足够的高度容纳4行 */
  grid-auto-rows: 1fr; /* 自动行高，确保每行高度一致 */
  /* 默认列数设置，JavaScript会根据屏幕尺寸动态调整 */
  grid-template-columns: repeat(2, 1fr);
}

.faculty-title-list-page .faculty-list-flex-card {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding: 1rem;
  min-height: 120px;
  width: 100%;
  /* 确保卡片填满Grid单元格 */
}

.faculty-title-list-page .faculty-photo-container {
  width: 100%;
  max-width: 120px;
  min-width: 80px;
  flex-shrink: 0;
}

.faculty-title-list-page .faculty-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.faculty-title-list-page .faculty-info {
  flex: 1;
  margin-left: 0.2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.1rem;
}

.faculty-title-list-page .faculty-info strong {
  margin-bottom: 0.1rem;
  line-height: 1.2;
}

.faculty-title-list-page .faculty-title {
  font-size: 0.95em;
  color: #888;
  font-weight: 500;
  margin-top: 0.2rem;
  line-height: 1.2;
}

/* 空白占位符样式 */
.faculty-title-list-page .faculty-placeholder {
  min-height: 120px;
  background: transparent;
  border: none;
}

/* 教职工列表页面响应式设计 */
@media (min-width: 2000px) {
  .faculty-title-list-page .faculty-list-grid-container {
    grid-template-columns: repeat(4, 1fr);
    max-width: none;
  }
  
  .faculty-title-list-page .faculty-list-flex-card {
    max-width: 260px;
    min-width: 230px;
  }
  
  .faculty-title-list-page .faculty-photo-container {
    max-width: 90px;
  }
  
  .faculty-title-list-page .faculty-photo {
    max-width: 70px;
  }
  
  .faculty-title-list-page .faculty-info {
    margin-left: 0.2rem;
  }
}

@media (min-width: 1440px) and (max-width: 1999px) {
  .faculty-title-list-page .faculty-list-grid-container {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .faculty-title-list-page .faculty-list-flex-card {
    max-width: 260px;
    min-width: 230px;
  }
  
  .faculty-title-list-page .faculty-photo-container {
    max-width: 90px;
  }
  
  .faculty-title-list-page .faculty-photo {
    max-width: 70px;
  }
  
  .faculty-title-list-page .faculty-info {
    margin-left: 0.2rem;
  }
}

@media (min-width: 1200px) and (max-width: 1439px) {
  .faculty-title-list-page .faculty-list-grid-container {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .faculty-title-list-page .faculty-list-flex-card {
    max-width: 240px;
    min-width: 180px;
  }
  
  .faculty-title-list-page .faculty-photo-container {
    max-width: 110px;
  }
  
  .faculty-title-list-page .faculty-photo {
    max-width: 90px;
  }
  
  .faculty-title-list-page .faculty-info {
    margin-left: 0.15rem;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .faculty-title-list-page .faculty-list-grid-container {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .faculty-title-list-page .faculty-list-flex-card {
    max-width: 240px;
    min-width: 180px;
  }
  
  .faculty-title-list-page .faculty-photo-container {
    max-width: 120px;
  }
  
  .faculty-title-list-page .faculty-photo {
    max-width: 100px;
  }
  
  .faculty-title-list-page .faculty-info {
    margin-left: 0.15rem;
  }
}

@media (max-width: 767px) {
  .faculty-title-list-page .faculty-list-grid-container {
    grid-template-columns: 1fr;
  }
  
  .faculty-title-list-page .faculty-list-flex-card {
    max-width: none;
    min-width: 280px;
    padding: 0.8rem;
    margin: 0.3rem;
  }
  
  .faculty-title-list-page .faculty-photo-container {
    max-width: 100px;
  }
  
  .faculty-title-list-page .faculty-photo {
    max-width: 80px;
  }
  
  .faculty-title-list-page .faculty-info {
    margin-left: 0.25rem;
  }
}

@media (max-width: 576px) {
  .faculty-title-list-page .faculty-list-grid-container {
    gap: 0.5rem;
  }
  
  .faculty-title-list-page .faculty-list-flex-card {
    min-width: 250px;
    padding: 0.6rem;
    margin: 0.2rem;
  }
  
  .faculty-title-list-page .faculty-photo-container {
    max-width: 80px;
  }
  
  .faculty-title-list-page .faculty-photo {
    max-width: 70px;
  }
  
  .faculty-title-list-page .faculty-info {
    margin-left: 0.2rem;
    font-size: 0.9em;
  }
}



