
/* =========================
   ✅ 与 articleDetail 同款：页面底部留白 + 不影响头尾
   ========================= */
.article-page{
  --page-bottom-gap: 24px;
  padding-bottom: var(--page-bottom-gap);
  overflow: visible !important;
}
.article-inner{ width:100%; }

/* ✅ 移动端：中间区域左右缩进 5px（只作用于正文区域） */
@media (max-width: 991px){
  .article-inner{
    padding-left: 5px !important;
    padding-right: 5px !important;
    box-sizing:border-box;
  }
}

/* =========================
   顶部分类行
   ========================= */
.breadcrumb-line{
  display:flex;
  align-items:center;
  gap:8px;
  color:#8a8a8a;
  font-size:13px;
  margin:0 0 12px 0;
  flex-wrap:wrap;
}
.breadcrumb-line a{ color:#FFFFFF; text-decoration:none; }
.breadcrumb-line a:hover{ color:#0d6efd; }
.breadcrumb-sep{ color:#b6b6b6; }

.bc-cat{
  display:inline-flex;
  align-items:center;
  padding:6px 12px;
  border-radius:999px;
  background:#404553;
  color:#eaeaea;
  font-size:13px;
  text-decoration:none;
}
.bc-cat.active{ font-weight:900; color:#fff; background:#0d6efd; }

/* =========================
   两栏布局（结构必须和 detail 一样）
   ========================= */
.article-row{
  display:flex !important;
  gap:16px !important;
  align-items:flex-start !important;
}
.article-main{
  flex:1 !important;
  min-width:0 !important;
}
.article-side{
  width:330px;
  flex:0 0 330px;
  position:relative; /* ✅ 必须：is-abs 的参照物 */
}

/* ✅ 桌面端：让右侧列拉伸到整行高度（否则左右底部不齐） */
@media (min-width: 992px){
  .article-side{ align-self:stretch; }
}

/* 小屏：上下结构 */
@media (max-width: 991px){
  .article-row{ flex-direction:column !important; }
  .article-side{
    width:auto;
    flex:1 1 auto;
    position: static;
    align-self:auto;
  }
}

/* =========================
   ✅ 右侧“见底才固定”的状态样式（同 articleDetail）
   ========================= */
@media (min-width: 992px){
  #rightSidebarInner{ width:100%; }

  /* 见底后：固定在视窗底部 */
  #rightSidebarInner.is-fixed{
    position:fixed;
    top:auto;
    bottom: var(--page-bottom-gap);
    z-index: 20;
  }

  /* 页面接近底部：解除 fixed，吸在右侧列底部 */
  #rightSidebarInner.is-abs{
    position:absolute;
    top:auto;
    bottom:0;
    left:0;
    width:100%;
  }
}

/* =========================
   幻灯片（支持 controller 传 $featured）
   ========================= */
.featured-wrap{
  border-radius:5px;
  overflow:hidden;
  background:#fff;
  box-shadow:0 8px 24px rgba(0,0,0,.08);
  margin:0;
  position:relative;
}
.featured-ratio{
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 1;
  overflow:hidden;
}
@supports not (aspect-ratio: 3 / 1){
  .featured-ratio{ height:0; padding-top:33.333%; }
}
.featured-img{
  position:absolute !important;
  left:0; top:0;
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  display:block !important;
}
#featuredCarousel .carousel-inner{ position:relative; }
#featuredCarousel .carousel-item{ display:none !important; position:relative; }
#featuredCarousel .carousel-item.active{ display:block !important; }

.featured-caption{
  position:absolute;
  left:0; right:0; bottom:0;
  pointer-events:none;
  z-index:3;
}
.featured-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  background:rgba(0,0,0,.35);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.featured-text{ min-width:0; text-shadow:0 2px 10px rgba(0,0,0,.55); }
.featured-text .title{
  font-size:16px;
  line-height:1.25;
  font-weight:900;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.featured-text .title a{
  color:#fff;
  text-decoration:none;
  pointer-events:auto;
}
.featured-text .title a:hover{ text-decoration:underline; }

#featuredCarousel .carousel-indicators{
  position:absolute !important;
  right:14px !important;
  bottom:12px !important;
  left:auto !important;
  margin:0 !important;
  padding:0 !important;
  display:flex !important;
  gap:8px !important;
  justify-content:flex-end !important;
  z-index:50 !important;
  pointer-events:auto !important;
}
#featuredCarousel .carousel-indicators button{
  width:8px !important;
  height:8px !important;
  border-radius:50% !important;
  border:0 !important;
  padding:0 !important;
  background:rgba(255,255,255,.45) !important;
  opacity:1 !important;
  margin:0 !important;
  cursor:pointer;
}
#featuredCarousel .carousel-indicators button.active{
  background:rgba(255,255,255,.95) !important;
}

/* 广告图 */
.ad-wrap{ margin-top:10px; }
.ad-imges{
  display:block !important;
  border-radius:5px;
  box-shadow:0 8px 24px rgba(0,0,0,.08);
  width:100%;
  height:auto;
}

/* =========================
   文章卡片网格
   ========================= */
.post-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:10px;
  margin-top:12px;
}
@media (max-width: 767px){
  .post-grid{ grid-template-columns:1fr; }
}

.post-card{
  background:#fff;
  border-radius:5px;
  overflow:hidden;
  box-shadow:0 8px 24px rgba(0,0,0,.08);
}
.post-card a{ display:block; }

/* 图片外层：按比例铺满 */
.post-thumb-wrap{
  width:100%;
  aspect-ratio: 533 / 300;
  overflow:hidden;
  background:#f3f4f6;
}
@supports not (aspect-ratio: 533 / 300){
  .post-thumb-wrap{ position:relative; height:0; padding-top:56.29%; }
  .post-thumb{ position:absolute; left:0; top:0; }
}
.post-thumb{
  width:100% !important;
  height:100% !important;
  object-fit: cover !important;
  display:block !important;
}

.post-body{ padding:10px 12px; }
.post-title{ margin:0; font-size:14px; line-height:1.35; font-weight:900; }
.post-title a{ color:#111; text-decoration:none; }
.post-title a:hover{ color:#0d6efd; }

.post-excerpt{
  margin-top:8px;
  font-size:13px;
  color:#8a8a8a;
  line-height:1.55;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.post-meta{
  margin-top:8px;
  font-size:12px;
  color:#8a8a8a;
  display:flex;
  justify-content:center;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}
.post-meta a{ color:#8a8a8a; text-decoration:none; }
.post-meta a:hover{ text-decoration:underline; }
.meta-item{ display:inline-flex; align-items:center; gap:6px; }
.meta-icon{ width:14px; height:14px; opacity:.9; display:inline-block; }

/* =========================
   ✅ 分页背景框：和左侧同宽（放在 article-main 内天然一致）
   上下间距一致
   ========================= */
.pager-wrap{
  margin-top: 14px;
  margin-bottom: 0 !important;
  background:#fff;
  border-radius:5px;
  box-shadow:0 8px 24px rgba(0,0,0,.08);
  padding: 16px 12px;
  display:flex;
  justify-content:center;
  align-items:center;
}
.pager-wrap .pagination{ margin:0 !important; }



/* 搜索框（不影响你原来的 article.css） */
.article-search{ margin: 12px 0 10px 0; }
.article-search-form{
  display:flex; gap:10px; align-items:center;
  background:#fff; border-radius:5px;
  padding:10px; box-shadow:0 8px 24px rgba(0,0,0,.06);
}
.article-search-input{
  flex:1; height:40px; border:1px solid rgba(17,24,39,.12);
  border-radius:5px; padding:0 12px; outline:none;
}
.article-search-input:focus{ border-color:#0d6efd; }
.article-search-btn{
  height:40px; padding:0 14px; border:none;
  border-radius:5px; background:#0d6efd; color:#fff; font-weight:700;
}
.article-search-clear{
  height:40px; display:inline-flex; align-items:center;
  padding:0 10px; border-radius:5px; color:#6b7280; text-decoration:none;
}
.article-search-clear:hover{ background:rgba(0,0,0,.04); }
.article-search-tip{ margin-top:8px; font-size:13px; color:#d1523c; }
.article-empty{
  background:#fff; border-radius:5px;
  padding:18px; margin-top:12px;
  box-shadow:0 8px 24px rgba(0,0,0,.06);
  color:#6b7280; font-size:14px;
}

