/* ============================================================
   ip-news-swiper.css
   Latest News module: real Swiper 11 carousel (4/3/2/1 per row)
   All rules are scoped under .ip-news-swiper / .ip-news-*
   ============================================================ */

/* ---- Swiper base layout (scoped copy of swiper-bundle essentials) ---- */
.ip-news-swiper.swiper {
  position: relative;
  display: block;
  overflow: hidden;
  list-style: none;
  margin: 0;
  /* 左右 16px 内边距作为卡片 box-shadow 的安全区：Swiper 容器必须
     overflow:hidden，首尾卡片贴边时外侧阴影会被裁掉。padding 在容器
     内部（border-box），总宽仍不超过 1280，Swiper 按内容区重算 slide 宽。
     与参考站 lsrpf.com 新闻轮播的 !p-4 处理一致。 */
  padding: 12px 16px 16px;
  box-sizing: border-box;
  z-index: 1;
}

.ip-news-swiper .swiper-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: flex;
  box-sizing: content-box;
  transition-property: transform;
}

.ip-news-swiper .swiper-android .swiper-slide,
.ip-news-swiper .swiper-wrapper {
  transform: translate3d(0px, 0px, 0px);
}

.ip-news-swiper .swiper-pointer-events {
  touch-action: pan-y;
}

.ip-news-swiper .swiper-slide {
  flex-shrink: 0;
  width: 100%;
  height: auto;
  position: relative;
  display: flex;
  transition-property: transform;
}

/* ---- Cards stretch to equal height ---- */
.ip-news-swiper .swiper-slide > a {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.ip-news-swiper .swiper-slide .px-4.py-6 {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

/* Hide the free space when the slide happens to be wider than its card */
.ip-news-swiper.swiper-backface-hidden .swiper-slide {
  backface-visibility: hidden;
}

/* ---- Pagination row (centered bullets only, no arrows) ---- */
/* !important + double-class specificity: override swiper-bundle.min.css's
   default .swiper-pagination absolute positioning regardless of load order */
.ip-news-nav {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex !important;
  align-items: center;
  justify-content: center !important;
  text-align: center !important;
  margin: 14px auto 0;
}

/* ---- Pagination bullets ----
   设计：克制的小圆点 + 站点蓝胶囊激活态（简洁大气）。
   idealpro.css 的全局 .swiper-pagination-bullet 规则（圆环套中心点）
   全部带 !important，这里用更高特异性 (0,3,0) 的 scoped 选择器整体重置，
   并清掉其 ::after 中心点、border 与 margin。 */
.swiper-pagination.ip-news-pagination {
  position: static !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: auto !important;
  display: flex !important;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  text-align: center !important;
  gap: 10px;
  z-index: 2;
}

.swiper-pagination.ip-news-pagination .swiper-pagination-bullet {
  width: 8px !important;
  height: 8px !important;
  margin: 0 !important;
  padding: 0;
  border: none !important;
  border-radius: 999px;
  background: #d3dae4 !important;
  opacity: 1 !important;
  cursor: pointer;
  transition: width .3s ease, background-color .3s ease;
}

/* 清掉全局“圆环 + 中心点”的中心黑点 */
.swiper-pagination.ip-news-pagination .swiper-pagination-bullet::after {
  content: none !important;
}

.swiper-pagination.ip-news-pagination .swiper-pagination-bullet:hover {
  background: #aab6c6 !important;
}

.swiper-pagination.ip-news-pagination .swiper-pagination-bullet:focus-visible {
  outline: 2px solid rgba(51, 131, 255, .35);
  outline-offset: 3px;
}

/* 激活态：横向胶囊，站点主蓝 */
.swiper-pagination.ip-news-pagination .swiper-pagination-bullet-active {
  width: 24px !important;
  height: 8px !important;
  margin: 0 !important;
  background: #3383ff !important;
  cursor: default;
}

.swiper-pagination.ip-news-pagination .swiper-pagination-bullet-active:hover {
  background: #3383ff !important;
}

@media (max-width: 639.98px) {
  .ip-news-swiper.swiper {
    padding: 12px 12px 12px;
  }
}
