/**
 * 全站手机端自适应（手机已统一走桌面路由）
 * 用全局覆盖压住历史 1170/1200 固定宽 + 双栏，避免逐页漏改。
 */

/* —— 通用安全盒 —— */
img,
video,
iframe,
svg {
  max-width: 100%;
  height: auto;
}

table {
  max-width: 100%;
}

/* 内联写死固定宽的面包屑/侧栏/容器 */
[style*='width: 1200px'],
[style*='width:1200px'],
[style*='width: 1170px'],
[style*='width:1170px'],
[style*='width: 895px'],
[style*='width:895px'],
[style*='width: 860px'],
[style*='width:860px'],
[style*='width: 812px'],
[style*='width:812px'],
[style*='width: 338px'],
[style*='width:338px'],
[style*='width: 330px'],
[style*='width:330px'],
[style*='width: 250px'],
[style*='width:250px'] {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 1024px) {
  :root {
    --site-max: 100%;
    --site-gap: 16px;
  }

  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  /* 历史主内容宽 */
  .body_w,
  .container,
  .layout__container,
  .layout__box,
  .component__anchor,
  .site-container,
  .info-level,
  .footer_w,
  .main_w,
  .content_w,
  .news_w {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .body_w {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
  }

  /* 列表页左右栏 → 单列（覆盖 812/338/250/895 等历史写死宽） */
  .left_body,
  .right_body,
  .layout__detail__left,
  .layout__detail__right,
  .leftBody,
  .rightBody {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    float: none !important;
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
  }

  /* 院校详情头图/锚点禁止 min-width */
  .layout__univ__header,
  .layout__univ__header .bg-level,
  .layout__univ__header .bg-level img,
  .layout__detail__anchor,
  .layout__detail,
  .schoolInfo {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .layout__univ__header .bg-level img,
  .layout__univ__header .bg-level {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .layout__univ__header .bg-level img {
    min-width: 0 !important;
    min-height: 0 !important;
    height: 100% !important;
    margin-top: 0 !important;
    object-fit: cover !important;
  }

  /* 详情双栏 860/330 */
  .layout__detail__left,
  .layout__detail__right {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
  }

  /* 列表页侧栏内层 250 */
  .left_body > div[style],
  .left_body [ref] {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* 国家落地页横滑/多卡 */
  .banner_w img,
  .advantage_w img,
  .process_w img,
  .teacher_w img,
  .case_w img {
    max-width: 100% !important;
    height: auto !important;
  }

  .teacher_c,
  .process_c,
  .advantage_c,
  .case_c {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    justify-content: center !important;
  }

  .teacher_c .item,
  .process_c .item,
  .advantage_c .item,
  .case_c .item,
  .caseList .item {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  /* 评估/购物车表单 */
  .el-row,
  .el-col {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* 顶部导航移动端已有汉堡；保证内容不顶破 */
  .header,
  .header * {
    max-width: 100%;
    box-sizing: border-box;
  }

  .brand_row,
  .nav_bar {
    width: 100% !important;
    overflow: hidden !important;
  }

  .layout__univ__header {
    height: auto !important;
    padding: 16px 0 !important;
  }

  .layout__univ__header .info-level {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
    padding: 0 12px !important;
    box-sizing: border-box !important;
  }

  .layout__univ__header .layout__left,
  .layout__univ__header .layout__right {
    width: 100% !important;
    flex-wrap: wrap !important;
  }

  .layout__detail__anchor {
    height: auto !important;
    top: 56px !important;
  }

  .component__anchor {
    height: auto !important;
    overflow-x: auto !important;
  }

  .component__anchor .el-menu--horizontal {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    width: 100% !important;
  }

  .component__anchor .el-menu-item {
    flex: 0 0 auto !important;
    padding: 0 12px !important;
    height: 48px !important;
    line-height: 48px !important;
  }

  .layout__container {
    display: block !important;
    min-height: 0 !important;
    padding: 12px !important;
  }

  /* 资讯/案例详情常见 812+338 */
  .left_body[style],
  .right_body[style] {
    width: 100% !important;
  }

  /* 专业库卡片网格 */
  .zykList,
  a.zykList {
    width: calc(50% - 10px) !important;
    margin-right: 8px !important;
    box-sizing: border-box !important;
  }

  /* Element 表格可横滑，避免撑破 */
  .el-table {
    width: 100% !important;
  }

  .el-table__body-wrapper {
    overflow-x: auto !important;
  }

  /* 国家/服务落地页常见固定块（含 !important 历史写法） */
  .banner_w,
  .choose_w,
  .advantage_w,
  .process_w,
  .teacher_w,
  .case_w,
  .bottom_w,
  .gjbk_w,
  .about_w,
  .caseList,
  .banner_list,
  .choose_c,
  .choose_list,
  .advantage_c,
  .process_c,
  .teacher_c,
  .case_c,
  .header .container,
  .header .brand_row__inner,
  .header .nav_bar__inner {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .banner_list,
  .caseList,
  .choose_c {
    height: auto !important;
    flex-wrap: wrap !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .choose_c {
    width: 100% !important;
    flex-direction: column !important;
    gap: 16px !important;
  }

  .choose_c .item {
    width: 100% !important;
  }

  /* 首页等 flex 双列 */
  .home-hero,
  .home-section,
  .layout__box {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* 图片/封面卡 */
  .cover,
  .cover img,
  .case-item .cover,
  .major-item {
    max-width: 100% !important;
  }

  .major-item .cname {
    width: auto !important;
    flex: 1 1 auto !important;
  }

  /* 分页居中 */
  .pagetion,
  .el-pagination {
    width: 100% !important;
    overflow-x: auto !important;
    text-align: center !important;
  }

  /* Footer 多列 */
  .footer .footer_main,
  .footer_left,
  .footer_right,
  .footer_nav {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
  }
}

@media (max-width: 768px) {
  .zykList,
  a.zykList {
    width: 100% !important;
    margin-right: 0 !important;
    display: block !important;
  }

  .zixun_Tab {
    width: 100% !important;
  }

  /* 顾问/资讯侧栏卡片 */
  .teach_Div,
  .teach_body,
  .active_Div,
  .active_body {
    width: 100% !important;
  }

  .teach_body {
    display: flex !important;
    flex-wrap: wrap !important;
  }

  /* 字号略收，避免标题撑破 */
  h1 {
    font-size: 22px !important;
    line-height: 1.35 !important;
    word-break: break-word;
  }

  h2 {
    font-size: 18px !important;
    word-break: break-word;
  }

  /* 表单全宽 */
  .el-form,
  .el-form-item,
  .el-input,
  .el-select,
  .el-textarea,
  .el-button {
    max-width: 100% !important;
  }

  .el-dialog {
    width: 92% !important;
    margin-top: 8vh !important;
  }

  /* 隐藏仅桌面浮层（若未标 desktop-only） */
  .desktop-only-float {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .site-container,
  .body_w,
  .container,
  .layout__container {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .layout__univ__header .cover,
  .layout__univ__header .cover img {
    width: 72px !important;
    height: 72px !important;
  }
}

/* —— 冒烟失败页专项：aboutus / gjbk / 国家页 swiper / 评估 / 服务落地 —— */
@media (max-width: 1024px) {
  /* 关于我们：顾问卡 292+808 双栏 */
  .teacher_box {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: wrap !important;
    padding: 20px 12px !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .teacher_box .avatar {
    width: min(280px, 100%) !important;
    max-width: 100% !important;
    height: auto !important;
    float: none !important;
    margin: 0 auto 16px !important;
  }

  .teacher_box .right,
  .teacher_box .right .info,
  .teacher_box .about-adviser-r,
  .teacher_box .adv-desc,
  .about-adviser-r,
  .adv-desc {
    width: 100% !important;
    max-width: 100% !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }

  .contact_us,
  [style*='width: 585px'],
  [style*='width:585px'] {
    width: 100% !important;
    max-width: 100% !important;
  }

  #section__part__4 .list .promise-item {
    width: calc(50% - 8px) !important;
    max-width: 100% !important;
  }

  /* 国际本科 webgjbk：hero min-width 520 撑破 */
  .hero,
  .hero-panel,
  .hero-modes,
  .hero-features,
  .hero-lead,
  .region-tabs,
  .school-grid,
  .card.content-main,
  .content-main,
  .intro-panel,
  .intro-cols {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .hero {
    flex-direction: column !important;
    height: auto !important;
    min-height: 0 !important;
  }

  .hero-panel {
    padding: 28px 16px !important;
  }

  .hero-panel h1 {
    font-size: 28px !important;
  }

  .mode-tag {
    font-size: 16px !important;
    padding: 8px 12px !important;
  }

  .intro-cols {
    display: block !important;
    grid-template-columns: 1fr !important;
  }

  .school-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* Swiper：允许轨道比视口宽，但容器必须裁切，避免撑开 document */
  .swiper,
  .swiper-container,
  .swiper-container-horizontal {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .banner_w,
  .teacher_w,
  .teacher_c,
  .case_w,
  .bannerList,
  .banner_list {
    overflow: hidden !important;
    max-width: 100% !important;
  }

  /* 服务落地页历史固定宽 */
  [style*='width: 936px'],
  [style*='width:936px'],
  [style*='width: 1130px'],
  [style*='width:1130px'] {
    width: 100% !important;
    max-width: 100% !important;
  }

  .serviceHongkong,
  .serviceBoshi,
  .serviceKY,
  .hk_body,
  .bs_body {
    overflow-x: hidden !important;
    max-width: 100% !important;
  }
}

@media (max-width: 768px) {
  #section__part__4 .list .promise-item {
    width: 100% !important;
  }

  /* 评估表单左右 48% → 全宽 */
  .weblxpg .form-item,
  .form-item[style*='width: 48%'],
  .form-item[style*='width:48%'],
  [style*='width: 48%'],
  [style*='width:48%'] {
    width: 100% !important;
    max-width: 100% !important;
  }

  .el-form-item {
    margin-right: 0 !important;
  }

  /* 时间轴：内部横滑，不撑开 document */
  .timeline-wrap {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
  }

  .address-area,
  .about-add {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .logo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .whychoose {
    gap: 12px !important;
  }

  .whychoose .why-item {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* 服务页：内层 padding 不撑破视口 */
  .service .body,
  .service .left_body,
  .service .left_body > div {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .service .mainContainer {
    padding-left: 12px !important;
    padding-right: 12px !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }
}
