/* ============================================================
   首页样式（装饰风格参考 arrro.cityu-dg.edu.cn）
   ============================================================ */

/* ---------- Banner 轮播 ---------- */
.home-banner-wrap {
  background: var(--t-magenta);
  position: relative;
  width: 100%;
  height: 37.5vw;
  max-height: 7.2rem;
  min-height: 3.6rem;
}
.home-banner-wrap .swiper { overflow: hidden; height: 100%; position: relative; }
.home-banner-wrap .slide-content {
  width: 100%; height: 100%; position: absolute; inset: 0;
  opacity: 0; transition: opacity .8s ease; z-index: 1;
}
.home-banner-wrap .slide-content.active { opacity: 1; z-index: 2; }
/* 渐变 + 大圆装饰背景（纯 CSS，替代参考站的图片轮播） */
.home-banner-wrap .slide-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 82% 30%, hsl(var(--th-hue-1, 307) 80% 60% / .55) 0%, transparent 42%),
    radial-gradient(circle at 60% 100%, rgba(var(--t3-rgb), .5) 0%, transparent 35%),
    linear-gradient(-90deg, var(--t1) 0%, var(--t2) 48%, var(--t3) 100%);
}
.home-banner-wrap .slide-bg::after {
  content: " "; position: absolute; right: -4rem; top: -5rem;
  width: 13rem; height: 13rem; border-radius: 50%;
  background: rgba(255, 255, 255, .09);
}
.home-banner-wrap .slide-bg::before {
  content: " "; position: absolute; left: 52%; bottom: -3rem;
  width: 8rem; height: 8rem; border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, .25);
}

.home-banner-wrap .banner-title {
  position: absolute; bottom: 4.5vw; left: calc(50% - 44vw);
  max-width: 88vw; height: calc(100% - 4.5vw);
  display: flex; flex-direction: column; justify-content: center;
  z-index: 3;
}
.home-banner-wrap .banner-title .text { line-height: 1; color: #fff; }
.home-banner-wrap .pre-text {
  font-family: var(--font-display);
  font-size: .24rem; color: var(--t-accent); letter-spacing: .25em;
  text-transform: uppercase; margin-bottom: .18rem; font-weight: 700;
}
.home-banner-wrap .pre-text { filter: brightness(1.25) saturate(1.2); } /* 深色底上保证可读 */
.home-banner-wrap .pre-text strong { font-size: .4rem; }
.home-banner-wrap .banner-title .title {
  text-transform: uppercase;
  font-size: .72rem; line-height: 1.18;
  font-family: var(--font-display); font-weight: 900;
  background-clip: text; -webkit-background-clip: text;
  background-image: var(--grad-main);
  color: transparent;
  filter: drop-shadow(2px 2px 0 #fff);
  margin-bottom: .24rem;
}
.home-banner-wrap .content { color: #fff; margin-bottom: .3rem; }
.home-banner-wrap .content h3 { font-weight: 700; font-size: .26rem; line-height: 1.4; }
.home-banner-wrap .content p { font-weight: 400; font-size: .2rem; line-height: 1.5; opacity: .9; }
.home-banner-wrap .more_btn {
  white-space: nowrap; display: inline-block; width: 1.9rem; height: .56rem;
  border-radius: .3rem; font-weight: 700; font-size: .2rem; color: #fff;
  line-height: .54rem; text-align: center;
  background: var(--t-accent);
  transition: .3s;
}
.home-banner-wrap .more_btn:hover { filter: saturate(1.5); transform: translateX(6px); }
/* 胶囊右箭头（CSS 三角） */
.home-banner-wrap .more_btn::after {
  content: ""; display: inline-block; vertical-align: middle; margin-left: .1rem;
  width: .09rem; height: .09rem; border-top: 2px solid #fff; border-right: 2px solid #fff;
  transform: rotate(45deg) translateY(-1px);
}

/* 轮播圆点 */
.home-banner-wrap .swiper-control { position: absolute; bottom: .16rem; left: 0; width: 100%; z-index: 9; }
.home-banner-wrap .swiper-pagination { padding: 0 20px; display: flex; gap: 8px; }
.home-banner-wrap .swiper-pagination-bullet {
  width: 12px; height: 12px; border-radius: 6px; background: #fff;
  opacity: 1; transition: .3s; cursor: pointer;
}
.home-banner-wrap .swiper-pagination-bullet.active { background: var(--t-accent); width: 36px; }

/* ---------- 区块通用 ---------- */
.center-content { background: #fff; }
.content-area { position: relative; overflow: hidden; }
.content-area .page-content { position: relative; z-index: 1; }
.content-area .box .box-content { margin-top: .18rem; }

/* ---------- 区块一：公告 + 重要日期 ---------- */
.content-area.a1 {
  background:
    radial-gradient(circle at 95% 0%, rgba(var(--t3-rgb), .07) 0%, transparent 30%),
    #fff;
  padding: .8rem 0 1rem;
}
.content-area.a1::before {
  content: " "; position: absolute; right: -4rem; top: -5rem;
  width: 7.4rem; height: 7.4rem; background: var(--t-accent); border-radius: 50%;
  opacity: .12;
}
.content-area.a1 .home-cols { display: flex; gap: .4rem; }
.content-area.a1 .home-cols .left { flex: auto; min-width: 0; }
.content-area.a1 .home-cols .right { flex: none; width: 5.4rem; }
.content-area.a1 .pink-card-list .card-item { min-height: 1.1rem; margin-bottom: .1rem; }
.content-area.a1 .right .card-item { min-height: .92rem; }

/* ---------- 区块二：协会服务（大渐变 + 出血圆） ---------- */
.content-area.a2 {
  background: var(--grad-main);
  padding: .8rem 0;
}
.content-area.a2::before {
  content: " "; position: absolute; left: -5.2rem; bottom: -8rem;
  width: 12rem; height: 12rem; background: var(--t-accent); border-radius: 50%;
  opacity: .55;
}
.content-area.a2::after {
  content: " "; position: absolute; top: .8rem; right: .8rem;
  width: 6rem; height: 6rem; border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, .28);
}
.content-area.a2 .box-header .title {
  background: none; color: #fff; -webkit-text-fill-color: #fff;
}
.content-area.a2 .area-intro {
  margin-top: .2rem; font-weight: 500; font-size: .2rem; color: #fff; line-height: 1.8;
  max-width: 9rem;
}
.content-area.a2 .more.outline-w, .content-area.a2 .more.more-outline {
  background: transparent; border: 1px solid #fff;
}
.service-list { margin-top: .5rem; display: flex; justify-content: space-between; gap: .14rem; }
.service-list li {
  flex: 1; border-radius: .16rem; overflow: hidden; background: #fff;
  box-shadow: var(--shadow-card); transition: .35s;
}
.service-list li:hover { transform: translateY(-8px); }
.service-list li a { display: block; }
.service-list .pic_item .image {
  height: 2.5rem; position: relative; overflow: hidden;
  /* 封面色相随主题旋转（--sv 由 JS 注入，--th-off 由主题系统控制） */
  background: linear-gradient(135deg,
    hsl(calc(var(--sv, 320deg) + var(--th-off, 0deg)) 70% 55%),
    hsl(calc(var(--sv, 320deg) + var(--th-off, 0deg) + 40deg) 80% 45%));
}
.service-list .pic_item .svc-icon {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, .92);
}
.service-list .pic_item .svc-icon svg { width: .7rem; height: .7rem; transition: .4s; }
.service-list li:hover .svc-icon svg { transform: scale(1.18) rotate(-6deg); }
/* 自定义图标（后台上传图片，优先于预置 SVG） */
.service-list .pic_item .svc-icon img { width: .8rem; height: .8rem; object-fit: contain; display: block; transition: .4s; }
.service-list li:hover .svc-icon img { transform: scale(1.18) rotate(-6deg); }
.service-list .text {
  position: relative;
  display: flex; align-items: center; height: .8rem; padding: 0 .5rem .26rem;
  font-weight: 700; font-size: .2rem; color: var(--c-text);
  background: var(--c-pink-bg);
}
.service-list .text::after {
  content: ""; position: absolute; right: .24rem; top: 50%;
  width: .09rem; height: .09rem;
  border-top: 2px solid var(--t-accent); border-right: 2px solid var(--t-accent);
  transform: translateY(-70%) rotate(45deg);
}
.service-list li:hover .text { color: var(--c-magenta); }
/* 「查看更多」渐变卡 */
.service-list .more_item {
  background-image: linear-gradient(171deg, var(--t2) 1%, var(--t-footer-end) 100%);
  position: relative; display: flex;
}
.service-list .more_item a { flex: 1; position: relative; overflow: hidden; display: flex; }
.service-list .more_item a::before {
  content: " "; position: absolute; right: -.4rem; bottom: -.4rem;
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  background: rgba(255, 255, 255, .18); transition: .5s;
}
.service-list .more_item a:hover::before { transform: scale(1.25); }
.service-list .more_item .text {
  background: none; color: #fff; align-self: flex-end;
}
@media screen and (max-width: 1200px) {
  .service-list { flex-wrap: wrap; }
  .service-list li { flex: calc(33.3% - .1rem); }
}
@media screen and (max-width: 840px) {
  .service-list li { flex: calc(50% - .08rem); }
}

/* ---------- 区块三：精选项目 ---------- */
.content-area.a3 { background: #fff; padding: .8rem 0; }
.project-list { margin-top: .3rem; display: flex; gap: .3rem; }
.project-card {
  flex: 1; background: var(--c-pink-bg); border-radius: .14rem;
  padding: .3rem; transition: .3s; position: relative; overflow: hidden;
}
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card); }
.project-card .card-link { display: block; }
.project-card::after {
  content: " "; position: absolute; right: -1rem; top: -1rem;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: rgba(var(--t3-rgb), .12); transition: .4s;
}
.project-card:hover::after { transform: scale(1.3); }
.p-head { display: flex; align-items: center; gap: .16rem; position: relative; }
.p-logo {
  width: .66rem; height: .66rem; border-radius: .18rem; flex: none;
  color: #fff; font-weight: 900; font-size: .3rem;
  display: flex; align-items: center; justify-content: center;
}
.p-title { flex: 1; min-width: 0; }
.p-title h3 { font-size: .24rem; font-weight: 900; color: var(--c-text); line-height: 1.2; }
.p-title h3 small { font-size: .13rem; font-weight: 600; color: #999; margin-left: .06rem; letter-spacing: .05em; }
.p-field { font-size: max(11px, .14rem); color: var(--c-accent); font-weight: 600; }
.p-intro { margin: .18rem 0; font-size: max(12px, .15rem); color: var(--c-text-2); line-height: 1.7; }
.p-tags { display: flex; flex-wrap: wrap; gap: .08rem; margin-bottom: .2rem; }
.p-progress { display: flex; align-items: center; gap: .12rem; }
.p-progress .bar { flex: 1; height: .1rem; background: #f0dede; border-radius: .05rem; overflow: hidden; }
.p-progress .bar i { display: block; height: 100%; background: var(--grad-main); border-radius: .05rem; transition: width 1s ease; }
.p-progress .pct { font-weight: 900; font-size: .18rem; color: var(--c-accent); font-family: var(--font-display); }
@media screen and (max-width: 1200px) {
  .project-list { flex-wrap: wrap; }
  .project-card { flex: calc(50% - .15rem); }
}
@media screen and (max-width: 840px) {
  .project-card { flex: 100%; }
}

/* ---------- 区块四：数据带 ---------- */
.stats-band {
  background:
    radial-gradient(circle at 15% 120%, rgba(var(--t3-rgb), .4) 0%, transparent 40%),
    linear-gradient(-90deg, var(--t1) 0%, var(--t2) 44%, var(--t3) 100%);
  padding: .7rem 0;
  position: relative; overflow: hidden;
}
.stats-band::after {
  content: " "; position: absolute; right: -2rem; top: -2.6rem;
  width: 5rem; height: 5rem; border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, .3);
}
.stats-row { display: flex; justify-content: space-between; gap: .3rem; position: relative; z-index: 1; }
.stats-row li { flex: 1; text-align: center; color: #fff; }
.stats-row li + li { border-left: 1px solid rgba(255, 255, 255, .3); }
.stats-row .num {
  display: block; font-family: var(--font-display); font-weight: 900;
  font-size: .6rem; line-height: 1.1;
  filter: drop-shadow(2px 2px 0 rgba(var(--t1-rgb), .5));
}
.stats-row .label { font-size: .18rem; font-weight: 600; opacity: .92; }
@media screen and (max-width: 840px) {
  .stats-row { flex-wrap: wrap; }
  .stats-row li { flex: 50%; margin-bottom: .2rem; }
  .stats-row li:nth-child(3) { border-left: none; }
}

/* ---------- 区块五：新闻 ---------- */
.content-area.a5 { background: #fff; padding: .8rem 0 1rem; }
.news-list { margin-top: .3rem; display: flex; gap: .3rem; }
.news-card {
  flex: 1; border-radius: .14rem; overflow: hidden; background: var(--c-pink-bg);
  transition: .3s;
}
.news-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card); }
.news-card a { display: block; }
.news-card .cover {
  height: 1.9rem; position: relative;
  background: linear-gradient(135deg,
    hsl(calc(var(--cv, 60deg) + var(--th-off, 0deg)) 65% 52%),
    hsl(calc(var(--cv, 60deg) + var(--th-off, 0deg) + 40deg) 75% 42%));
}
.news-card .cover .cat {
  position: absolute; left: .2rem; bottom: .2rem;
  background: rgba(255, 255, 255, .92); color: var(--c-rose);
  font-weight: 700; font-size: max(11px, .13rem);
  padding: .03rem .14rem; border-radius: .2rem;
}
.news-card .body { padding: .24rem .26rem .3rem; }
.news-card .meta {
  display: flex; justify-content: space-between; color: #a08a8a;
  font-size: max(11px, .13rem); margin-bottom: .1rem;
}
.news-card .meta span { display: inline-flex; align-items: center; gap: .04rem; }
.news-card .meta svg { width: .14rem; height: .14rem; }
.news-card .title { font-size: .2rem; font-weight: 700; color: var(--c-text); line-height: 1.5; margin-bottom: .1rem; }
.news-card .summary { font-size: max(12px, .14rem); color: var(--c-text-2); line-height: 1.7; }
.news-card .more-link {
  display: inline-flex; align-items: center; gap: .04rem; margin-top: .16rem;
  color: var(--c-accent); font-weight: 700; font-size: max(12px, .14rem);
}
.news-card .more-link svg { width: .14rem; height: .14rem; }
.news-card:hover .title { color: var(--c-rose); }
@media screen and (max-width: 1200px) {
  .news-list { flex-wrap: wrap; }
  .news-card { flex: calc(50% - .15rem); }
}
@media screen and (max-width: 840px) {
  .news-card { flex: 100%; }
}

/* ---------- 区块六：CTA ---------- */
.cta-wrap {
  background:
    radial-gradient(circle at 10% -40%, rgba(var(--t1-rgb), .45) 0%, transparent 45%),
    radial-gradient(circle at 90% 140%, rgba(var(--t3-rgb), .5) 0%, transparent 45%),
    linear-gradient(-90deg, var(--t1) 0%, var(--t2) 44%, var(--t3) 100%);
  padding: 1rem 0 1.1rem; position: relative; overflow: hidden;
}
.cta-wrap::before {
  content: " "; position: absolute; left: -3rem; bottom: -4rem;
  width: 9rem; height: 9rem; border-radius: 50%; background: rgba(255, 255, 255, .08);
}
.cta-inner {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  position: relative; z-index: 1; flex-wrap: wrap;
}
.cta-text h2 {
  font-family: var(--font-display); font-weight: 900; font-size: .52rem;
  line-height: 1.3; color: #fff; filter: drop-shadow(2px 2px 0 rgba(var(--t1-rgb), .5));
}
.cta-text p { margin-top: .2rem; color: rgba(255, 255, 255, .9); font-size: .18rem; }
.cta-btns { display: flex; gap: .24rem; flex-wrap: wrap; }
.btn-pill.btn-outline-w { background: transparent; border: 2px solid #fff; color: #fff; }
.btn-pill.btn-outline-w:hover { background: #fff; color: var(--c-magenta); }
@media screen and (max-width: 840px) {
  .content-area.a1 .home-cols { flex-wrap: wrap; }
  .content-area.a1 .home-cols .right { width: 100%; }
  .home-banner-wrap .banner-title .title { filter: drop-shadow(1px 1px 0 #fff); }
}

/* ============ 会员讨论区（首页：紧凑缩略条，评论数最多 2 条） ============ */
.content-area.a1b { background: var(--pink); padding: .24rem 0 .22rem; }
/* 左话题预览 + 右管理员配图（无图时话题条自动占满整行） */
.topics-strip { display: flex; align-items: stretch; gap: .2rem; }
.topics-strip-main { flex: 1; min-width: 0; }
.topics-strip-img {
  flex: none; width: 2.6rem; max-width: 30%;
  border: 1px solid var(--c-border); border-radius: .08rem; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: #fff; transition: box-shadow .25s;
}
.topics-strip-img:hover { box-shadow: 0 .04rem .14rem rgba(148, 8, 69, .1); }
.topics-strip-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 配图介绍文字（管理员后台可视化编辑）：上图下文纵向布局 */
.topics-strip-img.has-caption { flex-direction: column; align-items: stretch; }
.topics-strip-img.has-caption img { flex: 1; min-height: 0; }
.topics-strip-cap {
  flex: none; padding: .07rem .12rem; font-size: max(11px, .12rem); line-height: 1.5;
  color: var(--c-text2); text-align: center; background: #fff; border-top: 1px solid var(--c-border);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.hot-topic-list { display: flex; flex-direction: column; gap: .07rem; max-width: 860px; }
.hot-topic-list li { display: flex; align-items: center; gap: .14rem;
  background: #fff; border: 1px solid var(--c-border); border-radius: .08rem;
  padding: .09rem .18rem; transition: box-shadow .25s; }
.hot-topic-list li:hover { box-shadow: 0 .04rem .14rem rgba(148, 8, 69, .1); }
.hot-topic-list .ht-title { flex: 1; min-width: 0; font-size: max(12px, .145rem); font-weight: 600;
  color: var(--c-text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hot-topic-list .ht-title:hover { color: var(--t-magenta, #981B49); }
.hot-topic-list .ht-stat { flex: none; display: inline-flex; align-items: center; gap: .04rem;
  font-size: max(11px, .125rem); color: var(--c-text2); text-decoration: none; }
.hot-topic-list .ht-stat svg { width: .13rem; height: .13rem; }
.hot-topic-list .ht-stat:hover { color: var(--t-magenta, #981B49); }
.topic-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: .2rem; }
.topic-card {
  background: #fff; border: 1px solid var(--c-border); border-radius: .12rem;
  padding: .2rem .24rem; transition: box-shadow .3s, transform .3s;
  display: flex; flex-direction: column;
}
.topic-card:hover { box-shadow: 0 .06rem .24rem rgba(148, 8, 69, .12); transform: translateY(-3px); }
.topic-card .t-head { display: flex; align-items: center; gap: .12rem; margin-bottom: .1rem; }
.topic-card .t-avatar {
  width: .4rem; height: .4rem; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 900; font-size: .17rem;
}
.topic-card .t-meta { flex: 1; min-width: 0; }
.topic-card .t-meta strong { display: block; font-size: .15rem; }
.topic-card .t-meta time { font-size: .12rem; color: var(--c-text2); }
.topic-card .badge svg { width: .13rem; height: .13rem; vertical-align: -0.01em; }
.topic-card .t-title { font-size: max(13px, .17rem); font-weight: 900; line-height: 1.5; margin-bottom: .06rem; }
.topic-card .t-content { font-size: max(12px, .14rem); color: var(--c-text2); line-height: 1.7; margin-bottom: .1rem; }
.topic-card .t-latest {
  font-size: max(11px, .13rem); color: var(--c-text2);
  background: var(--pink); border-radius: .08rem; padding: .08rem .12rem;
  margin-bottom: .1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.topic-card .t-latest b { color: var(--c-text); }
.topic-card .t-actions { margin-top: auto; text-align: right; }
.topic-card .t-actions .btn-pill { padding: .04rem .18rem; font-size: max(11px, .13rem); cursor: pointer; }
@media screen and (max-width: 840px) { .topic-list { grid-template-columns: 1fr; } }

/* ============ 首页热门话题缩略条（已并入上方 336 行区块） ============ */

/* 话题列表页卡片操作行 */
.topic-card .t-actions { display: flex; align-items: center; gap: .12rem; margin-top: .1rem; }
.topic-card .t-actions .btn-pill { padding: .04rem .18rem; font-size: max(11px, .13rem); }
.topic-card a.tc-link { text-decoration: none; color: inherit; display: block; }
.topic-card a.tc-link:hover .t-title { color: var(--t-magenta, #981B49); }
.topic-card .badge svg { width: .13rem; height: .13rem; vertical-align: -0.01em; }

/* 缩略条兜底：任何情况下图标不许超过自身行高（防止异常内容把图标撑大成大圆圈） */
.hot-topic-list svg { width: .13rem; height: .13rem; flex: none; }
.hot-topic-list.compact li { min-height: 0; padding: .08rem .16rem; }
/* 窄屏：讨论区配图改到话题条下方，占满整行（保持可读尺寸） */
@media screen and (max-width: 840px) {
  .topics-strip { flex-direction: column; }
  .topics-strip-img { width: 100%; max-width: none; height: 1.8rem; }
}

/* 通用头像（话题卡/评论：图片优先，无图用 avatarBg 色块+首字） */
.avatar-img { display: inline-flex; align-items: center; justify-content: center;
  width: .4rem; height: .4rem; border-radius: 50%; flex: none; overflow: hidden;
  color: #fff; font-weight: 900; font-size: .17rem;
  background-size: cover; background-position: center; }
.avatar-img.t-avatar { width: .4rem; height: .4rem; }

/* 封面图（后台上传，优先于渐变色块）：按原图比例完整显示（宽度撑满、高度自适应），
   超长图在 3.2rem 上限内裁底防卡片无限拉长——与新闻详情页一致的"完整显示"语义 */
.news-card .cover.has-img { background: none; height: auto; }
.news-card .cover.has-img img {
  width: 100%; height: auto; max-height: 3.2rem;
  object-fit: cover; object-position: top; display: block;
}
