/* 首页「视频专栏」板块的样式，配合 videos-widget.js 使用。
 * 颜色全部取 index.html :root 里已有的变量，跟着首页整体走。
 * 板块默认是 hidden 的，脚本拿到数据才揭开 —— 没视频时首页不会留一块空白。 */

.videos .vh { display: grid; grid-template-columns: 1.55fr .9fr; gap: 22px; align-items: stretch; margin-top: 26px; }
.videos .vh.is-solo { grid-template-columns: 1fr; max-width: 780px; }

/* ---- 封面：点了才把播放器插进来，首屏不加载第三方 iframe ---- */
.videos .vh-screen { display: block; position: relative; width: 100%; aspect-ratio: 16/9; padding: 0; border: 0; background: #0d1a2b; cursor: pointer; overflow: hidden; }
.videos .vh-screen img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s, opacity .2s; }
.videos .vh-screen:hover img { transform: scale(1.03); opacity: .9; }
.videos .vh-screen:focus-visible { outline: 3px solid var(--lime); outline-offset: -3px; }
.videos .vh-badge { position: absolute; left: 13px; top: 12px; color: #8ba0b5; font-size: 12.5px; font-weight: 800; letter-spacing: .05em; }
.videos .vh-screen img ~ .vh-badge { display: none; }
.videos .vh-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 62px; height: 62px; border-radius: 50%; background: #ffffffee; box-shadow: 0 6px 20px #00000045; transition: transform .2s, background .2s; }
.videos .vh-play::after { content: ""; position: absolute; left: 52%; top: 50%; transform: translate(-50%, -50%); border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent var(--navy); }
.videos .vh-screen:hover .vh-play { transform: translate(-50%, -50%) scale(1.07); background: var(--lime); }
.videos .vh-dur { position: absolute; right: 9px; bottom: 9px; padding: 2px 7px; border-radius: 5px; background: #0b1624cc; color: #fff; font-size: 12px; font-weight: 800; }
.videos .vh-lead iframe { display: block; width: 100%; aspect-ratio: 16/9; border: 0; }

/* ---- 置顶那条 ---- */
.videos .vh-lead { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.videos .vh-body { padding: 18px 22px 20px; }
.videos .vh-body h3 { margin: 0; font-size: clamp(19px, 2.4vw, 24px); line-height: 1.35; letter-spacing: -.02em; }
.videos .vh-body p { margin: 9px 0 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.videos .vh-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 14px; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.videos .vh-topic { padding: 2px 9px; border-radius: 999px; border: 1px solid #14263d26; background: #14263d0d; color: var(--ink); }

/* ---- 右侧往期 ---- */
.videos .vh-side { display: flex; flex-direction: column; gap: 12px; }
.videos .vh-item { flex: 1; display: grid; grid-template-columns: 142px 1fr; gap: 13px; align-items: center; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); transition: box-shadow .15s, transform .15s; }
.videos .vh-item:hover { box-shadow: 0 4px 16px #0000001a; transform: translateY(-1px); }
.videos .vh-thumb { position: relative; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; background: #0d1a2b; }
.videos .vh-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.videos .vh-thumb .vh-badge { display: none; }   /* 小图里角标会跟播放按钮打架 */
.videos .vh-thumb .vh-play { width: 32px; height: 32px; }
.videos .vh-thumb .vh-play::after { border-width: 6px 0 6px 10px; }
.videos .vh-item b { display: block; font-size: 14.5px; line-height: 1.45; font-weight: 800; }
.videos .vh-item small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }

.videos .vh-more { margin-top: 24px; }

@media (max-width: 860px) {
  .videos .vh { grid-template-columns: 1fr; gap: 16px; align-items: start; }
  .videos .vh.is-solo { max-width: none; }
  .videos .vh-play { width: 54px; height: 54px; }
  .videos .vh-body { padding: 16px 17px 18px; }
  .videos .vh-item { flex: none; grid-template-columns: 116px 1fr; }
}

/* ---- 首页「小红书笔记」板块 ----------------------------------------------
 * 小红书没有对外的嵌入播放器，卡片一律点击跳转，所以这里没有播放器逻辑。
 * 底色用 #edf2ee，跟上面米色的视频板块错开，下面接深色活动横幅。      */
.section.xhs { background: #edf2ee; }
.xhs .xh-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 26px; }
.xhs .xh { display: block; background: #fff; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; text-decoration: none; color: var(--ink); transition: box-shadow .15s, transform .15s; }
.xhs .xh:hover { box-shadow: 0 5px 18px #0000001f; transform: translateY(-2px); }
.xhs .xh-cover { display: block; position: relative; width: 100%; aspect-ratio: 3/4; background: var(--navy); overflow: hidden; }
.xhs .xh-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.xhs .xh-badge { position: absolute; left: 11px; top: 10px; color: #8ba0b5; font-size: 12px; font-weight: 800; letter-spacing: .05em; }
.xhs .xh-cover img ~ .xh-badge { display: none; }
.xhs .xh-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; background: #ffffffe6; box-shadow: 0 5px 16px #00000040; }
.xhs .xh-play::after { content: ""; position: absolute; left: 53%; top: 50%; transform: translate(-50%, -50%); border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent var(--navy); }
.xhs .xh-body { display: block; padding: 12px 14px 14px; }
.xhs .xh-body b { display: block; font-size: 14.5px; line-height: 1.45; font-weight: 800; }
.xhs .xh-body small { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.xhs .xh-follow { display: flex; align-items: center; gap: 18px; margin-top: 22px; padding: 16px 20px; background: #fff; border: 1px solid var(--line); border-radius: 13px; }
.xhs .xh-qr { width: 88px; height: 88px; flex: 0 0 auto; object-fit: contain; border-radius: 8px; background: #fff; }
.xhs .xh-follow b { display: block; font-size: 15.5px; }
.xhs .xh-follow p { margin: 5px 0 12px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.xhs .xh-follow .button { border: 1.5px solid var(--navy); color: var(--navy); text-decoration: none; }

@media (max-width: 860px) {
  .xhs .xh-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .xhs .xh-body { padding: 10px 12px 12px; }
  .xhs .xh-body b { font-size: 13.5px; }
  .xhs .xh-follow { flex-direction: column; align-items: flex-start; gap: 13px; padding: 15px 16px; }
}

/* 频道卡片式表头：方版标识当头像，右边是小标 / 大标题 / 说明。
 * 用方版而不是横版 —— 横版近一半面积是空背景，同等尺寸下字更小，
 * 而且横版在版面里读作「另一张 banner」，会和大标题抢。 */
.videos .yt-head { display: flex; align-items: center; gap: 26px; }
.videos .yt-logo { display: block; flex: 0 0 auto; }
.videos .yt-logo img { display: block; width: 176px; height: 176px; border-radius: 16px; }
.videos .yt-head .heading { margin-bottom: 12px; }
.videos .yt-head .intro { margin: 0; }
/* 手机上换成长条：竖屏里方块占高，长条更合适。桌面保持方版。 */
@media (max-width: 760px) {
  .videos .yt-head { flex-direction: column; align-items: stretch; gap: 15px; }
  .videos .yt-logo { width: 100%; }
  .videos .yt-logo img { width: 100%; max-width: 440px; height: auto; border-radius: 12px; }
}

/* 每条视频的「分享」：分享的是 video/<ID>.html 这条视频自己的页面 */
.videos .vh-share { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; padding: 5px 11px; border: 0; border-radius: 999px; background: #eef2ee; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer; }
.videos .vh-share:hover { background: #e2e9e2; color: var(--ink); }
.videos .vh-share svg { width: 14px; height: 14px; display: block; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.videos .vh-body h3 a { color: inherit; text-decoration: none; }
.videos .vh-body h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.videos .vh-item .vh-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.videos .vh-item .vh-share { padding: 3px 9px; font-size: 11.5px; }

/* 板块「分享」按钮由 index.html 插在 logo 后面：桌面仍在右上角（.wrap 定位），
 * 手机上 logo 是整宽长条，按钮改成跟在 logo 下方，不再压在图上。 */
@media (max-width: 760px) {
  .videos .yt-head .section-share { position: static; align-self: flex-start; margin: -4px 0 -3px; }
}
