/* =====================================================================
   NỀN TẢNG – màu sắc, chữ, nút, tiêu đề mục, bộ lọc, khung xem ảnh
   Muốn đổi màu toàn trang: sửa các biến trong :root bên dưới.
   ===================================================================== */

:root {
  /* Bảng màu */
  --do: #c8232b;          /* đỏ biển hiệu */
  --do-dam: #9c1a20;
  --vang: #ffd23f;        /* vàng chữ biển */
  --xanh: #1e4636;        /* xanh bảng */
  --xanh-2: #2a5c47;
  --phan: #f1efe6;        /* trắng phấn */
  --go: #c48a50;          /* gỗ bàn */
  --muc: #1d2420;         /* chữ chính */
  --xam: #5d6660;         /* chữ phụ */
  --ke: #e2e0d9;          /* đường kẻ */
  --nen: #ffffff;
  --nen-2: #f2f5f2;       /* nền phụ, xanh phấn rất nhạt */
  --zalo: #0068ff;

  /* Màu nhận diện từng môn (chấm nhỏ) */
  --mon-toan: #1f5fa8;
  --mon-van: #b4541a;
  --mon-anh: #c8232b;
  --mon-ly: #6b3fc4;
  --mon-hoa: #0f8a83;
  --mon-sinh: #3f8f3a;

  /* Chữ */
  --font-sign: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font: "Lexend", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --header-h: 68px;
  --container: 1160px;
}

/* ---------- Nền tảng ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.65;
  color: var(--muc); background: var(--nen); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; }
p { margin: 0 0 1em; }
ul, dl, dd { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
button { font: inherit; cursor: pointer; color: inherit; }
[hidden] { display: none !important; }

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

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 999; background: var(--muc); color: #fff; padding: 8px 14px; }
.skip-link:focus { left: 8px; }
.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; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
.icon { width: 1.1em; height: 1.1em; flex-shrink: 0; vertical-align: -0.18em; }
[data-icon] { display: inline-flex; align-items: center; }

/* ---------- Nút ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 11px 20px; border-radius: 6px; border: 1.5px solid transparent;
  font-weight: 600; font-size: 15px; line-height: 1.2; text-decoration: none; white-space: nowrap;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn--lg { min-height: 52px; padding: 14px 24px; font-size: 16px; }
.btn--block { width: 100%; }
.btn--red { background: var(--do); color: #fff; }
.btn--red:hover { background: var(--do-dam); }
.btn--line { border-color: var(--muc); color: var(--muc); background: transparent; }
.btn--line:hover { background: var(--muc); color: #fff; }
.btn--zalo { background: var(--zalo); color: #fff; }
.btn--zalo:hover { background: #0052cc; }
.btn--yellow { background: var(--vang); color: var(--muc); }
.btn--yellow:hover { background: #fff; }
.btn--line-light { border-color: rgba(255, 255, 255, 0.8); color: #fff; }
.btn--line-light:hover { background: rgba(255, 255, 255, 0.12); }
.btn--sm { min-height: 40px; padding: 8px 14px; font-size: 14px; }
.btn:disabled { opacity: 0.6; cursor: wait; }

/* Nút "Zalo" nhỏ đặt cạnh số điện thoại */
.zalo-chip {
  display: inline-flex; align-items: center; min-height: 28px; padding: 3px 11px; margin-left: 10px;
  border-radius: 999px; background: var(--zalo); color: #fff !important; font-family: var(--font);
  font-size: 13px; font-weight: 600; line-height: 1; text-decoration: none !important; vertical-align: middle;
}
.zalo-chip:hover { background: #0052cc; }

/* ---------- Section chung ---------- */
.section { padding: 88px 0; }
.section--tint, .section--wood { background: var(--nen-2); }
.section-head { margin-bottom: 40px; max-width: 640px; }
.section-head--row { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.section-title { font-family: var(--font-sign); font-weight: 700; font-size: clamp(32px, 4vw, 44px); line-height: 1.05; color: var(--muc); margin-bottom: 10px; }
.section-sub { color: var(--xam); font-size: 17px; margin: 0; max-width: 60ch; }
.prose p { max-width: 62ch; }

/* Ảnh giữ chỗ */
.ph {
  width: 100%; height: 100%; min-height: 140px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: var(--nen-2); color: var(--xam); font-size: 13px; text-align: center; padding: 12px;
}
.ph .icon { width: 30px; height: 30px; }

/* ---------- Bộ lọc dạng tab ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.tabs__group { display: flex; flex-wrap: wrap; gap: 4px; }
.tab {
  min-height: 40px; padding: 7px 13px; border-radius: 4px; border: 1px solid var(--ke);
  background: #fff; font-size: 14px; font-weight: 500;
}
.tab:hover { border-color: var(--muc); }
.tab.is-active { background: var(--xanh); border-color: var(--xanh); color: var(--phan); }

/* Xem ảnh lớn */
.lightbox { position: fixed; inset: 0; z-index: 400; background: rgba(12, 16, 14, 0.95); display: flex; align-items: center; justify-content: center; padding: 60px 72px; animation: fadeIn 0.2s; }
.lightbox__figure { max-width: 1100px; width: 100%; text-align: center; }
.lightbox__media { display: flex; justify-content: center; }
.lightbox__media img { max-height: calc(100vh - 150px); width: auto; max-width: 100%; border-radius: 4px; }
.lightbox__media .ph { aspect-ratio: 4 / 3; max-width: 800px; }
.lightbox figcaption { color: var(--phan); margin-top: 14px; }
.lightbox__count { opacity: 0.6; margin-left: 8px; }
.lightbox__close, .lightbox__nav { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.12); color: #fff; display: grid; place-items: center; }
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255, 255, 255, 0.25); }
.lightbox__close { top: 14px; right: 14px; }
.lightbox__nav--prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 14px; top: 50%; transform: translateY(-50%); }
.lightbox .icon { width: 24px; height: 24px; }

@keyframes fadeIn { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

@media (max-width: 640px) {
  :root { --header-h: 60px; }
  body { padding-bottom: 72px; }
  .section { padding: 64px 0; }

  .tabs, .tabs__group { flex-wrap: nowrap; }
  .tabs { flex-direction: column; gap: 8px; width: 100%; }
  .tabs__group { overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .tabs__group::-webkit-scrollbar { display: none; }
  .tab { flex-shrink: 0; }

  .lightbox { padding: 60px 8px; }
  .lightbox__nav { top: auto; bottom: 14px; transform: none; }
  .lightbox__nav--prev { left: calc(50% - 60px); }
  .lightbox__nav--next { right: calc(50% - 60px); }
}
