/* 移动端头部适配样式 */
@media screen and (max-width: 768px) {
  /* 移动端整体布局调整 - 重新排列元素顺序 */
  .header {
    width: 7.5rem;
    height: 5.1rem;
    background: url(wap-sy-header.png) no-repeat top center;
    background-size: 100% 100%;
    padding: 0;
    display: flex;
    flex-direction: column;
  }

  /* 移动端顶部工具栏适配 - 简化设计 */
  .header-top-bar {
    padding: 0.05rem 0.15rem;
    text-align: center;
    order: 1 !important;
    background: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 0.4rem;
  }

  .top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-direction: row;
  }

  .top-links {
    text-align: left !important;
    font-size: 0.18rem;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 0.05rem;
    flex: 1;
    justify-content: flex-start;
  }

  .top-links a {
    font-size: 0.18rem;
    text-align: left;
    color: #fff;
    text-decoration: none;
  }

  .top-links a:not(:last-child)::after {
    content: "|";
    margin: 0 0.03rem;
    color: #ccc;
  }

  .top-utils {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    justify-content: flex-end;
  }

  /* 隐藏原有的工具项 */
  .language-switch,
  .accessibility,
  .elderly-mode-btn {
    display: none !important;
  }

  /* 移动端Logo区域适配 */
  .header .h-logo-box {
    width: 7.07rem;
    height: 2.55rem;
    margin: 0 auto;
    padding-top: 0.8rem;
    text-align: center;
    order: 2 !important;
  }

  .logo-content {
    flex-direction: row;
    align-items: center;
    text-align: center;
    justify-content: center;
    gap: 0.1rem;
  }

  .guohui-icon {
    width: 50px !important;
    height: 50px !important;
    margin: 0 !important;
    display: block;
    flex-shrink: 0;
  }

  .site-title {
    font-size: 24px !important;
    margin: 0 !important;
    line-height: 1.1 !important;
    text-align: center !important;
  }

  .site-subtitle {
    font-size: 12px !important;
    text-align: center !important;
    margin: 0 !important;
  }

  /* 标题和副标题容器 */
  .logo-content .title-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.02rem;
  }

  /* 移动端导航栏适配 - 移动到搜索框下方 */
  .header .h-nav {
    width: 100%;
    height: 1rem;
    background-size: 100% 100%;
    margin: 0;
    overflow-x: auto;
    overflow-y: hidden;
    border: none;
    text-align: center;
    order: 4 !important;
    margin-top: 0.6rem;
  }

  .h-nav-box {
    width: 13.3rem;
    height: 0.68rem !important;
    line-height: 0.88rem;
    display: flex;
    justify-content: space-between;
  }

  .h-nav-box li {
    width: 100%;
    text-align: center;
  }

  .h-nav-box li a {
    font-size: 0.2rem;
    padding: 0.08rem 0.04rem;
    text-align: center !important;
    display: block;
    line-height: 1.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.04rem;
    margin-bottom: 0.05rem;
    width: 100%;
  }

  .h-nav-box li a.cur {
    background: rgba(255, 255, 255, 0.2);
  }

  /* 移动端搜索框适配 */
  .header .h-search {
    padding: 0.1rem 0.2rem 0.15rem;
    text-align: center;
    display: flex;
    gap: 0.1rem;
    align-items: center;
    order: 3 !important;
    bottom: 1.3rem !important;
  }

  .header .h-search .s-box {
    flex: 1;
    margin-bottom: 0;
    text-align: center;
    padding: 0 0.15rem;
    width: 6.4rem;
    border-radius: 1rem;
  }

  .header .h-search .s-box .type {
    font-size: 0.18rem;
  }

  .header .h-search .s-box .line {
    height: 0.4rem;
    margin: 0 0.15rem;
    margin-top: 0.2rem;
  }

  .header .h-search .s-box input {
    width: 2.5rem;
    height: 0.8rem;
    line-height: 0.8rem;
    font-size: 0.26rem;
  }

  .header .h-search .s-btn {
    width: 1.5rem;
    height: 0.7rem;
    text-align: center !important;
    padding: 0.1rem;
    font-size: 0.18rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    background: #296ddd !important;
    border-radius: 1rem !important;
    right: 0.4rem !important;
    top: -0.05rem !important;
  }

  /* 确保所有文本居中 */
  .header * {
    text-align: center !important;
  }

  /* 特殊处理某些需要左对齐的元素 */
  .header .h-search input {
    text-align: left !important;
  }

  /* 移动端去除topnews的padding */
  .topnews {
    padding: 0 !important;
  }

  /* 移动端去除sy-lb .box .topnews的margin */
  .sy-lb .box .topnews {
    width: 7.02rem;
    height: 1.72rem;
    margin: 0 !important;
  }

  /* 移动端sy-lb .box样式 */
  .sy-lb .box {
    width: 7.5rem;
    padding: 0.32rem 0.24rem 0;
    margin: 0 auto;
  }

  /* 移动端两列布局图片样式 */
  .nav-box.rt:has(.two-column-layout) .image-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
  }

  /* 移动端隐藏官方微信链接 */
  .lx.lf:has(img[alt="官方微信"]) {
    display: none !important;
  }
}