/* ==========================================================================
   BICO MEDIA — CORPORATE WEBSITE DESIGN SYSTEM (v0.8)
   Nguồn chuẩn: thuong-hieu/DESIGN-WEB.md (v0.8) + Lõi chung brand-bico/SKILL.md
   Phong cách: Modern Swiss Bento kiểu Apple (thẻ trắng bo 24px trên nền #F2F2F7,
   bóng loang nhẹ mức B, thang chữ Inter 17/28 & 20/30, nút/ô nhập 44px bo 14px)
   ========================================================================== */

:root {
  /* --- 1. BẢNG MÀU CHUẨN BICO (DESIGN-WEB.md v0.8) --- */
  --background: #F2F2F7;           /* Nền xám sáng kiểu Apple đồng bộ toàn thương hiệu (07/11) */
  --surface: #FFFFFF;              /* Thẻ trắng nổi trên nền xám */
  --surface-hover: #FAFAFA;
  --muted: #E4E4E7;                /* Nền phụ phân đoạn, pill, nút phụ */
  --muted-hover: #D4D4D8;
  --muted-pressed: #C4C4CA;
  --muted-subtle: #EAECEF;
  --disabled: #EDEDF0;
  --on-disabled: #6B6B70;

  --on-surface: #080808;           /* Chữ chính Đen BICO */
  --on-surface-muted: #616161;     /* Chữ phụ Xám chì chuẩn AA */
  --input-border: #8A8A8A;
  --divider: #E5E5EA;
  --focus: #1E6EF4;                /* Vòng focus bàn phím 2px */

  --primary: #D0161F;              /* Đỏ BICO (~10% điểm nhấn) */
  --primary-hover: #B5121A;
  --primary-pressed: #9E0F17;
  --primary-text: #D0161F;
  --primary-soft: rgba(208, 22, 31, 0.08);
  --on-primary: #FFFFFF;

  /* Màu trạng thái chuẩn DESIGN-WEB.md v0.8 (đạt tương phản >= 4.5:1) */
  --error: #A3121A;
  --error-container: #FBE8E9;
  --success: #007A2D;
  --success-container: #E5F3EA;
  --info: #1A5FDB;
  --info-container: #E8F0FE;
  --warning: #B34A00;
  --warning-container: #FBEEE2;

  /* --- 2. ĐỘ NỔI & KÍNH MỜ (ELEVATION CHUẨN DESIGN-WEB.md v0.8) --- */
  --glass-bg: rgba(255, 255, 255, 0.82);
  --border-subtle: rgba(0, 0, 0, 0.06);
  --border-strong: rgba(0, 0, 0, 0.12);
  /* Bóng mềm mức B cho thẻ Bento và KPI */
  --shadow-card: 0 0 0 0.5px rgba(0, 0, 0, 0.04), 0 2px 12px rgba(0, 0, 0, 0.07);
  --shadow-card-hover: 0 0 0 0.5px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.10);
  --shadow-dialog: 0 0 0 0.5px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.08), 0 8px 30px rgba(0, 0, 0, 0.14), 0 24px 60px rgba(0, 0, 0, 0.08);

  /* --- 3. BO GÓC KIỂU APPLE (SHAPES v0.8) --- */
  --radius-xs: 4px;    /* Nhãn (rounded.label) */
  --radius-sm: 10px;   /* Mục con trong pill */
  --radius-md: 14px;   /* Nút bấm, ô nhập, caption-bar (rounded.control) */
  --radius-lg: 16px;   /* Hộp con, callout (rounded.sub) */
  --radius-xl: 24px;   /* Thẻ Bento, thẻ KPI, thẻ CTA (rounded.card mức B) */
  --radius-full: 999px;/* Thanh điều hướng, avatar (rounded.full) */

  /* --- 4. KHOẢNG CÁCH (SPACING v0.8) --- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 48px;
  --space-9: 64px;

  /* --- 5. FONT CHỮ CHUẨN BICO (Inter + JetBrains Mono) --- */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --container-max: 1240px;
  --header-height: 64px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- CHẾ ĐỘ TỐI (DARK MODE CHUẨN DESIGN-WEB.md v0.8 - APPLE HIG) --- */
[data-theme="dark"] {
  --background: #121214;
  --surface: #1C1C1F;
  --surface-hover: #242428;
  --muted: #2A2A2E;
  --muted-hover: #34343A;
  --muted-pressed: #3E3E46;
  --muted-subtle: #262628;

  --on-surface: #F5F5F7;
  --on-surface-muted: #A1A1A6;
  --divider: rgba(255, 255, 255, 0.08);

  --primary-text: #FF5A62; /* Chữ, chấm, liên kết đỏ trên nền tối đạt 6.1:1 */
  --primary-soft: rgba(255, 90, 98, 0.16);

  --success: #5CC47A;
  --success-container: #10301A;
  --info: #6FA8F0;
  --info-container: #12243D;
  --warning: #E0A040;
  --warning-container: #33240A;
  --error: #F0707A;
  --error-container: #3A1215;

  --glass-bg: rgba(28, 28, 31, 0.82);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.08);
  --shadow-card-hover: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-dialog: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 24px 60px rgba(0, 0, 0, 0.65);
}

/* ==========================================================================
   RESET & BASE (TYPOGRAPHY BODY 17PX / 28PX CHUẨN DESIGN-WEB.md v0.8)
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  font-family: var(--font-sans);
  font-size: 1.0625rem; /* 17px chuẩn DESIGN-WEB.md v0.8 */
  line-height: 28px;    /* 28px chuẩn DESIGN-WEB.md v0.8 */
  font-weight: 400;
  color: var(--on-surface);
  background-color: var(--background); /* Nền #F2F2F7 chuẩn v0.8 */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 150ms var(--ease-out);
}

button, input {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.container {
  max-width: var(--container-max);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* ==========================================================================
   THANH ĐỈNH WEBSITE 64PX (STICKY GLASS HEADER - KÍNH MỜ DUY NHẤT Ở ĐÂY)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--glass-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--border-subtle);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-logo img {
  height: 46px;
  width: auto;
}

.logo-dark { display: none; }
[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: block; }

/* Thanh điều hướng dạng viên thuốc (rounded.full 999px) nền #E4E4E7 */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--muted);
  padding: 4px;
  border-radius: var(--radius-full);
}

.nav-link {
  padding: 7px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8125rem; /* 13px label */
  font-weight: 600;
  line-height: 18px;
  color: var(--on-surface-muted);
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out), box-shadow 150ms var(--ease-out);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover {
  color: var(--on-surface);
}

.nav-link.active {
  background: var(--surface);
  color: var(--on-surface);
  font-weight: 600;
  box-shadow: var(--shadow-card);
}

/* Nút Menu thu gọn trên điện thoại (<720px theo DESIGN-WEB.md v0.8 mục 5) */
.mobile-menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: var(--radius-md); /* 14px */
  background: var(--muted);
  color: var(--on-surface);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 150ms var(--ease-out);
}

.mobile-menu-btn:hover,
.mobile-menu-btn:active {
  background: var(--muted-hover);
}

.mobile-menu-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.mobile-menu-btn .ico-close {
  display: none;
}

.site-header.menu-open .mobile-menu-btn .ico-menu {
  display: none;
}

.site-header.menu-open .mobile-menu-btn .ico-close {
  display: block;
}

.nav-pill-count {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  background: var(--primary-soft);
  color: var(--primary-text);
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* ==========================================================================
   NÚT BẤM (44PX, BO 14PX), NHÃN TRẠNG THÁI (BO 4PX) & ICON LUCIDE NÉT 1.5
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 44px;                    /* Chuẩn 44px DESIGN-WEB.md v0.8 */
  padding: 0 20px;                 /* Đệm 20px */
  border-radius: var(--radius-md); /* Bo 14px (rounded.control) */
  font-size: 0.8125rem;            /* 13px đậm (typography.label) */
  font-weight: 600;
  line-height: 18px;
  border: none;
  cursor: pointer;
  transition: background-color 150ms var(--ease-out), opacity 150ms var(--ease-out);
  white-space: nowrap;
}

.btn-lg {
  height: 44px;
  padding: 0 20px;
  font-size: 0.8125rem;
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-primary:active {
  background: var(--primary-pressed);
}

.btn-secondary {
  background: var(--muted);
  color: var(--on-surface);
}

.btn-secondary:hover {
  background: var(--muted-hover);
}

.btn-secondary:active {
  background: var(--muted-pressed);
}

.btn-text {
  background: transparent;
  color: var(--on-surface);
}

.btn-text:hover {
  background: var(--muted);
}

.btn-surface {
  background: var(--surface);
  color: var(--on-surface);
  box-shadow: var(--shadow-card);
}

.btn-surface:hover {
  box-shadow: var(--shadow-card-hover);
}

.btn:disabled,
.btn.disabled {
  background: var(--disabled);
  color: var(--on-disabled);
  cursor: not-allowed;
}

.btn-icon {
  width: 44px;
  padding: 0;
}

/* Icon Lucide nét 1.5px chuẩn DESIGN-WEB.md v0.8 */
.ico-lucide {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}

.kbd-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  background: var(--muted);
  color: var(--on-surface-muted);
}

/* Nhãn trạng thái bo 4px có icon Lucide nét 1.5 + chữ chuẩn v0.8 */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-xs); /* 4px (rounded.label) */
  font-size: 0.8125rem;            /* 13px (typography.label) */
  font-weight: 600;
  line-height: 18px;
}

.badge svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.badge-done { background: var(--success-container); color: var(--success); }
.badge-doing { background: var(--info-container); color: var(--info); }
.badge-waiting { background: var(--warning-container); color: var(--warning); }
.badge-error { background: var(--error-container); color: var(--error); }
.badge-todo { background: var(--muted); color: var(--on-surface-muted); }

/* ==========================================================================
   MODERN SWISS BENTO GRID (THẺ TRẮNG BO 24PX NỔI TRÊN NỀN XÁM #F2F2F7)
   ========================================================================== */
.page-section {
  padding: var(--space-6) 0;
}

.page-section + .page-section {
  padding-top: 0;
}

.section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  padding: 0 var(--space-1);
}

.swiss-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-4); /* 16px khe lưới lộ nền xám #F2F2F7 chuẩn DESIGN-WEB.md v0.8 */
}

.col-12 { grid-column: span 12; }
.col-8  { grid-column: span 8; }
.col-7  { grid-column: span 7; }
.col-6  { grid-column: span 6; }
.col-5  { grid-column: span 5; }
.col-4  { grid-column: span 4; }
.col-3  { grid-column: span 3; }

/* Thẻ Bento trắng bo góc 24px, đệm 32px, bóng mềm mức B chuẩn DESIGN-WEB.md v0.8 */
.bento-card {
  background: var(--surface);
  color: var(--on-surface);
  border-radius: var(--radius-xl); /* 24px (rounded.card) */
  padding: var(--space-7);         /* 32px (bento-card.padding) */
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-5);
  position: relative;
  overflow: hidden;
  transition: box-shadow 150ms var(--ease-out), opacity 150ms var(--ease-out);
}

.bento-card.pad-md {
  padding: var(--space-6); /* 24px */
}

.bento-card.pad-sm,
.bento-card.kpi-card {
  padding: var(--space-5); /* 20px chuẩn kpi-card */
}

.bento-card.pad-0 {
  padding: 0;
}

.bento-card.interactive:hover {
  box-shadow: var(--shadow-card-hover);
}

.bento-card.surface-muted {
  background: var(--muted);
  box-shadow: none;
}

.bento-card.surface-dark,
.bento-card.cta-banner {
  background: #080808;
  color: #F2F2F7;
}

.bento-card.surface-dark .text-muted,
.bento-card.cta-banner .text-muted {
  color: #A1A1A6;
}

/* Biến thể thẻ nền Đỏ BICO (#D0161F) chữ trắng (#FFFFFF) */
.bento-card.surface-red {
  background: var(--primary);
  color: var(--on-primary);
  border-left: none;
}

.bento-card.surface-red .kicker {
  color: rgba(255, 255, 255, 0.92);
}

.bento-card.surface-red .kicker-dot {
  background: #FFFFFF;
}

.bento-card.surface-red .text-lead,
.bento-card.surface-red .text-muted {
  color: rgba(255, 255, 255, 0.92);
}

.bento-card.surface-red .text-red {
  color: #FFFFFF;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* v0.8 BỎ vạch đỏ bên trái thẻ (thay bằng chấm đỏ 8px cạnh nhãn) */
.bento-card.accent-left {
  border-left: none;
}

/* ==========================================================================
   TYPOGRAPHY TRÊN WEBSITE CHUẨN DESIGN-WEB.MD v0.8
   ========================================================================== */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem; /* 13px (typography.label) */
  font-weight: 600;
  line-height: 18px;
  color: var(--primary-text);
  margin-bottom: var(--space-2);
}

/* Chấm đỏ 8px cạnh nhãn thay cho vạch đỏ trái (DESIGN-WEB.md v0.8) */
.kicker-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-text);
  flex-shrink: 0;
}

.h-display {
  font-size: 2.625rem; /* 42px (display-hero chuẩn DESIGN-WEB.md v0.8) */
  font-weight: 700;
  line-height: 48px;
  letter-spacing: -0.028em;
  color: inherit;
}

.h-title-lg {
  font-size: 1.75rem; /* 28px (title-section chuẩn DESIGN-WEB.md v0.8) */
  font-weight: 600;   /* Bán đậm 600 */
  line-height: 34px;
  letter-spacing: -0.02em;
  color: inherit;
}

.h-title {
  font-size: 1.25rem; /* 20px (title-card chuẩn DESIGN-WEB.md v0.8) */
  font-weight: 600;   /* Bán đậm 600 */
  line-height: 26px;
  letter-spacing: -0.015em;
  color: inherit;
}

.text-lead {
  font-size: 1.25rem; /* 20px (typography.lead chuẩn DESIGN-WEB.md v0.8) */
  font-weight: 400;
  line-height: 30px;
  color: var(--on-surface-muted);
}

.text-muted {
  color: var(--on-surface-muted);
}

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

.num-stat {
  font-size: 1.625rem; /* 26px đậm chuẩn KPI v0.8 */
  font-weight: 700;
  line-height: 1.23;   /* 32px / 26px */
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* Khung ảnh nhân sự bo góc mịn chuẩn v0.8 */
.photo-card {
  padding: var(--space-3);
  gap: var(--space-3);
}

.photo-wrap {
  width: 100%;
  flex: 1;
  min-height: 290px;
  border-radius: var(--radius-lg); /* 16px (rounded.sub) */
  overflow: hidden;
  background: var(--muted);
}

.photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: opacity 150ms var(--ease-out);
}

/* Caption-bar: nền #E4E4E7, chữ 12px/16px, bo 14px (rounded.control), đệm 10px 14px */
.caption-bar {
  background: var(--muted);
  color: var(--on-surface-muted);
  padding: 10px 14px;
  border-radius: var(--radius-md); /* 14px */
  font-size: 0.75rem;              /* 12px (typography.caption) */
  font-weight: 400;
  line-height: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

/* Hộp con (sub-box): nền #F2F2F7, bo 16px (rounded.sub), đệm 16px */
.sub-box {
  background: var(--background);
  padding: var(--space-4);         /* 16px */
  border-radius: var(--radius-lg); /* 16px */
  font-size: 0.9375rem;
  line-height: 1.6;
}

.sub-box-label {
  font-size: 0.8125rem; /* 13px (label) */
  font-weight: 600;
  line-height: 18px;
  color: var(--on-surface-muted);
  margin-bottom: 4px;
  display: block;
}

/* ==========================================================================
   HERO BANNER LỚN TOÀN CẢNH TRANG CHỦ
   ========================================================================== */
.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;
}

.hero-fullbleed-wrap {
  width: 100%;
  background: var(--surface);
  border-bottom: 1px solid var(--border-subtle);
  line-height: 0;
  overflow: hidden;
}

.hero-fullbleed-img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-banner-image-only {
  grid-column: span 12;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  background: var(--surface);
  line-height: 0;
}

.hero-banner-image-only img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-banner-unified {
  grid-column: span 12;
  background: linear-gradient(96deg, #FFFFFF 0%, #FFFFFF 44%, #FBE4E5 51%, #B61820 62%, #9E141B 100%);
  color: var(--on-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  border: none;
  position: relative;
  overflow: hidden;
  min-height: 410px;
  display: grid;
  grid-template-columns: 47% 53%;
  align-items: stretch;
}

.hero-banner-bg {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 410px;
  z-index: 1;
  overflow: hidden;
  order: 2;
}

.hero-banner-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.82) 10%, #000000 20%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.82) 10%, #000000 20%);
}

.hero-banner-left {
  position: relative;
  z-index: 2;
  order: 1;
  width: 100%;
  padding: 48px 16px 48px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}

.hero-title-caps {
  font-size: clamp(1.55rem, 2.05vw + 0.25rem, 2.15rem);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--on-surface);
}

.hero-title-line {
  display: block;
  white-space: nowrap;
}

.hero-bico-explain {
  display: inline-flex;
  align-items: center;
  background: transparent;
  border: none;
  padding: 4px 0 0;
  width: fit-content;
}

.hero-bico-formula {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--on-surface);
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.inline-logo-formula {
  height: 46px;
  width: auto;
  display: inline-block;
  vertical-align: -6px;
}

.inline-logo-h1 {
  height: 64px;
  width: auto;
  display: inline-block;
  vertical-align: -10px;
  margin-right: 6px;
}

/* Banner mở đầu Tủ tri thức có ảnh tủ sách bên phải */
.hub-header-banner {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  overflow: hidden;
  min-height: 170px;
}

.hub-header-left {
  padding: 28px 32px;
}

.hub-header-right {
  height: 100%;
  min-height: 170px;
  position: relative;
  overflow: hidden;
}

.hub-header-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.75) 20%, rgba(0,0,0,1) 40%);
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.75) 20%, rgba(0,0,0,1) 40%);
}

/* 4 Thẻ nền tảng dưới Hero Banner — Tiêu đề + Icon góc phải + Gạch đỏ + Chấm đỏ gọn */
.hero-foundation-card {
  padding: 20px 18px;
  justify-content: flex-start;
  gap: 14px;
  background: var(--surface);
  border-radius: var(--radius-xl); /* 24px (card) */
  border: none;
  box-shadow: var(--shadow-card);
  transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}

.hero-foundation-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.foundation-card-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  gap: 10px;
  width: 100%;
}

.foundation-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
}

.foundation-corner-icon {
  width: 24px;
  height: 24px;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.foundation-corner-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.foundation-card-head::after {
  content: "";
  display: block;
  width: 36px;
  height: 4px;
  background: var(--primary);
  border-radius: 999px;
}

.foundation-title {
  font-size: 1.25rem; /* 20px (title-card) */
  font-weight: 600;
  line-height: 26px;
  letter-spacing: -0.015em;
  color: var(--on-surface);
  text-align: left;
}

/* Danh sách chấm đỏ gọn trong thẻ Bento dưới Hero */
.bento-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bento-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.8125rem; /* 13px */
  line-height: 1.48;
  color: var(--on-surface);
}

.red-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  margin-top: 7px;
}

@media (max-width: 980px) {
  .hero-banner-unified {
    flex-direction: column;
    min-height: auto;
  }
  .hero-banner-left {
    width: 100%;
    padding: 32px 24px 20px;
  }
  .hero-banner-bg {
    position: relative;
    height: 290px;
  }
  .hero-banner-bg::after {
    display: none;
  }
}

/* ==========================================================================
   TỦ TRI THỨC 20 BÀI NGẮN (BỐ CỤC THẺ BENTO NEO TRÁI 330PX + TRANG ĐỌC RỘNG PHẢI)
   ========================================================================== */
.hub-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: var(--space-4); /* 16px chuẩn lưới DESIGN-WEB.md v0.8 */
  align-items: start;
}

/* Cột trái: Thẻ danh mục 20 bài ghim khi cuộn */
.hub-sidebar-card {
  position: sticky;
  top: calc(var(--header-height) + 16px);
  max-height: calc(100vh - var(--header-height) - 32px);
  background: var(--surface);
  border-radius: var(--radius-xl); /* 24px */
  padding: var(--space-5); /* 20px */
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  overflow: hidden;
}

.hub-search-input {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  background: var(--surface);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md); /* 14px (control) */
  font-size: 1.0625rem; /* 17px (body) */
  line-height: 28px;
  color: var(--on-surface);
}

.hub-search-input::placeholder {
  color: var(--on-surface-muted);
}

.hub-search-input:focus {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-color: var(--focus);
}

/* Thanh chọn 4 ngăn dạng viên thuốc đồng bộ .nav-links (rounded.full 999px) */
.hub-cat-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  background: var(--muted);
  padding: 4px;
  border-radius: var(--radius-full); /* 999px đồng bộ thanh điều hướng */
}

.hub-cat-tab {
  height: 30px;
  border: none;
  border-radius: var(--radius-full); /* 999px */
  background: transparent;
  font-size: 0.75rem; /* 12px */
  font-weight: 600;
  color: var(--on-surface-muted);
  cursor: pointer;
  transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out), box-shadow 150ms var(--ease-out);
}

.hub-cat-tab.active {
  background: var(--surface);
  color: var(--on-surface);
  box-shadow: var(--shadow-card);
}

.hub-lesson-scroll {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.hub-group-heading {
  font-size: 0.75rem; /* 12px (caption - không nhỏ hơn 12px) */
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--on-surface-muted);
  padding: 4px 8px;
  display: flex;
  justify-content: space-between;
}

.hub-lesson-btn {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  border-radius: var(--radius-md); /* 14px */
  background: transparent;
  color: var(--on-surface);
  font-size: 0.875rem;
  line-height: 1.45;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  transition: background-color 140ms var(--ease-out);
}

.hub-lesson-btn:hover {
  background: var(--background);
}

.hub-lesson-btn.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

.hub-lesson-code {
  font-family: var(--font-mono);
  font-size: 0.75rem; /* 12px (mono) */
  font-weight: 500;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 1px;
}

/* Cột phải: Thẻ đọc bài học rộng rãi, dễ chịu */
.hub-reader-card {
  background: var(--surface);
  border-radius: var(--radius-xl); /* 24px (card) */
  padding: var(--space-8); /* 32px */
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: var(--space-6); /* 24px */
}

.reader-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
}

/* Hộp Tóm tắt 30 giây: nền #F2F2F7, bo 16px, chấm đỏ 8px cạnh nhãn (không kẻ viền đỏ dọc) */
.reader-takeaway {
  background: var(--background);
  border: none;
  padding: var(--space-4); /* 16px */
  border-radius: var(--radius-lg); /* 16px (sub) */
}

.reader-section h2 {
  font-size: 1.25rem; /* 20px (title-card) */
  font-weight: 600;
  line-height: 26px;
  letter-spacing: -0.015em;
  margin-bottom: var(--space-3);
  color: var(--on-surface);
}

.reader-list {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  line-height: 1.7;
}

.reader-bico-apply {
  background: var(--info-container);
  color: var(--on-surface);
  padding: var(--space-4); /* 16px */
  border-radius: var(--radius-lg); /* 16px (sub) */
}

.reader-pitfalls {
  background: var(--error-container);
  color: var(--on-surface);
  padding: var(--space-4); /* 16px */
  border-radius: var(--radius-lg); /* 16px (sub) */
}

.reader-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-subtle);
}

.pager-card {
  padding: 10px 16px;
  border-radius: var(--radius-md); /* 14px */
  background: var(--background);
  border: 1px solid var(--border-subtle);
  text-align: left;
  cursor: pointer;
  transition: all 140ms var(--ease-out);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  max-width: 48%;
}

.pager-card strong {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pager-card:hover {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.pager-card.is-next {
  text-align: right;
  margin-left: auto;
}

/* ==========================================================================
   CHÂN TRANG (FOOTER) & HỘP TÌM NHANH CTRL+K
   ========================================================================== */
.site-footer {
  margin-top: auto;
  padding: var(--space-7) 0;
}

.footer-card {
  background: var(--surface);
  border-radius: var(--radius-xl); /* 24px (card) */
  padding: var(--space-6) var(--space-7);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-5);
  font-size: 0.875rem;
  color: var(--on-surface-muted);
}

.footer-links a:hover {
  color: var(--primary);
}

/* Command Palette: Nền mờ rgba(0,0,0,0.30), KHÔNG blur (DESIGN-WEB v0.8 mục 8) */
.cmd-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.30);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh var(--space-4) var(--space-4);
}

.cmd-backdrop.open {
  display: flex;
}

.cmd-dialog {
  width: 100%;
  max-width: 580px;
  background: var(--surface);
  border-radius: var(--radius-xl); /* 24px (card) */
  box-shadow: var(--shadow-dialog);
  overflow: hidden;
}

.cmd-input-wrap {
  padding: var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
}

.cmd-input {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md); /* 14px (control) */
  background: var(--surface);
  font-size: 1.0625rem; /* 17px (body) */
  color: var(--on-surface);
}

.cmd-input:focus {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-color: var(--focus);
}

.cmd-list {
  max-height: 340px;
  overflow-y: auto;
  padding: var(--space-2);
}

.cmd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 10px var(--space-3);
  border-radius: var(--radius-md); /* 14px */
  font-size: 0.875rem;
  cursor: pointer;
}

.cmd-item:hover {
  background: var(--muted);
}

/* ==========================================================================
   RESPONSIVE (TABLET 720-1199px & MOBILE <720px THEO DESIGN-WEB v0.8)
   ========================================================================== */
@media (min-width: 720px) and (max-width: 1199px) {
  .swiss-grid {
    gap: var(--space-4); /* 16px (Tablet) */
  }
  .col-8, .col-7 {
    grid-column: span 12;
  }
  .col-6, .col-5, .col-4, .col-3 {
    grid-column: span 6; /* Lưới 2 cột trên Tablet */
  }
  .hub-layout {
    grid-template-columns: 1fr;
  }
  .hub-sidebar-card {
    position: static;
    max-height: 340px;
  }
  .hub-reader-card {
    padding: var(--space-6);
  }
}

@media (max-width: 719px) {
  body {
    font-size: 1rem; /* 16px gọn gàng trên màn hình hẹp */
    line-height: 26px;
  }
  .container {
    padding: 0 var(--space-4); /* 16px */
  }
  .page-section {
    padding: var(--space-4) 0; /* 16px */
  }
  .page-section + .page-section {
    padding-top: 0;
  }
  .section-header-row {
    margin-bottom: var(--space-3);
  }
  .swiss-grid {
    gap: var(--space-3); /* 12px (Mobile chuẩn DESIGN-WEB.md v0.8 mục 5) */
  }
  .col-8, .col-7, .col-6, .col-5, .col-4, .col-3 {
    grid-column: span 12; /* Lưới 1 cột trên Mobile */
  }

  /* Thanh đỉnh 64px gọn gàng + Nút Menu thu gọn 44x44px */
  .site-header {
    height: var(--header-height); /* Giữ đúng 64px không chiếm màn hình */
    padding: 0;
  }
  .header-inner {
    height: var(--header-height);
    flex-wrap: nowrap;
    position: relative;
  }
  .brand-logo img {
    height: 40px;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: calc(var(--header-height) + 8px);
    left: var(--space-4);
    right: var(--space-4);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 8px;
    background: var(--surface);
    border-radius: var(--radius-lg); /* 16px */
    box-shadow: var(--shadow-dialog);
    z-index: 150;
  }
  .site-header.menu-open .nav-links {
    display: flex;
  }
  .nav-link {
    width: 100%;
    height: 44px; /* Chuẩn 44px nút chạm điện thoại */
    padding: 0 16px;
    border-radius: var(--radius-md); /* 14px */
    font-size: 0.9375rem; /* 15px */
    justify-content: space-between;
  }
  .nav-link.active {
    background: var(--primary-soft);
    color: var(--primary);
    box-shadow: none;
  }
  .nav-link.active::after {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
  }

  /* Thẻ Bento & Typography tối ưu cho màn hình điện thoại */
  .bento-card,
  .bento-card.pad-md,
  .bento-card.pad-sm {
    padding: var(--space-5); /* 20px */
    border-radius: 20px;
    gap: var(--space-4);
  }
  .hero-foundation-card {
    padding: 18px 16px;
    border-radius: 20px;
    gap: 12px;
  }
  .bento-checklist li {
    font-size: 0.9375rem; /* 15px dễ đọc khi 1 thẻ rộng full màn hình */
    line-height: 1.5;
  }
  .h-display {
    font-size: 1.625rem; /* 26px */
    line-height: 32px;
  }
  .inline-logo-h1 {
    height: 38px;
    vertical-align: -6px;
  }
  .h-title-lg {
    font-size: 1.375rem; /* 22px */
    line-height: 28px;
  }
  .h-title,
  .foundation-title {
    font-size: 1.125rem; /* 18px */
    line-height: 24px;
  }
  .text-lead {
    font-size: 1.0625rem; /* 17px */
    line-height: 26px;
  }

  /* Xếp thẻ nội dung quan trọng lên trước ảnh trên điện thoại (DESIGN-WEB v0.8 mục 5) */
  .swiss-grid > .photo-card.col-5 {
    order: 2;
  }
  .swiss-grid > .bento-card.col-7 {
    order: 1;
  }
  .photo-wrap {
    min-height: 200px;
    max-height: 240px;
  }

  /* Nút CTA cuối trang rộng 100% dễ bấm bằng ngón cái */
  .bento-card .col-4 {
    justify-content: stretch !important;
  }
  .bento-card .col-4 .btn {
    width: 100%;
  }

  /* Tủ tri thức trên điện thoại */
  .hub-layout {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
  .hub-sidebar-card {
    position: static;
    max-height: 310px;
    padding: var(--space-4);
    border-radius: 20px;
  }
  .hub-reader-card {
    padding: var(--space-5); /* 20px thay vì 48px */
    border-radius: 20px;
    gap: var(--space-4);
  }
  .reader-pager {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .pager-card,
  .pager-card.is-next {
    max-width: 100%;
    width: 100%;
    min-height: 44px;
    margin-left: 0;
    text-align: left;
    justify-content: space-between;
  }

  /* Chân trang gọn trên điện thoại */
  .site-footer {
    padding: var(--space-5) 0;
  }
  .footer-card {
    padding: var(--space-5);
    border-radius: 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }
  .footer-links {
    gap: var(--space-4);
    width: 100%;
  }

  .btn, .hub-search-input, .cmd-input {
    height: 44px;
  }
}

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