/* 视频列表页样式 */

/* 页面标题使用 common.css 中的 .page-title-lg 类 */

.video-header-bar {
  background-color: #0e3051;
  color: #ffffff;
}

.video-header-bar__inner {
  max-width: 1360px;
  margin-inline: auto;
  padding: 12px 32px;
  font-size: 20px;
  font-weight: 600;
}

.video-section {
  padding-top: 32px;
  padding-bottom: 40px;
}

/* Classification Tabs */
.video-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 24px;
  align-items: flex-end;
}

.video-tab {
  padding: 4px 0;
  border: none;
  background: none;
  font-size: 20px;
  color: #666666;
  cursor: pointer;
  /* Removed flex properties from button itself to rely on container alignment */
}

.video-tab--active {
  font-size: 30px;
  font-weight: 700;
  color: #1F558B;
  line-height: 1.2;
  /* Ensure line height doesn't cause jump */
}

/* 视频网格 */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.video-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(15, 36, 63, 0.16);
  overflow: hidden;
  height: auto;
  /* Changed from fixed height to auto */
  border: 1px solid transparent;
}

.video-card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-card__thumb--portrait img {
  object-fit: contain;
}

.video-card__play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  font-size: 28px;
}

.video-card__title {
  padding: 15px;
  font-size: 20px;
  font-weight: bold;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-card:hover .video-card__title {
  color: #004494;
}

.video-card:hover {
  border-color: #004494;
}

@media (max-width: 1200px) {
  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .video-section {
    padding-top: 24px;
    padding-bottom: 32px;
  }

  .video-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    gap: 16px;
    margin-bottom: 18px;
    padding-bottom: 4px;
  }

  .video-tabs::-webkit-scrollbar {
    display: none;
  }

  .video-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .video-header-bar__inner {
    padding: 10px 16px;
    font-size: 18px;
  }

  .video-card__thumb img {
    height: 100%;
  }

  .video-card__play {
    width: 48px;
    height: 48px;
    font-size: 24px;
  }

  .video-card__title {
    font-size: 16px;
    padding: 14px 12px;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    min-height: auto;
  }

  .video-tab {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 16px;
  }

  .video-tab--active {
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  .video-header-bar__inner {
    padding: 8px 12px;
    font-size: 16px;
  }

  .video-card__title {
    font-size: 16px;
    padding: 10px;
  }

  .video-card__play {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }
}
