﻿/* ====================================== */
/* 移动端响应式：768px 以下
/* ====================================== */
@media screen and (max-width: 768px) {

  /* 全局 */
  html {
    font-size: 50px !important;
  }

  body {
    padding-top: 0.8rem;
    min-width: unset !important;
  }

  /* ========== 头部导航 ========== */
  .header {
    height: 0.8rem !important;
    background: #005bb7;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    overflow: visible !important;
  }

  /* 移动端禁用 scroll 类的所有效果 */
  .header.scroll {
    height: 0.8rem !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  .header.scroll .header-inner {
    align-items: center !important;
  }

  .header.scroll .logo {
    width: 2rem !important;
    height: auto !important;
    margin-bottom: 0 !important;
  }

  .header.scroll .nav {
    height: auto !important;
    align-items: flex-start !important;
    padding-bottom: 0 !important;
  }

  .header-inner {
    max-width: 100%;
    padding: 0 0.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .logo {
    width: 2rem !important;
    height: auto !important;
  }

  .top-toolbar {
    display: none !important;
  }

  /* 导航菜单 - 移动端全屏弹出 */
  .nav {
    display: none;
    position: fixed;
    top: 0.8rem;
    left: 0;
    width: 100%;
    height: calc(100vh - 0.8rem);
    background: #005bb7;
    flex-direction: column;
    padding: 0.3rem 0;
    overflow-y: auto;
    z-index: 10000;
  }

  .nav.show {
    display: flex !important;
  }

  .nav>li {
    width: 100%;
    text-align: center;
    list-style: none;
    position: relative;
  }

  .nav>li>a {
    display: block;
    color: #fff;
    font-size: 0.24rem;
    padding: 0.2rem 0;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav>li>a.active {
    color: #ffd700;
  }

  /* 下拉菜单 */
  .nav .dropdown {
    position: static;
    background: #004a99;
    padding: 0;
    display: none;
  }

  .nav li.open .dropdown {
    display: block;
  }

  .nav .dropdown li {
    list-style: none;
  }

  .nav .dropdown li a {
    display: block;
    color: #fff;
    font-size: 0.2rem;
    padding: 0.15rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  /* 汉堡按钮 */
  .hamburger {
    display: block !important;
    width: 0.4rem;
    height: 0.4rem;
    cursor: pointer;
  }

  .hamburger span {
    display: block;
    height: 0.04rem;
    background: #fff;
    margin: 0.07rem 0;
    border-radius: 2px;
  }

  /* ========== 内容区域通用 ========== */
  .news-container,
  .notice-container,
  .major-container,
  .student-container,
  .life-container,
  .coop-container {
    padding: 0 0.2rem;
    max-width: 100%;
  }

  .news-title-cn {
    font-size: 0.3rem;
  }

  .news-title-en {
    font-size: 0.16rem;
  }

  /* ========== 优秀学子：隐藏小图轮播，只留大图 ========== */
  .student-section {
    padding: 0.3rem 0;
  }

  .carousel-container {
    position: relative;
  }

  /* 隐藏小图轮播 */
  .small-swiper {
    display: none !important;
  }

  /* 大图轮播铺满 */
  .big-swiper {
    width: 100% !important;
    height: auto !important;
    position: relative !important;
    right: 0 !important;
    top: 0 !important;
    transform: none !important;
  }

  .big-swiper .swiper-slide {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
  }

  .big-swiper .slide-img img {
    width: 100%;
    height: 3.5rem;
    object-fit: cover;
  }

  .big-swiper .slide-text {
    padding: 0 0.1rem;
  }

  .big-swiper .slide-title {
    font-size: 0.24rem;
  }

  .big-swiper .slide-desc {
    font-size: 0.18rem;
    line-height: 1.5;
  }

  .swiper-button-prev,
  .swiper-button-next {
    color: #fff !important;
    background: rgba(0, 0, 0, 0.3);
    width: 0.5rem !important;
    height: 0.5rem !important;
    border-radius: 50%;
  }

  /* ========== 布局适配：竖排、两列改一列 ========== */
  .news-body {
    flex-direction: column;
  }

  .major-grid {
    flex-direction: column;
    gap: 0.2rem;
  }

  .life-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .coop-stats {
    flex-wrap: wrap;
  }

  .coop-stat-item {
    width: 48%;
  }

  /* ========== 底部 ========== */
  .footer {
    flex-direction: column;
    text-align: center;
    gap: 0.3rem;
  }

  .bottom-nav {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* 更小屏幕 */
@media screen and (max-width: 576px) {
  html {
    font-size: 45px !important;
  }

  .life-grid {
    grid-template-columns: 1fr;
  }

  .coop-stat-item {
    width: 100%;
  }
}

/* ========== 移动端首页轮播：取消全屏，正常高度 ========== */
@media screen and (max-width: 768px) {
  .banner {
    height: auto !important;
    max-height: 220px !important;
    margin-top: 0 !important;
    position: relative;
    z-index: 1;
  }

  .banner-img {
    width: 100% !important;
    height: auto !important;
    max-height: 220px !important;
    object-fit: cover !important;
  }

  .banner-wrapper {
    height: auto !important;
  }
}

/* ========== 新闻列表完美适配手机宽度 ========== */
@media screen and (max-width: 768px) {
  .news-list {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }

  .news-list-item {
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0.15rem !important;
    padding-right: 0.15rem !important;
  }
}

/* ========== 校企合作 修复手机宽度超出 ========== */
@media screen and (max-width: 768px) {
  .coop-logos {
    width: 100% !important;
    overflow: hidden !important;
    position: relative !important;
  }

  .coop-logos-inner {
    width: calc(100% - 0.8rem) !important;
    margin: 0 auto !important;
  }

  .coop-logo-track {
    width: max-content !important;
    display: flex !important;
  }

  .coop-logo-card {
    width: 1.8rem !important;
    height: auto !important;
    margin: 0 0.1rem !important;
  }

  .coop-arrow {
    transform: translateY(-50%);
    top: 50%;
  }

  .coop-arrow-left {
    left: 0.05rem !important;
  }

  .coop-arrow-right {
    right: 0.05rem !important;
  }
}

/* ========== 校企合作数字统计 完美适配手机 ========== */
@media screen and (max-width:768px) {
  .coop-stats {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    padding: 0 0.2rem !important;
    box-sizing: border-box !important;
    gap: 0.2rem 0 !important;
  }

  .coop-stat-item {
    width: 48% !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box !important;
  }

  .coop-stat-icon {
    width: 0.7rem !important;
    height: 0.7rem !important;
  }

  .coop-stat-num {
    font-size: 0.28rem !important;
  }

  .coop-stat-label {
    font-size: 0.16rem !important;
  }
}

/* 数据展示 5个圈：缩小 + 横排一行 + 不超出屏幕 */
@media screen and (max-width: 768px) {
  .stats-section {
    height: auto !important;
    padding: 0.3rem 0 !important;
  }

  .stats-rings {
    display: flex !important;
    flex-wrap: nowrap !important;
    /* 强制一行 */
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    padding: 0 0.2rem !important;
    gap: 0.1rem !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .stat-ring {
    transform: none !important;
    margin: 0 !important;
    flex: 1 !important;
    /* 平均分配宽度 */
    min-width: unset !important;
  }

  .stat-ring-circle {
    width: 1.1rem !important;
    /* 缩小圈圈 */
    height: 1.1rem !important;
    margin: 0 auto !important;
  }

  .stat-ring-num {
    font-size: 0.26rem !important;
  }

  .stat-ring-label {
    font-size: 0.12rem !important;
    line-height: 1.1 !important;
  }
}

/* 底部5个专题图：高度大一倍 + 文字居中缩小 + 一行显示 */
@media screen and (max-width:768px) {
  .ztwz-list.bottom-nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    width: 100% !important;
    padding: 0.25rem 0.1rem !important;
    gap: 0.1rem !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .bottom-nav-item {
    flex: 1 !important;
    min-width: unset !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* 高度 ×2 放大一倍 */
  .bottom-nav-item img {
    width: 100% !important;
    height: 4rem !important;
    /* 原来 2rem → 现在 4rem 大一倍 */
    object-fit: cover !important;
  }

  /* 文字很小 + 绝对居中 */
  .vertical-text {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    font-size: 0.11rem !important;
    color: #fff !important;
    text-align: center !important;
    white-space: nowrap !important;
    z-index: 2 !important;
    writing-mode: vertical-rl !important;
    /* 保持竖排文字 */
  }
}

/* ========== 底部版权信息 适配手机宽度 ========== */
@media screen and (max-width: 768px) {
  .hongse2 {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0.3rem 0.2rem !important;
  }

  .footer {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 0.25rem !important;
    box-sizing: border-box !important;
    margin: 0 auto !important;
  }

  .footer>div {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border-left: none !important;
    box-sizing: border-box !important;
  }

  .footer p,
  .footer h6 {
    margin: 0.05rem 0 !important;
    line-height: 1.4 !important;
  }

  .footer a {
    color: #fff !important;
    text-decoration: none !important;
  }
}


@media screen and (max-width:768px) {
  .list-title-bar {
    padding: 0.8rem 0;
  }

  .list-title-bar .list-title {
    font-size: 0.32rem;
  }

  .list-banner {
    height: 10rem;
  }

  .tab-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tab-item {
    white-space: nowrap;
    padding: 0.12rem 0.2rem;
    font-size: 0.16rem;
  }

  .news-item {
    flex-wrap: wrap;
    gap: 0.1rem;
  }

  .news-date {
    flex: 0 0 auto;
    margin-right: 0;
    margin-bottom: 0.08rem;
  }

  .news-link {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  @media (max-width: 768px) {

    /* 1. 父容器链必须设高 */
    .list-banner {
      height: 180px;
      /* 你截图里的高度，可改 */
      overflow: hidden;
    }

    .banner-item {
      width: 100%;
      height: 100%;
      /* 继承父高，给img做“100%”的基准 */
    }

    /* 2. 核心：让图片撑满父容器，不变形 */
    .banner-img {
      width: 100% !important;
      height: 100% !important;
      object-fit: cover !important;
      /* 保持比例，填满容器，裁掉多余 */
      display: block !important;
      /* 消除图片下方默认空白 */
    }
  }
@media (max-width: 768px) {
  /* 1. 重置所有导航定位，让菜单全屏居中 */
  .nav {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    background: #0047ab !important;
    display: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .nav.show {
    display: block !important;
  }

  /* 2. 一级菜单项 */
  .nav > li {
    position: static !important; /* 取消相对定位，让子菜单继承流 */
    width: 100% !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .nav > li > a {
    display: block !important;
    width: 100% !important;
    padding: 12px 15px !important;
    color: #fff !important;
    text-align: center !important;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
  }

  /* 3. 核心修复：二级菜单完全重置 */
  .nav .dropdown {
    position: static !important; /* 强制取消绝对定位 */
    display: block !important; /* 先强制显示，测试用 */
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    background: #003a8c !important;
    margin: 0 !important;
    padding: 0 !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
  }
  .nav .dropdown li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .nav .dropdown li a {
    display: block !important;
    width: 100% !important;
    padding: 12px 15px 12px 35px !important; /* 左边缩进，区分层级 */
    color: #fff !important;
    text-decoration: none !important;
    text-align: left !important;
    border-bottom: 1px solid rgba(255,255,255,0.05) !important;
  }
}
}