/* ==========================================================================
   江西科技学院前沿交叉学院 - 门户站点全局样式
   严格遵循 ui规范.md 设计系统：直角、无阴影、CSS 变量驱动
   ========================================================================== */

/* ---------- 设计系统：CSS 变量 ---------- */
:root {
  /* 色值 */
  --color-primary: #19549C;          /* 主色，导航深蓝底色 */
  --color-highlight: #FF9F00;        /* 高亮，选中/当前栏目 */
  --color-primary-hover: #2864AF;    /* 辅助蓝，侧边菜单hover */
  --color-text-1: #222222;           /* 一级文字，标题 */
  --color-text-2: #444444;           /* 二级文字，正文/列表 */
  --color-text-3: #707070;           /* 辅助文字，日期/分页/面包屑 */
  --color-border: #D8DCE3;           /* 边框/分割线 */
  --color-bg: #FFFFFF;               /* 页面背景 */
  --color-bg-light: #F7F9FC;         /* 模块浅背景 */
  --color-btn-hover: #154580;        /* 按钮/链接hover加深 */

  /* 字号 */
  --fs-h1: 26px;
  --fs-h2: 20px;
  --fs-h3: 16px;
  --fs-h4: 14px;
  --fs-body: 15px;
  --fs-small: 13px;

  /* 行高 */
  --lh-h1: 36px;
  --lh-h2: 28px;
  --lh-h3: 24px;
  --lh-h4: 20px;
  --lh-body: 26px;
  --lh-small: 18px;

  /* 布局 */
  --container-width: 1200px;
  --space-base: 16px;

  /* 字体族 */
  --font-family: "Microsoft YaHei", "思源黑体", "SimHei", Arial, sans-serif;
}

/* ---------- 重置 ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  font-family: var(--font-family);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text-2);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-btn-hover);
}

ul,
ol {
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
  border: 0;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
}

input {
  font-family: inherit;
  outline: none;
}

/* 全局直角 + 无阴影 */
* {
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* ==========================================================================
   通用容器与标题栏
   ========================================================================== */
.container {
  width: var(--container-width);
  max-width: 100%;
  margin: 0 auto;
  padding: 0 var(--space-base);
}

/* 模块上下外边距 32px */
.section {
  margin-top: 32px;
  margin-bottom: 32px;
}

/* 标题栏：H2 + 底部 1px 分割线 + 右侧「更多 »」 */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 20px; /* 标题与内容间距 20px */
}

.section-head h2 {
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  font-weight: 500;
  color: var(--color-text-1);
  position: relative;
  padding-left: 12px;
}

.section-head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  background-color: var(--color-primary);
}

.section-head .more {
  font-size: var(--fs-small);
  color: var(--color-text-3);
  line-height: var(--lh-small);
}

.section-head .more:hover {
  color: var(--color-primary);
}

/* ==========================================================================
   1. 顶部通栏（banner背景图 + logo + 标题叠加）
   ========================================================================== */
.top-bar {
  background-image: url("../images/image-new/banner-bg.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  position: relative;
  height: 200px;
}

.top-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(25, 84, 156, 0.25);
  z-index: 0;
}

.top-bar-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 200px;
  padding: 0;
}

.brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
  margin-left: -40px;
}

.brand-logo {
  width: 300px;
  height: 111px;
  border-width: 0;
  flex-shrink: 0;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-title {
  font-size: 46px;
  line-height: 1.2;
  font-weight: 700;
  color: #fff;
  letter-spacing: 2px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.brand-sub {
  font-size: 14px;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 1px;
}

.top-tools {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-box {
  display: flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background-color: rgba(255, 255, 255, 0.2);
  overflow: hidden;
  backdrop-filter: blur(4px);
}

.search-box input {
  width: 260px;
  height: 40px;
  padding: 0 14px;
  border: 0;
  font-size: var(--fs-body);
  color: #fff;
  background: transparent;
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.8);
}

.search-box button {
  height: 40px;
  padding: 0 20px;
  background-color: var(--color-highlight);
  color: #fff;
  font-size: var(--fs-body);
  line-height: 40px;
  font-weight: 500;
}

.search-box button:hover {
  background-color: #e08e00;
}

.top-links {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-body);
  color: #fff;
}

.top-links a {
  display: flex;
  align-items: center;
  gap: 4px;
}

.top-links img {
  width: 16px;
  height: 16px;
}

.top-links a:hover {
  color: var(--color-highlight);
}

/* ==========================================================================
   2. 主导航
   ========================================================================== */
.main-nav {
  background-color: var(--color-primary);
  position: relative;
  z-index: 100;
}

/* 汉堡按钮 - 桌面端隐藏 */
.nav-toggle {
  display: none;
}

/* 子菜单展开按钮 - 桌面端隐藏，仅移动端显示 */
.nav-sub-toggle {
  display: none;
}

.main-nav-inner {
  display: flex;
  align-items: stretch;
  justify-content: center;
  height: 60px;
  gap: 0;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  text-align: center;
}

.nav-item > a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 60px;
  padding: 0 12px;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  font-weight: 400;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.nav-item > a:hover {
  background-color: var(--color-highlight);
  color: #fff;
}

/* 激活态：橙色背景 */
.nav-item.active > a {
  background-color: var(--color-highlight);
  color: #fff;
  font-weight: 700;
}

/* 二级下拉 */
.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  transform: translateY(8px);
  min-width: 100px;
  background-color: #fff;
  border: 1px solid var(--color-border);
  border-top: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 101;
}

.nav-item:hover .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.submenu li a {
  display: block;
  padding: 8px 12px;
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--color-text-2);
  background-color: #fff;
  transition: background-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.submenu li a:hover {
  background-color: var(--color-bg-light);
  color: var(--color-primary);
}

/* ==========================================================================
   3. 轮播 Banner
   ========================================================================== */
.banner {
  position: relative;
  width: var(--container-width);
  max-width: 100%;
  height: 420px;
  overflow: hidden;
  background-color: #000;
  margin: 20px auto 0;
}

.banner-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.banner-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  z-index: 1;
}

.banner-slide.active {
  opacity: 1;
  z-index: 2;
}

.banner-slide a {
  display: block;
  width: 100%;
  height: 100%;
}

.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 左右箭头 */
.banner-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 64px;
  background-color: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 24px;
  line-height: 64px;
  text-align: center;
  z-index: 5;
  transition: background-color 0.2s ease;
}

.banner-arrow:hover {
  background-color: rgba(0, 0, 0, 0.6);
}

.banner-arrow.prev {
  left: 0;
}

.banner-arrow.next {
  right: 0;
}

/* 底部指示点 */
.banner-dots {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 5;
}

.banner-dots button {
  width: 12px;
  height: 12px;
  background-color: rgba(255, 255, 255, 0.6);
  transition: background-color 0.2s ease;
}

.banner-dots button.active {
  background-color: var(--color-highlight);
}

.banner-dots button:hover {
  background-color: #fff;
}

/* ==========================================================================
   4. 主体两栏区
   ========================================================================== */
.main-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
}

.main-grid-left,
.main-grid-right {
  min-width: 0;
  overflow: hidden;
}

/* ---------- 学院新闻 卡片 ---------- */
.news-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.news-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
  background-color: var(--color-bg);
  transition: border-color 0.2s ease;
}

.news-card:hover {
  border-color: var(--color-primary);
}

.news-card .thumb {
  display: block;
  width: 100%;
  height: 160px;
  overflow: hidden;
}

.news-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s ease;
}

.news-card:hover .thumb img {
  opacity: 0.85;
}

.news-card .body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.news-card h3 {
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  font-weight: 500;
  color: var(--color-text-1);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card:hover h3 {
  color: var(--color-primary);
}

.news-card .summary {
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--color-text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card .date {
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--color-text-3);
  margin-top: auto;
}

/* ---------- 学生竞赛 卡片（单行横向滚动） ---------- */
.comp-scroll-wrap {
  overflow: hidden;
  position: relative;
}

.comp-list {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: compScroll 30s linear infinite;
}

.comp-scroll-wrap:hover .comp-list {
  animation-play-state: paused;
}

@keyframes compScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.comp-card {
  flex: 0 0 260px;
  display: block;
  border: 1px solid var(--color-border);
  background-color: var(--color-bg);
  transition: border-color 0.2s ease;
}

.comp-card a {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.comp-card:hover {
  border-color: var(--color-primary);
}

.comp-card .thumb {
  width: 100%;
  height: 150px;
  overflow: hidden;
  position: relative;
}

.comp-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s ease;
}

.comp-card:hover .thumb img {
  opacity: 0.85;
}

.comp-card .title {
  padding: 10px 14px;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 500;
  color: var(--color-text-1);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 44px;
}

.comp-card:hover .title {
  color: var(--color-primary);
}

/* 左栏内部块间距 */
.main-grid-left .block + .block {
  margin-top: 32px;
}

/* ---------- 通知公告 ---------- */
.notice-list {
  border-top: 0;
}

.notice-item {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
  transition: background-color 0.2s ease;
}

.notice-item:last-child {
  border-bottom: 0;
}

.notice-date {
  flex: 0 0 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--color-border);
  padding-right: 12px;
}

.notice-date .day {
  font-size: 28px;
  line-height: 1;
  font-weight: 500;
  color: var(--color-primary);
}

.notice-date .month-year {
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--color-text-3);
  margin-top: 6px;
}

.notice-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.notice-body h3 {
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  font-weight: 500;
  color: var(--color-text-1);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notice-item:hover .notice-body h3 {
  color: var(--color-primary);
}

.notice-body .summary {
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--color-text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- 快速通道（友情链接，一行紧凑布局） ---------- */
.quick-section {
  background-color: var(--color-bg-light);
  padding: 12px 0;
  border-top: 1px solid var(--color-border);
}

.quick-section .quick-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
}

.quick-item {
  flex-shrink: 0;
}

.quick-item a {
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease;
}

.quick-item a:hover {
  color: var(--color-primary);
}

.quick-item .icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-primary);
  background-color: #fff;
  border: 1px solid var(--color-border);
  transition: all 0.2s ease;
}

.quick-item a:hover .icon {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.quick-item .name {
  font-size: var(--fs-small);
  line-height: 1.2;
  color: var(--color-text-2);
  white-space: nowrap;
}

.quick-item a:hover .name {
  color: var(--color-primary);
}

/* 右栏内部块间距 */
.main-grid-right .block + .block {
  margin-top: 32px;
}

/* ==========================================================================
   5. 产教融合 + 团学动态 双栏区
   ========================================================================== */
.dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.dual-col {
  min-width: 0;
}

/* 特色卡片 */
.featured-card {
  display: block;
  margin-bottom: 16px;
  border: 1px solid var(--color-border);
  transition: border-color 0.2s ease;
}

.featured-card:hover {
  border-color: var(--color-primary);
}

.featured-card .thumb {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.featured-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s ease;
}

.featured-card:hover .thumb img {
  opacity: 0.85;
}

.featured-card .title {
  padding: 12px 16px;
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  font-weight: 500;
  color: var(--color-text-1);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-card:hover .title {
  color: var(--color-primary);
}

/* 标题列表 */
.title-list li {
  border-bottom: 1px solid var(--color-border);
}

.title-list li:last-child {
  border-bottom: 0;
}

.title-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0; /* 列表条目间距 12px */
}

.title-list .t {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  line-height: var(--lh-h3);
  color: var(--color-text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  padding-left: 12px;
}

.title-list .t::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  background-color: var(--color-text-3);
}

.title-list a:hover .t {
  color: var(--color-primary);
}

.title-list .d {
  flex: 0 0 auto;
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--color-text-3);
}

/* ==========================================================================
   6. 学院简介区
   ========================================================================== */
.intro-section {
  background-color: var(--color-bg-light);
  padding: 32px 0;
}

.intro-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 32px;
  align-items: center;
}

.intro-img {
  width: 100%;
  height: 320px;
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.intro-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.intro-text h2 {
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  font-weight: 500;
  color: var(--color-text-1);
  margin-bottom: 16px;
  position: relative;
  padding-left: 12px;
}

.intro-text h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  background-color: var(--color-primary);
}

.intro-text p {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text-2);
  text-indent: 2em;
  margin-bottom: 16px;
}

.intro-text .more {
  display: inline-block;
  font-size: var(--fs-h4);
  line-height: var(--lh-h4);
  color: var(--color-primary);
  font-weight: 500;
}

.intro-text .more:hover {
  color: var(--color-btn-hover);
}

/* ==========================================================================
   7. 联系我们 + 页脚（三栏布局：logo + 联系信息 + 二维码）
   ========================================================================== */
.contact-section {
  background-color: var(--color-primary);
  color: #fff;
  padding: 0 24px;
}

.contact-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 48px;
  align-items: center;
  padding: 36px 0;
}

/* 左栏：footer logo */
.contact-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-logo img {
  width: 120px;
  height: auto;
  object-fit: contain;
}

/* 中栏：联系信息 */
.contact-info h3 {
  font-size: 18px;
  line-height: var(--lh-h2);
  font-weight: 500;
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.contact-info p {
  font-size: var(--fs-body);
  line-height: 1.8;
  color: #C1D4F6;
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-info p img {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.contact-info .label {
  color: #fff;
  margin-right: 4px;
}

/* 右栏：二维码 */
.contact-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.contact-qr img {
  width: 120px;
  height: 120px;
  background-color: #fff;
  padding: 6px;
  object-fit: contain;
}

.contact-qr .qr-title {
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: #fff;
  margin-top: 8px;
  font-weight: 500;
}

.contact-qr .qr-desc {
  font-size: 12px;
  line-height: 1.5;
  color: #C1D4F6;
  margin-top: 4px;
  text-align: center;
  max-width: 180px;
}

/* 页脚 */
.site-footer {
  background-color: #0d3a6b;
  color: rgba(255, 255, 255, 0.7);
  padding: 20px 24px;
  text-align: center;
}

.site-footer p {
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}

.site-footer p + p {
  margin-top: 4px;
}

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1200px) {
  .container {
    width: 100%;
  }
}

@media (max-width: 980px) {
  .main-grid,
  .dual-grid,
  .intro-grid,
  .contact-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .news-list {
    grid-template-columns: repeat(2, 1fr);
  }

  /* 学生竞赛卡片缩小 */
  .comp-card {
    flex: 0 0 220px;
  }

  .comp-card .thumb {
    height: 130px;
  }

  .top-bar {
    height: auto;
    padding: 16px 0;
  }

  .top-bar-inner {
    flex-direction: column;
    height: auto;
    padding: 16px var(--space-base);
    gap: 16px;
    align-items: center;
  }

  .brand {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    margin-left: 0;
    gap: 12px;
  }

  .brand-title {
    font-size: 32px;
  }

  .brand-sub {
    font-size: 12px;
  }

  .top-tools {
    width: 100%;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
  }

  .search-box input {
    width: 200px;
  }

  .brand-logo {
    width: auto;
    height: auto;
  }

  .main-nav .container {
    padding: 0 var(--space-base);
    position: relative;
  }

  /* 汉堡按钮 - 移动端显示 */
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    margin: 4px 0;
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0;
  }

  .nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #fff;
    transition: transform 0.3s ease, opacity 0.3s ease;
    margin: 0 auto;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* 导航菜单 - 移动端垂直排列 */
  .main-nav-inner {
    display: none !important;
  }

  .main-nav-inner.open {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    padding-bottom: 8px;
  }

  /* 导航项 - 移动端块级显示 */
  .nav-item {
    display: block !important;
    width: 100% !important;
    position: relative !important;
    flex: none !important;
    text-align: left !important;
  }

  .nav-item > a {
    display: block !important;
    padding: 0 48px 0 16px !important;
    height: 44px !important;
    line-height: 44px !important;
    font-size: 14px !important;
  }

  /* 移动端展开按钮 */
  .nav-sub-toggle {
    position: absolute !important;
    right: 0 !important;
    top: 0 !important;
    width: 44px !important;
    height: 44px !important;
    background: transparent !important;
    border: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
  }

  .nav-sub-toggle::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid rgba(255, 255, 255, 0.75);
    border-bottom: 2px solid rgba(255, 255, 255, 0.75);
    transform: rotate(45deg);
    transition: transform 0.3s ease;
  }

  .nav-item.open .nav-sub-toggle::after {
    transform: rotate(-135deg);
  }

  .nav-item.open > a {
    background-color: rgba(255, 159, 0, 0.15);
  }

  /* 二级菜单 - 移动端在下方展开 */
  .submenu {
    position: static !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    border: 0 !important;
    background-color: rgba(0, 0, 0, 0.15) !important;
    display: none !important;
    width: 100% !important;
  }

  .nav-item:hover .submenu {
    display: none !important;
  }

  .nav-item.open .submenu {
    display: block !important;
  }

  .submenu li {
    display: block !important;
  }

  .submenu li a {
    display: block !important;
    color: #fff !important;
    background-color: transparent !important;
    padding: 12px 16px 12px 40px !important;
    font-size: 13px !important;
    white-space: normal !important;
  }

  .submenu li a:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
  }

  .banner {
    height: 260px;
  }

  /* 联系我们优化 */
  .contact-inner {
    padding: 24px 0;
    gap: 24px;
    text-align: center;
  }

  .contact-logo {
    order: 1;
  }

  .contact-qr {
    order: 2;
  }

  .contact-info h3 {
    font-size: var(--fs-h2);
    text-align: center;
  }

  .contact-info p {
    text-align: center;
  }
}

@media (max-width: 640px) {
  .news-list {
    grid-template-columns: 1fr;
  }

  /* 增大容器内边距，避免内容太靠边 */
  .container {
    padding: 0 20px;
  }

  .top-bar-inner {
    padding: 12px 4px;
  }

  .brand-logo {
    width: 80px;
    height: auto;
  }

  .brand {
    gap: 8px;
  }

  .brand-title {
    font-size: 24px;
  }

  .brand-sub {
    display: none;
  }

  .search-box input {
    width: 140px;
  }

  .top-links {
    display: none;
  }

  .banner {
    height: 200px;
  }

  /* 学生竞赛卡片进一步缩小 */
  .comp-card {
    flex: 0 0 180px;
  }

  .comp-card .thumb {
    height: 110px;
  }

  .comp-card .title {
    padding: 8px 10px;
    font-size: var(--fs-small);
    height: 36px;
  }

  /* 友情链接响应式 - 缩小间距 */
  .quick-section .quick-list {
    gap: 12px;
  }

  .quick-item .icon {
    width: 20px;
    height: 20px;
    font-size: 12px;
  }

  /* 联系我们小屏优化 */
  .contact-inner {
    padding: 20px 0;
    gap: 20px;
  }

  .contact-qr img {
    width: 100px;
    height: 100px;
  }

  .contact-info p {
    font-size: var(--fs-small);
  }

  /* 页脚优化 */
  .site-footer {
    padding: 16px 0;
  }

  .site-footer p {
    font-size: 12px;
    line-height: 1.6;
  }

  .site-footer p + p {
    margin-top: 6px;
  }

  .intro-img {
    height: 220px;
  }

  /* section间距缩小 */
  .section {
    margin-top: 20px;
    margin-bottom: 20px;
  }
}
