/* ========================================
   响应式样式 — 只影响移动端，不影响 PC 端
   ======================================== */

/* 移动端 breakpoint: max-width 768px */
@media (max-width: 768px) {

  /* ----- 全局重置 ----- */
  body { min-width: unset !important; }
  html { transform: none !important; }

  /* ----- 强制图片/视频自适应 ----- */
  img, video, iframe, embed, object {
    max-width: 100% !important;
    height: auto !important;
  }

  /* ----- 固定宽度容器覆盖 (行内样式 + CSS 类) ----- */
  [style*="width: 1200px"],
  [style*="width:1200px"],
  [style*="width: 1400px"],
  [style*="width:1400px"],
  [style*="width: 1220px"],
  [style*="width:1220px"],
  [style*="width: 1100px"],
  [style*="width:1100px"],
  [style*="width: 955px"],
  [style*="width:955px"],
  [style*="width: 785px"],
  [style*="width:785px"],
  [style*="width: 450px"],
  [style*="width:450px"],
  [style*="width: 375px"],
  [style*="width:375px"] {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* 固定高度在移动端改为自适应 */
  [style*="height: 370px"],
  [style*="height:370px"] {
    height: auto !important;
    min-height: 200px;
  }
  [style*="height: 780px"],
  [style*="height:780px"] {
    max-height: 300px !important;
  }
  [style*="height: 442px"],
  [style*="height:442px"] {
    height: 220px !important;
  }
  [style*="height: 592px"],
  [style*="height:592px"] {
    height: 300px !important;
  }
  [style*="height: 290px"],
  [style*="height:290px"] {
    height: 200px !important;
  }
  [style*="height: 200px"] {
    height: auto !important;
    min-height: 120px;
  }

  /* calc(50% - 600px) → 普通 padding */
  [style*="calc(50% - 600px)"] {
    padding-left: 15px !important;
  }

  /* ----- 顶部导航 ----- */
  #header, .web-header, [style*="min-width: 1280px"], [style*="min-width:1300px"] {
    min-width: unset !important;
  }

  #header {
    padding: 0 15px !important;
    height: 56px !important;
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999 !important;
    background: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  }

  /* 页面内容避开固定导航 */
  #layout-main {
    padding-top: 56px !important;
  }

  /* logo 缩小 */
  #header > img,
  #header img[style*="width: 110px"] {
    width: 80px !important;
  }

  /* ----- 汉堡菜单按钮 ----- */
  .hamburger-btn {
    display: flex !important;
    width: 36px;
    height: 36px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    z-index: 1000;
  }
  .hamburger-btn span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: #333;
    border-radius: 2px;
    transition: all .3s ease;
    margin: 3px 0;
  }
  .hamburger-btn.active span:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
  }
  .hamburger-btn.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger-btn.active span:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
  }

  /* ----- 移动端导航菜单 (抽屉) ----- */
  .mobile-nav {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff;
    z-index: 998;
    overflow-y: auto;
    padding: 10px 0;
  }
  .mobile-nav.open {
    display: block !important;
  }
  .mobile-nav .mobile-nav-item {
    display: block;
    padding: 14px 24px;
    font-size: 16px;
    color: #333;
    border-bottom: 1px solid #f5f5f5;
    text-decoration: none;
    position: relative;
  }
  .mobile-nav .mobile-nav-item:active {
    background: #f5f5f5;
  }
  .mobile-nav .mobile-nav-item .fa-caret-down {
    float: right;
    margin-top: 3px;
    transition: transform .2s;
  }
  .mobile-nav .mobile-nav-item .fa-caret-down.open {
    transform: rotate(180deg);
  }
  .mobile-nav .mobile-sub-menu {
    display: none;
    background: #fafafa;
    padding: 0;
  }
  .mobile-nav .mobile-sub-menu.open {
    display: block;
  }
  .mobile-nav .mobile-sub-menu a {
    display: block;
    padding: 12px 36px;
    font-size: 14px;
    color: #666;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
  }
  .mobile-nav .mobile-sub-menu a:active {
    background: #eee;
  }
  .mobile-nav .mobile-lang {
    padding: 16px 24px;
    display: flex;
    gap: 12px;
  }
  .mobile-nav .mobile-lang span {
    padding: 6px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
  }
  .mobile-nav .mobile-lang span:active {
    background: #f0f0f0;
  }
  .mobile-nav .mobile-lang span.active {
    background: #00397e;
    color: #fff;
    border-color: #00397e;
  }

  /* 隐藏 PC 导航链接，显示汉堡按钮 */
  #header > div:last-child,
  #header > div:last-of-type {
    display: none !important;
  }

  /* ----- 首页 ----- */
  /* 使命愿景 grid 改为单列 */
  [style*="grid-template-columns: repeat(2, 50%)"],
  [style*="grid-template-columns:repeat(2, 50%)"] {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
    width: 95% !important;
  }
  [style*="grid-template-columns: repeat(2, 50%)"] > div,
  [style*="grid-template-columns:repeat(2, 50%)"] > div {
    padding: 20px !important;
    flex-direction: column !important;
    text-align: center;
  }
  [style*="grid-template-columns: repeat(2, 50%)"] img,
  [style*="grid-template-columns:repeat(2, 50%)"] img {
    width: 100px !important;
    height: auto !important;
    margin-bottom: 10px;
  }
  [style*="grid-template-columns: repeat(2, 50%)"] [style*="font-size: 42px"],
  [style*="grid-template-columns:repeat(2, 50%)"] [style*="font-size: 42px"] {
    font-size: 28px !important;
  }
  [style*="grid-template-columns: repeat(2, 50%)"] [style*="font-size: 20px"],
  [style*="grid-template-columns:repeat(2, 50%)"] [style*="font-size: 20px"] {
    font-size: 15px !important;
  }

  /* 搜索框 */
  .search-container {
    position: relative !important;
    left: auto !important;
    top: -30px !important;
    transform: none !important;
    width: 92% !important;
    margin: 0 auto !important;
    height: 50px !important;
  }
  .search-input {
    height: 46px !important;
    font-size: 14px !important;
  }
  .search-select {
    width: 80px !important;
  }
  .search-select > span {
    font-size: 14px !important;
  }

  /* Swiper 高度 */
  .swiper-container {
    max-height: 250px !important;
  }

  /* ----- title-bg 区域 ----- */
  .title-text {
    font-size: 22px !important;
    line-height: 28px !important;
  }

  /* 首页四个方块 (g1~g6) */
  [style*="width: 291px"],
  [style*="width:291px"],
  [style*="width: 594px"],
  [style*="width:594px"] {
    width: calc(50% - 8px) !important;
    height: 180px !important;
    margin: 4px !important;
  }
  .g1-mask, .g2-mask, .g3-mask, .g4-mask, .g5-mask, .g6-mask {
    width: calc(50% - 8px) !important;
    height: 180px !important;
    margin: 4px !important;
  }
  .g-title {
    padding: 12px 16px !important;
  }
  .g-title > .title {
    font-size: 14px !important;
    line-height: 20px !important;
  }
  .g-title > .sub-title {
    font-size: 11px !important;
    line-height: 18px !important;
  }

  /* partners */
  .partners {
    height: 220px !important;
  }
  .partners-container {
    width: 95% !important;
    left: 2.5% !important;
    top: 180px !important;
    padding: 15px !important;
  }

  /* 右侧悬浮按钮 */
  #right {
    display: none !important;
  }

  /* ----- 详情页 (detail.ftl) ----- */
  /* 挡住标题的装饰图片隐藏 */
  img[style*="position: absolute"][style*="top:90px"],
  img[style*="position:absolute"][style*="left: 90px"] {
    display: none !important;
  }
  [style*="padding: 50px 150px 100px 150px"],
  [style*="padding:50px 150px 100px 150px"] {
    padding: 20px 15px !important;
  }
  [style*="font-size: 30px"][style*="font-weight: bold"][style*="padding"] {
    font-size: 20px !important;
    line-height: 28px !important;
    padding: 15px 0 !important;
  }

  /* 详情页 时间/来源 行 */
  [style*="line-height: 22px"][style*="margin: 20px 0 5px 0"][style*="display: flex"] {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 8px !important;
  }
  [style*="line-height: 22px"][style*="margin: 20px 0 5px 0"][style*="display: flex"] span {
    margin-left: 0 !important;
  }

  /* 详情页 PREV / NEXT */
  [style*="width: 375px"][style*="height:130px"],
  [style*="width:375px"][style*="height:130px"] {
    width: 48% !important;
    height: 80px !important;
    line-height: 24px !important;
    padding-left: 10px !important;
  }
  [style*="width: 375px"][style*="height:130px"] p:first-child,
  [style*="width:375px"][style*="height:130px"] p:first-child {
    font-size: 18px !important;
    margin-top: 14px !important;
    padding-left: 10px !important;
  }
  [style*="width: 375px"][style*="height:130px"] p:last-child,
  [style*="width:375px"][style*="height:130px"] p:last-child {
    font-size: 12px !important;
  }

  /* ----- 列表页 (news.ftl, case.ftl, about.ftl) ----- */
  [style*="width: 1200px"][style*="margin: 30px auto"] {
    padding: 0 15px !important;
    box-sizing: border-box !important;
  }
  /* 1200px 容器内的 flex 布局在移动端改为纵向 */
  [style*="width: 1200px"][style*="display: flex"] {
    flex-direction: column !important;
  }
  /* 1400px 容器的 flex 布局也改为纵向 (nad18000, fda, sgs) */
  [style*="width: 1400px"][style*="display: flex"] {
    flex-direction: column !important;
  }
  /* 内容区左间距取消 */
  [style*="width: 1200px"][style*="display: flex"] [style*="margin-left: 25px"],
  [style*="width: 1200px"][style*="display: flex"] [style*="margin-left:25px"],
  [style*="width: 1200px"][style*="display: flex"] [style*="margin-left: 50px"],
  [style*="width: 1200px"][style*="display: flex"] [style*="margin-left:50px"],
  [style*="width: 1400px"][style*="display: flex"] [style*="margin-left: 25px"],
  [style*="width: 1400px"][style*="display: flex"] [style*="margin-left:25px"] {
    margin-left: 0 !important;
  }
  [style*="display: flex"][style*="margin-top: 30px"][style*="background: #ffffff"],
  [style*="display: flex"][style*="margin-top: 30px"] {
    flex-direction: column !important;
  }
  /* news-list items */
  [style*="display: flex"][style*="margin-top: 30px"] > img[style*="width: 400px"] {
    width: 100% !important;
    height: 180px !important;
    margin: 0 !important;
  }
  /* case-list items */
  [style*="display: flex"][style*="margin-top: 30px"] > img[style*="width: 320px"] {
    width: 100% !important;
    height: 180px !important;
    margin: 0 0 10px 0 !important;
  }
  [style*="margin-right: 20px"][style*="padding: 20px"][style*="flex:1"] {
    padding: 15px !important;
  }
  [style*="font-size: 20px"][style*="overflow: hidden"][style*="text-overflow"] {
    font-size: 16px !important;
  }

  /* ----- Tab 列表页 (list-tab.ftl) ----- */
  [style*="padding-left: calc(50% - 600px)"] {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
  [style*="padding-left: calc(50% - 600px)"] > div {
    display: inline-flex !important;
    float: none !important;
    white-space: nowrap;
  }
  [style*="width: 150px"][style*="height: 60px"][style*="font-size: 16px"] {
    width: auto !important;
    height: 48px !important;
    padding: 0 10px;
    flex-shrink: 0;
  }
  /* tab 内部文字不换行 */
  [style*="width: 150px"][style*="height: 60px"] .tab-list-item {
    white-space: nowrap;
  }
  [style*="width: 150px"][style*="height: 60px"] [style*="flex:1"]:last-child {
    display: none !important;
  }
  #contentTitle, [style*="font-size: 48px"][style*="font-weight: bolder"] {
    font-size: 24px !important;
    padding-left: 15px !important;
    padding-top: 20px !important;
  }

  /* 面包屑搜索栏 (case.ftl, about.ftl) */
  [style*="width: 240px"][style*="height: 40px"][style*="border: 2px solid"] {
    width: 180px !important;
    height: 34px !important;
  }
  [style*="width: 240px"][style*="height: 40px"][style*="border: 2px solid"] input {
    font-size: 13px !important;
  }

  /* ----- 分页 (list-pager.ftl) ----- */
  [style*="padding: 50px 0"][style*="font-size: 16px"][style*="letter-spacing: 3px"] {
    flex-wrap: wrap !important;
    padding: 15px 0 !important;
    justify-content: center !important;
  }
  [style*="padding: 50px 0"][style*="font-size: 16px"] > div:first-child,
  [style*="padding: 50px 0"][style*="font-size: 16px"] > div:last-child {
    display: none !important;
  }
  /* 分页按钮容器：允许换行、缩小间距 */
  [style*="padding: 0 50px"][style*="text-align: center"] {
    flex-wrap: wrap !important;
    justify-content: center !important;
    padding: 5px !important;
    gap: 4px;
  }
  /* 分页按钮缩小 */
  .page-button {
    width: 24px !important;
    height: 24px !important;
    line-height: 24px !important;
    margin: 0 3px !important;
    font-size: 12px !important;
  }
  /* 隐藏"共X条 每页X条" */
  [style*="padding: 50px 0"] > div:nth-child(2) {
    display: none !important;
  }
  /* 隐藏"前往 X 页" */
  [style*="padding: 50px 0"] > div:nth-child(4) {
    display: none !important;
  }

  /* ----- Footer ----- */
  #footer {
    height: auto !important;
    padding-bottom: 20px;
  }
  #footer > div,
  #footer [style*="width: 1400px"] {
    width: 100% !important;
    height: auto !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 20px 15px !important;
    box-sizing: border-box;
  }
  #footer img[style*="width: 200px"],
  #footer img[style*="width:200px"] {
    width: 120px !important;
    height: auto !important;
    margin: 0 auto 15px !important;
  }
  #footer [style*="flex: 1"] {
    display: none !important;
  }
  #footer [style*="display: flex"]:last-child {
    flex-wrap: wrap !important;
    justify-content: center;
    gap: 15px;
  }
  #footer .xx-text {
    width: auto !important;
    line-height: 28px !important;
    font-size: 14px !important;
    text-align: center !important;
  }
  #footer .xx-text > div {
    display: inline !important;
    margin-left: 8px;
  }
  #footer .xx-text > div a {
    font-size: 12px !important;
  }
  .f_list {
    flex-wrap: wrap !important;
    height: auto !important;
    padding: 10px !important;
    justify-content: center;
  }
  .f_list a {
    margin: 5px 10px !important;
    font-size: 13px !important;
  }

  /* ----- 关于页/联系我们 ----- */
  [style*="width: 42%"],
  [style*="width: 40%"],
  [style*="width: 300px"][style*="line-height: 44px"],
  [style*="width: 80px"][style*="margin"] {
    width: 100% !important;
    padding: 0 15px !important;
    box-sizing: border-box;
  }
  [style*="padding-top: 90px"][style*="display: flex"] {
    flex-direction: column !important;
    padding-top: 30px !important;
  }
  /* 地图区域 flex 容器改为纵向 */
  [style*="margin-top: 100px"][style*="padding-bottom: 100px"] > [style*="display: flex"] {
    flex-direction: column !important;
  }
  [style*="font-size: 36px"][style*="font-weight: bold"][style*="margin-top: 90px"] {
    font-size: 24px !important;
    margin-top: 30px !important;
  }

  /* ----- website frames (about / invest / etc) ----- */
  .jy1, .jy2, .jy3, .jy4 {
    width: calc(50% - 10px) !important;
    height: 280px !important;
    margin: 5px !important;
  }
  .jy-container {
    height: 260px !important;
  }
  .half-circle {
    width: 120px !important;
    line-height: 36px !important;
    font-size: 14px !important;
    left: 20px !important;
    background-size: 100% 100% !important;
  }

  /* ----- 地图页 ----- */
  [style*="width: 15%"] {
    display: none !important;
  }

  /* ----- body-container (通用) ----- */
  .body-container {
    width: 95% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 20px !important;
  }
  .category-container {
    flex-wrap: wrap !important;
  }
  .category-item {
    flex: none !important;
    width: 100% !important;
    margin-bottom: 8px;
  }

  /* ----- guide.ftl / business.ftl 侧边栏 + 布局 ----- */
  /* 220px 侧边栏 */
  [style*="width: 220px"][style*="background: linear-gradient"],
  [style*="width: 220px"][style*="margin-left: 22px"] {
    width: 100% !important;
    margin-left: 0 !important;
    padding: 20px 15px !important;
    display: flex !important;
    flex-wrap: wrap !important;
  }
  [style*="width: 220px"] + div > .title-bg,
  [style*="width: 220px"][style*="margin-left: 22px"] + .title-bg {
    display: none !important;
  }
  /* guide/business 主内容区 920px */
  [style*="width: 920px"],
  [style*="width:920px"] {
    width: 100% !important;
    max-width: 100% !important;
  }
  /* 920x300 flex 块 */
  [style*="width: 920px"][style*="height: 300px"] {
    height: auto !important;
    min-height: 200px;
  }
  [style*="width: 90px"][style*="height: 300px"] {
    width: 40px !important;
    min-height: 200px;
  }
  [style*="width: 90px"][style*="height: 300px"] > div {
    font-size: 16px !important;
    padding: 10px 0 !important;
    width: 20px !important;
  }
  /* 460px 盒子 */
  [style*="width: 460px"] {
    width: 100% !important;
    max-width: 100% !important;
  }
  [style*="width: 460px"][style*="height: 380px"],
  [style*="width:460px"][style*="height:380px"] {
    height: auto !important;
    min-height: 200px;
  }
  /* 415px 表单输入框 */
  [style*="width: 415px"] {
    width: 100% !important;
    max-width: 100%;
  }
  /* 820px 招商联盟背景盒子 */
  [style*="width: 820px"] {
    width: 100% !important;
    padding: 15px !important;
    position: relative !important;
  }
  [style*="width: 820px"][style*="height: 325px"] {
    height: auto !important;
    min-height: 200px;
  }
  [style*="width: 820px"] > img {
    display: none !important;
  }

  /* 145px 招商联盟优势卡片 */
  [style*="width: 145px"][style*="height: 190px"] {
    width: 48% !important;
    height: auto !important;
    padding: 12px 8px !important;
    margin-bottom: 10px !important;
  }
  [style*="margin-top: 30px"][style*="display: flex"]:has(> [style*="width: 145px"]) {
    flex-wrap: wrap !important;
    gap: 4%;
    justify-content: center;
  }
  /* 180px title-bg */
  [style*="width: 180px"][style*="height: 100px"] {
    width: 140px !important;
    height: 70px !important;
    padding: 10px !important;
  }
  .title-bg > div {
    font-size: 15px !important;
    line-height: 18px !important;
  }

  /* ----- FDA / SGS 内容区 (70% + margin-left: 15%) ----- */
  [style*="min-height: 500px"][style*="padding: 0 60px"][style*="width: 70%"],
  [style*="width: 70%"][style*="margin-left: 15%"] {
    width: 100% !important;
    margin-left: 0 !important;
    padding: 15px !important;
    box-sizing: border-box;
  }

  /* ----- about-list.ftl: width: 615px / max-width: 615px ----- */
  [style*="width: 615px"] {
    width: 100% !important;
    max-width: 100% !important;
  }
  [style*="max-width: 615px"] {
    max-width: 100% !important;
  }

  /* ----- resource-list.ftl: 485px ----- */
  [style*="width: 485px"] {
    width: 100% !important;
    max-width: 100% !important;
  }
  [style*="max-width: 485px"] {
    max-width: 100% !important;
  }
  /* resource-list "了解详情" 200px button */
  [style*="width: 200px"][style*="background: #4a70d4"] {
    width: 140px !important;
    font-size: 15px !important;
  }

  /* ----- list-tab1.ftl sidebar (min-width: 280px) ----- */
  [style*="min-width: 280px"] {
    min-width: unset !important;
    width: 100% !important;
    margin-left: 0 !important;
  }

  /* ----- map.ftl .title_1 margin-right: 1050px ----- */
  .title_1 {
    margin-right: 0 !important;
  }

  /* ----- map.ftl 整体 ----- */
  [style*="margin-left: calc(50% - 600px)"][style*="min-height: 400px"] {
    width: 100% !important;
    margin-left: 0 !important;
    padding: 10px !important;
    box-sizing: border-box;
  }
  .item_1 {
    padding: 10px 20px 10px 0 !important;
    font-size: 14px !important;
  }

  /* ----- 其他杂项 ----- */
  .web-header {
    min-width: unset !important;
    padding: 0 15px !important;
    height: 56px !important;
  }
  .vip-button {
    transform: scale(0.8);
    margin-right: 5px !important;
  }
}

/* 极小屏适配 (max-width: 480px) */
@media (max-width: 480px) {
  .swiper-container {
    max-height: 200px !important;
  }
  .search-container {
    width: 94% !important;
    height: 44px !important;
    top: -20px !important;
  }
  .search-input {
    height: 40px !important;
    font-size: 13px !important;
  }
  [style*="grid-template-columns: repeat(2, 50%)"] {
    grid-row-gap: 15px !important;
    grid-column-gap: 15px !important;
  }
  .g1-mask, .g2-mask, .g3-mask, .g4-mask, .g5-mask, .g6-mask {
    height: 140px !important;
  }
}
