/*
 * Riêng trang /career. Port từ mockup career/blog ban đầu.
 * Ghi chú: mockup nguồn không có breakpoint responsive nào cho grid 5 cột —
 * bổ sung ở đây theo đúng bảng Grid & Breakpoint của /career trong §9.9 vì để
 * nguyên 5 cột trên mobile sẽ vỡ layout.
 */

/*
 * Hero: dùng đúng khung .page-heading/.page-kicker/.page-title/.page-intro
 * chung trong base.css (page-hero.php) — không khai lại màu/size ở đây, chỉ
 * ảnh nền riêng của trang này (2 lớp: ::before ảnh + ::after gradient, khác
 * cách làm 1-lớp của course/doc/ask/tool nhưng cho cùng hiệu ứng thị giác).
 * Category-sidebar đã có border-top làm ranh giới nên không cần border-bottom
 * riêng cho .page-heading nữa.
 */

.page-heading::before {
  content: "";
  position: absolute;
  z-index: -2;
  top: 0;
  right: 0;
  bottom: 0;
  width: 56%;
  background: var(--bess-page-hero-image, none) center 50% / cover no-repeat;
}

.page-heading::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(90deg, #000 0%, #000 42%, rgb(0 0 0 / 0.78) 57%, rgb(0 0 0 / 0.12) 100%),
    linear-gradient(0deg, rgb(0 0 0 / 0.35), transparent 48%);
}

.blog-content { padding-block: 12px 84px; }

.career-page .category-nav { gap: 8px; }
.career-page .category-name-lead { display: none; }

.topic-section + .topic-section { margin-top: 86px; }

.article-card { display: block; min-width: 0; transition: transform 180ms ease; }
.article-card:hover { transform: translateY(-3px); }

.card-thumbnail {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #111214;
}

.card-thumbnail img { display: block; width: 100%; height: auto; }

.card-title {
  display: -webkit-box;
  overflow: hidden;
  margin: 16px 0 0;
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.42;
  letter-spacing: -0.018em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.card-excerpt {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* ==================================================
   Responsive — thang bậc 1279 / 1023 / 767 / 479 (tokens.css)
   Số cột do .content-grid--5 trong base.css quyết định (5/4/3/2/1).
   ================================================== */

@media (max-width: 1023px) {
  .blog-content { padding-bottom: 72px; }
  .topic-section + .topic-section { margin-top: 64px; }
}

@media (max-width: 767px) {
  .blog-content { padding-block: 8px var(--space-section); }
  .topic-section + .topic-section { margin-top: var(--space-section); }
  .topic-section .section-header-2__title { font-size: 26px; }
  .topic-section .content-grid--5 { row-gap: 36px; }

  /*
   * Hero /career dựng bằng 2 lớp (::before ảnh, ::after gradient) — khác các
   * trang danh mục khác gộp 1 lớp, nên phần chỉnh mobile cũng phải tách đôi:
   * ảnh trải hết bề ngang và gradient chuyển từ trục ngang sang trục dọc.
   */
  .page-heading::before { width: 100%; }
  .page-heading::after {
    background: linear-gradient(180deg, rgb(0 0 0 / 0.42) 0%, rgb(0 0 0 / 0.82) 58%, #000 100%);
  }

  .card-title { margin-top: 12px; font-size: 15px; }
  .card-excerpt { min-height: 0; margin-top: 6px; font-size: 12.5px; }
  .card-thumbnail { border-radius: 10px; }
}

@media (max-width: 479px) {
  /* 1 cột: card rộng gần hết màn nên trả lại cỡ chữ đọc dài được. */
  .topic-section .section-header-2__title { font-size: 25px; }
  .topic-section .content-grid--5 { row-gap: 40px; }
  .card-title { font-size: 17px; }
  .card-excerpt { font-size: 13.5px; }
  .card-thumbnail { border-radius: 8px; }
}

/* ==================================================
   Lớp cảm ứng — xem base.css để biết vì sao dùng (hover: none)
   ================================================== */

@media (hover: none) {
  /* Tránh trạng thái hover bị giữ lại sau khi chạm trên thiết bị cảm ứng. */
  .article-card:hover { transform: none; }
}
