/* 内联样式提取 */
.h-nav-box {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  gap: 0;
}

/* ==================== 导航二级菜单样式（仅PC端） ==================== */
@media (min-width: 993px) {
  /* 有二级菜单的导航项 */
  .h-nav .h-nav-box li.has-dropdown {
    position: relative;
  }

  /* 二级菜单容器 */
  .h-nav .h-nav-box li.has-dropdown .dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 0 0 8px 8px;
    padding: 10px 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    transform: translateX(-50%) translateY(-10px);
    margin-top: 0;
  }

  /* Hover时显示二级菜单 */
  .h-nav .h-nav-box li.has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }

  /* 二级菜单项 */
  .h-nav .h-nav-box li.has-dropdown .dropdown li {
    width: 100%;
    height: auto;
    line-height: normal;
    padding: 0;
    margin: 0;
  }

  /* 二级菜单链接 */
  .h-nav .h-nav-box li.has-dropdown .dropdown li a {
    display: block;
    width: 100%;
    padding: 10px 20px;
    color: #333333;
    font-size: 14px;
    text-align: left;
    white-space: nowrap;
    background: transparent;
    transition: all 0.3s ease;
  }

  /* 二级菜单链接hover效果 */
  .h-nav .h-nav-box li.has-dropdown .dropdown li a:hover {
    background: #f5f8fa;
    color: #154caf;
    padding-left: 25px;
  }

  /* 二级菜单链接hover时不显示before伪元素 */
  .h-nav .h-nav-box li.has-dropdown .dropdown li a:hover::before {
    display: none;
  }
}

/* 移动端完全隐藏二级菜单 */
@media (max-width: 992px) {
  .h-nav .h-nav-box li.has-dropdown .dropdown {
    display: none !important;
  }
}

.zcwj {
  display: flex;
  align-items: center;
  justify-content: center;
}

.zcwj .xxgk-2img a img {
  width: 270px !important;
  height: 210px !important;
  object-fit: contain !important;
  object-position: center !important;
  border-radius: 8px !important;
}

/* 移动端优化 - 不影响PC端 */
@media screen and (max-width: 768px) {
  /* 政务公开与服务区域移动端优化 */
  .xxgk {
    flex-direction: column !important;
  }

  .zfxxgk {
    width: 100% !important;
  }

  .zcwj {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }

  .zcwj .xxgk-2img {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
  }

  .zcwj .xxgk-2img a {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    height: 200px !important;
    width: 100% !important;
    background: transparent !important;
  }

  .zcwj .xxgk-2img a img {
    width: 100% !important;
    max-width: 300px !important;
    height: 200px !important;
    border-radius: 12px !important;
    display: block !important;
    margin: 0 auto !important;
    object-fit: contain !important;
    object-position: center !important;
  }

  /* 政府信息公开按钮移动端优化 */
  .zfxxgk .zfxx {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: auto auto auto !important;
    gap: 15px !important;
    padding: 0 15px !important;
    justify-items: start !important;
    margin-top: 20px !important;
  }

  .zfxxgk .zfxx a {
    width: 100% !important;
    max-width: 150px !important;
    height: 120px !important;
    padding: 15px 10px !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  .zfxxgk .zfxx a:nth-child(2n + 1) {
    grid-column: 1 !important;
    /* grid-row: 1 !important; */
  }

  .zfxxgk .zfxx a:nth-child(2n + 2) {
    grid-column: 2 !important;
    /* grid-row: 1 !important; */
    justify-self: end !important;
  }

  /* .zfxxgk .zfxx a:nth-child(3) {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }

  .zfxxgk .zfxx a:nth-child(4) {
    grid-column: 2 !important;
    grid-row: 2 !important;
    justify-self: end !important;
  }

  .zfxxgk .zfxx a:nth-child(5) {
    grid-column: 1 !important;
    grid-row: 3 !important;
    max-width: 150px !important;
    justify-self: start !important;
    margin-left: 0 !important;
  } */

  .zfxxgk .zfxx a img {
    width: 32px !important;
    height: 32px !important;
    margin: 0 auto 8px !important;
    display: block !important;
    object-fit: contain !important;
    background: transparent !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* 确保第一个按钮的图片显示 */
  .zfxxgk .zfxx a:first-child img {
    width: 32px !important;
    height: 32px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: transparent !important;
  }

  /* 覆盖main.css中的rem单位设置 */
  .sy-lms .tabContent .tabItem .zfxxgk .zfxx a img {
    width: 32px !important;
    height: 32px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0 auto 8px !important;
    object-fit: contain !important;
  }

  .zfxxgk .zfxx a .zf-item {
    font-size: 15px !important;
    line-height: 1.2 !important;
    color: #333 !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 5px !important;
  }

  /* 导航栏移动端优化 */
  .h-nav-box {
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: 0 !important;
  }

  .h-nav-box li {
    flex: 0 0 auto !important;
  }

  .h-nav-box li a {
    padding: 8px 12px !important;
  }
}
