/* =========================
   HPO - BIỂN BÁO: HTML UXBUILDER + CSS RIÊNG
   Fix frontend WordPress/Flatsome wpautop làm vỡ menu
========================= */

#hpo-sign-page,
#hpo-sign-page * {
  box-sizing: border-box;
}

#hpo-sign-page {
  margin: 0;
  color: #000;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.4;
}

/* Chống WordPress/Flatsome tự chèn p/br làm vỡ layout */
#hpo-sign-page p {
  margin: 0 !important;
  padding: 0 !important;
}

#hpo-sign-page p:empty,
#hpo-sign-page br {
  display: none !important;
}

#hpo-sign-page img {
  max-width: 100%;
  height: auto;
}

/* Layout chính */
#hpo-sign-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px 18px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

#hpo-sign-sidebar-wrap {
  width: 320px;
  min-width: 320px;
  flex: 0 0 320px;
  position: sticky;
  top: var(--hpo-top, 120px);
  align-self: flex-start;
  z-index: 30;
}

#hpo-sign-sidebar {
  position: relative;
  top: auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(2, 6, 23, .08);
}

#hpo-sign-sidebar>div {
  border-radius: 18px;
  overflow: hidden;
}

#hpo-sign-sidebar>div>div:first-child {
  padding: 14px 14px 10px;
  border-bottom: 1px solid #e2e8f0;
}

#hpo-sign-sidebar>div>div:first-child>div:first-child {
  font-weight: 950;
  font-size: 14px;
  line-height: 1.35;
  color: #000;
}

#hpo-sign-sidebar .hpo-sidebar-note {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
  color: #000;
  font-weight: 650;
}

/* Mục lục trái */
#hpo-sign-tabs {
  padding: 12px;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

#hpo-sign-tabs p {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Dùng span bên trong a để tránh wpautop tách div */
#hpo-sign-tabs a[data-hpo-tab] {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
  width: 100% !important;
  min-height: 74px;
  padding: 10px;
  margin: 0 !important;
  cursor: pointer;
  border-radius: 16px;
  border: 1px solid #2563eb !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
  box-shadow: 0 10px 20px rgba(37, 99, 235, .08) !important;
  text-decoration: none !important;
  color: #000 !important;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

#hpo-sign-tabs a[data-hpo-tab]:hover {
  transform: translateY(-1px);
  border-color: #1d4ed8 !important;
  box-shadow: 0 14px 28px rgba(37, 99, 235, .14) !important;
  background: linear-gradient(180deg, #ffffff 0%, #eef6ff 100%) !important;
}

#hpo-sign-tabs a[data-hpo-tab].is-active {
  border-color: #dc2626 !important;
  box-shadow: 0 12px 26px rgba(220, 38, 38, .18) !important;
  background: linear-gradient(180deg, #ffffff 0%, #fff1f2 100%) !important;
}

#hpo-sign-tabs a[data-hpo-tab].is-active .hpo-tab-title {
  color: #dc2626 !important;
}

#hpo-sign-tabs .hpo-tab-thumb {
  width: 74px !important;
  height: 54px !important;
  min-width: 74px !important;
  flex: 0 0 74px !important;
  display: block !important;
  overflow: hidden !important;
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 240, .9);
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .95), rgba(255, 255, 255, .65));
}

#hpo-sign-tabs .hpo-tab-thumb img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  margin: 0 !important;
  transform: scale(1.18);
  transform-origin: center;
}

#hpo-sign-tabs .hpo-tab-body {
  display: block !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
  color: #000 !important;
}

#hpo-sign-tabs .hpo-tab-title,
#hpo-sign-tabs .hpo-tab-meta,
#hpo-sign-tabs .hpo-tab-count {
  display: block !important;
  margin-left: 0 !important;
  padding: 0 !important;
  text-align: left !important;
}

#hpo-sign-tabs .hpo-tab-title {
  font-weight: 950;
  font-size: 16px;
  line-height: 1.25;
  color: #000;
}

#hpo-sign-tabs .hpo-tab-meta {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 750;
  color: #000;
}

#hpo-sign-tabs .hpo-tab-meta b {
  font-weight: 900;
}

#hpo-sign-tabs .hpo-tab-meta b.is-red {
  color: #dc2626;
}

#hpo-sign-tabs .hpo-tab-meta b.is-yellow {
  color: #ca8a04;
}

#hpo-sign-tabs .hpo-tab-meta b.is-blue {
  color: #2563eb;
}

#hpo-sign-tabs .hpo-tab-meta b.is-black {
  color: #000;
}

#hpo-sign-tabs .hpo-tab-count {
  margin-top: 6px;
  font-size: 19px;
  line-height: 1.05;
  font-weight: 950;
  color: #1d4ed8;
  letter-spacing: .1px;
}

/* Đánh số mục lục bên trái */
#hpo-sign-tabs a[data-hpo-tab="bien-cam"] .hpo-tab-title::before {
  content: "1. ";
}

#hpo-sign-tabs a[data-hpo-tab="nguy-hiem"] .hpo-tab-title::before {
  content: "2. ";
}

#hpo-sign-tabs a[data-hpo-tab="hieu-lenh"] .hpo-tab-title::before {
  content: "3. ";
}

#hpo-sign-tabs a[data-hpo-tab="chi-dan"] .hpo-tab-title::before {
  content: "4. ";
}

#hpo-sign-tabs a[data-hpo-tab="bien-phu"] .hpo-tab-title::before {
  content: "5. ";
}

/* Content */
#hpo-sign-content {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: #000;
}

#hpo-sign-page [data-hpo-pane] {
  display: block !important;
  scroll-margin-top: calc(var(--hpo-scroll-top, 120px) + 18px);
}

#hpo-sign-page [data-hpo-pane]+[data-hpo-pane] {
  margin-top: 14px;
}

#hpo-sign-page .hpo-pane-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 14px 34px rgba(2, 6, 23, .06);
}

#hpo-sign-page .hpo-pane-icon {
  display: none !important;
}

#hpo-sign-page .hpo-pane-head {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6px 0 2px;
}

#hpo-sign-page .hpo-pane-text {
  max-width: 760px;
  color: #000;
}

#hpo-sign-page .hpo-pane-title {
  font-size: 30px;
  font-weight: 950;
  line-height: 1.15;
  color: #000;
}

#hpo-sign-page .hpo-pane-subtitle {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.55;
  color: #000;
}

/* Đánh số tiêu đề nội dung */
#hpo-sign-page [data-hpo-pane="bien-cam"] .hpo-pane-title::before {
  content: "1. ";
}

#hpo-sign-page [data-hpo-pane="nguy-hiem"] .hpo-pane-title::before {
  content: "2. ";
}

#hpo-sign-page [data-hpo-pane="hieu-lenh"] .hpo-pane-title::before {
  content: "3. ";
}

#hpo-sign-page [data-hpo-pane="chi-dan"] .hpo-pane-title::before {
  content: "4. ";
}

#hpo-sign-page [data-hpo-pane="bien-phu"] .hpo-pane-title::before {
  content: "5. ";
}

/* Nội dung chi tiết */
#hpo-sign-page .hpo-sign-detail {
  margin-top: 14px;
  line-height: 1.8;
  color: #000;
  font-weight: 650;
}

#hpo-sign-page .hpo-sign-detail ul {
  padding-left: 18px;
  margin: 18px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #000;
}

#hpo-sign-page .hpo-sign-detail ul li {
  margin: 0;
  color: #000;
}

#hpo-sign-page .hpo-sign-detail .hpo-li-sub {
  margin-left: 18px;
  list-style: circle;
}

#hpo-sign-page .hpo-sign-detail b {
  color: #000;
  font-weight: 900;
}

#hpo-sign-page .hpo-sign-img {
  margin: 20px 0 28px;
  display: flex;
  justify-content: center;
}

#hpo-sign-page .hpo-sign-img img {
  width: 70%;
  max-width: 520px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  display: block;
}

#hpo-sign-page .hpo-sign-img img.singleImg,
#hpo-sign-page img.singleImg {
  width: 50% !important;
}

#hpo-sign-page img[src*="Hieulenh5"] {
  width: 40% !important;
}

#hpo-sign-footer {
  margin-top: 2px;
  color: #000;
  font-weight: 750;
  font-size: 12px;
}

/* Mobile */
@media (max-width: 900px) {
  #hpo-sign-layout {
    display: block !important;
  }

  #hpo-sign-sidebar-wrap {
    position: relative !important;
    top: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
    margin-bottom: 14px !important;
  }

  #hpo-sign-page .hpo-sign-img img {
    width: 92%;
    max-width: 560px;
  }

  #hpo-sign-tabs .hpo-tab-thumb img {
    transform: scale(1.12);
  }
}