:root {
  --brand: #0097a7;
  --accent: #ff6600;
  --header-h: 40px;
  /* chiều cao header */
  --logo-w: 160px;
  /* chiều rộng reserved cho logo (tùy chỉnh nếu logo lớn hơn) */
  --icons-w: 90px;
  /* width vùng icon phải (ước chừng) */
}
* {
  box-sizing: border-box
}
/* HEADER */
header {
  /* position:relative; */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 12px;
  overflow: visible;
  z-index: 15;
}
/* logo: cố định width để dễ tính toán vùng search */
.logo {
  min-width: var(--logo-w);
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 20px;
  color: var(--accent);
  z-index: 4;
  flex-shrink: 0;
}
.logo span {
  position: relative;
  top: -2px;
  margin-left: 6px;
  color: var(--brand);
  background: #fff;
  border-radius: 50%;
  padding: 2px 6px;
  font-weight: 700;
  font-size: 13px;
  vertical-align: middle;
}
.logo a {
  text-decoration: none;
  font-weight: 700;
  font-size: 22px;
  color: var(--accent);
  transition: color 0.3s ease;
}
.logo a:hover {
  color: #ff3300;
  /* màu cam đỏ thương hiệu */
}
/* navigation trung tâm */
nav#mainNav {
  display: flex;
  /* gap: 20px; */
  gap: 0;
  align-items: center;
  margin: 0 auto;
  transition: opacity .28s ease, transform .28s ease;
  z-index: 3;
}
nav#mainNav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 0 10px;
  position: relative;
  font-size: 15px;
}
nav#mainNav a:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 50px; /* chiều cao của gạch */
  background-color: #ccc; /* màu xám nhạt giống baomoi */
}
nav#mainNav a:hover {
  color: #b9b9b9; /* xanh nhạt kiểu baomoi */
}
nav#mainNav a:not(:last-child)::after {
  background-color: #ddd;
}
/* vùng icons phải */
.icons {
  display: flex;
  gap: 12px;
  align-items: center;
  z-index: 4;
  min-width: var(--icons-w);
  justify-content: flex-end;
  margin-left: auto;
  /* ✅ thêm dòng này */
}
.icon {
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: #fff;
  user-select: none;
}
/* SEARCH BOX - đặt absolute để không ảnh hưởng layout */
/* THIẾT KẾ Ý TƯỞNG:
       - Mặc định: .search-box nằm ngoài phải bằng left:100% (ẩn)
       - Khi active: left chuyển về right-edge of logo (left: var(--logo-w) + 12px)
       - right luôn bằng padding header (12px) để ngang hàng icons
    */
#searchForm {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 1;
  /* thay width:100% bằng flex:1 để không đè nút × */
}
.search-box {
  position: absolute;
  top: 0;
  /* height: var(--header-h); */
  height: 30px;
  /* bắt đầu ẩn bên ngoài phải */
  left: 100%;
  right: 12px;
  display: flex;
  align-items: center;
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  padding: 6px 10px;
  gap: 8px;
  overflow: hidden;
  transition: left .42s cubic-bezier(.22, .9, .3, 1), opacity .6s;
  z-index: 5;
  opacity: 0;
  /* ẩn */
  pointer-events: none;
  margin-top: 5px;
}
#searchInput {
  padding: 4px 10px;   /* 🔽 giảm khoảng trong để input thấp hơn */
  font-size: 14px;     /* có thể giảm chữ chút cho cân đối */
  height: auto;        /* để chiều cao tự theo padding */
}
/* khi active thì left move về phía sau logo (giữ margin nhỏ 12px) */
.search-box.active {
  left: calc(var(--logo-w) + 12px);
  opacity: 1;
  pointer-events: auto;
  right: 45px;
}
.search-box input {
  border: 0;
  outline: 0;
  font-size: 16px;
  color: #222;
  padding: 6px 4px;
  background: transparent;
  width: 100%;
  min-width: 120px;
}
.search-box .btn {
  border: 0;
  background: transparent;
  font-size: 20px;
  color: var(--brand);
  cursor: pointer;
  padding: 6px;
  line-height: 1;
}
#closeSearch {
  cursor: pointer;
  position: relative;
  z-index: 6;
  /* ✅ đảm bảo cao hơn form input */
  cursor: pointer;
  font-size: 28px;
  transition: transform 0.6s ease;
}
#closeSearch:hover {
  transform: rotate(90deg); /* xoay nhẹ khi hover */
}
/* make nav non-interactive while search open */
nav#mainNav.dimmed {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px);
}
/* MENU OVERLAY full screen */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 120;
  display: none;
  flex-direction: column;
  overscroll-behavior: contain;
  overflow-y: auto;
  /* ✅ cho phép cuộn */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.6s ease;
}
.menu-overlay.active {
  display: flex;
  animation: menuIn .50s ease;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  display: block;
}
@keyframes menuIn {
  from {
    opacity: 0;
    transform: translateY(6px)
  }
  to {
    opacity: 1;
    transform: none
  }
}
.menu-header {
  background: var(--brand);
  color: #fff;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-weight: 700;
}
.menu-content {
  padding: 18px 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px 28px;
}
.menu-section h4 {
  color: var(--brand);
  margin: 6px 0;
  font-size: 14px;
  background: #e9ecef;
  padding: 5px;
}
.menu-section a {
  display: block;
  color: #333;
  text-decoration: none;
  padding: 4px 0;
  font-size: 1.2rem;
}
/* responsive: khi nhỏ hơn 800px ẩn nav, show hamburger to hơn */
@media (max-width:800px) {
  :root {
    --logo-w: 120px;
    --icons-w: 96px;
  }
  /* nav#mainNav{ display:none; } */
  .icons {
    min-width: 48px;
  }
  .search-box.active {
    left: calc(var(--logo-w) + 8px);
    right: 78px;
  }
}
/* nhỏ hơn 480px (mobile) */
@media (max-width:430px) {
  :root {
    --logo-w: 110px;
    --icons-w: 64px;
  }
  header {
    padding: 0 18px;
  }
  .logo {
    font-size: 18px;
    min-width: var(--logo-w);
  }
  .search-box.active {
    left: calc(var(--logo-w) - 8px);
    right: 55px;
    padding: 6px 8px;
  }
  .menu-content {
    padding: 12px;
    gap: 12px;
    grid-template-columns: repeat(1, 1fr);
  }
  main.demo .info .danhmuc {
    margin-left: 2px;
  }
  nav#mainNav {
    margin-left: -50px;
}
}
/* small visual polish for demo page body content */
main.demo {
  padding: 0px;
  padding-top: var(--header-h);
  /* cùng chiều cao với header */
}
main.demo .info {
  max-width: 980px;
  margin: 0px auto;
  background: #fff;
  padding: 5px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
main.demo .info .kqtk {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 600;
  color: #0097a7;
}
main.demo .info .danhmuc {
  text-align: left;
  font-size: 1.0rem;
  font-weight: 600;
  color: #0097a7;
  margin-left: 5px;
  text-transform: uppercase;
  margin-top: 5px;
}
footer {
  display: flex;
  justify-content: center;
  align-items: center;
  /* flex-direction: column; */
  padding: 20px 0;
  background: #f5f5f5;
}
footer p {
  text-align: center;
  margin: 2px 0;
}
footer a {
  color: #ff3300;
  text-decoration: none;
  transition: color 0.3s;
}
.footer-text {
  margin: 4px 0;
  font-size: 15px;
  color: #333;
  padding: 0 10px 0;
}
footer a:hover {
  color: #cc2200;
}
.danhmuc {
  display: flex;
  align-items: center;
  gap: 1px;
  /* khoảng cách giữa chữ và dấu */
  font-size: 15px;
  color: #333;
}
.daulon {
  display: inline-flex;
  align-items: center;
  font-size: 25px;
  /* nhỏ hơn chữ */
  color: #999;
  user-select: none;
  transform: translateY(-1px);
}
.danhmuc .daulon {
  display: inline-flex;
  /* giúp nằm cùng dòng */
  align-items: center;
  /* căn giữa theo chiều dọc */
  font-size: 18px;
  line-height: 1;
  color: #999;
  transform: translateY(-1px);
  /* căn dấu cho cân */
  user-select: none;
}
/* thay ký tự > bằng chevron mềm hơn (›) */
.danhmuc .daulon::before {
  content: "›";
  margin: 0 4px;
  font-size: 1.8rem;
  font-weight: 500;
  position: relative;
  top: -3px;
}
.danhmuc .daulon {
  color: #aaa;
  font-weight: 500;
}
/* menu */
.menu-toggle {
  width: 26px;
  height: 20px;
  position: relative;
  cursor: pointer;
  display: inline-block;
  transition: transform 0.3s ease;
}
.menu-toggle span {
  background: #ffffff;
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  transition: all 0.35s ease;
  /* transition: 0.4s; */
}
/* 3 thanh ngang */
.menu-toggle span:nth-child(1) {
  top: 0;
}
.menu-toggle span:nth-child(2) {
  top: 8px;
}
.menu-toggle span:nth-child(3) {
  top: 16px;
}
/* Khi menu mở (active) */
.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg);
  top: 8px;
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg);
  top: 8px;
}
.menu-toggle span {
  transform-origin: center;
}
.menu-toggle:hover span {
  background: #ff3300; /* màu hover kiểu Báo Mới */
}
#closeMenu {
    color: #fff;
    margin-left: auto; /* Đẩy nút đóng về bên phải */
    text-decoration: none;
    transition: 0.3s;
}
img.lazy {
    /* width: 100%; */
    /* max-width: 400px; */
    display: block;
    margin: 1px auto;
    opacity: 0;
    transform: scale(1.05);
    transition: opacity .6s ease, transform .6s ease;
    /* border-radius: 10px; */
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  }
  img.lazy.loaded {
    opacity: 1;
    transform: scale(1);
  }
  .section-divider {
  display: flex;
  align-items: flex-end; /* căn phần tử con theo đáy chữ */
  gap: 8px;
  margin: 14px 0;
  color: #0097a7;
  font-weight: 700;
  line-height: 1; /* giảm khoảng cách thừa phía dưới chữ */
  padding: 0 10px;
}
.section-divider .label {
  white-space: nowrap;
  position: relative;
  bottom: -1px; /* tinh chỉnh nhẹ cho sát mép dưới chữ */
}
.section-divider .line {
  flex: 1;
  height: 2px;
  background: #2fa1b3;
  min-width: 10px;
  transform: translateY(-2px); /* đẩy đường kẻ lên một chút cho khớp baseline */
}
/* Về trang chủ*/
.home-button-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: auto; /* bỏ nếu không muốn giữa cả trang */
}
.home-button {
  display: inline-flex;
  align-items: center;        /* căn giữa icon + chữ theo chiều dọc */
  justify-content: center;
  gap: 8px;
  padding: 3px 24px;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  text-decoration: none;
  border-radius: 30px;
  background-image: linear-gradient(90deg, #2fa1b3, #39c9e0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  line-height: 1;             /* tránh chữ bị đẩy lệch */
}
.home-button img {
  width: 30px;
  height: 30px;
  display: block;             /* loại bỏ khoảng thừa của inline img */
  filter: brightness(0) invert(1);
  margin-bottom: 5px;
}
.home-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  color: #fff;
}