:root {
  --red: #b40000;
  --red-dark: #9b0000;
  --red-deep: #7f1516;
  --red-news: #c8102e;
  --green: #1d714c;
  --gold: #ffae27;
  --gold-dark: #f67f00;
  --text: #1a1823;
  --muted: #808185;
  --line: #d1d3d4;
  --page: #f9f6fa;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Montserrat", "Noto Sans", sans-serif;
  font-size: 14.4px;
  line-height: 1.5;
  color: var(--text);
  background: var(--page);
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; }
section[id], footer[id] { scroll-margin-top: 64px; }

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 15px;
}

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

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--red-dark);
}
.navbar-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
}
.brand {
  color: #ffe9a8;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 4px;
  background: none;
  border: 0;
}
.nav-toggle span {
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
}
.nav-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  padding-bottom: 12px;
  background: var(--red-dark);
  border-top: 1px solid rgba(255, 255, 255, .15);
  box-shadow: 0 10px 20px rgba(0, 0, 0, .3);
}
.nav-menu.open { display: flex; }
.nav-menu a {
  padding: 12px 16px;
  color: #fff;
  font-weight: 700;
}
.nav-menu a:hover { color: #ffe9a8; }
.nav-menu .nav-cta {
  margin: 8px 16px 0;
  padding: 10px 18px;
  text-align: center;
  border: 2px solid var(--gold);
  border-radius: 12px;
  background: linear-gradient(var(--gold) 0%, var(--gold-dark) 100%);
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
  transition: filter .15s, transform .15s;
}
.nav-menu .nav-cta:hover { color: #fff; filter: brightness(1.08); transform: translateY(-1px); }

/* ---------- Hero ---------- */
.hero { line-height: 0; }
.hero a { display: block; }
.hero img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Cards ---------- */
main section { margin-bottom: 24px; }
.countdown-section { margin-top: 16px; }

.wrap { border-radius: 20px; }
.card-white {
  background: #fff;
  border: 1px solid var(--muted);
}
.card-red {
  background: linear-gradient(135deg, #b40000 0%, #7e0000 100%);
  border: 1px solid var(--gold);
  color: #fff;
}

/* ---------- Intro + countdown ---------- */
.intro { padding: 16px; }
.intro .title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
}
.intro .description {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 500;
}
.info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  font-weight: 700;
}
.info-row { display: flex; align-items: center; gap: 8px; }
.icon {
  flex: none;
  width: 24px;
  height: 24px;
  fill: none;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-red { stroke: #c0392b; }

.countdown-box { margin-top: 16px; }
.countdown {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  padding: 14px 10px 12px;
  background: linear-gradient(135deg, #b40000 0%, #7e0000 100%);
  border: 1px solid var(--gold);
  border-radius: 14px;
  color: #fff;
}
.cd-item {
  display: flex;
  flex: 1 1 0;
  max-width: 96px;
  flex-direction: column;
  align-items: center;
}
.cd-num {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 3px;
  margin-right: -3px; /* bù letter-spacing để số nằm chính giữa */
  color: #ffe9a8;
  font-variant-numeric: tabular-nums;
}
.cd-label {
  margin-top: 2px;
  font-size: 13px;
  font-weight: 500;
}
.cd-sep {
  font-size: 22px;
  font-weight: 700;
  line-height: 34px;
  color: var(--gold);
}
.cd-over {
  margin-top: 10px;
  text-align: center;
  font-weight: 600;
  color: var(--red);
}

/* ---------- Certificate ---------- */
.card-red { padding: 24px; text-align: center; }
.cert-title {
  color: #ffd76a;
  font-size: 20px;
  font-weight: 700;
}
.icon-solid {
  width: 20px;
  height: 20px;
  margin-right: 4px;
  vertical-align: -3px;
  fill: #ffd76a;
}
.cert-desc { margin-top: 8px; font-size: 14px; font-weight: 500; }
.cert-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  transition: transform .15s, filter .15s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn-icon { flex: none; width: 18px; height: 18px; fill: currentColor; }
.btn-light {
  background: #f8f7fc;
  border: 1px solid #f8f7fc;
  color: var(--red);
}
.btn-gold {
  background: linear-gradient(var(--gold) 0%, var(--gold-dark) 100%);
  border: 2px solid var(--gold);
  color: #fff;
}
.btn-fb { background: #1877f2; border: 2px solid #1877f2; color: #fff; }
.btn-msg { background: #fff; border: 2px solid #0084ff; color: #0084ff; }

/* ---------- Đăng ký ---------- */
.register { padding: 20px 16px; }
.register h2 { font-size: 20px; font-weight: 700; }
.register p { margin-top: 6px; font-weight: 500; }
.register-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

/* ---------- Stats ---------- */
.stats { padding: 15px 0; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  row-gap: 18px;
}
.item-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 11px;
}
.item-stat:nth-child(even) { border-left: 1px solid var(--line); }
.stat-icon { flex: none; width: 34px; height: 34px; }
.stat-num {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.item-stat span { font-size: 13px; }

.progress-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 18px;
  padding: 0 16px;
}
.progress-title, .progress-goal { font-weight: 700; }
.progress-bar-wrapper {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 8px;
}
.progress-fill, .progress-remain { height: 8px; border-radius: 4px; }
.progress-fill { background: linear-gradient(90deg, #00a651, #dca644); }
.progress-remain { flex: 1; background: var(--line); }
.progress-fill[style*="100%"] { flex: 1; }
.progress-fill[style*="100%"] ~ .progress-remain { display: none; }
.progress-percent { font-size: 13px; font-weight: 700; color: var(--muted); }

/* ---------- Sponsor banner + video ---------- */
.sponsor-banner, .video-wrapper {
  border-radius: 20px;
  overflow: hidden;
}
.sponsor-banner {
  padding: 28px 20px 40px;
  background:
    radial-gradient(120% 60% at 50% 118%, #f6c453 0 48%, transparent 49%),
    radial-gradient(120% 70% at 30% 120%, rgba(47, 179, 107, .45) 0 55%, transparent 56%),
    linear-gradient(135deg, #0a7a45, #0b4d33);
  color: #fff;
  text-align: center;
}
.sponsor-banner img { display: block; width: 100%; height: auto; }
.sp-title { color: #ffe9a8; font-size: 20px; font-weight: 800; letter-spacing: .5px; }
.sp-sub { margin-top: 4px; font-weight: 500; }
.sp-steps {
  display: grid;
  gap: 14px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  font-weight: 700;
}
.sp-steps li { display: flex; align-items: center; gap: 12px; text-align: left; }
.sp-num {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  color: #0a7a45;
  font-size: 20px;
  font-weight: 800;
}

.video-wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--gold);
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
}
.video-wrapper:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 0, 0, .3); }
.video-wrapper.playing { cursor: auto; transform: none; }
.video-thumbnail, .video-wrapper iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}
.video-thumbnail { transition: transform .3s ease, filter .3s ease; }
.video-wrapper:hover .video-thumbnail { transform: scale(1.015); filter: brightness(.92); }
.video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .15);
  transition: background .25s ease;
}
.video-wrapper:hover .video-overlay { background: rgba(0, 0, 0, .28); }
.yt-icon {
  width: 54px;
  height: 38px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .45));
  transition: transform .25s ease;
}
.yt-icon-bg { fill: #f00; transition: fill .25s ease; }
.video-wrapper:hover .yt-icon { transform: scale(1.15); }
.video-wrapper:hover .yt-icon-bg { fill: #c00; }

/* ---------- News ---------- */
.news-section { margin-top: 40px; }
.news-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.news-head h2 { color: var(--red-news); font-size: 20px; font-weight: 700; line-height: 1.2; }
.news-head a { font-weight: 700; }
.news-head a:hover { text-decoration: underline; }
.news-grid { display: grid; gap: 16px; }
.news-card {
  display: flex;
  min-height: 112px;
  background: #fff;
  border: 1px solid #dcdcdc;
  border-radius: 6px;
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.news-card:hover { box-shadow: 0 6px 16px rgba(0, 0, 0, .12); transform: translateY(-2px); }
.news-card-img { flex: none; width: 137px; background-size: cover; background-position: center; }
.thumb-1 { background-image: linear-gradient(135deg, #d81616, #f5a623); }
.thumb-2 { background-image: linear-gradient(135deg, #0a7a45, #9ad66b); }
.thumb-3 { background-image: linear-gradient(135deg, #7e0000, #d81616); }
.news-card-body { padding: 12px 16px; min-width: 0; }
.news-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  margin-bottom: 8px;
  color: #555;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}
.news-card:hover .news-title { color: var(--red-news); }
.news-card time { display: block; color: #999; font-size: 12.500px; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 48px;
  padding: 56px 0 24px;
  background: linear-gradient(90deg, #91000b, #c40a1b, #91000b);
  color: #fff;
}
.footer-grid { display: grid; gap: 28px; }
.footer-logo {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
  color: #ffd76a;
  font-weight: 800;
}
.footer-logo span { font-size: 18px; letter-spacing: 2px; }
.footer-logo strong { font-size: 30px; letter-spacing: 1px; }
.footer-logo em { color: #fff; font: italic 600 22px "Times New Roman", Times, serif; }
.site-footer h4 { margin-bottom: 14px; font-size: 16px; font-weight: 700; }
.site-footer li { margin-bottom: 8px; }
.site-footer a:hover { text-decoration: underline; }
.footer-bottom {
  display: grid;
  gap: 8px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .2);
  font-size: 13px;
  text-align: center;
}
.footer-legal i { margin: 0 8px; font-style: normal; opacity: .5; }
.footer-social { display: flex; gap: 12px; }
.footer-social a, .float-btn {
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: transform .15s, filter .15s;
}
.footer-social a {
  width: 42px;
  height: 42px;
  background: #fff;
  color: var(--red-dark);
}
.footer-social a:hover, .float-btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.footer-social svg { width: 22px; height: 22px; fill: currentColor; }
.footer-register { margin-top: 16px; }
.site-footer .footer-register:hover { text-decoration: none; }

/* ---------- Nút nổi Facebook / Nhắn tin ---------- */
.float-actions {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.float-btn {
  width: 52px;
  height: 52px;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
}
.float-btn svg { width: 28px; height: 28px; fill: currentColor; }
.float-fb { background: #1877f2; }
.float-msg { background: linear-gradient(45deg, #0084ff, #a033ff 60%, #ff5c87); }

/* ---------- Tablet trở lên ---------- */
@media (min-width: 768px) {
  .intro { padding: 16px 32px; text-align: center; }
  .info { flex-direction: row; justify-content: center; gap: 20px; }

  .cert-actions { flex-direction: row; justify-content: center; }
  .register { padding: 24px 32px; text-align: center; }
  .register-actions { flex-direction: row; justify-content: center; }
  .item-stat { gap: 15px; padding: 0 20px; }
  .stat-icon { width: 45px; height: 45px; }
  .stat-num { font-size: 20px; }
  .item-stat span { font-size: 14.4px; }

  .sponsor-banner { padding: 40px 32px 72px; }
  .sp-title { font-size: 30px; }
  .sp-sub { font-size: 17px; }
  .sp-steps { grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 28px; font-size: 16px; }
  .sp-steps li { flex-direction: column; text-align: center; }
  .sp-num { width: 56px; height: 56px; font-size: 26px; }

  .yt-icon { width: 68px; height: 48px; }
  .video-wrapper { border: 0; }

  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-bottom { grid-template-columns: repeat(3, 1fr); align-items: center; }
  .footer-legal { text-align: right; }
}

/* ---------- Desktop ---------- */
@media (min-width: 992px) {
  .navbar-inner { min-height: 62px; padding: 0 24px; }
  .nav-toggle, .brand { display: none; }
  .nav-menu {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }
  .nav-menu a { padding: 8px; white-space: nowrap; }
  .nav-menu .nav-cta { margin: 0; padding: 10px 24px; }

  section[id], footer[id] { scroll-margin-top: 78px; }

  .countdown-section { margin-top: 20px; }
  .register {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    text-align: left;
  }
  .register-actions { flex: none; margin-top: 0; }
  .intro {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 32px;
    padding: 18px 32px;
  }
  .intro .title { font-size: 18px; }
  .countdown-box { margin-top: 0; }
  .countdown { gap: 12px; padding: 12px 22px 10px; }
  .cd-item { flex: none; width: 64px; }
  .cd-num { font-size: 34px; }
  .cd-sep { line-height: 38px; }

  /* Cột đầu rộng hơn vì con số 10 tỷ dài nhất */
  .stats-grid { grid-template-columns: 1.35fr 1.1fr .75fr 1fr; }
  .item-stat { padding: 0 14px; }
  .item-stat + .item-stat { border-left: 1px solid var(--line); }

  .progress-block {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
    padding: 0 22px;
  }

  .news-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}

@media (min-width: 1200px) {
  .navbar-inner { padding: 0 48px; }
  .stat-num { font-size: 24px; }
}

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