/* ---------- Giải thưởng ---------- */
.nhbf-prizes { position: relative; padding: 62px 16px 0; }
.nhbf-prizes__sparkle { left: -155px; top: -60px; width: 602px; max-width: none; }
.nhbf-prizes__grid {
  position: relative; z-index: 1; max-width: 826px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 29px 54px;
}
.nhbf-prizes__grid { color: inherit; cursor: pointer; }
.nhbf-prizes__grid:hover .nhbf-prize { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(60, 0, 4, .32); }
#nhbf-scoring-grand { scroll-margin-top: 20px; }
.nhbf-prize {
  background: #fff; border-radius: 22px; padding: 16px 19px 28px; text-align: center;
  box-shadow: 0 10px 24px rgba(60, 0, 4, .25); transition: transform .2s, box-shadow .2s;
}
.nhbf-prize__media {
  position: relative; aspect-ratio: 350 / 208.5; border-radius: 16px;
  background: linear-gradient(180deg, #c00000 0%, #b00101 23%, #940304 72%, #8a0406 100%);
}
.nhbf-prize__media img { position: absolute; left: 0; top: -1.6%; width: 102.2%; max-width: none; }
.nhbf-prize:nth-child(2) .nhbf-prize__media { overflow: hidden; }
.nhbf-prize:nth-child(2) .nhbf-prize__media img { top: 0; width: 100%; height: 100%; object-fit: cover; }
.nhbf-prize__title { margin-top: 16px; color: var(--nhbf-red-text); font-weight: 800; font-size: 23.6px; line-height: 1.1; }
.nhbf-prize__desc { margin-top: 9px; color: #71677a; font-weight: 500; font-style: italic; font-size: 15px; line-height: 1.45; }
.nhbf-prize__list { display: inline-block; text-align: left; }
.nhbf-prize__list li { position: relative; padding-left: 10px; }
.nhbf-prize__list li::before { content: ""; position: absolute; left: 0; top: .6em; width: 4px; height: 4px; border-radius: 50%; background: #71677a; }

.nhbf-prize--wide { grid-column: 1 / -1; display: grid; grid-template-columns: 358px 1fr; align-items: center; padding: 21px 19px; margin-top: 0; }
.nhbf-prize--wide .nhbf-prize__media { aspect-ratio: 358.5 / 213.7; }
.nhbf-prize__media--pop img { left: 2%; top: -17.9%; width: 94.4%; }
.nhbf-prize--wide .nhbf-prize__title { margin-top: 0; font-size: 27.3px; }
.nhbf-prize--wide .nhbf-prize__desc { max-width: 320px; margin: 9px auto 0; }

/* ---------- 7 ngày nhập hội ---------- */
.nhbf-steps { position: relative; padding: 74px 16px 0; }
.nhbf-steps__watermark { right: -300px; top: 330px; font-size: 220px; transform: rotate(90deg); transform-origin: center; }
.nhbf-steps__box {
  position: relative; z-index: 1; max-width: 1344px; margin: 0 auto; padding: 18px 0 0;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(101,3,4,0) 0%, rgba(104,1,2,.25) 34%, rgba(108,0,0,.5) 76%, rgba(110,0,0,.6) 100%);
}
.nhbf-steps__dots {
  display: block; width: min(1214px, calc(100% - 40px)); height: 28px; margin: 0 auto;
  background: radial-gradient(circle, #c60008 13.5px, transparent 14.5px) 0 0 / 55.2px 28px repeat-x;
}
.nhbf-steps__box > .nhbf-heading { margin-top: 28px; }
.nhbf-steps__grid {
  max-width: 1218px; margin: 29px auto 0; padding: 0 20px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 34px 24px;
}
.nhbf-step { position: relative; min-height: 374px; background: #fff; border-radius: 22px; padding: 50px 32px 30px; }
.nhbf-step__text { max-width: 340px; }
.nhbf-step__badge {
  display: inline-flex; align-items: center; height: 46px; padding: 0 17px; border-radius: 12px;
  background: var(--nhbf-grad-btn); border: 2px solid #ff0d0d; color: #fff; font-weight: 800; font-size: 25px;
}
.nhbf-step__title { white-space: nowrap; margin-top: 14px; color: var(--nhbf-red-text); font-weight: 800; font-size: 24px; line-height: 1.2; }
.nhbf-step__desc { margin-top: 20px; color: var(--nhbf-text); font-weight: 600; font-size: 15px; line-height: 1.2; }
.nhbf-step__desc strong { font-weight: 800; }
.nhbf-step__phone { position: absolute; right: 26px; top: 2px; width: 194px; }
.nhbf-step--tip { padding-top: 83px; }
.nhbf-step__note { margin-top: 8px; font-style: italic; font-weight: 500; font-size: 15px; color: var(--nhbf-text); }
.nhbf-step--tip .nhbf-step__desc { margin-top: 50px; }
.nhbf-step--tip .nhbf-btn { margin-top: 15px; }

/* Yêu cầu bài thi hợp lệ */
.nhbf-req { max-width: 1031px; margin: 33px auto -16px; padding: 0 16px; position: relative; }
.nhbf .nhbf-req__title {
  position: relative; z-index: 1; width: fit-content; margin: 0 auto; padding: 0 33px; height: 61px;
  display: flex; align-items: center; border: 2px solid #ff0d0d; border-radius: 999px;
  background: linear-gradient(180deg, #c00000 25%, #8a0406 100%); color: #fff; font-weight: 700; font-size: 24.1px;
}
.nhbf-req__panel {
  margin-top: -30px; min-height: 277px; padding: 67px 43px 30px; border: 1px solid var(--nhbf-maroon); border-radius: 30px;
  background: var(--nhbf-cream); display: flex; align-items: center; justify-content: space-between; gap: 30px;
}
.nhbf-req__items { display: grid; gap: 27px; max-width: 440px; }
.nhbf-req__item { display: flex; gap: 16px; align-items: flex-start; }
.nhbf-req__item img { width: 70px; flex: 0 0 70px; }
.nhbf-req__item h4 { color: var(--nhbf-red-text); font-weight: 800; font-size: 16px; }
.nhbf-req__item p { margin-top: 4px; font-weight: 600; font-size: 15px; line-height: 20px; }
.nhbf-req__join { position: relative; flex: 0 0 402px; height: 186px; margin-top: -10px; }
.nhbf-req__join-btn {
  position: absolute; left: 0; bottom: 0; width: 100%; height: 121px; border-radius: 20px; padding-left: 42px;
  display: flex; align-items: center; background: var(--nhbf-grad-deep); color: #fff;
  font-weight: 800; font-size: 18.4px; line-height: 23px; text-align: center;
}
.nhbf-req__join-btn:hover { color: #fff; filter: brightness(1.08); }
.nhbf-req__qr { position: absolute; right: 0; top: 0; width: 186px; }

/* ---------- Lưu ý ---------- */
.nhbf-notes { padding: 52px 16px 0; position: relative; z-index: 1; }
.nhbf-notes__box { max-width: 1167px; margin: 0 auto; background: #fff; border: 1px solid #4c000b; border-radius: 20px; padding: 16px 28px 18px; }
.nhbf-notes__title { color: var(--nhbf-red-text); font-weight: 800; font-size: 24px; }
.nhbf-notes__list { margin-top: 8px; }
.nhbf-notes__list li { position: relative; padding-left: 14px; font-weight: 600; font-size: 17px; line-height: 23px; color: var(--nhbf-text); }
.nhbf-notes__list li::before { content: ""; position: absolute; left: 0; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--nhbf-red-text); }

/* ---------- Cách tính điểm ---------- */
.nhbf-scoring { position: relative; padding: 34px 16px 0; }
.nhbf-scoring__sparkle { display: none; }
.nhbf-score-box { position: relative; z-index: 1; max-width: 1214px; margin: 0 auto; padding: 27px 34px 30px; border-radius: 30px; background: var(--nhbf-maroon); }
.nhbf-score-box + .nhbf-score-box { margin-top: 63px; }
/* Lớp trắng phía sau lệch xuống 8px, thụt 23px mỗi bên (offset 31 - spread 23 = 8). */
.nhbf-score-box--stacked { padding-bottom: 45px; box-shadow: 0 31px 0 -23px #fff; }
.nhbf-score-table { margin-top: 30px; background: #fff; border-radius: 16px; padding: 14px 14px 20px; }
.nhbf-score-grid { display: grid; grid-template-columns: 399px 530px 1fr; align-items: center; padding: 0 18px; }
.nhbf-score-table--post .nhbf-score-grid { grid-template-columns: 372px 502px 1fr; }
.nhbf-score-table__head { height: 46px; border: 2px solid #ff0d0d; border-radius: 12px; background: var(--nhbf-grad-btn); color: #fff; font-weight: 800; font-size: 20.9px; }
.nhbf-score-table__row { min-height: 64px; border-bottom: 1px solid #ececec; font-weight: 600; font-size: 17px; line-height: 21px; color: var(--nhbf-text); padding-top: 10px; padding-bottom: 10px; }
.nhbf-score-table__row:last-child { border-bottom: 0; }
.nhbf-score-table__name { font-weight: 800; color: #2d2d2d; }
.nhbf-score-table__row strong { color: var(--nhbf-red-text); font-weight: 800; font-size: 18px; }
.nhbf-score-table--post .nhbf-score-table__row { min-height: 110px; }
.nhbf-score-table--post .nhbf-score-table__row > * { max-width: 344px; }
.nhbf-score-table--post .nhbf-score-table__row strong { font-size: 17px; max-width: 200px; }

/* ---------- Footer liên hệ ---------- */
.nhbf-contact { position: relative; margin-top: 16px; }
.nhbf-contact__banner { position: relative; height: 352px; overflow: hidden; }
/* Ảnh banner đã cắt dải trắng (vùng trong suốt bị mất khi xuất JPG); mép trên mờ dần vào nền trang. */
.nhbf-contact__banner > img.nhbf-pc {
  position: absolute; left: 50%; top: 64px; width: 1924px; max-width: none; height: 288px; transform: translateX(-50%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 50px); mask-image: linear-gradient(180deg, transparent 0, #000 50px);
}
.nhbf-contact__inner { position: absolute; inset: 0; width: 1920px; left: 50%; transform: translateX(-50%); }
.nhbf-contact__info { position: absolute; left: 890px; top: 81px; color: #fff; }
.nhbf-contact__info h2 { color: #fff; font-weight: 700; font-size: 24.1px; line-height: 29px; }
.nhbf-contact__info ul { margin-top: 30px; display: grid; gap: 6px; }
.nhbf-contact__info li { display: flex; align-items: center; gap: 15px; margin-left: 42px; font-weight: 700; font-size: 17px; }
.nhbf-contact__info li svg { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: #fff; fill: #c00000; flex: 0 0 22px; }
.nhbf-contact__info a { color: #fff; }
.nhbf-contact__info a:hover { text-decoration: underline; }
.nhbf-contact__qr { position: absolute; left: 1421px; top: 131px; width: 165px; height: 177px; border-radius: 14px; background: var(--nhbf-grad-deep); padding: 9px 14px 0; text-align: center; color: #fff; font-weight: 800; font-size: 14px; }
.nhbf-contact__qr img { width: 137px; border-radius: 10px; }
.nhbf-contact__qr span { display: block; margin-top: 7px; }

/* Thanh điều hướng nhanh cố định đáy màn hình; body chừa --nhbf-nav-h để không che footer.
 * Bản PC thu gọn so với design (icon 58 -> 44px) để không chiếm quá nhiều chiều cao màn hình. */
:root { --nhbf-nav-h: 112px; }
.nhbf-body { padding-bottom: calc(var(--nhbf-nav-h) + env(safe-area-inset-bottom, 0px)); }
.nhbf-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 999;
  height: calc(var(--nhbf-nav-h) + env(safe-area-inset-bottom, 0px));
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  display: flex; justify-content: center; align-items: stretch;
  background: linear-gradient(180deg, #c00000 0%, #960203 43%, #7a0305 79%, #700406 100%);
  box-shadow: 0 -6px 18px rgba(60, 0, 4, .35);
}
.nhbf-nav__item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; padding: 0 24px; color: #fff; text-align: center; font-weight: 600; font-size: 17px; line-height: 20px; }
.nhbf-nav__item + .nhbf-nav__item::before { content: ""; position: absolute; left: 0; top: 18px; height: 62px; border-left: 1px solid rgba(255, 255, 255, .7); }
.nhbf-nav__item img { height: 44px; width: auto; }
.nhbf-nav__item:hover { color: #fff; opacity: .9; }

/* ---------- Tablet ---------- */
@media (max-width: 1240px) {
  .nhbf-step__phone { width: 160px; right: 16px; }
  .nhbf-step__text { max-width: calc(100% - 180px); }
  .nhbf-step__title { white-space: normal; }
  .nhbf-score-grid, .nhbf-score-table--post .nhbf-score-grid { grid-template-columns: 1.1fr 1.4fr 1fr; gap: 10px; }
}

/* Nút lên đầu trang: góc phải, ngay trên thanh nav cố định; hiện khi đã cuộn (JS thêm .is-visible). */
.nhbf-to-top {
  position: fixed; right: 24px; z-index: 998;
  bottom: calc(var(--nhbf-nav-h) + env(safe-area-inset-bottom, 0px) + 16px);
  width: 52px; height: 52px; border-radius: 50%; border: 2px solid #ff0d0d;
  display: flex; align-items: center; justify-content: center;
  background: var(--nhbf-grad-btn); color: #fff; box-shadow: 0 6px 16px rgba(60, 0, 4, .4);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.nhbf-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.nhbf-to-top:hover { color: #fff; filter: brightness(1.1); }
.nhbf-to-top svg { width: 26px; height: 26px; }

/* Ảnh quà "rung rinh": lắc vài nhịp quanh đáy rồi nghỉ, 3 ô lệch nhịp nhau.
 * Ô giải chung cuộc có overflow: hidden nên phóng nhẹ (1.08) để không lộ góc khi xoay. */
@keyframes nhbf-gift-wiggle {
  0%, 60%, 100% { transform: rotate(0); }
  64% { transform: rotate(-4deg); }
  70% { transform: rotate(3.5deg); }
  76% { transform: rotate(-2.5deg); }
  82% { transform: rotate(1.5deg); }
  88% { transform: rotate(0); }
}
@keyframes nhbf-gift-wiggle-zoom {
  0%, 60%, 100% { transform: scale(1.08) rotate(0); }
  64% { transform: scale(1.08) rotate(-3deg); }
  70% { transform: scale(1.08) rotate(2.5deg); }
  76% { transform: scale(1.08) rotate(-2deg); }
  82% { transform: scale(1.08) rotate(1deg); }
  88% { transform: scale(1.08) rotate(0); }
}
.nhbf-prize__media img { transform-origin: 50% 90%; animation: nhbf-gift-wiggle 3s ease-in-out infinite; }
.nhbf-prize:nth-child(2) .nhbf-prize__media img { animation-name: nhbf-gift-wiggle-zoom; animation-delay: .5s; }
.nhbf-prize:nth-child(3) .nhbf-prize__media img { animation-delay: 1s; }
@media (prefers-reduced-motion: reduce) {
  .nhbf-prize__media img { animation: none; }
}
