/* ============================================================
   zf.css — Government page styles
   设计稿: 1920px, 内容区 1400px, SCALE=1
   单位: rem (1rem = 100px at 1400px viewport)
   所有尺寸来自 DSL layoutStyle 坐标计算
   ============================================================ */

/* ============================================================
   Section 1: Hero (y=198, mode: FULL_BG)
   DSL: Rectangle 36, x=0, y=198, w=1920, h=578, bg=#F7FBFF
   ============================================================ */
.government-hero {
  position: relative;
  background-color: #f7fbff;
  /* DSL: section h=578 → 5.78rem, but let content drive height */
  padding-top: 0.2rem; /* DSL: title y=312-198=114px → 1.14rem */
  padding-bottom: 0.2rem; /* DSL: deco line bottom(631+4=635) - section top(198)=437; 578-437=141px →  adjusted */
  overflow: hidden;
}
.government-hero-lf {
  padding: 0.8rem 0 0;
}
.government-hero__inner {
  position: relative;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: start;
  align-items: flex-start;
  -ms-flex-pack: justify;
  justify-content: space-between;
  min-height: 5.38rem; /* DSL: hero image h=538 → 5.38rem */
}

/* DSL: title Frame, x=295, y=312, w=572, h=52 */
/* font_4:0010: Inter Bold 40px, lineHeight=57, color=#000 */
.government-hero__title {
  display: block;
  font-size: 0.4rem; /* DSL: font_4:0010 size=40 → 0.4rem */
  font-weight: 700;
  color: #000000; /* DSL: paint_4:146 #000000 */
  line-height: 0.57rem; /* DSL: lineHeight=57 → 0.57rem */
  margin-bottom: 0.38rem; /* DSL: desc y=402 - title bottom(312+52=364) = 38px → 0.38rem */
}

/* DSL: description text, x=295, y=402, w=657, h=130 */
/* font_4:2117: Inter Regular 24px, lineHeight=229, case=capitalize */
.government-hero__desc {
  font-size: 0.24rem; /* DSL: font_4:2117 size=24 → 0.24rem */
  font-weight: 400;
  color: #3d3d3d; /* DSL: paint_4:0042 #3D3D3D */
  line-height: 2.29; /* DSL: lineHeight=229 → 2.29 */
  max-width: 6.57rem; /* DSL: w=657 → 6.57rem */
}

/* DSL: 矩形 63, x=295, y=631, w=89, h=4 */
.government-hero__deco {
  width: 0.89rem; /* DSL: w=89 → 0.89rem */
  height: 0.04rem; /* DSL: h=4 → 0.04rem */
  background-color: #004190; /* DSL: paint_9:00727 #004190 */
}

/* DSL: hero image, x=985, y=218, w=614, h=538 */
.government-hero__image {
  width: 6.14rem; /* DSL: w=614 → 6.14rem */
  height: 5.38rem; /* DSL: h=538 → 5.38rem */
}

.government-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* IE10 忽略，由下方 min 尺寸撑满容器 */
  min-width: 100%;
  min-height: 100%;
}

/* ============================================================
   Section 2: Department (y=817, mode: CONTAINED)
   DSL: title x=762, w=397, h=66.7; more x=1580, w=62.9, h=20
   ============================================================ */
.government-department {
  padding-top: 0.41rem; /* DSL: gap from hero bottom(198+578=776) to dept top(817) = 41px → 0.41rem */
  padding-bottom: 0.12rem; /* DSL: dept bottom ~1448 to pagination y=1506, gap ~58px → adjusted */
}

/* Header: title + more link */
.government-department__header {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-pack: center;
  justify-content: center;
  -ms-flex-align: center;
  align-items: center;
  position: relative;
  height: 0.4rem;
  margin-bottom: 0.52rem;
}

/* DSL: "Department" text, x=762, w=397, h=66.7, font=SHS Bold 40px */
.government-department__title {
  font-family: "Source Han Sans", "Inter", sans-serif;
  font-size: 0.4rem; /* DSL: font_4:1593 size=40 → 0.4rem */
  font-weight: 700;
  color: #000000;
  line-height: 1;
  text-align: center;
}

/* DSL: more link, x=1580, y=840, w=62.9, h=20, font=Inter Bold 14px */
.government-department__more {
  position: absolute;
  right: 0;
  top: 0.1rem;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: center;
  align-items: center;

  font-size: 0.14rem; /* DSL: font_4:0718 size=14 → 0.14rem */
  font-weight: 700;
  color: #006bc3; /* DSL: paint_4:0712 #006BC3 */
  text-decoration: none;
  transition: opacity 0.2s;
}

.government-department__more:hover {
  opacity: 0.8;
}

.government-department__more-icon {
  width: 0.16rem;
  height: 0.16rem;
  margin-left: 0.07rem; /* 替代 gap */
}

/* Department swiper container */
.government-department__swiper {
  overflow: hidden;
}

.government-department__swiper .swiper-slide {
  height: auto;
}

/* Department list: 双列布局（由 flex-btw 控制，IE10 不用 grid） */
.government-department__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* DSL: each row has dot, text, arrow, divider */
.government-department__item {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: center;
  align-items: center;
  padding: 0.2rem 0.1rem 0.2rem 0; /* adjusted */
  border-bottom: 1px solid #ececec; /* DSL: paint_167:01211 #ECECEC */
  position: relative;
  width: 48.5%;
}
/* DSL: dot (Ellipse), size 6x6, color #ADC6E2 */
.government-department__dot {
  width: 0.06rem;
  height: 0.06rem;
  border-radius: 50%;
  background-color: #adc6e2; /* DSL: paint_167:01204 #ADC6E2 */
  -ms-flex-negative: 0;
  flex-shrink: 0;
  margin-right: 0.15rem;
}

/* DSL: department text, font=Inter Regular 18px, color=#3D3D3D */
.government-department__item a {
  -ms-flex: 1;
  flex: 1;

  font-size: 0.18rem; /* DSL: font_167:01196 size=18 → 0.18rem */
  font-weight: 400;
  color: #3d3d3d; /* DSL: paint_4:0042 #3D3D3D */
  line-height: 1.5;
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.government-department__item a:hover {
  color: #006bc3;
}

/* DSL: arrow icon, x=913 or 1626, size 14x14 */
.government-department__arrow {
  -ms-flex-negative: 0;
  flex-shrink: 0;
  margin-left: 0.1rem;
  width: 0.14rem;
  height: 0.14rem;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: center;
  align-items: center;
  -ms-flex-pack: center;
  justify-content: center;
}

.government-department__arrow svg {
  width: 100%;
  height: 100%;
}

/* ============================================================
   Section 2b: Department Pagination (inside Department module)
   Uses Swiper built-in pagination with custom renderBullet
   ============================================================ */
.government-department__pagination {
  position: static !important;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-pack: center;
  justify-content: center;
  -ms-flex-align: center;
  align-items: center;
  padding-top: 0.57rem;
  padding-bottom: 0.57rem;
  width: auto !important;
  z-index: auto;
}

.government-department__pagination .swiper-pagination-bullet {
  min-width: 0.25rem;
  width: auto;
  height: auto;
  line-height: 0.25rem;
  border-radius: 0;
  background-color: #deecff;
  cursor: pointer;
  transition: background-color 0.2s;
  color: #ffffff;
  font-size: 0.16rem;
  text-align: center;
  white-space: nowrap;
  padding: 0 0.02rem;
  margin: 0 !important;
  opacity: 1;
}

/* 分页间距，替代 gap */
.government-department__pagination
  .swiper-pagination-bullet
  + .swiper-pagination-bullet {
  margin-left: 0.22rem !important;
}

.government-department__pagination .swiper-pagination-bullet-active {
  background-color: #006bc3;
}

.government-department__pagination .swiper-pagination-bullet:hover {
  opacity: 0.8;
}

/* ============================================================
   Section 4: Yearbooks (y=1588, mode: FULL_BG)
   DSL: bg x=0, y=1588, w=1920, h=600, gradient #EFF5FF→#F3F7FF
   ============================================================ */
.government-yearbooks {
  background: linear-gradient(
    180deg,
    #eff5ff 0%,
    #f3f7ff 100%
  ); /* DSL: paint_167:01249 */
  padding-top: 0.59rem; /* DSL: title y=1647 - section top(1588) = 59px → 0.59rem */
  padding-bottom: 0.9rem; /* adjusted for cards bottom + padding */
}

/* DSL: "Yearbooks" title, x=853, w=213, h=20, font=Inter Bold 40px */
.government-yearbooks__title {
  font-size: 0.4rem; /* DSL: font_4:144 size=40 → 0.4rem */
  font-weight: 700;
  color: #000000;
  text-align: center;
  line-height: 1;
  margin-bottom: 0.52rem;
  display: block;
}

/* Cards layout */
.government-yearbooks__list {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-pack: center;
  justify-content: center;
}

/* DSL: card gap ~40px → 0.4rem，用 margin 替代 gap */
.government-yearbooks__card + .government-yearbooks__card {
  margin-left: 0.4rem;
}

/* DSL: Card 1, x=260, y=1724, w=438, h=398 */
.government-yearbooks__card {
  width: 4.38rem; /* DSL: w=438 → 4.38rem */
  height: 3.98rem; /* DSL: h=398 → 3.98rem */
  background-color: #ffffff; /* DSL: paint_1:3 #FFFFFF */
  overflow: hidden;
  position: relative;
  -ms-flex-negative: 0;
  flex-shrink: 0;
  padding: 0.15rem 0.15rem 0;
}

/* DSL: image, x=274, y=1739, w=413, h=274 */
/* relative to card: left=274-260=14px, top=1739-1724=15px */
.government-yearbooks__card-image {
  position: relative;
  height: 2.74rem; /* DSL: h=274 → 2.74rem */
  overflow: hidden;
}

.government-yearbooks__card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-width: 100%;
  min-height: 100%;
}

/* DSL: card title, x=255, y=2034, w=407, h=60 */
.government-yearbooks__card {
  display: block;
  text-decoration: none;
  color: inherit;
}
.government-yearbooks__card-title-box {
  height: 1.09rem;
  padding-bottom: 0.05rem;
}
.government-yearbooks__card-title {
  padding-left: 0.25rem;
  position: relative;
}

.government-yearbooks__card-title::before {
  content: "";
  -ms-flex-negative: 0;
  flex-shrink: 0;
  width: 0.06rem;
  height: 0.06rem;
  border-radius: 50%;
  background-color: #1d62bd;
  position: absolute;
  left: 0.02rem;
  top: 0.14rem;
}

.government-yearbooks__card-title {
  font-size: 0.2rem; /* DSL: font_167:01201 size=20 → 0.2rem */
  font-weight: 400;
  color: #000000;
  line-height: 1.5;
  transition:
    color 0.2s,
    font-weight 0.2s;
}

.government-yearbooks__card:hover .government-yearbooks__card-title {
  color: #004a99;
  font-weight: 700;
}

/* ============================================================
   Section 5: Sister Cities & Consulates (y=2240, mode: CONTAINED)
   DSL: cards x=263/978, y=2240, w=682, h=267
   ============================================================ */
.government-partners {
  padding-top: 0.52rem; /* DSL: gap from Yearbooks bottom(1588+600=2188) to Partners top(2240) = 52px → 0.52rem */
  padding-bottom: 0.52rem; /* DSL: gap to Footer top(2559) - Partners bottom(2240+267=2507) = 52px → 0.52rem */
}

.government-partners__inner {
  display: -ms-flexbox;
  display: flex;
}

/* DSL: card gap = 978-(263+682) = 33px → 0.33rem，用 margin 替代 gap */
.government-partners__card + .government-partners__card {
  margin-left: 0.33rem;
}

/* DSL: Card x=263, y=2240, w=682, h=267 */
.government-partners__card {
  position: relative;
  width: 6.82rem; /* DSL: w=682 → 6.82rem */
  height: 2.67rem; /* DSL: h=267 → 2.67rem */
  overflow: hidden;
  display: block;
  text-decoration: none;
}

.government-partners__card-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-width: 100%;
  min-height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

/* ============================================================
   Responsive — 参考最新动态 @media (max-width: 1024px)
   ============================================================ */
@media screen and (max-width: 1024px) {
  /* === Hero === */
  .government-hero {
    padding: 0.4rem 0.25rem;
  }

  .government-hero__inner {
    min-height: auto;
  }

  .government-hero-lf {
    padding-top: 0;
  }

  .government-hero__title {
    line-height: 1.3;
    margin-bottom: 0.2rem;
  }

  .government-hero__desc {
    font-size: 0.28rem;
    line-height: 1.6;
    max-width: 100%;
  }
  .government-hero__image {
    width: 100%;
    height: auto;
    margin-top: 0.3rem;
  }

  .government-hero__image img {
    width: 100%;
    height: auto;
  }

  /* === Department === */
  .government-department {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    box-sizing: border-box;
  }

  .government-department__header {
    padding: 0;
    margin-bottom: 0.3rem;
  }

  .government-department__title {
    line-height: 1.3;
  }

  .government-department__more {
    font-size: 0.25rem;
    right: 0;
  }

  .government-department__list {
    -ms-flex-direction: column;
    flex-direction: column;
    -ms-flex-wrap: nowrap;
    flex-wrap: nowrap;
  }

  .government-department__item {
    width: 100%;
    box-sizing: border-box;
  }

  .government-department__item a {
    font-size: 0.28rem;
    line-height: 0.4rem;
  }

  /* Pagination 移动端适配 */
  .government-department__pagination {
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
  }

  .government-department__pagination .swiper-pagination-bullet {
    font-size: 0.25rem;
    min-width: 0.35rem;
    line-height: 0.35rem;
  }

  /* === Yearbooks === */
  .government-yearbooks {
    padding: 0.3rem 0.25rem;
    box-sizing: border-box;
  }

  .government-yearbooks__title {
    line-height: 1.3;
    margin-bottom: 0.3rem;
  }

  .government-yearbooks__list {
    -ms-flex-direction: column;
    flex-direction: column;
    -ms-flex-align: center;
    align-items: center;
  }

  .government-yearbooks__card + .government-yearbooks__card {
    margin-left: 0;
    margin-top: 0.3rem;
  }

  .government-yearbooks__card {
    width: 100%;
    height: auto;
  }

  /* 移动端图片比例参照 PC：PC 图片区宽 4.08rem / 高 2.74rem（padding 比例替代 aspect-ratio） */
  .government-yearbooks__card-image {
    height: 0;
    padding-bottom: 67.16%; /* 2.74 / 4.08 */
  }

  .government-yearbooks__card-image img {
    position: absolute;
    top: 0;
    left: 0;
  }

  .government-yearbooks__card-title {
    font-size: 0.28rem;
  }

  /* === Partners === */
  .government-partners {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    box-sizing: border-box;
  }

  .government-partners__inner {
    -ms-flex-direction: column;
    flex-direction: column;
    -ms-flex-align: center;
    align-items: center;
  }

  .government-partners__card + .government-partners__card {
    margin-left: 0;
    margin-top: 0.3rem;
  }

  /* 移动端卡片比例参照 PC：PC w=6.82rem / h=2.67rem（padding 比例替代 aspect-ratio） */
  .government-partners__card {
    width: 100%;
    height: 0;
    padding-bottom: 39.15%; /* 2.67 / 6.82 */
  }
  .government-yearbooks__card-title::before {
    top: 0.22rem;
  }
}
