:root {
  --primary: #0054a6;
  --primary-dark: #003d7a;
  --accent: #ff6600;
  --accent-dark: #e65500;
  --bg: #ffffff;
  --bg-soft: #f8f9fa;
  --text: #1a1f2b;
  --text-muted: #5b6472;
  --border: #e7eaee;
  --radius: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Header / Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 18px 16px 32px;
}

.hero__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: .3px;
}

.hero__logo svg { width: 28px; height: 28px; }

.hero__content { margin-top: 20px; text-align: center; }

.hero h1 {
  font-size: clamp(22px, 6vw, 32px);
  line-height: 1.25;
  margin: 0 0 10px;
  font-weight: 800;
}

.hero p {
  margin: 0 auto 20px;
  max-width: 560px;
  font-size: 15px;
  color: rgba(255,255,255,.88);
  line-height: 1.5;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  padding: 14px 24px;
  line-height: 1;
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(255,102,0,.35);
}
.btn-accent:active { background: var(--accent-dark); }

.btn-ghost-light {
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,.4);
}

/* ---------- Filter tabs ---------- */
.tabs-wrap {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 16px;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  flex: 0 0 auto;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.tab.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ---------- Sections ---------- */
section { padding: 28px 0; }
.section-bg { background: var(--bg-soft); }

.section-title {
  font-size: clamp(19px, 4.5vw, 24px);
  font-weight: 800;
  text-align: center;
  margin: 0 0 4px;
  color: var(--primary-dark);
}
.section-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 20px;
}

/* ---------- Package cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 2px 10px rgba(16,24,40,.04);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card--feature {
  border: 2px solid var(--primary);
  box-shadow: 0 10px 28px rgba(0,84,166,.14);
}

.card__badge {
  position: absolute;
  top: -12px;
  left: 16px;
  background: var(--accent);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: .3px;
}

.card__code {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary-dark);
}

.card__price {
  font-size: 26px;
  font-weight: 800;
  color: var(--accent);
}
.card__price small { font-size: 14px; font-weight: 600; color: var(--text-muted); }

.card__data {
  font-size: 15px;
  font-weight: 700;
  background: var(--bg-soft);
  border-radius: 10px;
  padding: 8px 12px;
  display: inline-block;
}

.card__perks {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
}
.card__perks li { padding-left: 18px; position: relative; }
.card__perks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 800;
}

.card__cta {
  margin-top: 4px;
  width: 100%;
}

.card__hint {
  text-align: center;
  font-size: 11.5px;
  color: var(--text-muted);
  margin: 0;
}

/* compact cards for the full list */
.grid--compact { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid--compact .card { padding: 16px; gap: 8px; }
.grid--compact .card__code { font-size: 18px; }
.grid--compact .card__price { font-size: 20px; }

/* ---------- Trust section ---------- */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.trust-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
}
.trust-item .icon { font-size: 28px; margin-bottom: 8px; }
.trust-item h3 { margin: 0 0 6px; font-size: 15px; }
.trust-item p { margin: 0; font-size: 13.5px; color: var(--text-muted); line-height: 1.5; }

/* ---------- Footer ---------- */
footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,.8);
  padding: 24px 0;
  font-size: 12.5px;
  line-height: 1.7;
  text-align: center;
}
footer strong { color: #fff; }

/* ---------- Hero note / disclaimer ---------- */
.hero__note {
  font-size: 12px;
  color: rgba(255,255,255,.65);
  margin: -12px auto 18px;
  max-width: 560px;
}

/* ---------- Card actions (CTA + "Chi tiết" link) ---------- */
.card__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.card__actions .card__cta { flex: 1; }
.btn-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}
.btn-sm { padding: 9px 18px; font-size: 13px; }

/* ---------- TablePress-style comparison table ---------- */
/* Same buffer trick as .tp-pricing-scroll below: this wrapper also scrolls
   horizontally, so without matching padding it re-clips the negative-margin
   buffer the V3 pricing cards rely on for their scale/shadow, before that
   buffer ever gets a chance to work. */
.tablepress-wrap { overflow-x: auto; padding: 0 14px; margin: 0 -14px; }

table.tablepress {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 28px;
  background: #fff;
  font-size: 13.5px;
}
table.tablepress td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  vertical-align: top;
}
table.tablepress tr.tablepress-group-heading td {
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .2px;
}
table.tablepress tr.tablepress-col-heading td {
  background: var(--bg-soft);
  font-weight: 700;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
}
table.tablepress tbody tr:not(.tablepress-group-heading):not(.tablepress-col-heading):nth-child(even) {
  background: var(--bg-soft);
}
table.tablepress .tp-price { color: var(--accent); font-weight: 800; }
table.tablepress .tp-perks { margin: 4px 0; padding-left: 18px; color: var(--text-muted); }
table.tablepress td:last-child { text-align: center; white-space: nowrap; }

/* ---------- Eligibility / usage notes ---------- */
.note-heading {
  margin: 28px 0 10px;
  font-size: 16px;
  color: var(--primary-dark);
}
.note-list {
  margin: 0 0 8px;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.7;
}

/* ---------- Footer category tiles ---------- */
.cat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}
.cat-tile {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 10px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--primary-dark);
}
.cat-tile__icon { display: block; font-size: 26px; margin-bottom: 6px; }

/* ---------- Homepage hub navigation ---------- */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}
.hub-card {
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: 0 2px 10px rgba(16,24,40,.04);
  transition: transform .15s ease, box-shadow .15s ease;
}
.hub-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(16,24,40,.08); }
.hub-card__icon { font-size: 26px; margin-bottom: 8px; }
.hub-card__title { font-size: 16.5px; font-weight: 800; color: var(--primary-dark); margin: 0 0 6px; }
.hub-card__desc { font-size: 13.5px; color: var(--text-muted); line-height: 1.5; margin: 0 0 12px; }
.hub-card__cta { font-size: 13px; font-weight: 800; color: var(--accent); }

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}
.article-link {
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}
.article-link__code { display: block; font-size: 14.5px; font-weight: 800; color: var(--primary-dark); margin-bottom: 2px; }
.article-link__meta { font-size: 12.5px; color: var(--text-muted); }

/* ---------- Comparison table — shared bits across all 4 variants ---------- */
.tp-perks {
  margin: 6px 0;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.5;
}
.tp-sms {
  display: inline-block;
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.tp-sms__body { color: var(--primary-dark); font-weight: 800; }
.tp-sms__to {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  font-size: 12px;
  padding: 1px 8px;
  border-radius: 999px;
  letter-spacing: .3px;
}
.tp-rows-group__title {
  margin: 24px 0 10px;
  font-size: 15px;
  color: var(--primary-dark);
}

/* ---------- V2: horizontal row cards ---------- */
.tp-rows-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 8px;
}
.tp-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.tp-row:last-child { border-bottom: none; }
.tp-row__id {
  flex: 0 0 150px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tp-row__code { font-size: 17px; font-weight: 800; color: var(--primary-dark); }
.tp-row__badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  width: fit-content;
}
.tp-row__price { font-size: 16px; font-weight: 800; color: var(--accent); }
.tp-row__price small { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.tp-row__info { flex: 1 1 200px; min-width: 0; }
.tp-row__data {
  font-size: 13.5px;
  font-weight: 700;
  background: var(--bg-soft);
  border-radius: 8px;
  padding: 4px 10px;
  display: inline-block;
}
.tp-row__cta { flex: 0 0 auto; }

/* ---------- V3: pricing-card grid ---------- */
.tp-pricing-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  /* overflow-x:auto forces overflow-y to behave like 'auto' too (CSS Overflow
     spec), which was clipping the badge's negative top offset below — give
     it room instead of fighting the spec. Left/right padding needs the same
     buffer: a --highlight card's scale(1.03) + box-shadow has no sibling gap
     to grow into at the very first/last position, so it got clipped there. */
  padding: 16px 14px 6px;
  margin: -16px -14px 8px;
  scroll-snap-type: x mandatory;
}
.tp-price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 0 0 200px;
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
}
.tp-price-card--highlight {
  border: 2px solid var(--primary);
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
  transform: scale(1.03);
}
.tp-price-card__badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.tp-price-card__code { font-size: 18px; font-weight: 800; color: var(--primary-dark); margin-top: 6px; }
.tp-price-card__price { font-size: 22px; font-weight: 800; color: var(--accent); margin: 6px 0; }
.tp-price-card__price small { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.tp-price-card__data {
  font-size: 13px;
  font-weight: 700;
  background: var(--bg-soft);
  border-radius: 8px;
  padding: 4px 10px;
  display: inline-block;
}
.tp-price-card .tp-perks { text-align: left; flex: 1; }
.tp-price-card .btn { width: 100%; margin-top: auto; }

/* ---------- V4: accordion / compact list ---------- */
details.tp-acc {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}
.tp-acc__summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 800;
  color: var(--primary-dark);
  background: var(--bg-soft);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tp-acc__summary::-webkit-details-marker { display: none; }
.tp-acc__count { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.tp-acc__body { padding: 4px 16px; }
.tp-acc-row { padding: 12px 0; border-bottom: 1px solid var(--border); }
.tp-acc-row:last-child { border-bottom: none; }
.tp-acc-row__head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.tp-acc-row__price { color: var(--accent); font-weight: 800; font-size: 13.5px; }
.tp-acc-row__data {
  font-size: 12.5px;
  font-weight: 700;
  background: var(--bg-soft);
  border-radius: 8px;
  padding: 3px 8px;
}
.tp-acc-row__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}
.tp-acc-row__foot .tp-perks { flex: 1; margin: 0; }
.tp-acc-row__foot .btn { flex: 0 0 auto; }

/* ---------- Article pages (goi-cuoc-*-vinaphone) ---------- */
.article-top {
  background: var(--primary);
  padding: 14px 0;
}
.article-top .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.article-top__brand { color: #fff; font-weight: 800; font-size: 15px; }
.article-top__crumb { color: rgba(255,255,255,.85); font-size: 12.5px; }
.article-top__crumb a { color: #fff; font-weight: 600; }

.article-wrap {
  max-width: 720px;
  padding-top: 28px;
  padding-bottom: 36px;
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--text);
}
.article-wrap h1 {
  font-size: clamp(21px, 5vw, 27px);
  line-height: 1.3;
  color: var(--primary-dark);
  margin: 0 0 18px;
}
.article-wrap h2 {
  font-size: 19px;
  color: var(--primary-dark);
  margin: 30px 0 10px;
}
.article-wrap p { margin: 0 0 14px; }

.info-box {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin: 0 0 22px;
}
.info-box__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.info-box__label { display: block; font-size: 11.5px; color: var(--text-muted); text-transform: uppercase; }
.info-box__row strong { font-size: 15px; }
.info-box__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.info-box__actions .btn { flex: 1 1 160px; }
.info-box--cta { text-align: center; margin-top: 30px; }

details.faq-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2px 16px;
  margin-bottom: 8px;
}
details.faq-item summary {
  cursor: pointer;
  padding: 12px 0;
  font-weight: 700;
  color: var(--primary-dark);
  list-style: none;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item p { padding-bottom: 12px; color: var(--text-muted); margin: 0; }

.article-related {
  text-align: center;
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 14px;
}

/* ---------- SMS syntax popup ---------- */
body.sms-modal-open { overflow: hidden; }

.sms-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(16, 24, 40, .55);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease;
}
.sms-modal-overlay.is-open { opacity: 1; visibility: visible; }

.sms-modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 28px 22px 22px;
  text-align: center;
  transform: translateY(16px);
  transition: transform .2s ease;
}
.sms-modal-overlay.is-open .sms-modal { transform: translateY(0); }

@media (min-width: 560px) {
  .sms-modal-overlay { align-items: center; }
  .sms-modal { border-radius: var(--radius); }
}

.sms-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.sms-modal__icon { font-size: 32px; }
.sms-modal__title {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-dark);
  margin: 6px 0 10px;
}
.sms-modal__code { color: var(--accent); }
.sms-modal__hint {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0 0 14px;
}
.sms-modal__syntax {
  background: var(--bg-soft);
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 14px;
  font-size: 17px;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 18px;
  word-break: break-word;
}
.sms-modal__hint-number { color: var(--accent); font-size: 15px; }
.sms-modal__arrow { color: var(--text-muted); font-weight: 700; }
.sms-modal__to {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  font-size: 19px;
  padding: 2px 12px;
  border-radius: 999px;
  letter-spacing: .5px;
}
.sms-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sms-modal__actions .btn { width: 100%; }
.sms-modal__note {
  font-size: 11.5px;
  color: var(--text-muted);
  margin: 14px 0 0;
}
.article-related a { color: var(--primary); font-weight: 700; }
