/* Trang video — bám mockup: lưới 3 cột, thẻ trắng, ảnh full-bleed, chữ + nút căn giữa */

@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&display=swap");

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
}

body.video-page {
  margin: 0;
}

.video-page {
  min-height: 100vh;
  padding: 28px 16px 40px;
  font-family: "Roboto", "Helvetica Neue", Arial, sans-serif;
  background-color: #f0f0f0;
  color: #000;
}

.video-page__inner {
  max-width: 1140px;
  margin: 0 auto;
}

/* Form lái thử (partial _testdrive_below) — đặt dưới lưới video */
.video-page #thtc-news-testdrive-block {
  margin-top: 48px;
  padding-top: 8px;
}

/* Lưới: 3 cột, khoảng cách ~20px; hàng 2 chỉ 2 thẻ — tự căn trái */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (max-width: 991px) {
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .video-page {
    padding: 20px 12px 32px;
  }

  .video-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

/* Thẻ */
.video-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transition: box-shadow 0.28s ease, transform 0.28s ease, border-color 0.28s ease;
}

.video-card:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  transform: translateY(-3px);
  border-color: #cfcfcf;
}

.video-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  flex-shrink: 0;
  background: #e5e5e5;
}

/* Lớp phủ xanh nhạt trên thumbnail — hover thẻ làm giảm phủ để ảnh rõ hơn */
.video-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 86, 160, 0.42);
  pointer-events: none;
  transition: opacity 0.32s ease, background 0.32s ease;
}

.video-card:hover .video-card__media::after {
  opacity: 0;
}

.video-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Logo HT góc trên trái — nhỏ, tương phản */
.video-card__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  border-radius: 2px;
}

/* Link bọc ảnh — cùng URL với tiêu đề / CTA */
.video-card__media-link {
  display: block;
  color: inherit;
  text-decoration: none;
  border-radius: 5px 5px 0 0;
  overflow: hidden;
}

.video-card__media-link:focus-visible {
  outline: 2px solid #0066b3;
  outline-offset: -2px;
  position: relative;
  z-index: 1;
}

/* Khối chữ + nút: padding 15–20px, nút luôn sát đáy thẻ */
.video-card__lower {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 18px 18px 20px;
}

.video-card__title {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: #000;
}

.video-card__title-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.18s ease;
}

.video-card__title-link:hover {
  color: #e10a1a;
}

.video-card__title-link:focus-visible {
  outline: 2px solid #0066b3;
  outline-offset: 3px;
  border-radius: 2px;
}

.video-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
  padding: 10px 22px;
  min-height: 40px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  background: #222;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: background 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease, color 0.22s ease;
}

.video-card__cta:hover {
  background: #e10a1a;
  color: #fff;
  box-shadow: 0 4px 12px rgba(225, 10, 26, 0.4);
  transform: translateY(-1px);
}

.video-card__cta:active {
  transform: translateY(0);
}

.video-card__cta:hover:active {
  background: #b00814;
  box-shadow: 0 1px 4px rgba(176, 8, 20, 0.45);
}

.video-card__cta:active:not(:hover) {
  background: #151515;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
}

.video-card__cta:focus-visible {
  outline: 2px solid #0066b3;
  outline-offset: 3px;
}

.video-card__cta-icon {
  font-size: 14px;
  line-height: 1;
  opacity: 0.95;
}

.video-page__empty {
  margin: 2rem 0;
  text-align: center;
  font-size: 15px;
  color: #444;
}

.video-page__paging {
  margin-top: 2rem;
}

.video-page__paging ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.video-page__paging a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  font-size: 14px;
  color: #222;
  text-decoration: none;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.video-page__paging a:hover {
  background: #f5f5f5;
  border-color: #ccc;
}

.video-page__paging a.is-active {
  font-weight: 600;
  color: #fff;
  background: #222;
  border-color: #222;
}

/* ——— Trang chi tiết video ——— */
.video-detail__container {
  max-width: 1140px;
  margin: 0 auto;
}

.video-detail__title {
  margin: 0 0 28px;
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  color: #000;
}

.video-detail__player {
  margin-bottom: 28px;
}

.video-detail__ratio {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 6px;
  background: #111;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.video-detail__iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-detail__embed-fallback {
  margin-bottom: 24px;
  padding: 16px;
  text-align: center;
  font-size: 14px;
  color: #555;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
}

/* Điều hướng video trước/sau — cùng style chi tiết bài viết (.news-post-nav), scope .video-page */
.video-page .news-post-nav {
  margin: 2.25rem 0 1.75rem;
}

.video-page .news-post-nav__inner {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 10px 40px rgba(13, 71, 161, 0.07);
  overflow: hidden;
}

.video-page .news-post-nav__col {
  flex: 1 1 50%;
  min-width: 280px;
  box-sizing: border-box;
  padding: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}

.video-page .news-post-nav__col--next::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: min(72%, 5.5rem);
  background: linear-gradient(180deg, transparent 0%, #d1dae6 15%, #d1dae6 85%, transparent 100%);
  pointer-events: none;
}

.video-page .news-post-nav__link,
.video-page .news-post-nav__empty {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  text-decoration: none;
  color: #0f172a;
  min-height: 5.25rem;
  padding: 1.35rem 1.5rem 1.4rem 1.45rem;
  box-sizing: border-box;
  transition: background-color 0.22s ease, box-shadow 0.22s ease;
  width: 100%;
  flex: 1 1 auto;
}

.video-page .news-post-nav__link--next,
.video-page .news-post-nav__empty--next {
  flex-direction: row;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 0.75rem;
  padding-left: 1.5rem;
  padding-right: 1.35rem;
}

.video-page .news-post-nav__link--next .news-post-nav__text,
.video-page .news-post-nav__empty--next .news-post-nav__text {
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
}

.video-page .news-post-nav__link--next .news-post-nav__arrow,
.video-page .news-post-nav__empty--next .news-post-nav__arrow {
  flex-shrink: 0;
}

.video-page .news-post-nav__link:hover {
  background: linear-gradient(100deg, #f4f7fb 0%, #fafcfe 55%, #fff 100%);
}

.video-page .news-post-nav__link--next:hover {
  background: linear-gradient(-100deg, #f4f7fb 0%, #fafcfe 55%, #fff 100%);
}

.video-page .news-post-nav__link:focus-visible {
  outline: 2px solid #0d47a1;
  outline-offset: -2px;
  z-index: 1;
}

.video-page .news-post-nav__link:hover .news-post-nav__title {
  color: #0d47a1;
}

.video-page .news-post-nav__link:hover .news-post-nav__label {
  color: #0d47a1;
}

.video-page .news-post-nav__arrow {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  color: #0d47a1;
  background: linear-gradient(145deg, #eef3fb 0%, #e4ebf7 100%);
  border: 1px solid #d8e2f0;
  margin-top: 0.12rem;
  transition:
    background 0.22s ease,
    color 0.22s ease,
    border-color 0.22s ease,
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.video-page .news-post-nav__link:hover .news-post-nav__arrow {
  background: linear-gradient(145deg, #0d47a1 0%, #1565c0 100%);
  color: #fff;
  border-color: #0a3d7a;
  box-shadow: 0 4px 12px rgba(13, 71, 161, 0.28);
}

.video-page .news-post-nav__link:hover .news-post-nav__arrow--prev {
  transform: translateX(-3px);
}

.video-page .news-post-nav__link:hover .news-post-nav__arrow--next {
  transform: translateX(3px);
}

.video-page .news-post-nav__empty .news-post-nav__arrow {
  opacity: 0.45;
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #94a3b8;
}

.video-page .news-post-nav__text {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
  padding-top: 0.08rem;
}

.video-page .news-post-nav__label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
  transition: color 0.2s ease;
}

.video-page .news-post-nav__title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #1e293b;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  transition: color 0.2s ease;
}

.video-page .news-post-nav__title--muted {
  font-weight: 500;
  font-size: 0.8125rem;
  font-style: italic;
  color: #94a3b8;
  text-transform: none;
  letter-spacing: 0;
  -webkit-line-clamp: unset;
  display: block;
}

@media screen and (max-width: 767px) {
  .video-page .news-post-nav__inner {
    border-radius: 12px;
  }

  .video-page .news-post-nav__col--next::before {
    display: none;
  }

  .video-page .news-post-nav__col--next {
    border-top: 1px solid #e8edf3;
  }

  .video-page .news-post-nav__link,
  .video-page .news-post-nav__empty {
    min-height: auto;
    padding: 1.2rem 1.25rem;
  }
}

.video-detail__related {
  margin-bottom: 8px;
}

.video-detail__related-title {
  margin: 0 0 20px;
  font-size: 1.125rem;
  font-weight: 700;
  text-align: center;
  color: #000;
}

.video-detail .video-grid {
  margin-bottom: 0;
}
