/* ============================================================
   THCL26 THEME - CSS Variables & Reset
   ============================================================ */
:root {
  /* Brand - xanh logo (#0060A8); trắng trên --brand-blue đạt 6.5:1 */
  --brand-blue: #0060a8;
  --brand-blue-dark: #004b85;
  --brand-blue-deep: #0b2d4f;
  --brand-blue-pale: #e8f1f9;
  --brand-blue-light: #1a78c2;

  /* Accent - đỏ logo (#E00020): nhấn "nóng/nổi bật", link "Xem tất cả".
     Không đặt đỏ lên nền xanh (rung màu) — trên nền xanh/tối dùng trắng. */
  --accent-red: #e00020;
  --accent-red-dark: #b3001a;
  --accent-red-pale: #fdecee;

  /* Neutral - Slate tones (warmer, more modern than gray) */
  --text-headline: #0f172a;
  --text-body: #222222;
  --text-secondary: #64748b;
  /* #94a3b8 was 2.6:1 on white; #64748b clears WCAG AA 4.5:1 on white and --bg-section */
  --text-meta: #64748b;
  --border-color: #e2e8f0;
  --bg-section: #f8fafc;
  --bg-card: #ffffff;
  --bg-white: #ffffff;
  /* Dải nền xanh nhạt trang chủ: Đề tài nổi bật + Video, eMagazine */
  --bg-band: #f0ffff;

  /* Spacing */
  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 12px;
  --sp-lg: 16px;
  --sp-xl: 24px;

  /* Radius - Modern */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  /* Shadows - Depth system. Một thang elevation:
     ảnh nội dung phẳng (không bóng); thẻ/khối = viền + --shadow-sm, hover
     --shadow-hover; panel nổi (dropdown, popover) --shadow-md; lớp phủ
     --shadow-overlay; nút nổi --shadow-fab. */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md:
    0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg:
    0 10px 25px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-hover:
    0 14px 30px -4px rgba(0, 96, 168, 0.12), 0 4px 8px -2px rgba(0, 0, 0, 0.06);
  /* Thanh menu dính trên cùng */
  --shadow-nav: 0 2px 12px rgba(0, 96, 168, 0.15);
  /* Lớp phủ: dropdown menu, menu mobile, ô tìm kiếm mobile */
  --shadow-overlay: 0 8px 24px rgba(0, 0, 0, 0.2);
  /* Nút nổi góc màn hình: lên đầu trang, cỡ chữ */
  --shadow-fab: 0 4px 14px rgba(0, 96, 168, 0.3);
  --shadow-fab-hover: 0 6px 20px rgba(0, 96, 168, 0.4);

  /* Typography */
  --font-body:
    "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: "Noto Sans", Georgia, sans-serif;

  /* Layout */
  --container-width: 1200px;
  --header-height: 44px;
  --nav-height: 48px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Screen reader only - accessible hidden text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.sr-only:focus {
  position: fixed;
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  padding: 1rem 2rem;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background: var(--brand-blue);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 600;
  z-index: 9999;
}

html {
  font-size: 71.875%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1.5rem;
  line-height: 1.6;
  color: var(--text-body);
  background: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--text-headline);
  text-decoration: none;
  transition:
    color 0.2s,
    background 0.2s;
}

a:hover {
  color: var(--brand-blue);
}

/* Focus-visible for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
  border-radius: 2px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Global interactive cursor */
a,
button,
[role="button"],
.topic-card,
.news-list-item,
.category-hot {
  cursor: pointer;
}

/* Smooth transitions for all interactive elements */
*,
*::before,
*::after {
  transition-property: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

ul {
  list-style: none;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--sp-lg);
}

/* ============================================================
   TOP BAR (hotline/email left, clock right)
   ============================================================ */
/* Muted on purpose: a saturated bar above the logo competed with the brand nav */
.top-bar {
  background: var(--bg-section);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-meta);
  font-size: 1.2rem;
  height: 30px;
  display: flex;
  align-items: center;
}

/* width: as a flex item the container would shrink to its content and sit centered */
.top-bar .container {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar a {
  color: var(--text-meta);
  font-size: 1.2rem;
}

.top-bar a:hover {
  color: var(--brand-blue);
}

.top-bar-contact {
  display: flex;
  gap: var(--sp-lg);
}

/* tabular-nums: digits keep the same width, so the line does not jiggle each minute */
.header-clock {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ============================================================
   HEADER (Logo + Banner)
   ============================================================ */
.header-main {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  padding: var(--sp-md) 0;
}

.header-main .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-xl);
}

.header-logo img {
  max-height: 60px;
}


.header-banner {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  text-align: right;
}

.header-banner > * {
  margin-left: auto;
}

.header-banner-placeholder {
  display: inline-block;
  width: 728px;
  max-width: 100%;
  height: 90px;
  background: var(--bg-section);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  line-height: 90px;
  text-align: center;
  color: var(--text-meta);
  font-size: 1.3rem;
}

/* ============================================================
   MAIN NAVIGATION (Sticky)
   ============================================================ */
.main-nav {
  background: linear-gradient(
    135deg,
    var(--brand-blue) 0%,
    var(--brand-blue-dark) 100%
  );
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-height);
  box-shadow: var(--shadow-nav);
}

.main-nav .container {
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  height: 100%;
  flex: 1;
}

.nav-list li {
  position: relative;
  white-space: nowrap;
}

.nav-list li a {
  display: flex;
  align-items: center;
  color: #fff;
  font-weight: 400;
  font-size: 14px;
  /* 10px keeps all 8 top-level items + search button inside the 1200px container
     (~37px spare with Be Vietnam Pro loaded); a new top-level item needs re-checking */
  padding: 0 10px;
  height: var(--nav-height);
  border-bottom: 3px solid transparent;
  transition: all 0.15s;
}

.nav-list li a:hover,
.nav-list li.active a {
  color: #fff;
  border-bottom-color: #fff;
}

.nav-list li a .home-icon {
  width: 18px;
  height: 18px;
}

.nav-list li a .home-text {
  display: none;
}

/* Dropdown arrow on parent items that have children */
.nav-list > li:has(.nav-dropdown) > a::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid rgba(255, 255, 255, 0.6);
  margin-left: 5px;
  vertical-align: middle;
  transition: transform 0.2s;
}

.nav-list > li:has(.nav-dropdown):hover > a::after {
  transform: rotate(180deg);
  border-top-color: #fff;
}

/* Dropdown */
.nav-list li:hover > .nav-dropdown {
  display: block;
  animation: dropIn 0.15s ease-out;
}

@keyframes dropIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-dropdown {
  list-style: none;
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--brand-blue-dark);
  min-width: 200px;
  box-shadow: var(--shadow-overlay);
  z-index: 100;
  border-top: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.nav-dropdown li a {
  padding: var(--sp-sm) var(--sp-lg);
  font-size: 14px;
  font-weight: 400;
  height: auto;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-dropdown li:last-child a {
  border-bottom: none;
}

.nav-dropdown li a:hover {
  background: rgba(255, 255, 255, 0.1);
  padding-left: calc(var(--sp-lg) + 4px);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: var(--sp-sm);
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
}

.nav-toggle .icon-close {
  display: none;
}

.nav-toggle.active .icon-hamburger {
  display: none;
}

.nav-toggle.active .icon-close {
  display: block;
}

/* ============================================================
   HOT TAGS BAR
   ============================================================ */
/* Nền sáng: dải đỏ đặc ngay dưới menu xanh quá chói. Đỏ logo chỉ còn ở nhãn
   HOT; chip tag dùng xanh nhạt để thanh lùi xuống vai phụ dưới menu. */
.hot-tags {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  padding: var(--sp-sm) 0;
  overflow: hidden;
}

.hot-tags .container {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

/* Nhãn nền đỏ logo chữ trắng (6.5:1) — điểm nhấn duy nhất của thanh. */
.hot-tags-icon {
  color: #fff;
  background: var(--accent-red);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 1.2rem;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

.hot-tags-list {
  display: flex;
  gap: var(--sp-sm);
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  flex: 1;
}

.hot-tags-list::-webkit-scrollbar {
  display: none;
}

/* Chữ xanh logo đậm trên xanh nhạt: ~7.8:1 */
.hot-tags-list a {
  color: var(--brand-blue-dark);
  font-size: 1.2rem;
  font-weight: 500;
  white-space: nowrap;
  padding: 4px 14px;
  background: var(--brand-blue-pale);
  border: none;
  border-radius: var(--radius-full);
  transition: background-color 0.2s, color 0.2s;
}

.hot-tags-list a:hover {
  background: var(--brand-blue);
  color: #fff;
}

/* ============================================================
   FEATURE SECTION
   ============================================================ */
.feature-section {
  padding: var(--sp-lg) 0 var(--sp-xl);
}

.feature-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--sp-lg);
  align-items: start;
}

.feature-main {
  grid-column: 1;
  grid-row: 1;
}

.feature-main .feature-img {
  width: 100%;
  aspect-ratio: 3/2;
  background: var(--bg-section);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
}

.feature-main .feature-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-main .feature-cat {
  display: inline-block;
  margin-top: var(--sp-md);
  background: linear-gradient(
    135deg,
    var(--brand-blue) 0%,
    var(--brand-blue-light) 100%
  );
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.feature-main h2 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-top: var(--sp-sm);
  color: var(--text-headline);
}

.feature-main h2 a {
  color: inherit;
}

.feature-main h2 a:hover {
  color: var(--brand-blue);
}

.feature-main .feature-sapo {
  font-size: 1.4rem;
  color: var(--text-secondary);
  margin-top: var(--sp-xs);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feature-sub {
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
  grid-column: 2;
  grid-row: 1;
}

.feature-sub-item .feature-img {
  width: 100%;
  aspect-ratio: 3/2;
  background: var(--bg-section);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.feature-sub-item .feature-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-sub-item h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.35;
  margin-top: var(--sp-sm);
}

.feature-sub-item h3 a {
  color: var(--text-headline);
}

.feature-sub-item h3 a:hover {
  color: var(--brand-blue);
}

/* Feature right - latest news column */
.feature-latest {
  border-left: 1px solid var(--border-color);
  padding-left: var(--sp-lg);
  grid-column: 3;
  grid-row: 1;
}

/* Banner slider above "Mới nhất": one banner per view, swipe or arrows (app.js) */
.banner-slider {
  position: relative;
  margin-bottom: var(--sp-lg);
}

.banner-slider-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.banner-slider-track::-webkit-scrollbar {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .banner-slider-track {
    scroll-behavior: auto;
  }
}

/* Fixed 180px frame like mms24; contain so odd-sized banners are neither cropped nor stretched */
.banner-slide {
  flex: 0 0 100%;
  height: 180px;
  scroll-snap-align: start;
  background: var(--bg-section);
}

.banner-slide a {
  display: block;
  height: 100%;
}

.banner-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.banner-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}

.banner-slider-prev {
  left: 6px;
}

.banner-slider-next {
  right: 6px;
}

.banner-slider:hover .banner-slider-arrow,
.banner-slider-arrow:focus-visible {
  opacity: 1;
}

/* Tiêu đề khối hẹp: cột "Mới nhất", cột chuyên mục trang chủ, widget sidebar.
   Cùng vạch xanh bên trái như .section-header (không nền gradient) để mọi khối
   chung một kiểu tiêu đề; từng khối chỉ chỉnh khoảng cách riêng bên dưới. */
.feature-latest-header,
.category-block-header,
.sidebar-widget-header {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-headline);
  padding-left: var(--sp-sm);
  border-left: 4px solid var(--brand-blue);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-sm);
}

.feature-latest-header {
  margin-bottom: var(--sp-md);
}

.feature-latest-header a {
  font-size: 1.2rem;
  color: var(--accent-red);
  font-weight: 600;
}

.feature-latest-header a:hover {
  color: var(--accent-red-dark);
}

.latest-item {
  padding: var(--sp-sm) 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  gap: var(--sp-sm);
}

.latest-item:last-child {
  border-bottom: none;
}

.latest-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-blue);
  margin-top: 8px;
  flex-shrink: 0;
}

.latest-item h4 {
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.4;
}

.latest-item h4 a {
  color: var(--text-headline);
}

.latest-item h4 a:hover {
  color: var(--brand-blue);
}

.latest-time {
  font-size: 1.1rem;
  color: var(--text-meta);
  margin-top: 2px;
}

/* ============================================================
   HOT TOPICS + VIDEO BAND, EMAGAZINE/INFOGRAPHIC (topic cards)
   ============================================================ */
.topic-video-band,
.special-news {
  background: var(--bg-band);
  padding: var(--sp-xl) 0;
}

/* Hai nửa: 4 thẻ đề tài 2×2 | panel video tối, cao xấp xỉ nhau.
   minmax(0, 1fr) chứ không 1fr: track 1fr không co dưới min-content, nên dải
   vuốt ngang 4×220px trên mobile sẽ kéo cột (và cả trang) rộng ra ~900px. */
.topic-video-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--sp-xl);
  align-items: start;
}

.topic-video-grid.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-lg);
}

/* Panel Video trang chủ: .media-main-title / .media-list-item dùng kiểu nền sáng mặc định */
.video-panel {
  border-radius: var(--radius-md);
  padding: var(--sp-xl);
}

.special-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-lg);
}

.special-card .topic-card-img {
  position: relative;
}

.special-card .topic-card-img a {
  display: block;
  height: 100%;
}

.special-card-type {
  position: absolute;
  top: var(--sp-sm);
  left: var(--sp-sm);
  padding: 2px var(--sp-sm);
  border-radius: var(--radius-full);
  font-size: 1.1rem;
  font-weight: 400;
  color: #fff;
  background: var(--brand-blue);
  box-shadow: var(--shadow-sm);
  pointer-events: none;
}

.special-card-type--infographic {
  background: var(--accent-red);
}

.section-header {
  display: flex;
  align-items: center;
  margin-bottom: var(--sp-lg);
  gap: var(--sp-md);
}

.section-header h1,
.section-header h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-headline);
  padding-left: var(--sp-md);
  border-left: 4px solid var(--brand-blue);
  background: linear-gradient(
    90deg,
    var(--brand-blue-pale) 0%,
    transparent 100%
  );
  padding: var(--sp-xs) var(--sp-md);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.section-header-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-color) 0%, transparent 100%);
}

.section-header a {
  font-size: 1.3rem;
  color: var(--accent-red);
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.2s;
}

.section-header a:hover {
  color: var(--accent-red-dark);
}

/* Tiêu đề khối là link (vd. "Multimedia"): giữ kiểu tiêu đề, không lấy kiểu link đỏ "Xem tất cả" */
.section-header h2 a {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  white-space: normal;
}

.section-header h2 a:hover {
  color: var(--brand-blue);
}

.topic-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow 0.25s,
    transform 0.25s;
  cursor: pointer;
}

.topic-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.topic-card-img {
  aspect-ratio: 16/10;
  overflow: hidden;
}

.topic-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.topic-card:hover .topic-card-img img {
  transform: scale(1.05);
}

.topic-card-body {
  padding: var(--sp-md);
}

/* Block + line-height riêng: nhãn dài (vd "KIẾN TẠO THƯƠNG HIỆU") xuống dòng
   trong thẻ hẹp không bị giãn theo line-height của thân thẻ */
.topic-card-cat {
  display: block;
  font-size: 1.1rem;
  line-height: 1.4;
  color: var(--brand-blue);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.topic-card-cat:hover {
  color: var(--brand-blue-dark);
  text-decoration: underline;
}

.topic-card h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.35;
  margin-top: var(--sp-xs);
}

.topic-card h3 a {
  color: var(--text-headline);
}

.topic-card h3 a:hover {
  color: var(--brand-blue);
}

.topic-card-meta {
  font-size: 1.1rem;
  color: var(--text-meta);
  margin-top: var(--sp-sm);
}

/* ============================================================
   MAIN CONTENT + SIDEBAR
   ============================================================ */
.content-section {
  padding: var(--sp-xl) 0;
}

.content-grid {
  display: grid;
  /* minmax(0, …): wide content (Google CSE tables, embeds) must not push the sidebar out */
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: var(--sp-xl);
}

/* News list */
.news-list-item {
  display: flex;
  /* Không stretch: ảnh bị kéo cao theo cột chữ sẽ đè aspect-ratio 3/2
     và object-fit cắt mất 2 bên ảnh (tiêu đề dài trên mobile) */
  align-items: flex-start;
  gap: var(--sp-md);
  padding: var(--sp-md);
  border-bottom: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: background 0.2s;
  cursor: pointer;
  margin: 0;
}

.news-list-item:first-child {
  padding-top: var(--sp-md);
}

.news-list-item:hover {
  background: var(--bg-section);
}

.news-list-thumb {
  width: 160px;
  flex-shrink: 0;
  aspect-ratio: 3/2;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-section);
}

.news-list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-list-content {
  flex: 1;
  min-width: 0;
}

.news-list-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-sm);
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.news-list-cat {
  font-size: 1rem;
  color: var(--brand-blue);
  font-weight: 400;
  background: var(--brand-blue-pale);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.news-list-cat:hover {
  background: var(--brand-blue);
  color: #fff;
}

.news-list-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-meta);
}

.news-list-content h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.35;
  margin-top: 2px;
}

.news-list-content h3 a {
  color: var(--text-headline);
}

.news-list-content h3 a:hover {
  color: var(--brand-blue);
}

.news-list-sapo {
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-top: var(--sp-xs);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

.news-list-cat .meta-icon,
.news-list-time .meta-icon {
  flex-shrink: 0;
  vertical-align: -1px;
}

/* Highlight box: khối nền trung tính như các khối khác; chỉ vạch tiêu đề đỏ
   ("nổi bật" = accent đỏ), cùng kiểu header rộng với .section-header */
.highlight-box {
  background: var(--bg-section);
  border-radius: var(--radius-md);
  padding: var(--sp-lg);
  margin: var(--sp-lg) 0;
  border: 1px solid var(--border-color);
}

.highlight-box .section-header {
  margin-bottom: var(--sp-md);
}

.highlight-box .section-header h2 {
  border-left-color: var(--accent-red);
  font-size: 1.6rem;
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-md);
}

.highlight-card-img {
  aspect-ratio: 3/2;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-section);
}

.highlight-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.highlight-card h4 {
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.35;
  margin-top: var(--sp-sm);
}

.highlight-card h4 a {
  color: var(--text-headline);
}

.highlight-card h4 a:hover {
  color: var(--brand-blue);
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: sticky;
  top: calc(var(--nav-height) + var(--sp-lg));
  align-self: start;
}

/* ============================================================
   AD SLOTS
   ============================================================ */
.ad-slot {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: var(--sp-lg) 0;
}

.ad-slot > * {
  margin-left: auto;
  margin-right: auto;
}

.ad-slot-fullwidth {
  background: var(--bg-section);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.ad-placeholder {
  display: inline-block;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-meta);
  font-size: 1.2rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ad-placeholder-728 {
  width: 728px;
  max-width: 100%;
  height: 90px;
}

.ad-placeholder-970 {
  width: 970px;
  max-width: 100%;
  height: 90px;
}

.ad-placeholder-300 {
  width: 300px;
  max-width: 100%;
  height: 250px;
}

.ad-placeholder-300h {
  width: 300px;
  max-width: 100%;
  height: 600px;
}

.ad-placeholder-inline {
  width: 100%;
  height: 100px;
}

.ad-slot-label {
  font-size: 1rem;
  color: var(--text-meta);
  margin-bottom: var(--sp-xs);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Sidebar widget */
.sidebar-widget {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  margin-bottom: var(--sp-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

/* Trong thẻ có viền: vạch xanh sát mép thẻ, kẻ ngăn với danh sách bên dưới */
.sidebar-widget-header {
  padding: var(--sp-md);
  border-bottom: 1px solid var(--border-color);
}

.sidebar-widget-header a {
  color: inherit;
}

.sidebar-widget-header a:hover {
  color: var(--brand-blue);
}

.popular-item {
  display: flex;
  gap: var(--sp-sm);
  padding: var(--sp-sm) var(--sp-md);
  border-bottom: 1px solid var(--border-color);
  align-items: flex-start;
}

.popular-item:last-child {
  border-bottom: none;
}

.popular-num {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--bg-white);
  line-height: 1;
  min-width: 26px;
  height: 26px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-blue);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.popular-num.top-3 {
  background: linear-gradient(
    135deg,
    var(--accent-red) 0%,
    var(--accent-red-dark) 100%
  );
}

.popular-item h4 {
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.4;
}

.popular-item h4 a {
  color: var(--text-headline);
}

.popular-item h4 a:hover {
  color: var(--brand-blue);
}

/* Sidebar banner box */
.sidebar-box {
  margin: 15px 0;
}
.sidebar-box > a,
.sidebar-box > img {
  display: block;
  max-width: 100%;
  margin: 0 auto;
}
.sidebar-box img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.sidebar-banner-placeholder {
  display: inline-block;
  width: 300px;
  max-width: 100%;
  height: 250px;
  background: var(--bg-section);
  border: 1px dashed var(--border-color);
  line-height: 250px;
  color: var(--text-meta);
  font-size: 1.3rem;
  border-radius: var(--radius-md);
}

/* ============================================================
   MEDIA SECTION (trang Video: danh sách, chuyên mục, chi tiết) - nền trắng
   như các trang khác; header khối, phân trang dùng kiểu mặc định
   ============================================================ */
.media-section {
  background: var(--bg-white);
  padding: var(--sp-xl) 0;
}

.media-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-xl);
}

.media-block-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-headline);
  margin-bottom: var(--sp-md);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.media-main-img {
  aspect-ratio: 16/9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-section);
  position: relative;
}

.media-main-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  background: rgba(230, 0, 36, 0.85);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-play-btn::after {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 0 10px 18px;
  border-color: transparent transparent transparent #fff;
  margin-left: 3px;
}

.media-main-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 600;
  margin-top: var(--sp-md);
  line-height: 1.35;
}

.media-main-title a {
  color: var(--text-headline);
}

.media-main-title a:hover {
  color: var(--brand-blue);
}

.media-list {
  margin-top: var(--sp-md);
}

.media-list-item {
  display: flex;
  gap: var(--sp-sm);
  padding: var(--sp-sm) 0;
  border-top: 1px solid var(--border-color);
}

.media-list-thumb {
  width: 100px;
  flex-shrink: 0;
  aspect-ratio: 16/9;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-section);
  position: relative;
}

.media-list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-list-item h4 {
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.35;
}

.media-list-item h4 a {
  color: var(--text-body);
}

.media-list-item h4 a:hover {
  color: var(--brand-blue);
}

/* ============================================================
   CATEGORY GRID
   ============================================================ */
.category-section {
  padding: var(--sp-xl) 0;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-lg);
}

.category-block {
}

/* Cột 1/4 hẹp: 1.4rem cho tên dài ("Doanh nghiệp - Doanh nhân") vừa 1 dòng ở 1366 */
.category-block-header {
  font-size: 1.4rem;
  margin-bottom: var(--sp-md);
  /* Tiêu đề cột chuyên mục trang chủ: không vạch xanh trái */
  padding-left: 0;
  border-left: none;
}

.category-block-header a:first-child {
  color: var(--text-headline);
}

.category-block-header a:first-child:hover {
  color: var(--brand-blue);
}

.category-block-header .cat-more {
  font-size: 1.2rem;
  color: var(--accent-red);
  font-weight: 600;
  /* "»" glyph alone is ~8px wide: give it a 32px tap target (WCAG 2.5.8) */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  margin-right: -8px;
}

.category-hot {
  margin-bottom: var(--sp-md);
}

.category-hot-img {
  aspect-ratio: 3/2;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-section);
}

.category-hot-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-hot h3 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.35;
  margin-top: var(--sp-sm);
}

.category-hot h3 a {
  color: var(--text-headline);
}

.category-hot h3 a:hover {
  color: var(--brand-blue);
}

/* Bài phụ: tiêu đề bên trái, ảnh nhỏ 3:2 bên phải, kẻ ngăn giữa các bài */
.category-list {
  border-top: 1px solid var(--border-color);
}

.category-list li {
  padding: var(--sp-sm) 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 1.4rem;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: var(--sp-sm);
}

.category-list li:last-child {
  border-bottom: none;
}

.category-list-title {
  flex: 1;
  min-width: 0;
  color: var(--text-body);
  font-weight: 400;
}

.category-list-title:hover {
  color: var(--brand-blue);
}

.category-list-thumb {
  flex-shrink: 0;
  width: 96px;
  aspect-ratio: 3/2;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-section);
}

.category-list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--brand-blue-dark);
  /* 0.85 alpha: 6.9:1 trên --brand-blue-dark (AA cần 4.5:1) */
  color: rgba(255, 255, 255, 0.85);
  padding-top: var(--sp-xl);
}

.footer a {
  color: rgba(255, 255, 255, 0.85);
}

.footer a:hover {
  color: #fff;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: var(--sp-xl);
  padding-bottom: var(--sp-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
}

/* Footer link/text size matches the main menu (14px/400) */
.footer-nav a {
  font-size: 14px;
  font-weight: 400;
}

.footer-main {
  display: grid;
  grid-template-columns: 250px 1fr 250px;
  gap: var(--sp-xl);
  padding: var(--sp-xl) 0;
}

.footer-brand img {
  max-height: 50px;
  margin-bottom: var(--sp-md);
}

.footer-social {
  display: flex;
  gap: var(--sp-md);
  margin-top: var(--sp-md);
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  transition: all 0.2s;
}

/* Nền trắng icon xanh: nền --brand-blue cũ gần trùng nền footer nên hover không thấy */
.footer-social a:hover {
  background: #fff;
  border-color: #fff;
  color: var(--brand-blue);
  transform: translateY(-2px);
}

.footer-info {
  font-size: 14px;
  line-height: 1.7;
}

.footer-info p {
  margin-bottom: var(--sp-sm);
  font-size: 14px;
}

.footer-links h3 {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: var(--sp-md);
}

/* Same rhythm as before (8px gap), but the gap moved into the link padding so
   each tap target is >= 24px tall */
.footer-links li {
  margin-bottom: 2px;
}

.footer-links a {
  display: inline-block;
  padding: 3px 0;
  font-size: 14px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--sp-lg) 0;
  text-align: center;
  font-size: 14px;
}

.footer-bottom p {
  margin-bottom: var(--sp-xs);
  font-size: 14px;
}

/* ============================================================
   BACK TO TOP
   ============================================================ */
/* Ẩn khi đang ở đầu trang để không đè nội dung màn đầu; app.js bật .is-visible */
.back-to-top {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  right: 20px;
  width: 44px;
  height: 44px;
  background: linear-gradient(
    135deg,
    var(--brand-blue) 0%,
    var(--brand-blue-light) 100%
  );
  color: #fff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-fab);
  transition: all 0.25s;
  z-index: 999;
  font-size: 1.8rem;
  line-height: 1;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.back-to-top.is-visible:hover {
  background: linear-gradient(
    135deg,
    var(--brand-blue-dark) 0%,
    var(--brand-blue) 100%
  );
  color: #fff;
  transform: translateY(-3px);
  box-shadow: var(--shadow-fab-hover);
}

/* ============================================================
   UTILITY
   ============================================================ */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(
    to right,
    var(--brand-blue),
    var(--accent-red)
  );
  width: 0%;
  z-index: 1001;
  transition: width 0.1s ease;
}

/* Demo placeholder images */
.placeholder-img {
  background: linear-gradient(
    135deg,
    var(--bg-section) 0%,
    var(--border-color) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-meta);
  font-size: 1.2rem;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb-nav {
  background: var(--bg-section);
  border-bottom: 1px solid var(--border-color);
  padding: var(--sp-sm) 0;
  font-size: 1.2rem;
}

.breadcrumb-nav a {
  color: var(--text-body);
  /* taller hit area without changing the bar height */
  display: inline-block;
  padding: 4px 0;
  margin: -4px 0;
}

.breadcrumb-nav a:hover {
  color: var(--brand-blue);
}

.breadcrumb-sep {
  color: var(--text-meta);
  margin: 0 4px;
}

.breadcrumb-current {
  color: var(--text-secondary);
}

/* ============================================================
   ARTICLE DETAIL
   ============================================================ */
.article-title {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-headline);
  margin-bottom: var(--sp-md);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-lg);
  font-size: 1.2rem;
  color: var(--text-meta);
  margin-bottom: var(--sp-lg);
}

.article-meta time,
.article-meta a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.article-meta a {
  color: var(--brand-blue);
  font-weight: 600;
}

.article-sapo {
  font-size: calc(1.6rem * var(--fs-scale, 1));
  font-weight: 600;
  line-height: 1.6;
  color: var(--text-headline);
  margin-bottom: var(--sp-lg);
}

.article-body {
  font-size: calc(1.5rem * var(--fs-scale, 1));
  line-height: 1.8;
  color: var(--text-body);
}

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  margin: var(--sp-md) 0;
}

/* Content Image (CMS figure/figcaption) */
.article-body figure.cnt-img {
  margin: var(--sp-lg) auto;
  text-align: center;
  width: auto;
}

.article-body figure.cnt-img img {
  display: block;
  margin: 0 auto;
  border-radius: var(--radius-sm);
}

.article-body figure.cnt-img figcaption,
.article-body .img-caption {
  display: block;
  background: var(--bg-section);
  color: var(--text-secondary);
  font-style: italic;
  text-align: center;
  font-size: calc(1.3rem * var(--fs-scale, 1));
  line-height: 1.6;
  padding: var(--sp-sm) var(--sp-md);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  margin-top: -2px;
}

/*
 * Ảnh chèn kiểu cũ trong đoạn văn (phần lớn bài cũ):
 * <p><img><em class="img-caption">…</em></p>. Ảnh căn giữa; đoạn chứa caption
 * co theo bề rộng ảnh để caption dính liền và rộng đúng bằng ảnh.
 */
.article-body p > img,
.article-body p > a > img {
  display: block;
  margin: var(--sp-md) auto;
}

/* Only when the image sits in the SAME <p>: a caption in its own <p> (also
   common in old posts) would otherwise shrink to one word per line */
.article-body p:has(> .img-caption):has(> img, > a > img) {
  width: fit-content;
  max-width: 100%;
  margin: var(--sp-lg) auto;
}

.article-body p > img:has(+ .img-caption) {
  margin: 0 auto;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

/* width:0 + min-width:100% → caption không nới rộng khối, chỉ lấp bề rộng ảnh */
.article-body p:has(> img, > a > img) > .img-caption {
  width: 0;
  min-width: 100%;
  box-sizing: border-box;
  margin-top: 0;
}

/* img always fills its container */
.article-body figure.cnt-img img {
  width: 100%;
}

/* Width variants (on the figure, not the img) */
.article-body .cnt-img.w-100 {
  width: 100%;
}
.article-body .cnt-img.w-75 {
  width: 75%;
}
.article-body .cnt-img.w-50 {
  width: 50%;
}
.article-body .cnt-img.w-25 {
  width: 25%;
}
.article-body .cnt-img.w-auto {
  width: auto;
}

/* Alignment variants */
.article-body .cnt-img.align-left,
.article-body .cnt-img.left {
  float: left;
  margin: 0 15px 15px 0;
  text-align: left;
}

.article-body .cnt-img.align-right,
.article-body .cnt-img.right {
  float: right;
  margin: 0 0 15px 15px;
  text-align: right;
}

.article-body .cnt-img.align-center,
.article-body .cnt-img.center {
  margin-left: auto;
  margin-right: auto;
  clear: both;
}

/* Device visibility */
.article-body .desktop-only {
  display: block;
}
.article-body .mobile-only {
  display: none;
}

.article-body p {
  margin-bottom: var(--sp-md);
}

/* Link trong bài: thẻ a toàn cục mang màu chữ tiêu đề, gần như chữ thân bài,
   nên tô màu thương hiệu để người đọc nhận ra internal link (không gạch chân) */
.article-body a {
  color: var(--brand-blue);
}

.article-body a:hover {
  color: var(--brand-blue-dark);
}

.article-body h2,
.article-body h3 {
  font-family: var(--font-heading);
  color: var(--text-headline);
  margin: var(--sp-lg) 0 var(--sp-md);
}

.article-body blockquote {
  border-left: 4px solid var(--brand-blue);
  padding: var(--sp-md) var(--sp-lg);
  margin: var(--sp-lg) 0;
  background: var(--brand-blue-pale);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
}

/* Box nổi bật do plugin highlighttext của CMS chèn:
   <div class="highlight [w-50|w-75|w-100] [left|right] [bg-info|bg-danger|...]">.
   Không có class nào thêm thì là box hết cột, màu mặc định (xanh thương hiệu). */
.article-body .highlight {
  --hl-bg: var(--brand-blue-pale);
  --hl-bar: var(--brand-blue);
  clear: both;
  background: var(--hl-bg);
  border-left: 4px solid var(--hl-bar);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--sp-md) var(--sp-lg);
  margin: var(--sp-lg) 0;
}

.article-body .highlight > :last-child {
  margin-bottom: 0;
}

.article-body .highlight.w-50 {
  width: 50%;
}
.article-body .highlight.w-75 {
  width: 75%;
}
.article-body .highlight.w-100 {
  width: 100%;
}

.article-body .highlight.left {
  float: left;
  margin: 6px 20px 16px 0;
}
.article-body .highlight.right {
  float: right;
  margin: 6px 0 16px 20px;
}

.article-body .highlight.bg-danger {
  --hl-bg: var(--accent-red-pale);
  --hl-bar: var(--accent-red);
}
.article-body .highlight.bg-warning {
  --hl-bg: #fff7dd;
  --hl-bar: #ffc507;
}
.article-body .highlight.bg-success {
  --hl-bg: #ecf8f0;
  --hl-bar: #1e9e57;
}
.article-body .highlight.bg-primary {
  --hl-bar: var(--brand-blue-deep);
}

/* Mobile: box float nửa cột quá hẹp để đọc, trả về hết cột. */
@media (max-width: 575px) {
  .article-body .highlight.left,
  .article-body .highlight.right {
    float: none;
    width: 100%;
    margin: var(--sp-lg) 0;
  }
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--sp-md) 0;
}

.article-body td,
.article-body th {
  border: 1px solid var(--border-color);
  padding: var(--sp-sm) var(--sp-md);
  font-size: calc(1.4rem * var(--fs-scale, 1));
}

/* Responsive video/iframe embeds (Facebook, YouTube, etc.) */
.article-body iframe {
  max-width: 100%;
  border: none;
  border-radius: var(--radius-sm);
  margin: var(--sp-md) 0;
}

.article-body iframe[src*="facebook.com"],
.article-body iframe[src*="youtube.com"],
.article-body iframe[src*="youtu.be"] {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16/9;
}

/* Facebook SDK embeds */
.article-body .fb-video,
.article-body .fb_iframe_widget {
  width: 100% !important;
  margin: var(--sp-md) 0;
}
.article-body .fb-video span,
.article-body .fb-video iframe,
.article-body .fb_iframe_widget span,
.article-body .fb_iframe_widget iframe {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16/9;
}

/* ============================================================
   SHARING BUTTONS
   ============================================================ */
.sharing-bar {
  display: flex;
  gap: var(--sp-sm);
  margin: var(--sp-lg) 0;
  padding: var(--sp-md) 0;
  border-top: 1px solid var(--border-color);
}

.sharing-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  border: none;
}

/* Icon nét cùng bộ với .meta-icon (viewBox 24, stroke 2) */
.sharing-btn svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.sharing-btn-fb {
  background: var(--brand-blue);
  color: #fff;
}

.sharing-btn-fb:hover {
  background: var(--brand-blue-dark);
  color: #fff;
}

.sharing-btn-print {
  background: var(--bg-section);
  color: var(--text-body);
  border: 1px solid var(--border-color);
}

.sharing-btn-print:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

/* ============================================================
   ARTICLE TAGS
   ============================================================ */
.article-tags {
  margin: var(--sp-lg) 0;
  padding: var(--sp-md) 0;
  border-top: 1px solid var(--border-color);
}

.article-tags-label {
  font-size: 1.3rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.article-tag-link {
  display: inline-block;
  margin: 4px 2px;
  padding: 4px 12px;
  background: var(--brand-blue-pale);
  color: var(--brand-blue);
  font-size: 1.2rem;
  font-weight: 500;
  border-radius: var(--radius-full);
}

.article-tag-link:hover {
  background: var(--brand-blue);
  color: #fff;
}

/* ============================================================
   RELATED ARTICLES
   ============================================================ */
.relate-section {
  margin: var(--sp-xl) 0;
}

.relate-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-lg);
}

.relate-item-img {
  aspect-ratio: 3/2;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-section);
}

.relate-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.relate-item h4 {
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.35;
  margin-top: var(--sp-sm);
}

.relate-item h4 a {
  color: var(--text-headline);
}

.relate-item h4 a:hover {
  color: var(--brand-blue);
}

.relate-item-time {
  font-size: 1.1rem;
  color: var(--text-meta);
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.meta-icon {
  flex-shrink: 0;
  vertical-align: -1px;
  opacity: 0.85;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination-nav {
  margin: var(--sp-xl) 0;
  text-align: center;
}

.pagination-list {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.pagination-link,
.pagination-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  font-size: 1.3rem;
}

.pagination-link {
  border: 1px solid var(--border-color);
  color: var(--text-body);
}

.pagination-link:hover {
  background: var(--brand-blue-pale);
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

.pagination-current {
  background: var(--brand-blue);
  color: #fff;
  font-weight: 600;
}

.pagination-info {
  margin-left: var(--sp-sm);
  font-size: 1.2rem;
  color: var(--text-meta);
}

/* ============================================================
   CATEGORY LISTING
   ============================================================ */
/* Sub-category dropdown (<details>) sitting at the right end of the section header */
.cat-child-menu {
  position: relative;
  flex-shrink: 0;
}

.cat-child-toggle {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  min-height: 36px;
  padding: 0 var(--sp-md);
  background: var(--brand-blue-pale);
  color: var(--brand-blue);
  font-size: 1.3rem;
  font-weight: 400;
  border-radius: var(--radius-full);
  cursor: pointer;
  list-style: none;
  user-select: none;
  touch-action: manipulation;
  transition: background 0.2s, color 0.2s;
}

.cat-child-toggle::-webkit-details-marker {
  display: none;
}

/* Chevron, flips when open */
.cat-child-toggle::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s;
}

.cat-child-menu[open] .cat-child-toggle::after {
  transform: translateY(1px) rotate(-135deg);
}

.cat-child-toggle:hover,
.cat-child-menu[open] .cat-child-toggle {
  background: var(--brand-blue);
  color: #fff;
}

.cat-child-toggle:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}

.cat-child-panel {
  position: absolute;
  top: calc(100% + var(--sp-xs));
  right: 0;
  z-index: 50;
  width: max-content;
  min-width: 220px;
  max-width: min(320px, calc(100vw - 2 * var(--sp-lg)));
  max-height: 60vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--sp-xs) 0;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}

.cat-child-panel ul {
  list-style: none;
}

/* Doubled class beats `.section-header a` (red "Xem thêm" link style) */
.cat-child-panel .cat-child-link {
  display: block;
  padding: 10px var(--sp-lg);
  color: var(--text-headline);
  font-size: 1.4rem;
  font-weight: 500;
  white-space: normal;
  transition: background 0.2s, color 0.2s;
}

.cat-child-panel .cat-child-link:hover,
.cat-child-panel .cat-child-link:active {
  background: var(--brand-blue-pale);
  color: var(--brand-blue);
}

.cat-child-link:focus-visible {
  outline-offset: -2px;
}

/* Mục con đang xem (trang chuyên mục con liệt kê các mục cùng cấp) */
.cat-child-panel .cat-child-link[aria-current="page"] {
  color: var(--brand-blue);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--brand-blue);
}

/* Bài nổi bật chuyên mục: 1 bài lớn 2/3 bên trái, 2 bài nhỏ xếp dọc 1/3 bên phải */
.cat-hot-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: var(--sp-lg);
  margin-bottom: var(--sp-lg);
  padding-bottom: var(--sp-lg);
  border-bottom: 1px solid var(--border-color);
}

/* Chỉ có 1 bài nổi bật: bài lớn chiếm cả hàng */
.cat-hot-main:only-child {
  grid-column: 1 / -1;
}

.cat-hot-side {
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
}

.cat-hot-img {
  aspect-ratio: 3/2;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-section);
}

.cat-hot-sub .cat-hot-img {
  border-radius: var(--radius-sm);
}

.cat-hot-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cat-hot-title {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.35;
  margin-top: var(--sp-sm);
}

.cat-hot-main .cat-hot-title {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.3;
}

.cat-hot-sub .cat-hot-title {
  font-size: 1.4rem;
}

.cat-hot-title a {
  color: var(--text-headline);
}

.cat-hot-title a:hover {
  color: var(--brand-blue);
}

.cat-hot-sapo {
  font-size: 1.4rem;
  color: var(--text-secondary);
  margin-top: var(--sp-xs);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   VIDEO PAGES
   ============================================================ */
.video-cat-nav {
  display: flex;
  gap: var(--sp-sm);
  flex-wrap: wrap;
  margin-bottom: var(--sp-xl);
}

.video-cat-link {
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 1.3rem;
  font-weight: 400;
  background: var(--brand-blue-pale);
  color: var(--brand-blue);
}

.video-cat-link:hover,
.video-cat-link.active {
  background: var(--brand-blue);
  color: #fff;
}

.video-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-lg);
}

.video-grid-item-img {
  aspect-ratio: 16/9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-section);
  position: relative;
}

.video-grid-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-grid-item-img .media-play-btn {
  width: 36px;
  height: 36px;
}

.video-grid-item h4 {
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.35;
  margin-top: var(--sp-sm);
}

.video-grid-item h4 a {
  color: var(--text-headline);
}

.video-grid-item h4 a:hover {
  color: var(--brand-blue);
}

/* Video Detail */
.video-player-wrap {
  aspect-ratio: 16/9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  margin-bottom: var(--sp-lg);
}

.video-player-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.video-detail-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-headline);
  line-height: 1.3;
  margin-bottom: var(--sp-md);
}

.video-detail-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-lg);
  padding-bottom: var(--sp-lg);
  border-bottom: 1px solid var(--border-color);
}

.video-detail-desc {
  font-size: 1.4rem;
  line-height: 1.7;
  color: var(--text-body);
  margin-bottom: var(--sp-xl);
}


/* Search page */
.search-page-form {
  margin-bottom: var(--sp-lg);
}
.search-page-input-wrap {
  display: flex;
  gap: 0;
  border: 2px solid var(--brand-blue);
  border-radius: var(--radius-md);
  overflow: hidden;
}
/* Input bỏ outline (sẽ bị overflow:hidden cắt), focus vẽ lên khung bao */
.search-page-input-wrap:focus-within {
  box-shadow: 0 0 0 3px rgba(0, 96, 168, 0.35);
}
.search-page-input {
  flex: 1;
  border: none;
  padding: var(--sp-md) var(--sp-lg);
  font-size: 1.5rem;
  outline: none;
  background: var(--bg-white);
  color: var(--text-headline);
}
.search-page-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
  padding: var(--sp-md) var(--sp-lg);
  background: var(--brand-blue);
  color: #fff;
  border: none;
  font-size: 1.4rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.search-page-btn:hover {
  background: var(--brand-blue-dark);
}
/* Google CSE: dòng tên site + breadcrumb URL của kết quả và thanh phân trang
   1–10 đều không xuống dòng, trên mobile đẩy trang rộng ~470px. */
.gsc-webResult .gsc-url-top {
  overflow: hidden;
  text-overflow: ellipsis;
}
/* CSE đặt .gsc-cursor inline, các trang dính liền không có điểm ngắt dòng */
.gse-results-wrap .gsc-cursor-box .gsc-cursor {
  display: flex;
  flex-wrap: wrap;
  row-gap: 8px;
}
.search-page-result-info {
  font-size: 1.4rem;
  color: var(--text-secondary);
  margin-bottom: var(--sp-lg);
  padding-bottom: var(--sp-md);
  border-bottom: 1px solid var(--border-color);
}
.search-page-empty {
  text-align: center;
  padding: calc(var(--sp-xl) * 2) 0;
  color: var(--text-secondary);
  font-size: 1.4rem;
}

/* Search empty state */
.search-empty {
  text-align: center;
  padding: var(--sp-xl) 0;
  color: var(--text-secondary);
}

.search-empty-title {
  font-size: 1.6rem;
  margin-bottom: var(--sp-md);
}

.search-empty-hint {
  font-size: 1.3rem;
}

/* ============================================================
   ARTICLE FONT SIZE - nút nổi chỉnh cỡ chữ (news/inc/font-size-control.php)
   Cỡ đọc = cỡ gốc của khối x --fs-scale, nên cỡ "vừa" giữ nguyên cỡ hiện có
   ở mọi bề ngang (desktop 1.5rem, mobile 1.4rem - xem .article-body).
   ============================================================ */
html[data-fs="sm"] {
  --fs-scale: 0.9;
}

html[data-fs="lg"] {
  --fs-scale: 1.15;
}

/* Xếp ngay trên .back-to-top (bottom 20px, cao 44px) cùng cỡ và bo góc,
   để hai nút đọc ra một cột tiện ích. 74px = 20 + 44 + 10. */
.fs-fab {
  position: fixed;
  right: 20px;
  bottom: calc(74px + env(safe-area-inset-bottom, 0px));
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--sp-sm);
}

.fs-fab__panel {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-white);
  box-shadow: var(--shadow-md);
}

.fs-fab__panel[hidden] {
  display: none;
}

/* Canh trái chung một mép để ba chữ A thẳng cột; dấu -/+ tràn sang phải. */
.fs-fab__btn {
  display: flex;
  align-items: center;
  width: 44px;
  height: 44px;
  padding: 0 0 0 13px;
  border: 0;
  background: transparent;
  color: var(--text-headline);
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.fs-fab__btn + .fs-fab__btn {
  border-top: 1px solid var(--border-color);
}

.fs-fab__btn:hover {
  background: var(--brand-blue-pale);
  color: var(--brand-blue);
}

.fs-fab__btn[aria-pressed="true"] {
  background: var(--brand-blue);
  color: #fff;
}

.fs-fab__btn:focus,
.fs-fab__toggle:focus {
  outline: none;
}

.fs-fab__btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -3px;
}

.fs-fab__toggle:focus-visible {
  outline: 2px solid var(--accent-red);
  outline-offset: 2px;
}

/* Mặt chữ A lớn/nhỏ theo cỡ: nhìn là biết, không phải suy từ dấu. */
.fs-fab__btn--sm,
.fs-fab__toggle[data-fs-key="sm"] {
  font-size: 1.4rem;
}

.fs-fab__btn--md,
.fs-fab__toggle[data-fs-key="md"] {
  font-size: 1.6rem;
}

.fs-fab__btn--lg,
.fs-fab__toggle[data-fs-key="lg"] {
  font-size: 1.9rem;
}

.fs-fab__glyph {
  display: inline-flex;
  align-items: center;
}

.fs-fab__sign {
  font-size: 0.75em;
  font-weight: 500;
  margin-left: 2px;
}

.fs-fab__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-light) 100%);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1;
  box-shadow: var(--shadow-fab);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.fs-fab__face--open,
.fs-fab__toggle[aria-expanded="true"] .fs-fab__face--closed {
  display: none;
}

.fs-fab__toggle[aria-expanded="true"] .fs-fab__face--open {
  display: inline;
}

.section-block {
  margin: var(--sp-xl) 0;
}

/* ============================================================
   E-MAGAZINE - cover tràn toàn màn hình, thân bài một cột 770px
   Màu/font theo bài: block/news-theme-style.php
   ============================================================ */
.emag-cover img {
  display: block;
  width: 100%;
  height: auto;
}

.emag-content {
  padding: var(--sp-xl) 0;
}

.emag-title {
  max-width: 900px;
  margin: var(--sp-lg) auto var(--sp-xl);
  padding: 0 var(--sp-lg);
  text-align: center;
  font-family: var(--font-heading);
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-headline);
}

.emag-body {
  width: 770px;
  max-width: calc(100% - 2 * var(--sp-lg));
  margin: 0 auto;
}

/* E-magazine cố ý để sapo NHỎ hơn thân bài (ngược với bài thường), vẫn theo
   --fs-scale để nút chỉnh cỡ chữ kéo theo. */
.emag-body .article-sapo {
  font-size: calc(1.45rem * var(--fs-scale, 1));
  font-weight: 400;
}

/* Ảnh dàn trang từ editor eMagazine: align-full tràn 100vw, align-overflow
   tràn ra hai bên 980px, align-left/right ôm chữ. body đã overflow-x:hidden. */
.emag-body .align-center:not(h2):not(h3):not(h4) {
  width: 100%;
  margin: var(--sp-md) auto var(--sp-xl);
}

.emag-body .align-full {
  position: relative;
  min-width: 100vw;
  left: calc((100% - 100vw) / 2);
  margin: var(--sp-md) 0 var(--sp-xl);
}

.emag-body .align-overflow {
  position: relative;
  min-width: 980px;
  left: calc((100% - 980px) / 2);
  margin: var(--sp-md) 0 var(--sp-xl);
}

.emag-body .align-left {
  float: left;
  margin-right: 15px;
}

.emag-body .align-right {
  float: right;
  margin-left: 15px;
}

.emag-body figure img,
.emag-body .align-full img,
.emag-body .align-overflow img {
  width: 100%;
  height: auto;
  margin: 0;
}

.emag-body .align-full img,
.emag-body .align-overflow img {
  border-radius: 0;
}

.emag-after {
  max-width: 900px;
}

/* ============================================================
   INFOGRAPHIC - ảnh tĩnh dài, khung 1170px không sidebar
   Màu/font theo bài: block/news-theme-style.php
   ============================================================ */
.info-container {
  max-width: 1170px;
}

.info-card {
  padding: var(--sp-xl) var(--sp-lg);
  border-radius: var(--radius-lg);
}

.info-wrap {
  max-width: 820px;
  margin: 0 auto;
}

.info-template .article-title {
  text-align: center;
  font-size: 2.8rem;
}

.info-template .article-meta {
  justify-content: center;
}

.info-template .article-sapo {
  font-weight: 600;
}

.info-body {
  text-align: center;
}

/* Ảnh infographic thường cắt thành nhiều lát xếp liền nhau: không bo góc,
   không khoảng hở. */
.info-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 0;
}

.info-card .sharing-bar {
  justify-content: center;
}

/* ============================================================
   IMAGE REVEAL - ảnh hiện dần khi cuộn tới (news/inc/image-reveal.php)
   Chỉ khi <html> có .has-img-reveal (script inline đặt); tắt JS hoặc không có
   IntersectionObserver thì ảnh hiện bình thường. Đặt lên <img>, không lên
   <figure>, để không đè transform/left của ảnh dàn trang.
   ============================================================ */
.has-img-reveal .emag-body img,
.has-img-reveal .info-body img {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s cubic-bezier(0.2, 0.7, 0.3, 1),
    transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.has-img-reveal .emag-body img.is-revealed,
.has-img-reveal .info-body img.is-revealed {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .has-img-reveal .emag-body img,
  .has-img-reveal .info-body img {
    transition: none;
  }
}

/* Nút In chép innerHTML của #print-content; ảnh chưa cuộn tới đang opacity:0
   sẽ in ra trắng, Ctrl+P cũng vậy. */
@media print {
  .fs-fab {
    display: none !important;
  }

  .has-img-reveal .emag-body img,
  .has-img-reveal .info-body img {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ============================================================
   SECTION BLOCKS (figure.blk-section) - chèn qua plugin 'sectionblock' của CMS
   Dùng chung article / emagazine / infographic; layout theo taxonomy align-*.
   ============================================================ */
.article-body figure.blk-section {
  margin: 20px auto 24px;
  text-align: center;
}

.article-body figure.blk-section img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.article-body figure.blk-section figcaption {
  margin-top: var(--sp-sm);
  color: var(--brand-blue);
  font-style: italic;
  text-align: center;
}

.article-body figure.blk-section.align-center {
  max-width: 70%;
}

/* Hết bề ngang cột nội dung - khác align-full ở chỗ không tràn ra ngoài cột. */
.article-body figure.blk-section.align-container,
.article-body figure.blk-section.blk-grid {
  max-width: 100%;
}

/* Nửa cột, chữ chạy quanh. width (không phải max-width) để khối float không co
   theo ảnh nhỏ, bố cục bài nào cũng giống nhau. */
.article-body figure.blk-section.align-left,
.article-body figure.blk-section.align-right {
  width: 50%;
}

.article-body figure.blk-section.align-left {
  float: left;
  margin: 6px 20px 16px 0;
}

.article-body figure.blk-section.align-right {
  float: right;
  margin: 6px 0 16px 20px;
}

/* Khối float không được thoát ra ngoài bài, đè lên tags / sharing bên dưới. */
.article-body::after {
  content: "";
  display: table;
  clear: both;
}

/* Khối nhiều ảnh (2/3 ảnh): hàng ngang chia đều. width tường minh để hàng 1 ảnh
   không co theo nội dung. */
.article-body figure.blk-section .blk-grid-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  width: 100%;
}

.article-body figure.blk-section .blk-grid-row img {
  flex: 1 1 0;
  width: 100%;
  min-width: 0;
  height: auto;
  margin: 0;
}

.article-body figure.blk-section .blk-grid-row + .blk-grid-row {
  margin-top: 8px;
}

/* full-bleed CHỈ trong eMagazine/Infographic (thân bài căn giữa viewport). Bài
   thường có sidebar: align-full giữ bề ngang cột chữ. */
.info-body .align-full {
  position: relative;
  min-width: 100vw;
  left: calc((100% - 100vw) / 2);
}

.emag-body figure.blk-section.align-full img,
.info-body figure.blk-section.align-full img {
  width: 100%;
}

@media (max-width: 575px) {
  .article-body figure.blk-section.align-left,
  .article-body figure.blk-section.align-right {
    float: none;
    width: 100%;
    margin: 20px auto 24px;
  }

  .article-body figure.blk-section .blk-grid-row {
    flex-direction: column;
  }
}
