:root {
  --primary: #ee0033;
  --primary-dark: #a4001f;
  --accent: #ffb100;
  --accent-dark: #e69c00;
  --bg: #ffffff;
  --bg-soft: #fff5f6;
  --text: #221416;
  --text-muted: #6b5a5c;
  --border: #f1dde0;
  --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, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

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

/* ---------- Header / Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 18px 16px 36px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('../images/hero-bg.svg') center top / cover no-repeat;
  opacity: .55;
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }

.hero__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: .3px;
}
.hero__logo img { width: 34px; height: 34px; }

.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,.9);
  line-height: 1.5;
}

.hero__note {
  font-size: 12px;
  color: rgba(255,255,255,.7);
  margin: -12px auto 18px;
  max-width: 560px;
}

.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: #3a2200;
  box-shadow: 0 8px 20px rgba(255,177,0,.35);
}
.btn-accent:active { background: var(--accent-dark); }

.btn-outline {
  background: #fff;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-ghost-light {
  background: rgba(255,255,255,.14);
  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;
  cursor: pointer;
}

.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(80,16,24,.05);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.card__badge {
  position: absolute;
  top: -12px;
  left: 16px;
  background: var(--accent);
  color: #3a2200;
  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(--primary);
}
.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;
}

.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,.82);
  padding: 24px 0;
  font-size: 12.5px;
  line-height: 1.7;
  text-align: center;
}
footer strong { color: #fff; }

/* ---------- 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; }

/* ---------- Comparison table (one markup, responsive via CSS) ---------- */
.tp-group { margin-bottom: 10px; }
.tp-group__title {
  margin: 24px 0 10px;
  font-size: 16px;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}
.tablepress-wrap { overflow-x: auto; }

table.tablepress {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 10px;
  background: #fff;
  font-size: 13.5px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
table.tablepress td {
  border: 1px solid var(--border);
  padding: 12px;
  vertical-align: top;
}
table.tablepress thead td {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .3px;
}
table.tablepress tbody tr:nth-child(even) { background: var(--bg-soft); }
table.tablepress .tp-price { color: var(--primary); font-weight: 800; }
table.tablepress .tp-perks { margin: 6px 0; padding-left: 18px; color: var(--text-muted); }
table.tablepress .tp-sms { display: inline-block; margin-top: 4px; font-size: 12.5px; color: var(--text-muted); }
table.tablepress .tp-sms__to {
  display: inline-block;
  background: var(--accent);
  color: #3a2200;
  font-weight: 900;
  font-size: 12px;
  padding: 1px 8px;
  border-radius: 999px;
}
table.tablepress td:last-child { text-align: center; white-space: nowrap; }
.tp-badge {
  display: inline-block;
  background: var(--accent);
  color: #3a2200;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
}

@media (max-width: 640px) {
  table.tablepress thead { display: none; }
  table.tablepress, table.tablepress tbody, table.tablepress tr, table.tablepress td { display: block; width: 100%; }
  table.tablepress tr { border-bottom: 6px solid var(--bg-soft); }
  table.tablepress td { border: none; padding: 8px 14px; }
  table.tablepress td:last-child { text-align: left; padding-bottom: 14px; }
  table.tablepress td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 4px;
  }
}

/* ---------- 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(80,16,24,.05);
  transition: transform .15s ease, box-shadow .15s ease;
}
.hub-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(80,16,24,.1); }
.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(--primary); }

.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); }

/* ---------- Blog (tin-tức) ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.post-card {
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.post-card__icon { font-size: 26px; margin-bottom: 8px; }
.post-card__title { font-size: 16px; font-weight: 800; color: var(--primary-dark); margin: 0 0 6px; line-height: 1.35; }
.post-card__excerpt { font-size: 13.5px; color: var(--text-muted); line-height: 1.5; margin: 0 0 10px; }
.post-card__date { font-size: 11.5px; color: var(--text-muted); }

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

.post-wrap { max-width: 720px; padding-top: 28px; padding-bottom: 36px; font-size: 15.5px; line-height: 1.75; color: var(--text); }
.post-wrap h1 { font-size: clamp(21px, 5vw, 27px); line-height: 1.3; color: var(--primary-dark); margin: 0 0 8px; }
.post-wrap .post-meta { font-size: 12.5px; color: var(--text-muted); margin: 0 0 20px; }
.post-wrap h2 { font-size: 19px; color: var(--primary-dark); margin: 26px 0 10px; }
.post-wrap p { margin: 0 0 14px; }
.post-wrap ul { padding-left: 20px; color: var(--text-muted); line-height: 1.7; }
.post-wrap li { margin-bottom: 4px; }

/* ---------- Article pages (goi-cuoc-*-viettel) ---------- */
.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; }
.article-related a { color: var(--primary); font-weight: 700; }

/* ---------- 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(40,8,12,.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(--primary); }
.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(--primary); font-size: 15px; }
.sms-modal__arrow { color: var(--text-muted); font-weight: 700; }
.sms-modal__to {
  display: inline-block; background: var(--accent); color: #3a2200; 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; }

/* ---------- Admin edit pin (shown on public pages when logged in) ---------- */
.admin-bar {
  background: #1a1210; color: #fff; font-size: 12.5px;
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 8px 12px; flex-wrap: wrap;
}
.admin-bar a { color: var(--accent); font-weight: 700; }
.admin-edit-pin {
  position: absolute; top: 10px; right: 10px;
  background: #1a1210; color: #fff !important; font-size: 11px; font-weight: 700;
  padding: 4px 9px; border-radius: 999px; z-index: 2;
}
table.tablepress .admin-edit-pin { position: static; display: inline-block; margin-left: 6px; }
