/* ==========================================================================
   响应式媒体查询（≤999px 收纳导航与搜索框 + 各断点布局适配）
   rem 基准见 js/main.js fontSize()：≤999px 时 html{font-size:85px} 且 body 加 .mobile
   ========================================================================== */

/* ------------------------------ 中间宽度微调（1000px - 1400px） ------------------------------ */
@media screen and (min-width: 1000px) and (max-width: 1400px) {
  /* rem 缩放已按比例适配，此处仅处理换行敏感区域 */
  .menu-link { padding: 0 0.15rem; }
  .notice-item .n-title { height: 0.64rem; }
}

/* ------------------------------ 窄屏：≤999px 导航与搜索收纳 ------------------------------ */
@media screen and (max-width: 999px) {
  body.mobile { overflow-x: hidden; }

  /* 通用容器改为流式 */
  .inner { width: auto; padding: 0 0.3rem; }

  /* ---- 头部：收纳导航与搜索，显示汉堡按钮 ---- */
  .head-logo { margin-top: 0.2rem; }
  .head-logo img { height: 0.6rem; }
  .head-right {right: 0.3rem; top: 0.24rem; }
  .head-links { display: none; }
  .menu-btn {
    display: block;
    position: relative;
    width: 0.3rem;
    height: 0.24rem;
  }
  .menu-btn .xian {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: #fff;
    -webkit-transition: all 0.25s;
    transition: all 0.25s;
  }
  .menu-btn .xian1 { top: 0; }
  .menu-btn .xian2 { top: 0.11rem; }
  .menu-btn .xian3 { top: 0.22rem; }
  /* 展开态按钮变形为 X */
  .menu-btn.on .xian1 { top: 0.11rem; -webkit-transform: rotate(45deg); transform: rotate(45deg); }
  .menu-btn.on .xian2 { opacity: 0; }
  .menu-btn.on .xian3 { top: 0.11rem; -webkit-transform: rotate(-45deg); transform: rotate(-45deg); }

  /* ---- 移动端导航面板（白底卡片式，深色文字，红色强调） ---- */
  .nav {
    float: none;
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0;
    background: #fff;
    border-top: 0.03rem solid #961d13;
    box-shadow: 0 0.16rem 0.24rem rgba(0, 0, 0, 0.18);
    max-height: calc(100vh - 1rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 98;
  }
  .nav.open { display: block; }
  .nav { padding: 0 0.2rem; }
  .wp-menu { float: none; }
  .wp-menu > .menu-item {
    float: none;
    position: relative;
    border-bottom: 1px solid #f0eae5;
  }
  .wp-menu > .menu-item:last-child { border-bottom: 0; }
  .menu-link {
    padding: 0 0.72rem 0 0.24rem;
    line-height: 0.6rem;
    font-size: 0.18rem;
    color: #333;
  }
  .menu-link::after { display: none; }
  .menu-item.active > .menu-link { color: #961d13; font-weight: 600; }
  /* 二级展开箭头：热区铺满整行右端（约 48px 点击区），箭头本体用 ::before 绘制 */
  .menu-switch-arrow {
    position: absolute;
    right: 0;
    top: 0;
    width: 0.6rem;
    height: 0.6rem;
    cursor: pointer;
    -webkit-transition: all 0.2s;
    transition: all 0.2s;
  }
  .menu-switch-arrow::before {
    content: "";
    position: absolute;
    right: 0.24rem;
    top: 0.24rem;
    width: 0.13rem;
    height: 0.13rem;
    border-right: 2px solid #999;
    border-bottom: 2px solid #999;
    -webkit-transform: rotate(45deg);
    transform: rotate(45deg);
    -webkit-transition: all 0.2s;
    transition: all 0.2s;
  }
  .menu-switch-arrow:active { background: #f7efe8; }
  .menu-item.sub-open .menu-switch-arrow::before {
    top: 0.18rem;
    border-color: #961d13;
    -webkit-transform: rotate(225deg);
    transform: rotate(225deg);
  }
  /* 子菜单改为面板内手风琴（米色底，缩进层级） */
  .sub-menu {
    position: static;
    display: none;
    width: auto;
    margin: 0;
    padding: 0.04rem 0;
    background: #f7efe8;
    border-top: 0;
    box-shadow: none;
  }
  .menu-item:hover > .sub-menu { display: none; } /* 触屏关闭 hover 行为 */
  .menu-item.focus > .sub-menu { display: none; } /* 点击链接后残留的 focus 不展开二级（桌面键盘可达兜底仅限 ≥1000px） */
  .menu-item.sub-open > .sub-menu { display: block; }
  .sub-item .sub-link {
    color: #666;
    text-align: left;
    padding: 0.1rem 0.3rem 0.1rem 0.36rem;
    font-size: 0.16rem;
    line-height: 0.24rem;
    border-left: 0.03rem solid transparent;
  }
  .sub-item .sub-link:hover {
    background: rgba(150, 29, 19, 0.06);
    color: #961d13;
    border-left-color: #961d13;
  }
  /* 面板附加区：快捷链接 + 搜索（参考 _t3934：菜单 → 快捷链接 → 搜索框） */
  .nav-extra {
    display: block;
    padding: 0.24rem 0.24rem 0.3rem;
    background: #faf6f2;
  }
  .nav-links {
    margin-bottom: 0.24rem;
  }
  .nav-links li { float: left; }
  .nav-links li + li { border-left: 1px solid #ddd0c6; }
  .nav-links a {
    display: block;
    padding: 0 0.3rem;
    line-height: 0.24rem;
    font-size: 0.16rem;
    color: #666;
  }
  .nav-links li:last-child a { padding-right: 0; }
  .nav-links a:hover { color: #961d13; }
  .nav-search { position: relative; }
  .nav-search-input { margin: 0; }
  .nav-search-title {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    width: 100%;
    height: 0.48rem;
    padding: 0 1.16rem 0 0.2rem;
    border: 1px solid #e3d9d1;
    border-radius: 0.08rem;
    background: #fff;
    font-size: 0.16rem;
    color: #333;
  }
  .nav-search-title:focus { border-color: #961d13; }
  .nav-search-btn {
    position: absolute;
    top: 0.05rem;
    right: 0.05rem;
    width: 0.96rem;
    height: 0.38rem;
    line-height: 0.38rem;
    border: 0;
    border-radius: 0.06rem;
    background: #961d13;
    color: #fff;
    font-size: 0.16rem;
    cursor: pointer;
  }
  .nav-search-btn:hover { background: #7d150d; }
  .nav-search-tip {
    display: none;
    margin-top: 0.12rem;
    font-size: 0.14rem;
    color: #961d13;
  }
  .nav-search-tip.show { display: block; }

  /* ---- 搜索面板：仍从头部下拉 ---- */
  .wp-search {
    position: fixed;
    top: 0.9rem;
    right: 0.3rem;
    left: 0.3rem;
    width: auto;
    margin-top: 0;
  }

  /* ---- 轮播 ---- */
  .banner { height: 4.4rem; }
  .banner-slider .banner-item { height: 4.4rem; }
  .banner::before { height: 1.6rem; }
  .banner .slick-dots { right: 0.3rem; margin-right: 0; }
  .banner::after{display: none;}

  /* ---- 栏目标题 ---- */
  .sec-head { height: auto; padding-bottom: 0.1rem; }
  .sec-title { font-size: 0.32rem; }
  .sec-icon { width: 0.6rem; top: -0.12rem; }
  .main1 .more, .main2 .more, .main3 .more { left: auto; right: 0; top: 0.16rem; }

  /* ---- 综合新闻：单列堆叠 ---- */
  .main1 { padding: 0.5rem 0 0.4rem; }
  .news-left, .news-right { float: none; width: auto; }
  .news-right { margin-top: 0.6rem; }
  .news-fea { margin-top: 0.3rem; }
  .fea-img { height: 3.2rem; }
  .fea-bar { height: auto; padding: 0.3rem 0.9rem 0.6rem 0.24rem; }
  .fea-date { float: none; width: auto; margin-bottom: 0.12rem; }
  .fea-day { display: inline-block; margin-right: 0.1rem; vertical-align: middle; }
  .fea-week, .fea-year { display: inline-block; vertical-align: middle; }
  .fea-info { margin-left: 0; }
  .fea-arrow { right: 0.24rem; bottom: 0.24rem; width: 0.4rem; height: 0.4rem; line-height: 0.42rem; }
  .news-big-img { height: 3.6rem; }
  .news-sm-row { margin-top: 0.3rem; }
  .news-sm { float: left; width: 48%; }
  .news-sm + .news-sm { float: right; width: 48%; }
  .news-sm-img { height: 225px; }
  .news-sm-title { font-size: 0.16rem; height: 0.52rem; }

  /* ---- 通知公告：两列 ---- */
  .main-bg { background: #f7efe8; } /* 移动端恢复整块米色 */
  .main-bg::after { display: none; }
  .main2 { padding-top: 0.7rem; }
  .notice-item {
    width: 49%;
    margin-right: 2%;
    margin-bottom: 0.4rem;
    padding-bottom: 0.3rem;
  }
  .notice-item:nth-child(3n) { margin-right: 2%; }
  .notice-item:nth-child(2n) { margin-right: 0; }
  .n-title { font-size: 0.16rem; height: 0.56rem; }

  /* ---- 科学研究：卡片与照片堆叠 ---- */
  .main3 { padding: 0.6rem 0 0.5rem; }
  .research-wrap { height: auto; margin-top: 0.3rem; }
  /* 移动端：照片仅显示当前选中项 */
  .research-photos { position: static; width: auto; height: auto; }
  .research-photo { position: static; display: none; width: 100%; height: 3.6rem; margin-top: 0.3rem; opacity: 1; visibility: visible; }
  .research-photo.active { display: block; }
  .research-card { position: static; width: auto; height: auto; padding: 0.3rem 0.24rem 0.4rem; }
  .research-deco { display: none; }
  /* 选中项：日期堆叠在标题上方，内容不缩进 */
  .r-date { float: none; width: auto; margin-bottom: 0.12rem; }
  .r-list li.active .r-date { max-width: 1.14rem; margin-bottom: 0.12rem; }
  .r-list li.active .r-info { margin-left: 0; }
  .r-list { margin-top: 0.3rem; }
  .r-list li { padding: 0.24rem 0; }
  .r-list a { font-size: 0.16rem; }

  /* ---- 页脚 ---- */
  .f-top { min-height: 0; display: flex;flex-direction: column;align-items: center;}
  .f-social {padding: 0.1rem 0 0.2rem; }
  .f-social li { margin-right: 0.4rem; }
  .f-logo { }
  .f-line { width: 100%; transform: translateY(0);}
  .f-contact { padding: 0.3rem 0 0.4rem; }
  .f-contact-title { float: none; width: auto; margin-bottom: 0.1rem; }
  .f-item { float: left; margin-right: 0.4rem; }
  .f-addr { width: auto; }
  .f-qr { position: static; margin-top: 0.2rem; }
  .f-bot p { font-size: 0.14rem; line-height: 0.5rem; padding: 0 0.15rem; }
  .footer{padding-top: 40px;}
  .f-social{width: auto;}
  .f-bot::before{display: none;}
  .f-cu::after{display: none;}
  .f-cu{display: flex;flex-direction: column;align-items: center;text-align: center;}
  .f-item{display: flex;margin: 0;}
  .f-qr{display: flex;justify-content: center;}

  /* ---- 内页 banner / 栏目头 / 列表卡片 / 分页（listcolumn / list_zhxw） ---- */
  .banner-sub { height: 3.4rem; }
  .banner-sub .bs-slogan { left: 0.3rem; top: 1.5rem; width: 3.6rem; }
  .col-wrap { width: auto; padding: 0 0.3rem; }
  /* 左导航与内容区改为上下堆叠 */
  .col-side { float: none; width: auto; margin-bottom: 0.3rem; }
  .col-main { float: none; width: auto; }
  /* 侧导航默认收纳，点击红条右侧按钮展开 */
  .side-nav { display: none; }
  .side-switch {
    display: block;
    position: absolute;
    right: 0.24rem;
    top: 50%;
    width: 0.22rem;
    height: 0.14rem;
    margin-top: -0.07rem;
  }
  .side-switch .ss-x {
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 2px;
    margin-top: -1px;
    background: #fff;
    -webkit-transition: -webkit-transform 0.2s;
    transition: transform 0.2s;
  }
  .side-switch .ss-x1 { -webkit-transform: translateY(-0.04rem); transform: translateY(-0.04rem); }
  .side-switch .ss-x2 { -webkit-transform: translateY(0.04rem); transform: translateY(0.04rem); }
  .side-switch.on .ss-x1 { -webkit-transform: rotate(45deg); transform: rotate(45deg); }
  .side-switch.on .ss-x2 { -webkit-transform: rotate(-45deg); transform: rotate(-45deg); }
  .side-name { padding: 0.2rem 0.24rem; font-size: 0.2rem; }
  .side-nav a,
  .side-nav .wp_listcolumn .wp_column a { padding: 0.15rem 0.24rem; font-size: 0.16rem; }
  .col-head { flex-direction: column; align-items: flex-start; }
  .col-crumb { margin-top: 20px; font-size: 0.15rem; }
  .news-rows { margin-top: 0.2rem; }
  .news-row { padding: 0.2rem 0; }
  .nr-title { font-size: 0.16rem; line-height: 0.28rem; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .nr-date { margin-left: 0.15rem; font-size: 0.14rem; }
  .col-list { margin-top: 0.3rem; }
  .col-item { height: auto; padding: 0.3rem 0.24rem 0.6rem; }
  .ci-date { left: 0; top: 0.3rem; }
  .ci-body { padding: 0 0 0 0.9rem; }
  .ci-tit { height: auto; max-height: 0.7rem; font-size: 0.2rem; line-height: 0.3rem; }
  .ci-desc { margin-top: 0.12rem; font-size: 0.16rem; line-height: 0.28rem; }
  .ci-more { left: 0.9rem; bottom: 0.24rem; }
  .ci-thumb { position: static; display: block; width: 100%; height: auto; margin: 0.16rem 0 0; }
  .page-nav { flex-wrap: wrap; margin-top: 0.5rem; padding-bottom: 0.4rem; }
  .page-nav .pn-label { margin-left: 0.04rem; }
  .pn-box { min-width: 0.4rem; height: 0.4rem; line-height: 0.38rem; margin-left: 0.04rem; font-size: 0.14rem; }
  .pn-box.pn-prev, .pn-box.pn-next, .pn-btn { width: 0.6rem; }
  .pn-btn { height: 0.4rem; line-height: 0.4rem; margin-left: 0.04rem; }
  .pn-input { width: 0.4rem; font-size: 0.14rem; }
  .pn-ellipsis { margin: 0 0.06rem; }
  .main-list { padding-bottom: 0.6rem; }

  /* ---- 文章页（displayinfo）：单列布局，侧栏移至正文下方 ---- */
  .main-info { padding: 0.4rem 0 0.6rem; }
  .info-inner { display: block; width: auto; padding: 0 0.3rem; }
  .info-main { width: auto; padding: 0; }
  .info-back { margin-top: 0.1rem; }
  .info-title { margin-top: 0.2rem; font-size: 0.24rem; line-height: 0.36rem; }
  .info-bar { flex-direction: column; align-items: center; }
  .info-share { margin-top: 0.12rem; }
  .info-body { margin-top: 0.3rem; }
  .info-body p { font-size: 0.17rem; line-height: 0.32rem; }
  .info-img img { max-width: 100%; }
  .info-img img[style] { width: 100% !important; }
  .info-turn { margin-top: 0.5rem; font-size: 0.16rem; line-height: 0.26rem; }
  .info-side { margin-left: 0; margin-top: 0.5rem; border-left: 0; border-top: 1px solid #e3e3e3; padding: 0.3rem 0 0; }
  .is-list::before { display: none; }
  .is-item { height: auto; margin-bottom: 0.24rem; }
  .is-item::before { display: none; }
  .is-link { -webkit-line-clamp: 3; }
  .info-main .info-body img{width: 100%!important;}
}

/* ------------------------------ 超窄屏：≤640px ------------------------------ */
@media screen and (max-width: 640px) {
  .inner { padding: 0 0.2rem; }
  .head-right { right: 0.2rem; }
  .banner { height: 3.2rem; }
  .banner-slider .banner-item { height: 3.2rem; }
  .banner-sub { height: 2.6rem; }
  .banner-sub .bs-slogan { left: 0.2rem; top: 1.1rem; width: 2.8rem; }
  .news-sm { float: none; width: 100%; }
  .news-sm + .news-sm { float: none; width: 100%; margin-top: 0.3rem; }
  .notice-item { width: 100%; margin-right: 0; }
  .notice-item:nth-child(3n), .notice-item:nth-child(2n) { margin-right: 0; }
  .f-item { float: none; margin-right: 0; margin-bottom: 0.08rem; }
  .search-title { font-size: 16px; } /* 防 iOS 聚焦缩放 */
}

/* ------------------------------ 手机：≤ 476px ------------------------------ */
@media screen and (max-width: 476px) {
  .fea-desc{display: none;}
  .fea-bar{padding: 20px;}
  .research-photos{display: none;}
  .r-list{margin: 0;}
  .col-item.has-thumb .ci-desc{display: none;}
}
