:root {
  --text-color: #090909;
  --text-color-soft: #444344;
  --text-primary-color: #1b75bc;
  --highlight-color: rgb(10, 100, 180);
}

body {
  font-family: "Roboto", sans-serif;
}

.merriweather {
  font-optical-sizing: auto;
  font-family: "Merriweather", serif;
}

.roboto {
  font-family: "Roboto", ui-sans-serif;
}

.roboto\! {
  font-family: "Roboto", ui-sans-serif !important;
}

.text-primary {
  color: var(--text-primary-color);
}

.t\:container {
  padding-left: 15px;
  padding-right: 15px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  max-width: 100%;
}

@media (min-width: 992px) {
  .t\:container {
    max-width: 960px !important;
  }
}

@media (min-width: 1200px) {
  .t\:container {
    max-width: 1140px !important;
  }
}

@media (min-width: 1400px) {
  .t\:container {
    max-width: 1320px !important;
  }
}

/* img */

.img-block {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
}

.img-block img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-block.lg {
  width: 260px;
  max-width: 50%;
}

.img-block.md {
  width: 192px;
  max-width: 50%;
}

.img-block.sm {
  width: 178px;
  max-width: 50%;
}

.img-block.ssm {
  width: 145px;
  max-width: 50%;
}

/* thumbnail icon badge — renders only where a .thumb-badge element exists in the HTML.
   The icon is supplied via inline background-image in the markup; CSS frames/sizes it.
   Size scales with the container on the vnexpress scale (24-34px). */
.thumb-badge {
  width: clamp(24px, 8%, 34px);
  aspect-ratio: 1;
  border-radius: 20%;
  background-color: rgba(17, 17, 17, 0.42);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 58%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  pointer-events: none;
}

/* default placement: pinned to the image's bottom-left corner */
.img-block .thumb-badge {
  position: absolute;
  left: 6px;
  bottom: 6px;
  z-index: 2;
}

/* variant: sits in flow just above the title (cards whose title overlays the image) */
.thumb-badge.is-over-title {
  display: block;
  margin-bottom: 6px;
}

/* title */
.title {
  color: var(--text-color);
  font-weight: 700;
  margin-top: 4px;
  font-family: "Merriweather", serif;
}

.title.l1 {
  font-size: 1.5rem;
}

.title.l2 {
  font-size: 1.125rem;
}

.title.l3 {
  font-size: 1rem;
}

.title.l4 {
  font-size: 0.875rem;
}

@media (max-width: 1000px) {
  .title.l1 {
    font-size: 1.25rem;
  }

  .title.l2 {
    font-size: 1.125rem;
  }

  .title {
    line-height: 1.3;
  }
}

.desc {
  color: var(--text-color-soft);
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  margin-top: 8px;
  font-size: 1rem;
  overflow-wrap: break-word;
}

a:hover {
  color: var(--highlight-color);
}

/* swiper */
.swiper-pagination .swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background-color: #67b2eb;
  transition: all 0.3s ease;
}

.swiper-pagination .swiper-pagination-bullet-active {
  background-color: #0a64b4;
  width: 67px !important;
  border-radius: 9999px !important;
}

/* cate-label */
.cate-label {
  padding-bottom: 6px;
  border-bottom: 1px dashed #d9d9d9;
  flex-wrap: wrap;
}

.cate-label h2,
.cate-label h3 {
  color: #0a64b4;
  font-weight: 700;
  font-size: 1.35rem;
  text-transform: uppercase;
  font-family: "Merriweather", serif;
}

.header-main {
  transition:
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.header-main.header-main--sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: auto;
  z-index: 100;
  background-color: #fff;
}

.logo-header.logo-header--compact {
  max-height: 40px;
  width: auto;
  height: auto;
}

.article-date {
  font-size: 0.8rem;
  color: var(--text-color-soft);
  display: flex;
  align-items: center;
  gap: 5px;
}

.t\:break-words {
  overflow-wrap: break-word;
}

/* transform đưa khối tiêu đề lên trên ảnh float bên cạnh ⇒ chặn click nửa trên ảnh; chỉ link nhận click */
.t\:flow-root .title {
  margin-top: 0px;
  transform: translateY(-4px);
  pointer-events: none;
}

.t\:flow-root .title a {
  pointer-events: auto;
}

figcaption {
  margin-top: 0px;
  margin-bottom: 0px;
}

figcaption * {
  margin: 0px !important;
}

.article-prose p {
  overflow-wrap: break-word;
}

/* img.loading {
    filter: blur(6px);
} */

#content > *:first-child {
  margin-top: 0px !important;
}

#content > figure:first-child,
#content > :first-child > figure {
  margin-top: 0px !important;
}

.article-prose .dropcap::first-letter {
  float: left;
  font-size: 3.75rem;
  line-height: 0.95;
  font-weight: 700;
  color: #0a64b4;
  padding: 0.25rem 0.5rem 0 0;
}

.article-prose h2 {
  font-size: 1.6rem !important;
  font-weight: 700 !important;
  margin: 1rem 0 0.75rem !important;
}
.article-prose h3 {
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  margin: 1rem 0 0.5rem !important;
}
.article-prose h4 {
  font-size: 1.4rem !important;
  font-weight: 700 !important;
  margin: 1rem 0 0.4rem !important;
}
.article-prose h5 {
  font-size: 1.375rem !important;
  font-weight: 700 !important;
  margin: 0.875rem 0 0.35rem !important;
}
.article-prose h6 {
  font-size: 1.3125rem !important;
  font-weight: 700 !important;
  margin: 0.75rem 0 0.3rem !important;
  letter-spacing: 0.03em !important;
}

/* ---------------------------------------------------------------------------
   Fallback độ mờ cho trình duyệt không có color-mix() (Chrome < 111)

   Tailwind v4 biên dịch modifier độ mờ (`t:bg-black/50`) thành
   `color-mix(in oklab, var(--t-color-black) 50%, transparent)` và tự bọc
   `@supports`. Nhưng fallback nó chọn là MÀU ĐẶC 100%, nên trên Chrome 109
   (bản cuối cho Windows 7/8.1) lớp phủ che kín nội dung bên dưới.

   Khối này chỉ tồn tại ở đúng những trình duyệt thiếu color-mix(), nên không
   đổi một pixel nào trên trình duyệt hiện đại — kể cả quan hệ đè nhau giữa các
   utility. `color-mix(in oklab, C p%, transparent)` cho ra đúng C với alpha
   nhân p%, nên rgba() là tương đương chính xác chứ không phải xấp xỉ.

   Chỉ liệt kê class THỰC SỰ có trong output.css được phục vụ. Thêm class mới
   thì bổ sung ở đây; a_script/check-legacy.ts sẽ báo nếu có color-mix() lọt ra
   ngoài @supports.
   --------------------------------------------------------------------------- */
@supports not (color: color-mix(in lab, red, red)) {
  .t\:bg-black\/50 { background-color: rgba(0, 0, 0, 0.5); }
  .t\:bg-white\/10 { background-color: rgba(255, 255, 255, 0.1); }
  .t\:bg-white\/15 { background-color: rgba(255, 255, 255, 0.15); }
  .t\:bg-white\/20 { background-color: rgba(255, 255, 255, 0.2); }

  /* Utility gốc nằm trong @media (hover: hover) — giữ đúng để không bật trên máy cảm ứng. */
  @media (hover: hover) {
    .t\:hover\:bg-white\/25:hover { background-color: rgba(255, 255, 255, 0.25); }
  }

  .t\:text-white\/60 { color: rgba(255, 255, 255, 0.6); }
  .t\:text-white\/70 { color: rgba(255, 255, 255, 0.7); }
  .t\:text-white\/80 { color: rgba(255, 255, 255, 0.8); }
  .t\:text-white\/85 { color: rgba(255, 255, 255, 0.85); }
  .t\:border-white\/20 { border-color: rgba(255, 255, 255, 0.2); }
}
