@charset "UTF-8";
/* ==========================================================================
   HUYU Blogs & News 模块  v2.0
   独立样式表（不依赖主题）｜默认宽度 1600px ｜含分页器与响应式
   ▸ 改主色：短码里加 accent="#xxxxxx"，或改下方 --hybn-accent
   ▸ 改宽度：短码里加 max_width="1400"（默认 1600）
   ========================================================================== */

.hybn {
  --hybn-accent: #db3831;
  --hybn-accent-dark: #b8261f;
  --hybn-card: #f3f6f7;
  --hybn-text: #201e1c;
  --hybn-sub: #4a4846;
  --hybn-muted: #6f6d6b;
  --hybn-line: #dcdcdc;
  --hybn-max-width: 1600px;
  --hybn-gap: 20px;
  --hybn-radius: 15px;

  padding: 70px 0;
  color: var(--hybn-text);
  font-family: inherit;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.hybn *,
.hybn *::before,
.hybn *::after { box-sizing: border-box; }

/* ---------- 容器 ---------- */
.hybn__inner {
  width: 100%;
  max-width: var(--hybn-max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.hybn__heading {
  margin: 0 0 22px;
  font-size: 36px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--hybn-text);
}

/* ---------- 顶部条：Tab + 按钮 ---------- */
.hybn__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.hybn__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 0;
}

/* Tab 现在直接是 <a>（不再套 li），
   选择器带 .hybn__tabs 前缀把权重抬到 (0,2,0)，
   避免被主题的 a:link / a:visited (0,1,1) 抢走颜色。 */
.hybn__tabs .hybn__tab {
  display: inline-block;
  margin: 0;
  padding: 0 0 6px;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 500;
  color: #969696;
  -webkit-text-fill-color: currentColor;
  text-decoration: none;
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  box-shadow: none;
  transition: color .25s ease, border-color .25s ease;
}

.hybn__tabs .hybn__tab:hover,
.hybn__tabs .hybn__tab:focus-visible {
  color: var(--hybn-accent);
  border-bottom-color: var(--hybn-accent);
}

.hybn__tabs .hybn__tab.is-active {
  color: var(--hybn-accent);
  border-bottom-color: var(--hybn-accent);
}

/* 键盘聚焦时给个可见轮廓（tab 用方向键/空格操作，必须有焦点提示） */
.hybn__tabs .hybn__tab:focus-visible {
  outline: 2px solid var(--hybn-accent);
  outline-offset: 3px;
}

/* ---------- 按钮 ---------- */
.hybn__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hybn__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  height: 50px;
  padding: 0 26px;
  font-size: 16px;
  line-height: 1;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--hybn-accent);
  border-radius: 60px;
  transition: background-color .25s ease, color .25s ease;
}

.hybn__btn--dark { background: var(--hybn-accent); color: #fff; }
.hybn__btn--dark:hover,
.hybn__btn--dark:focus-visible { background: #fff; color: var(--hybn-accent); }

.hybn__btn--light { background: transparent; color: var(--hybn-accent); }
.hybn__btn--light:hover,
.hybn__btn--light:focus-visible { background: var(--hybn-accent); color: #fff; }

/* ---------- 面板 / 分组 ---------- */
.hybn__panel { display: none; }
.hybn__panel.is-active { display: block; }
/* :target 只在「没有 JS」时兜底 —— 有 JS 时根节点会加 .hybn--js，
   此时必须让这条失效，否则地址栏残留 #hash（比如点过标签、或从带 hash 的链接进来）
   会让 :target 命中的面板和 .is-active 的面板同时 display:block，
   表现出来就是"切换后底下多出一组内容"。 */
.hybn:not(.hybn--js) .hybn__panel:target { display: block; }

/* 分组：默认全部可见（SEO / 无 JS 友好），有 JS 时才收起非当前组 */
.hybn__group {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  row-gap: var(--hybn-gap);
}

.hybn--js .hybn__group { display: none; }
.hybn--js .hybn__group.is-active {
  display: flex;
  animation: hybnFade .3s ease;
}

@keyframes hybnFade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- 卡片 ---------- */
.hybn__item {
  width: 49%;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  background: var(--hybn-card);
  border-radius: var(--hybn-radius);
  overflow: hidden;
  transition: box-shadow .25s ease;
}

.hybn__item:hover { box-shadow: 0 10px 28px rgba(0, 0, 0, .08); }
.hybn__item.is-featured { width: 100%; }

/* 图片区：强制 4:3（align-self 必须写，否则会被 flex 拉伸导致比例失效） */
.hybn__img {
  position: relative;
  display: block;
  flex: 0 0 45%;
  width: 45%;
  align-self: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e8eaea;
  text-decoration: none;
}

.hybn__img img,
.hybn__img .hybn__photo {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  object-position: center;
  transition: transform .4s ease;
}

.hybn__item:hover .hybn__img img { transform: scale(1.04); }

.hybn__noimg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #e9edee 0%, #dfe4e5 100%);
}

.hybn__noimg::after {
  content: "HUYU";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  letter-spacing: 2px;
  color: #b9c0c1;
}

.hybn__desc {
  flex: 1 1 55%;
  width: 55%;
  padding: 28px 32px;
}

.hybn__time {
  display: block;
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--hybn-muted);
}

.hybn__title {
  margin: 0;
  font-size: 20px;
  line-height: 1.5;
  font-weight: 600;
}

.hybn__title a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--hybn-text);
  text-decoration: none;
  transition: color .25s ease;
}

.hybn__title a:hover,
.hybn__title a:focus-visible { color: var(--hybn-accent); }

.hybn__excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 10px 0 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--hybn-sub);
}

/* 通栏大卡 */
.hybn__item.is-featured .hybn__desc { padding: 36px 40px; }
.hybn__item.is-featured .hybn__title { font-size: 30px; line-height: 1.35; }
.hybn__item.is-featured .hybn__time { font-size: 15px; }
.hybn__item.is-featured .hybn__excerpt {
  margin-top: 16px;
  font-size: 18px;
  line-height: 1.55;
  -webkit-line-clamp: 3;
}

/* ---------- 分页圆点（无数字、无左右箭头；样式参考 ruy-power 的 banner dots） ----------
   未选中：10px 小圆点；当前项：拉长成 30px 胶囊并变主色
   点击区用 ::after 扩大到约 28px，方便手指点按 */
.hybn__dots { display: none; }

.hybn--js .hybn__dots {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 34px;
}

.hybn__dot {
  position: relative;
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  padding: 0;
  margin: 0;
  background: #d5d8d9;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: width .4s ease, border-radius .4s ease, background-color .4s ease;
}

.hybn__dot::after {
  content: "";
  position: absolute;
  inset: -9px;
}

.hybn__dot:hover { background: #b9bec0; }

.hybn__dot.is-active,
.hybn__dot[aria-current="page"] {
  width: 30px;
  border-radius: 6px;
  background: var(--hybn-accent);
  cursor: default;
}

.hybn__dot:focus-visible {
  outline: 2px solid var(--hybn-accent);
  outline-offset: 4px;
}

.hybn__empty {
  margin: 0;
  padding: 48px 30px;
  font-size: 16px;
  text-align: center;
  color: var(--hybn-muted);
  background: var(--hybn-card);
  border-radius: var(--hybn-radius);
}

.hybn .screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1440px) {
  .hybn__item.is-featured .hybn__title { font-size: 27px; }
  .hybn__item.is-featured .hybn__desc { padding: 32px 34px; }
}

@media (max-width: 1199px) {
  .hybn { padding: 56px 0; }
  .hybn__heading { font-size: 32px; }
  .hybn__tabs .hybn__tab { font-size: 22px; }
  .hybn__tabs { gap: 24px; }
  .hybn__item.is-featured .hybn__title { font-size: 24px; line-height: 1.4; }
  .hybn__item.is-featured .hybn__excerpt { font-size: 16px; -webkit-line-clamp: 2; }
  .hybn__img,
  .hybn__item.is-featured .hybn__img { flex-basis: 42%; width: 42%; }
  .hybn__desc { padding: 24px 24px; }
}

/* 平板：小卡改为单列（避免窄栏里图文拥挤） */
@media (max-width: 1023px) {
  .hybn__item { width: 100%; }
  .hybn__item:not(.is-featured) .hybn__img { flex-basis: 38%; width: 38%; }
  .hybn__item:not(.is-featured) .hybn__desc { padding: 22px 26px; }
}

/* 手机：全部纵向排列，图片通栏 4:3 */
@media (max-width: 782px) {
  .hybn { padding: 40px 0; }
  .hybn__inner { padding: 0 18px; }
  .hybn__heading { font-size: 26px; }

  .hybn__bar { gap: 16px; margin-bottom: 24px; }
  .hybn__tabs { gap: 18px; }
  .hybn__tabs .hybn__tab { font-size: 18px; padding-bottom: 4px; border-bottom-width: 2px; }

  .hybn__btns { width: 100%; }
  .hybn__btn { flex: 1 1 auto; min-width: 0; height: 46px; padding: 0 16px; font-size: 15px; }

  .hybn__item,
  .hybn__item.is-featured { width: 100%; flex-wrap: wrap; }

  .hybn__img,
  .hybn__item.is-featured .hybn__img,
  .hybn__item:not(.is-featured) .hybn__img {
    flex: 0 0 100%;
    width: 100%;
    align-self: auto;
  }

  .hybn__desc,
  .hybn__item.is-featured .hybn__desc,
  .hybn__item:not(.is-featured) .hybn__desc {
    flex: 1 1 100%;
    width: 100%;
    padding: 20px 20px 24px;
  }

  .hybn__title,
  .hybn__item.is-featured .hybn__title { font-size: 20px; line-height: 1.4; }
  .hybn__excerpt,
  .hybn__item.is-featured .hybn__excerpt { font-size: 15px; -webkit-line-clamp: 2; }

  .hybn--js .hybn__dots { margin-top: 26px; gap: 10px; }
}

@media (max-width: 480px) {
  .hybn__heading { font-size: 22px; }
  .hybn__tabs .hybn__tab { font-size: 16px; }
  .hybn__tabs { gap: 14px; }
  .hybn__btn { height: 44px; font-size: 14px; }
  .hybn--js .hybn__dots { gap: 9px; }
  .hybn__dot.is-active,
  .hybn__dot[aria-current="page"] { width: 24px; }
}

/* 打印：把分页全部展开，别丢内容 */
@media print {
  .hybn__group { display: flex !important; }
  .hybn__dots { display: none !important; }
}
