/* 文件描述：培训视频列表页样式（前缀 ot-，Hero 复用 certificate_inquiry ci-hero） */

body.ot-page.ci-page {
  padding-top: var(--nav-height);
  background: #f4f7fc;
}

body.ot-page.ci-page .nav:not(.is-scrolled) {
  background: #fff;
  border-bottom-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.ot-page:not(.ci-page) {
  padding-top: var(--nav-height);
  background: #f4f7fc;
}

body.ot-page:not(.ci-page) .nav:not(.is-scrolled) {
  background: #fff;
  border-bottom-color: transparent;
  box-shadow: none;
}

/* 主内容区：为 Hero 下沉搜索框预留空间 */
.ot-page.ci-page .index-page {
  position: relative;
  z-index: 2;
  margin-top: 0;
  padding-bottom: clamp(26px, calc(100vw * 70 / 1440), 70px);
  background: #f8fafc;
}

.ot-page.ci-page .index-page .container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-px);
}

.ot-page.ci-page .csr-showroom {
  padding-top: clamp(28px, calc(100vw * 44 / 1920), 44px);
}

/* 双栏布局与侧栏分类导航（对齐案例/白皮书页 csr-showroom） */
.csr-showroom-layout {
  display: grid;
  grid-template-columns: clamp(168px, calc(100vw * 200 / 1440), 200px) minmax(0, 1fr);
  gap: clamp(24px, calc(100vw * 40 / 1440), 40px);
  align-items: start;
}

.csr-showroom-nav {
  position: sticky;
  top: calc(var(--nav-height) + clamp(12px, calc(100vw * 16 / 1440), 16px));
  z-index: 2;
}

.csr-showroom-nav-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.csr-showroom-nav-list::after {
  content: '';
  position: absolute;
  left: 1px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(193, 199, 210, 0.5);
  z-index: 0;
  pointer-events: none;
}

.csr-showroom-nav-link {
  position: relative;
  z-index: 1;
  display: block;
  padding: clamp(10px, calc(100vw * 12 / 1440), 12px) clamp(12px, calc(100vw * 16 / 1440), 16px);
  border-left: none;
  font-size: var(--fs-14);
  font-weight: 500;
  color: var(--on-surface-variant);
  line-height: 1.5;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.csr-showroom-nav-link:hover {
  color: var(--primary);
}

.csr-showroom-nav-link.is-active {
  background: var(--blue-bg);
  color: var(--primary);
  font-weight: 600;
}

.csr-showroom-nav-link.is-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary);
  z-index: 1;
}

.csr-showroom-head {
  margin-bottom: clamp(24px, calc(100vw * 32 / 1440), 52px);
}

.csr-showroom-title {
  margin: 0 0 clamp(10px, calc(100vw * 14 / 1440), 14px);
  font-size: var(--fs-28);
  font-weight: 700;
  color: var(--on-surface);
  line-height: 1.25;
}

.csr-showroom-desc {
  margin: 0;
  font-size: var(--fs-14);
  color: #777c85;
  line-height: 1.75;
}

/* Hero 搜索：去掉标签与输入框图标，按钮并入药丸容器 */
.ot-page.ci-page .ci-search {
  gap: 0;
}

.ot-page.ci-page .ci-search-pill {
  gap: 8px;
  padding: 0 6px 0 20px;
}

.ot-page.ci-page .ci-search-field--combo {
  gap: 0;
}

.ot-page.ci-page .ci-search-input {
  padding-left: 0;
}

.ot-page.ci-page .ci-search-pill .ci-search-btn {
  width: 44px;
  height: 44px;
  border: 0;
  background: var(--primary);
  color: #fff;
}

.ot-page.ci-page .ci-search-pill .ci-search-btn:hover {
  background: var(--primary);
  color: #fff;
  opacity: 0.92;
}

/* 主内容 */
.ot-main {
  padding: 32px 0 64px;
}

.ot-main .container {
  max-width: 1200px;
}

/* 筛选面板 */
.ot-filters {
  background: #fff;
  border: 1px solid #d6e8f7;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 24px rgba(10, 79, 140, 0.06);
}

.ot-page .csr-showroom-main .ot-filters {
  margin-bottom: clamp(20px, calc(100vw * 28 / 1440), 28px);
}

.ot-filter-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.ot-filter-row + .ot-filter-row {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e8f2fa;
}

.ot-filter-label {
  flex-shrink: 0;
  width: 56px;
  font-size: var(--fs-14);
  font-weight: 600;
  color: #194e84;
  line-height: 32px;
}

.ot-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}

.ot-filter-pill {
  border: 1px solid #c5ddf0;
  background: #f8fbff;
  color: #335a7a;
  font-size: var(--fs-14);
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ot-filter-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.ot-filter-pill.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* 标签区 */
.ot-tag-row {
  align-items: flex-start;
}

.ot-tag-panel {
  flex: 1;
  position: relative;
}

.ot-tag-panel.is-collapsed .ot-tag-list {
  max-height: 72px;
  overflow: hidden;
}

.ot-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  transition: max-height 0.3s ease;
}

.ot-tag {
  border: 1px solid #dce8f3;
  background: #fff;
  color: #4a6278;
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ot-tag:hover {
  border-color: #7ec0f0;
  color: var(--primary);
}

.ot-tag.is-active {
  background: #e8f4fd;
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}

.ot-tag-toggle {
  margin-top: 10px;
  border: 0;
  background: none;
  color: var(--primary);
  font-size: var(--fs-14);
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ot-tag-empty {
  font-size: var(--fs-14);
  color: #8aa0b5;
  margin: 0;
}

/* 视频区块 */
.ot-section {
  margin-bottom: 40px;
}

.ot-section-title {
  font-size: clamp(20px, calc(100vw * 24 / 1920), 24px);
  font-weight: 700;
  color: #194e84;
  margin: 0 0 20px;
  padding-left: 12px;
  border-left: 4px solid var(--primary);
}

.ot-section-empty {
  text-align: center;
  color: #8aa0b5;
  padding: 40px 20px;
  background: #fff;
  border-radius: 12px;
  border: 1px dashed #d6e8f7;
}

.ot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* 视频卡片 */
.ot-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e8f2fa;
  overflow: hidden;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.ot-card:hover {
  box-shadow: 0 12px 32px rgba(10, 79, 140, 0.12);
  transform: translateY(-2px);
}

.ot-card-link {
  display: block;
  padding: 16px 16px 12px;
  color: inherit;
  text-decoration: none;
}

.ot-card-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #0a4f8c 0%, #1a7fd4 100%);
  border-radius: 8px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ot-card-play {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.ot-card-new {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #ff6b35;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.ot-card-title {
  font-size: var(--fs-16);
  font-weight: 600;
  color: #1a2736;
  margin: 0 0 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ot-card-desc {
  font-size: 13px;
  color: #6b7f92;
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ot-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 14px;
}

.ot-card-tag {
  font-size: 12px;
  color: var(--primary);
  background: #eef5fd;
  padding: 2px 8px;
  border-radius: 4px;
}

/* 登录弹层 */
.ot-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 30, 50, 0.55);
  padding: 20px;
}

.ot-modal.is-visible {
  display: flex;
}

.ot-modal-box {
  background: #fff;
  border-radius: 16px;
  padding: 32px 28px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
}

.ot-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a2736;
  margin: 0 0 8px;
}

.ot-modal-desc {
  font-size: var(--fs-14);
  color: #6b7f92;
  margin: 0 0 24px;
  line-height: 1.6;
}

.ot-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.ot-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: var(--fs-14);
  font-weight: 600;
  cursor: pointer;
  border: 0;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.ot-btn--primary {
  background: var(--primary);
  color: #fff;
}

.ot-btn--ghost {
  background: #f0f4f8;
  color: #4a6278;
}

.ot-btn:hover {
  opacity: 0.9;
}

/* 响应式 */
@media (max-width: 1024px) {
  .ot-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  body.ot-page.ci-page {
    --ci-search-half: clamp(28px, 12vw, 32px);
  }

  /* 防止子项 min-content 把整页撑出视口（横向溢出 → 单列卡片异常增高） */
  .ot-page .index-page .container,
  .ot-page .csr-showroom,
  .ot-page .csr-showroom-layout,
  .ot-page .csr-showroom-main {
    min-width: 0;
    max-width: 100%;
  }

  .ot-page .csr-showroom-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    width: 100%;
  }

  .ot-page.ci-page .csr-showroom {
    padding-top: 0;
  }

  .ot-page .csr-showroom-nav {
    position: sticky;
    top: var(--nav-height, 64px);
    z-index: 6;
    width: 100vw;
    max-width: 100vw;
    min-width: 0;
    /* 相对容器居中拉满视口，避免分类条被内容撑宽 */
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 0;
    background: #fff;
    border-bottom: 1px solid rgba(193, 199, 210, 0.5);
    /* 不在 aside 上设 overflow，否则 sticky 吸顶会失效；滚动交给 nav-list */
    box-sizing: border-box;
  }

  /* 左右渐隐：提示分类可横向滑动 */
  .ot-page .csr-showroom-nav::before,
  .ot-page .csr-showroom-nav::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 28px;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
  }

  .ot-page .csr-showroom-nav::before {
    left: 0;
    background: linear-gradient(to right, #fff 20%, rgba(255, 255, 255, 0));
  }

  .ot-page .csr-showroom-nav::after {
    right: 0;
    background: linear-gradient(to left, #fff 20%, rgba(255, 255, 255, 0));
  }

  .ot-page .csr-showroom-nav.is-fade-start::before,
  .ot-page .csr-showroom-nav.is-fade-end::after {
    opacity: 1;
  }

  .ot-page .csr-showroom-nav-list {
    position: relative;
    z-index: 1;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0 12px;
    box-sizing: border-box;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .ot-page .csr-showroom-nav-list::after {
    display: none;
  }

  .ot-page .csr-showroom-nav-list::-webkit-scrollbar {
    display: none;
  }

  .ot-page .csr-showroom-nav-link {
    flex: 0 0 auto;
    min-width: auto;
    padding: 12px 14px;
    text-align: center;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    scroll-snap-align: center;
    font-size: 14px;
    line-height: 1.3;
  }

  .ot-page .csr-showroom-nav-link.is-active {
    border-bottom-color: var(--primary);
    background: transparent;
    color: var(--primary);
    font-weight: 600;
  }

  .ot-page .csr-showroom-nav-link.is-active::before {
    display: none;
  }

  .ot-page .csr-showroom-title {
    font-size: var(--fs-section-title);
    overflow-wrap: anywhere;
  }

  .ot-page .csr-showroom-desc {
    font-size: var(--fs-14);
  }

  .ot-page.ci-page .ci-search {
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    max-width: 100%;
  }

  .ot-page.ci-page .ci-search-pill {
    flex-direction: row;
    align-items: center;
    width: 100%;
    max-width: 100%;
    border-radius: 100px;
    height: 56px;
    padding: 0 6px 0 16px;
    box-sizing: border-box;
  }

  .ot-page.ci-page .ci-search-pill .ci-search-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
  }

  .ot-page .ot-filter-row {
    flex-direction: column;
  }

  .ot-page .ot-filter-label {
    width: auto;
    line-height: 1.4;
  }

  .ot-page .ot-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ot-page .ot-filters {
    padding: 16px;
    min-width: 0;
  }

  .ot-page .ot-card,
  .ot-page .ot-card-link {
    min-width: 0;
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ot-card,
  .ot-search-btn,
  .ot-filter-pill,
  .ot-tag {
    transition: none;
  }
}

/* 详情页 */
body.ot-view-page {
  padding-top: var(--nav-height);
  background: #f8fafc;
}

body.ot-view-page .nav:not(.is-scrolled) {
  background: #fff;
  border-bottom-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.ot-view-main {
  padding: clamp(32px, calc(100vw * 48 / 1440), 48px) 0 clamp(40px, calc(100vw * 64 / 1440), 64px);
}

/* 内容区宽度对齐全站 1440 栅格 */
.ot-view-main .container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-px);
}

.ot-view-breadcrumb {
  font-size: var(--fs-14);
  color: #6b7f92;
  margin-bottom: 24px;
}

.ot-view-breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}

.ot-view-breadcrumb a:hover {
  text-decoration: underline;
}

.ot-view-article {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e8f2fa;
  padding: 28px 32px 36px;
  box-shadow: 0 4px 24px rgba(10, 79, 140, 0.06);
}

.ot-view-title {
  font-size: clamp(22px, calc(100vw * 28 / 1440), 28px);
  font-weight: 700;
  color: #1a2736;
  margin: 0 0 10px;
  line-height: 1.35;
}

.ot-view-desc {
  font-size: var(--fs-16);
  color: #6b7f92;
  margin: 0 0 12px;
  line-height: 1.6;
}

.ot-view-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: #8aa0b5;
  margin-bottom: 12px;
}

.ot-view-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.ot-view-player-wrap {
  margin-bottom: 28px;
}

.ot-view-player {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #0a1a2e;
}

.ot-view-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: min(72vh, 810px);
  background: #000;
}

.ot-view-content-title {
  font-size: 18px;
  font-weight: 700;
  color: #194e84;
  margin: 0 0 12px;
}

.ot-view-content-body {
  font-size: var(--fs-16);
  color: #4a6278;
  line-height: 1.75;
}

.ot-view-episodes {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #e8f2fa;
}

.ot-view-episode-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ot-view-episode-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid #dce8f3;
  border-radius: 8px;
  background: #f8fbff;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.ot-view-episode-btn:hover {
  border-color: var(--primary);
  background: #eef5fd;
}

.ot-view-episode-title {
  font-size: var(--fs-14);
  color: #1a2736;
  font-weight: 500;
}

.ot-view-episode-time {
  font-size: 13px;
  color: #8aa0b5;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .ot-view-article {
    padding: 20px 16px 28px;
  }
}
