/**
 * 页面：zfxx.template.html（政务公开频道首页）
 */

/* ========== 1200px 以下：容器收窄 ========== */
@media screen and (max-width: 1200px) {
  .zfxx-container {
    width: 100% !important;
    max-width: 1200px;
    padding-left: 12px;
    padding-right: 12px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
  }
}

/* ========== 1024px 以下：平板 / 移动主布局入口 ========== */
@media screen and (max-width: 1024px) {
  .zfxx-container {
    width: 100% !important;
    margin-top: 16px;
    margin-bottom: 16px;
    padding-left: 12px;
    padding-right: 12px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
  }

  .zfxx-main-wrapper {
    display: block;
    height: auto;
  }

  .zfxx-left-main,
  .zfxx-right-sidebar {
    width: 100% !important;
  }

  .zfxx-left-main {
    padding: 16px;
    min-height: 0;
    margin-bottom: 12px;
  }

  .zfxx-right-sidebar {
    display: block;
  }

  .zfxx-sidebar-box {
    margin-bottom: 12px;
  }

  .zfxx-tabs-header {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    border-bottom: 0;
    margin-bottom: 12px;
    gap: 0;
  }

  .zfxx-tabs-header span {
    width: 50%;
    height: 44px;
    line-height: 44px;
    font-size: 0.9375rem;
  }

  .zfxx-tabs-header span a,
  .zfxx-tabs-header span:first-child a {
    left: 0;
    right: 0;
  }

  .zfxx-list li {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    min-height: 44px;
    height: auto;
    line-height: 1.5;
    padding-top: 8px;
    padding-bottom: 8px;
    padding-left: 14px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
  }

  .zfxx-list li::before {
    top: 20px;
  }

  .zfxx-list li a {
    display: block;
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    flex: 1;
    min-width: 0;
    margin-right: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .zfxx-list li span {
    width: 90px;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    text-align: right;
    white-space: nowrap;
  }

  .zfxx-report-header,
  .zfxx-key-areas-header {
    margin-top: 18px;
    margin-bottom: 12px;
  }

  .zfxx-report-header h3 {
    width: 228px;
    left: -12px;
    font-size: 1rem;
  }

  .zfxx-key-areas-header h3 {
    width: 288px;
    left: -12px;
    font-size: 1rem;
  }

  .zfxx-sidebar-box h3 {
    height: 60px;
    line-height: 60px;
    font-size: 1.125rem;
  }

  .zfxx-icon-grid,
  .zfxx-text-grid {
    padding: 12px;
  }

  .zfxx-icon-item,
  .zfxx-text-btn {
    width: calc(50% - 6px);
  }

  .zfxx-icon-item {
    height: 84px;
  }

  .zfxx-icon-item img {
    max-width: 36px;
    height: auto;
    margin-right: 12px;
  }

  .zfxx-icon-item span,
  .zfxx-text-btn {
    font-size: 0.875rem;
  }

  .zfxx-full-section {
    margin-top: 16px;
    padding: 0 0 16px;
  }

  .zfxx-key-areas-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .zfxx-key-btn {
    height: 46px;
    line-height: 46px;
    font-size: 0.875rem;
  }

  .zfxx-five-pillars {
    margin-top: 16px;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-box-pack: justify;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    gap: 12px;
  }

  .zfxx-pillar-item {
    -webkit-flex: 0 0 calc(50% - 6px);
    flex: 0 0 calc(50% - 6px);
    width: calc(50% - 6px);
    max-width: none;
    height: 200px;
    margin-bottom: 0;
  }

  .zfxx-pillar-item img {
    max-width: 64px;
    height: auto;
    margin-bottom: 18px;
  }

  .zfxx-pillar-item span {
    font-size: 1rem;
  }
}

/* ========== 768px 以下：手机布局 ========== */
@media screen and (max-width: 768px) {
  html {
    font-size: 16px;
  }

  .zfxx-container {
    width: 100% !important;
    margin-top: 12px;
    margin-bottom: 12px;
    padding-left: 8px;
    padding-right: 8px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
  }

  .zfxx-main-wrapper {
    display: block;
    height: auto;
  }

  .zfxx-left-main,
  .zfxx-right-sidebar {
    width: 100% !important;
  }

  .zfxx-left-main {
    min-height: 0;
    padding: 12px;
    margin-bottom: 10px;
  }

  .zfxx-right-sidebar {
    display: block;
  }

  .zfxx-sidebar-box {
    margin-bottom: 10px;
  }

  .zfxx-tabs-header {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    border-bottom: 0;
    margin-bottom: 10px;
  }

  .zfxx-tabs-header span {
    width: 50%;
    height: 44px;
    line-height: 44px;
    font-size: 0.9375rem;
  }

  .zfxx-tabs-header span a,
  .zfxx-tabs-header span:first-child a {
    left: 0;
    right: 0;
  }

  .zfxx-list li {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    min-height: 44px;
    height: auto;
    line-height: 1.5;
    padding-top: 8px;
    padding-bottom: 8px;
    padding-left: 12px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
  }

  .zfxx-list li::before {
    top: 20px;
    width: 5px;
    height: 5px;
  }

  .zfxx-list li a {
    display: block;
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    flex: 1;
    min-width: 0;
    margin-right: 8px;
    font-size: 0.875rem;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .zfxx-list li span {
    width: 76px;
    font-size: 0.8125rem;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    text-align: right;
    white-space: nowrap;
  }

  .zfxx-report-header,
  .zfxx-key-areas-header {
    margin-top: 14px;
    margin-bottom: 10px;
    height: 42px;
    line-height: 42px;
  }

  .zfxx-report-header h3 {
    width: 200px;
    left: -8px;
    font-size: 0.9375rem;
  }

  .zfxx-key-areas-header h3 {
    width: 220px;
    left: -8px;
    font-size: 0.9375rem;
  }

  .zfxx-key-areas-header .more-link {
    font-size: 0.8125rem;
  }

  .zfxx-sidebar-box h3 {
    height: 52px;
    line-height: 52px;
    font-size: 1rem;
  }

  .zfxx-icon-grid,
  .zfxx-text-grid {
    padding: 10px;
  }

  .zfxx-icon-item,
  .zfxx-text-btn {
    width: calc(50% - 5px);
  }

  .zfxx-icon-item {
    height: 74px;
    margin-bottom: 8px;
  }

  .zfxx-icon-item img {
    max-width: 30px;
    height: auto;
    margin-right: 10px;
  }

  .zfxx-icon-item span {
    width: auto;
    font-size: 0.8125rem;
    line-height: 1.4;
    text-align: left;
    text-align-last: auto;
  }

  .zfxx-text-btn {
    height: 44px;
    line-height: 44px;
    margin-bottom: 8px;
    font-size: 0.8125rem;
  }

  .zfxx-full-section {
    margin-top: 12px;
    padding: 0 0 12px;
  }

  .zfxx-key-areas-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding-top: 8px;
    padding-bottom: 0;
  }

  .zfxx-key-btn {
    height: 44px;
    line-height: 44px;
    font-size: 0.8125rem;
  }

  .zfxx-five-pillars {
    margin-top: 12px;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-box-pack: justify;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    gap: 10px;
  }

  .zfxx-pillar-item {
    -webkit-flex: 0 0 calc(50% - 5px);
    flex: 0 0 calc(50% - 5px);
    width: calc(50% - 5px);
    max-width: none;
    height: 156px;
    margin-bottom: 0;
  }

  .zfxx-pillar-item a {
    padding-top: 12px;
    padding-bottom: 12px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
  }

  .zfxx-pillar-item img {
    max-width: 54px;
    height: auto;
    margin-bottom: 14px;
  }

  .zfxx-pillar-item span {
    font-size: 0.9375rem;
  }
}

/* ========== 480px 以下：小屏手机 ========== */
@media screen and (max-width: 480px) {
  .zfxx-container {
    padding-left: 4px;
    padding-right: 4px;
  }

  .zfxx-left-main {
    padding-left: 8px;
    padding-right: 8px;
  }

  .zfxx-full-section {
    padding-left: 0;
    padding-right: 0;
  }

  .zfxx-icon-grid,
  .zfxx-text-grid {
    padding-left: 8px;
    padding-right: 8px;
  }

  .zfxx-icon-item,
  .zfxx-text-btn {
    width: calc(50% - 4px);
  }

  .zfxx-report-header h3 {
    width: 180px;
  }

  .zfxx-key-areas-header h3 {
    width: 200px;
  }

  .zfxx-key-areas-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}
