/* ===================== 基础重置 ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; color: #333; background: #f5f6f8; font-size: 14px; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
a:hover { color: #1e6fd9; }
ul { list-style: none; }
img { max-width: 100%; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===================== 简洁顶部（无导航 · 科技蓝） ===================== */
.site-header-simple { background: linear-gradient(135deg, #104a9e, #1e6fd9, #2979e6); box-shadow: 0 2px 10px rgba(0,0,0,.2); position: sticky; top: 0; z-index: 100; }
.site-header-simple .container { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.site-header-simple .header-logo { display: flex; align-items: center; gap: 10px; }
.site-header-simple .logo-text { color: #fff; font-size: 18px; font-weight: 700; letter-spacing: 1px; display: flex; align-items: center; }
.site-header-simple .header-search { display: flex; background: rgba(255,255,255,.18); border-radius: 20px; overflow: hidden; border: 1px solid rgba(255,255,255,.18); }
.site-header-simple .header-search input { background: transparent; border: none; outline: none; padding: 7px 14px; color: #fff; width: 260px; font-size: 13px; }
.site-header-simple .header-search input::placeholder { color: rgba(255,255,255,.6); }
.site-header-simple .header-search button { background: rgba(255,255,255,.18); border: none; color: #fff; padding: 0 14px; cursor: pointer; transition: background .2s; }
.site-header-simple .header-search button:hover { background: rgba(255,255,255,.32); }

/* ===================== 轮播图 ===================== */
.banner-section { position: relative; height: 360px; overflow: hidden; }
.banner-container { position: relative; height: 100%; }
.banner-slides { position: relative; height: 100%; }
.banner-slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity .6s; display: block; text-decoration: none; color: inherit; pointer-events: none; }
.banner-slide.active { opacity: 1; pointer-events: auto; }
.banner-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(30,111,217,.25), rgba(0,0,0,.15)); }
.banner-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 10; }
.banner-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.5); cursor: pointer; transition: all .3s; }
.banner-dot.active { background: #fff; width: 24px; border-radius: 4px; }
.banner-prev, .banner-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.3); color: #fff; border: none; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 16px; z-index: 10; transition: background .2s; display: flex; align-items: center; justify-content: center; }
.banner-prev { left: 16px; }
.banner-next { right: 16px; }
.banner-prev:hover, .banner-next:hover { background: rgba(30,111,217,.7); }

/* ===================== 申报横幅/公告栏（科技蓝） ===================== */
.apply-banner { background: linear-gradient(135deg, #1e6fd9, #2979e6); color: #fff; padding: 10px 0; text-align: center; }
.apply-banner .container { display: flex; align-items: center; justify-content: center; gap: 10px; }
.apply-banner i { font-size: 16px; }
.apply-banner span { font-size: 13px; font-weight: 500; }
.apply-banner #announcementContent span { display: inline; }

/* ===================== 主内容区 ===================== */
.main-content { padding: 24px 0 40px; }
.content-row { display: grid; grid-template-columns: 1fr 280px; gap: 20px; }

/* ===================== 左侧主内容区 ===================== */
.main-area { min-width: 0; }
.content-card { background: #fff; border-radius: 8px; box-shadow: 0 1px 6px rgba(0,0,0,.06); padding: 20px 24px; }

/* 版块标题 */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid #1e6fd9; }
.section-header h2 { font-size: 17px; font-weight: 700; color: #1e6fd9; display: flex; align-items: center; gap: 8px; }
.more-link { font-size: 12px; color: #1e6fd9; display: flex; align-items: center; gap: 3px; transition: color .2s; }
.more-link:hover { color: #104a9e; }

/* 分类Tab */
.category-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tab-btn { padding: 6px 14px; border: 1px solid #e0e0e0; background: #fff; border-radius: 20px; cursor: pointer; font-size: 13px; color: #555; transition: all .2s; }
.tab-btn:hover { border-color: #1e6fd9; color: #1e6fd9; }
.tab-btn.active { background: #1e6fd9; border-color: #1e6fd9; color: #fff; }

/* 排序栏 */
.sort-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding: 10px 12px; background: #f9f9f9; border-radius: 6px; }
.sort-bar span { font-size: 13px; color: #777; }
.sort-btn { padding: 5px 14px; border: 1px solid #e0e0e0; background: #fff; border-radius: 4px; cursor: pointer; font-size: 13px; color: #555; transition: all .2s; display: flex; align-items: center; gap: 5px; }
.sort-btn:hover { border-color: #1e6fd9; color: #1e6fd9; }
.sort-btn.active { background: #1e6fd9; border-color: #1e6fd9; color: #fff; }
.result-count { margin-left: auto; font-size: 12px; color: #999; }

/* 创新成果卡片 */
.innovation-list { display: flex; flex-direction: column; }
.innovation-card { padding: 18px 0; border-bottom: 1px solid #f0f0f0; cursor: pointer; transition: background .2s; border-radius: 4px; }
.innovation-card:hover { background: #f0f6ff; padding-left: 10px; padding-right: 10px; margin: 0 -10px; }
.innovation-card:last-child { border-bottom: none; }
.card-meta-top { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.card-tag { background: #e8f0fe; color: #1e6fd9; font-size: 11px; padding: 2px 8px; border-radius: 3px; font-weight: 500; display: inline-block; margin-right: 2px; }
.card-date { font-size: 12px; color: #999; display: flex; align-items: center; gap: 4px; margin-left: auto; }
.card-title { font-size: 15px; font-weight: 700; color: #222; margin-bottom: 8px; line-height: 1.5; transition: color .2s; }
.innovation-card:hover .card-title { color: #1e6fd9; }
.card-summary { font-size: 13px; color: #666; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 12px; }
.card-footer { display: flex; align-items: center; justify-content: space-between; }
.card-author { display: flex; align-items: center; gap: 5px; font-size: 12px; color: #888; }
.card-dept { color: #aaa; }
.like-btn { display: flex; align-items: center; gap: 5px; border: 1px solid #e0e0e0; background: #fff; border-radius: 20px; padding: 4px 12px; cursor: pointer; font-size: 13px; color: #888; transition: all .2s; }
.like-btn:hover { border-color: #1e6fd9; color: #1e6fd9; }
.like-btn.liked { background: #e8f0fe; border-color: #1e6fd9; color: #1e6fd9; }

/* 文章卡片 */
.article-card-list { display: flex; flex-direction: column; }
.article-card { padding: 16px 0; border-bottom: 1px solid #f0f0f0; cursor: pointer; transition: all .2s; }
.article-card:hover { background: #f0f6ff; padding-left: 10px; padding-right: 10px; margin: 0 -10px; border-radius: 4px; }
.article-card:last-child { border-bottom: none; }
.ac-type { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 3px; margin-bottom: 8px; font-weight: 500; }
.ac-type.share-type { background: rgba(39,174,96,.1); color: #27ae60; }
.ac-type.event-type { background: rgba(232,116,42,.1); color: #e8742a; }
.ac-title { font-size: 15px; font-weight: 600; color: #333; margin-bottom: 6px; line-height: 1.5; transition: color .2s; }
.article-card:hover .ac-title { color: #1e6fd9; }
.ac-summary { font-size: 13px; color: #888; line-height: 1.6; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ac-footer { display: flex; align-items: center; gap: 16px; font-size: 12px; color: #aaa; }
.ac-footer i { margin-right: 3px; }
.ac-likes { margin-left: auto; color: #1e6fd9; font-weight: 500; }

/* 空状态 */
.empty { text-align: center; padding: 40px; color: #bbb; }
.empty i { font-size: 40px; margin-bottom: 10px; display: block; }
.loading { text-align: center; padding: 40px; color: #bbb; }
.loading i { font-size: 24px; }

/* 分页 */
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 20px; padding-top: 16px; border-top: 1px solid #f0f0f0; }
.pagination button { min-width: 34px; height: 34px; border: 1px solid #e0e0e0; background: #fff; border-radius: 4px; cursor: pointer; font-size: 13px; color: #555; transition: all .2s; display: flex; align-items: center; justify-content: center; padding: 0 8px; }
.pagination button:hover:not(:disabled) { border-color: #1e6fd9; color: #1e6fd9; }
.pagination button.active { background: #1e6fd9; border-color: #1e6fd9; color: #fff; }
.pagination button:disabled { opacity: .4; cursor: default; }
.pagination span { color: #bbb; }

/* ===================== 右侧侧边栏 ===================== */
.sidebar-right { display: flex; flex-direction: column; gap: 0; }
.side-card { background: #fff; border-radius: 8px; box-shadow: 0 1px 6px rgba(0,0,0,.06); overflow: hidden; }
.side-card-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 2px solid #1e6fd9; background: #fafafa; }
.side-card-header h3 { font-size: 15px; font-weight: 700; color: #1e6fd9; display: flex; align-items: center; gap: 7px; }
.article-list { padding: 8px 0; }
.article-list li { border-bottom: 1px solid #f0f0f0; }
.article-list li:last-child { border-bottom: none; }
.article-item { display: flex; flex-direction: column; padding: 9px 16px; transition: background .2s; cursor: pointer; }
.article-item:hover { background: #f0f6ff; }
.article-title { font-size: 13px; color: #333; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-item:hover .article-title { color: #1e6fd9; }
.article-meta-line { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.article-author { font-size: 11px; color: #999; }
.article-date { font-size: 11px; color: #999; margin-top: 0; }

/* ===================== 移动端 H5 响应式 ===================== */

/* 全局移动端基础增强 */
@media screen and (max-width: 768px) {
  /* 阻止iOS弹性过度滚动 */
  html { overflow: hidden; height: 100%; }
  body { overflow: auto; height: 100%; -webkit-overflow-scrolling: touch; }

  /* 安全区域（刘海屏/底部横条） */
  .site-header-simple { padding-top: env(safe-area-inset-top); }

  /* 容器 */
  .container { padding: 0 12px; }

  /* 顶部栏 */
  .site-header-simple .container {
    flex-wrap: wrap; height: auto; padding: 8px 12px; gap: 6px;
  }
  .site-header-simple .header-logo { flex-shrink: 0; }
  .site-header-simple .logo-text { font-size: 15px; }
  .site-header-simple .header-search {
    flex: 1 1 100%; order: 3;
  }
  .site-header-simple .header-search input {
    width: 100%; font-size: 14px; padding: 8px 12px;
  }
  .site-header-simple .header-search button {
    padding: 0 16px; /* 更大的点击区域 */
  }

  /* 轮播图 */
  .banner-section { height: 180px; }
  .banner-prev, .banner-next { width: 32px; height: 32px; font-size: 12px; }
  .banner-prev { left: 8px; }
  .banner-next { right: 8px; }
  .banner-dots { bottom: 10px; }
  .banner-dot { width: 6px; height: 6px; }
  .banner-dot.active { width: 18px; }

  /* 公告栏 */
  .apply-banner { padding: 8px 0; }
  .apply-banner .container {
    height: auto; min-height: 20px;
    flex-wrap: wrap; justify-content: flex-start;
  }
  .apply-banner i { font-size: 14px; flex-shrink: 0; }
  .apply-banner span { font-size: 12px; text-align: left; }
  #announcementContent { padding-left: 20px !important; }

  /* 主内容区：PC双栏 → 手机单栏 */
  .content-row { grid-template-columns: 1fr; gap: 16px; }
  .sidebar-right { order: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .sidebar-right .side-card { margin-top: 0; }

  /* 内容卡片 */
  .content-card { padding: 14px 12px; border-radius: 8px; }

  /* 版块标题 */
  .section-header {
    flex-wrap: wrap; gap: 8px; margin-bottom: 12px; padding-bottom: 10px;
  }
  .section-header h2 { font-size: 15px; }
  .more-link { font-size: 12px; }

  /* 分类Tab */
  .category-tabs {
    gap: 6px; margin-bottom: 10px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap; padding-bottom: 4px;
    scrollbar-width: none; /* 隐藏滚动条 */
  }
  .category-tabs::-webkit-scrollbar { display: none; }
  .tab-btn {
    padding: 6px 12px; font-size: 12px; white-space: nowrap;
    flex-shrink: 0; min-height: 32px; /* 最小触摸区域 */
  }

  /* 排序栏 */
  .sort-bar {
    flex-wrap: wrap; gap: 6px; padding: 8px 10px;
  }
  .sort-btn {
    padding: 5px 12px; font-size: 12px; min-height: 32px;
  }
  .result-count { width: 100%; margin-left: 0; margin-top: 4px; font-size: 12px; }

  /* 创新成果卡片 - 移动端增强 */
  .innovation-card {
    padding: 14px 0; position: relative;
    -webkit-tap-highlight-color: transparent; /* 去除移动端点击高亮 */
  }
  .innovation-card:hover {
    background: transparent; padding-left: 0; padding-right: 0; margin: 0;
  }
  .innovation-card:active { background: #f0f6ff; } /* 触摸反馈 */
  .card-title { font-size: 15px; line-height: 1.6; }
  .card-summary { font-size: 13px; -webkit-line-clamp: 2; }
  .card-meta-top { flex-wrap: wrap; gap: 8px; }
  .card-footer { flex-wrap: wrap; gap: 8px; }
  .card-author { font-size: 12px; }
  .card-date { font-size: 11px; }
  .card-tag { font-size: 10px; padding: 2px 6px; }

  /* 点赞按钮 - 更大的触摸区域 */
  .like-btn {
    padding: 6px 14px; font-size: 13px; min-height: 36px;
    border-radius: 20px;
  }

  /* 文章卡片 */
  .article-card {
    padding: 14px 0; -webkit-tap-highlight-color: transparent;
  }
  .article-card:hover {
    background: transparent; padding-left: 0; padding-right: 0; margin: 0;
  }
  .article-card:active { background: #f0f6ff; }
  .ac-type { font-size: 10px; padding: 2px 6px; }
  .ac-title { font-size: 15px; line-height: 1.6; }
  .ac-summary { font-size: 13px; -webkit-line-clamp: 2; }
  .ac-footer { flex-wrap: wrap; gap: 8px; font-size: 12px; }

  /* 分页 - 移动端简化 */
  .pagination { gap: 4px; flex-wrap: wrap; justify-content: center; }
  .pagination button { min-width: 36px; height: 36px; font-size: 13px; padding: 0 8px; }

  /* 侧边栏 */
  .side-card { border-radius: 8px; }
  .side-card-header { padding: 10px 14px; }
  .side-card-header h3 { font-size: 14px; }
  .article-item { padding: 10px 14px; min-height: 44px; /* 最小触摸区域 */ }
  .article-title { font-size: 13px; }
  .article-date { font-size: 11px; }

  /* 空状态 */
  .empty { padding: 30px 16px; }
  .empty i { font-size: 32px; }

  /* 主内容区底部留白 - 为底部导航腾出空间 */
  .main-content { padding-bottom: 80px; }
}

/* 小屏幕手机（≤480px）进一步优化 */
@media screen and (max-width: 480px) {
  /* 轮播图更矮 */
  .banner-section { height: 140px; }
  .banner-prev, .banner-next { width: 28px; height: 28px; font-size: 10px; }

  /* logo 更小 */
  .site-header-simple .logo-text { font-size: 14px; }

  /* 搜索框 */
  .site-header-simple .header-search input { padding: 6px 10px; font-size: 13px; }

  /* 卡片更紧凑 */
  .content-card { padding: 10px 10px; border-radius: 6px; }
  .card-title { font-size: 14px; }
  .card-summary { font-size: 12px; -webkit-line-clamp: 2; }
  .ac-title { font-size: 14px; }
  .ac-summary { font-size: 12px; }

  /* 小屏手机侧边栏改为单列 */
  .sidebar-right { grid-template-columns: 1fr; gap: 12px; }

  /* 侧边栏更紧凑 */
  .side-card-header { padding: 8px 12px; }
  .article-item { padding: 8px 12px; }

  /* 点赞按钮 */
  .like-btn { padding: 5px 10px; font-size: 12px; min-height: 32px; }

  /* 分页 */
  .pagination button { min-width: 32px; height: 32px; font-size: 12px; }
}

/* ===================== 移动端底部导航栏 ===================== */
.mobile-bottom-nav {
  display: none; /* PC端隐藏 */
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #fff; border-top: 1px solid #eee;
  z-index: 200; padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 10px rgba(0,0,0,.06);
}
.mobile-bottom-nav .nav-items {
  display: flex; justify-content: space-around; align-items: center;
  height: 52px; max-width: 500px; margin: 0 auto;
}
.mobile-bottom-nav .nav-item {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2px; text-decoration: none;
  color: #999; font-size: 10px; min-width: 56px;
  -webkit-tap-highlight-color: transparent; transition: color .2s;
}
.mobile-bottom-nav .nav-item i { font-size: 18px; }
.mobile-bottom-nav .nav-item.active { color: #1e6fd9; }
.mobile-bottom-nav .nav-item:active { color: #1e6fd9; }

@media screen and (max-width: 768px) {
  .mobile-bottom-nav { display: block; }
  body { padding-bottom: calc(52px + env(safe-area-inset-bottom, 0px)); }
}

/* ===================== 移动端搜索框展开样式 ===================== */
@media screen and (max-width: 768px) {
  .header-search-collapsed .header-search {
    position: absolute; top: 100%; left: 0; right: 0;
    background: #1e6fd9; padding: 8px 12px;
    display: none; z-index: 50;
  }
  .header-search-collapsed .header-search.expanded { display: flex; }
}

/* ===================== 横屏适配 ===================== */
@media screen and (max-width: 768px) and (orientation: landscape) {
  .banner-section { height: 120px; }
  .site-header-simple .container { padding: 4px 12px; }
  .site-header-simple .header-search input { padding: 5px 10px; }
}
