/**
 * 办事服务页主体区块样式（与站点全局样式隔离，前缀 bsfw-main）
 */

.bsfw-main {
  --bsfw-blue: #0055aa;
  --bsfw-blue-light: #e8f2fc;
  --bsfw-card-radius: 8px;
  --bsfw-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 12px 32px;
  box-sizing: border-box;
  overflow-x: hidden;
}

.bsfw-main img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* 仅屏幕阅读器可见的标题，配合 aria-labelledby */
.bsfw-main .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* —— 顶部政务服务横幅（整区背景图 banner-bg.png） —— */
.bsfw-main__hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  padding: 20px 24px;
  margin-bottom: 24px;
  border-radius: var(--bsfw-card-radius);
  background: url("../images/bsfw-images/banner-bg.png") center center / cover no-repeat;
  box-shadow: var(--bsfw-shadow);
  min-height: 162px;
  box-sizing: border-box;
}

.bsfw-main__hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 12px;
}

/* 横幅快捷入口：圆形半透明底仅包住图标，文字在圆外下方 */
.bsfw-main__hero-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  box-sizing: border-box;
  width: auto;
  min-width: 80px;
  padding: 4px;
  margin: -4px;
  border-radius: 10px;
  text-decoration: none;
  text-align: center;
  transition: filter 0.2s ease;
}

.bsfw-main__hero-link:hover {
  filter: brightness(1.08);
}

.bsfw-main__hero-link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.bsfw-main__hero-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.32);
  box-sizing: border-box;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.bsfw-main__hero-link:hover .bsfw-main__hero-icon-wrap {
  background: rgba(255, 255, 255, 0.48);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
  transform: translateY(-2px);
}

.bsfw-main__hero-link:active .bsfw-main__hero-icon-wrap {
  transform: translateY(0) scale(0.96);
}

.bsfw-main__hero-icon-wrap img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  margin: 0;
  transition: transform 0.22s ease;
}

.bsfw-main__hero-link:hover .bsfw-main__hero-icon-wrap img {
  transform: scale(1.08);
}

.bsfw-main__hero-text {
  display: block;
  color: #fff;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* —— 办事事项 —— */
.bsfw-main__section {
  margin-bottom: 28px;
}

.bsfw-main__title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.bsfw-main__title-row h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--bsfw-blue);
  transition: color 0.2s ease, transform 0.2s ease;
}

.bsfw-main__title-row:hover h2 {
  color: #004494;
}

.bsfw-main__title-row img {
  width: 20px;
  height: auto;
}

.bsfw-main__table-wrap {
  overflow-x: auto;
  border-radius: var(--bsfw-card-radius);
  background: #fff;
  box-shadow: var(--bsfw-shadow);
  transition: box-shadow 0.28s ease;
}

.bsfw-main__table-wrap:hover {
  box-shadow: 0 6px 20px rgba(0, 85, 170, 0.1);
}

.bsfw-main__table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 14px;
}

.bsfw-main__table th,
.bsfw-main__table td {
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f6;
  text-align: left;
}

.bsfw-main__table th {
  background: var(--bsfw-blue-light);
  color: var(--bsfw-blue);
  font-weight: 600;
}

.bsfw-main__table tbody tr:not(.bsfw-main__table-more) {
  transition: background-color 0.22s ease;
}

.bsfw-main__table tbody tr:not(.bsfw-main__table-more):hover {
  background: #fafcff;
}

.bsfw-main__table .col-no {
  width: 56px;
  text-align: center;
  color: #666;
}

.bsfw-main__table .col-2 {
  width: 160px;
}

.bsfw-main__table a {
  color: #333;
  text-decoration: none;
  transition: color 0.2s ease;
}

.bsfw-main__table a:hover {
  color: var(--bsfw-blue);
  text-decoration: underline;
}

.bsfw-main__table a:focus-visible {
  outline: 2px solid var(--bsfw-blue);
  outline-offset: 2px;
  border-radius: 2px;
}

.bsfw-main__btn-online {
  display: inline-block;
  padding: 1px 14px;
  border-radius: 4px;
  background: #2687ee;
  color: #fff !important;
  font-size: 13px;
  text-decoration: none !important;
  transition: background-color 0.2s ease, transform 0.18s ease, box-shadow 0.2s ease;
}

.bsfw-main__btn-online:hover {
  background: #1a7ad8;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(38, 135, 238, 0.4);
  text-decoration: none !important;
}

.bsfw-main__btn-online:active {
  transform: translateY(0);
}

.bsfw-main__btn-online:focus-visible {
  outline: 2px solid var(--bsfw-blue);
  outline-offset: 2px;
}

/* 表格末行：整行跨列「查看更多」 */
.bsfw-main__table-more td.bsfw-main__more-cell {
  text-align: center;
  padding: 12px 14px;
  border-bottom: none;
  background: #fff;
}

.bsfw-main__more-cell a {
  color: #898989;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s ease, letter-spacing 0.2s ease;
}

.bsfw-main__more-cell a:hover {
  color: var(--bsfw-blue);
  text-decoration: underline;
  letter-spacing: 0.02em;
}

.bsfw-main__more-cell a:focus-visible {
  outline: 2px solid var(--bsfw-blue);
  outline-offset: 3px;
  border-radius: 2px;
}

/* 查询服务：与「办事事项」同款标题行，仅小屏展示（大屏标题在整图背景内） */
.bsfw-main__query-heading {
  display: none;
}

/* —— 查询服务：素材为标题+整图背景，仅用 padding 留出白区，无绝对定位 —— */
/* 底图尺寸 1192×297，用于保持比例避免移动端高度塌陷 */
.bsfw-main__query {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 3.2% 2.4% 3.4% 13.2%;
  aspect-ratio: 1192 / 297;
  background-image: url("../images/bsfw-images/query-title-icon.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  display: flex;
  flex-direction: column;
  line-height: normal;
}

.bsfw-main__query-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 6px;
  align-items: center;
  justify-items: center;
  align-content: center;
  box-sizing: border-box;
}

.bsfw-main__query-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 6px 4px;
  text-decoration: none;
  border: none;
  background: none;
  box-sizing: border-box;
  gap: 28px;
  border-radius: 8px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.2s ease;
}

.bsfw-main__query-card:hover {
  transform: translateY(-3px);
  /* box-shadow: 0 8px 22px rgba(0, 85, 170, 0.12); */
  background: rgba(255, 255, 255, 0.55);
}

.bsfw-main__query-card:focus-visible {
  outline: 2px solid var(--bsfw-blue);
  outline-offset: 3px;
}

.bsfw-main__query-card img {
  display: block;
  flex-shrink: 0;
  height: 80px;
  width: auto;
  max-width: 72%;
  object-fit: contain;
  margin: 0;
  transition: transform 0.22s ease;
}

.bsfw-main__query-card:hover img {
  transform: scale(1.06);
}

/* 查询入口说明文字（相对图标更醒目） */
.bsfw-main__query-label {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 0 2px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
  color: #333;
  transition: color 0.2s ease;
}

.bsfw-main__query-card:hover .bsfw-main__query-label {
  color: var(--bsfw-blue);
}

/* —— 外商投资门户（整图 portal.png） —— */
.bsfw-main__portal {
  margin: 0 0 28px;
  padding: 0;
  line-height: 0;
}

.bsfw-main__portal-link {
  display: block;
  margin: 0;
  padding: 0;
  line-height: 0;
  text-decoration: none;
  border-radius: var(--bsfw-card-radius);
  overflow: hidden;
  transition: 0.28s ease;
}

.bsfw-main__portal-link:hover {
  transform: translateY(-3px);
}

.bsfw-main__portal-link:focus-visible {
  outline: 3px solid var(--bsfw-blue);
  outline-offset: 3px;
}

.bsfw-main__portal-link:active {
  transform: translateY(-1px);
}

.bsfw-main__portal-link img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  transition: transform 0.4s ease;
}

.bsfw-main__portal-link:hover img {
  transform: scale(1.02);
}

/* —— 高效办成一件事 —— */
.bsfw-main__one-title {
  display: block;
  margin: 0 auto 20px;
  max-width: 360px;
}

.bsfw-main__one-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}

/* 每一项为素材图；悬停时轻微浮起与阴影 */
.bsfw-main__one-card {
  display: block;
  margin: 0;
  padding: 0;
  line-height: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.bsfw-main__one-card:hover {
  z-index: 1;
  transform: translateY(-4px);
}

.bsfw-main__one-card:focus-visible {
  outline: 3px solid var(--bsfw-blue);
  outline-offset: 4px;
  z-index: 1;
}

.bsfw-main__one-card img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  transition: transform 0.3s ease;
}

.bsfw-main__one-card:hover img {
  transform: scale(1.01);
}

/* —— 移动端 —— */
@media (max-width: 768px) {
  .bsfw-main {
    padding: 0 10px 24px;
  }

  .bsfw-main__hero {
    padding: 16px;
    flex-direction: column;
    justify-content: center;
    min-height: 88px;
    background: url(../images/bsfw-images/banner-bg.png) no-repeat;
    background-size: contain;
    background-color: #6db3f9;
  }

  .bsfw-main__hero-actions {
    justify-content: center;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 40px;
  }

  .bsfw-main__hero-link {
    min-width: 48px;
  }

  .bsfw-main__hero-icon-wrap {
    width: 40px;
    height: 40px;
  }

  .bsfw-main__hero-icon-wrap img {
    width: 24px;
    height: 24px;
  }

  .bsfw-main__hero-text {
    font-size: 10px;
  }

  /* 查询区移动端：去掉整图背景，用与办事事项相同的标题行；内容一行两个 */
  .bsfw-main__query-heading {
    display: flex;
    margin-bottom: 12px;
  }

  .bsfw-main__query {
    aspect-ratio: auto;
    background-image: none;
    background-color: #fff;
    background-size: auto;
    padding: 14px 12px 16px;
    border-radius: var(--bsfw-card-radius);
    box-shadow: var(--bsfw-shadow);
  }

  .bsfw-main__query-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, auto);
    gap: 12px 10px;
  }

  .bsfw-main__query-card {
    padding: 8px 6px;
    gap: 8px;
  }

  .bsfw-main__query-card img {
    height: 44px;
    max-width: 72%;
  }

  .bsfw-main__query-label {
    font-size: 12px;
    font-weight: 500;
  }

  .bsfw-main__title-row h2 {
    font-size: 18px;
  }

  .bsfw-main__one-grid {
    grid-template-columns: 1fr;
  }

  .bsfw-main .bsfw-main__one-title {
    transform: scale(1.9);
  }

  /* 小屏标题已放大，悬停不再叠加缩放 */
  .bsfw-main .bsfw-main__one-title:hover {
    transform: scale(1.9);
    filter: none;
  }
}

@media (max-width: 480px) {
  .bsfw-main__hero-icon-wrap {
    width: 36px;
    height: 36px;
  }

  .bsfw-main__hero-icon-wrap img {
    width: 22px;
    height: 22px;
  }

  .bsfw-main__hero-text {
    font-size: 10px;
  }

  .bsfw-main__table {
    font-size: 13px;
  }

  .bsfw-main__query {
    padding: 12px 10px 14px;
  }

  .bsfw-main__query-grid {
    gap: 10px 8px;
  }

  .bsfw-main__query-card img {
    height: 40px;
    max-width: 70%;
  }

  .bsfw-main__query-label {
    font-size: 11px;
  }
}

/* 系统开启「减少动效」时关闭位移动画，保留颜色等弱反馈 */
@media (prefers-reduced-motion: reduce) {
  .bsfw-main__hero-link,
  .bsfw-main__hero-icon-wrap,
  .bsfw-main__hero-icon-wrap img,
  .bsfw-main__table-wrap,
  .bsfw-main__table tbody tr,
  .bsfw-main__table a,
  .bsfw-main__btn-online,
  .bsfw-main__more-cell a,
  .bsfw-main__title-row h2,
  .bsfw-main__query-card,
  .bsfw-main__query-card img,
  .bsfw-main__query-label,
  .bsfw-main__portal-link,
  .bsfw-main__portal-link img,
  .bsfw-main__one-title,
  .bsfw-main__one-card,
  .bsfw-main__one-card img {
    transition: none !important;
  }

  .bsfw-main__hero-link:hover .bsfw-main__hero-icon-wrap,
  .bsfw-main__hero-link:hover .bsfw-main__hero-icon-wrap img,
  .bsfw-main__hero-link:active .bsfw-main__hero-icon-wrap,
  .bsfw-main__btn-online:hover,
  .bsfw-main__query-card:hover,
  .bsfw-main__query-card:hover img,
  .bsfw-main__portal-link:hover,
  .bsfw-main__portal-link:hover img,
  .bsfw-main__one-title:hover,
  .bsfw-main__one-card:hover,
  .bsfw-main__one-card:hover img {
    transform: none !important;
  }

  .bsfw-main__table-wrap:hover {
    box-shadow: var(--bsfw-shadow);
  }

  .bsfw-main__query-card:hover {
    box-shadow: none;
    background: none;
  }

  .bsfw-main__portal-link:hover {
    box-shadow: none;
  }

  .bsfw-main__one-card:hover {
    box-shadow: none;
  }
}
