/* ============ Khối dùng chung cho các trang nội dung ============ */

.page { flex: 1; width: 100%; }

.section { padding: 68px 0; }
.section--tight { padding: 44px 0; }
.section--alt { background: var(--bg-elev); border-block: 1px solid var(--line-soft); }

.section-head { max-width: 680px; margin-bottom: 34px; }
.section-head.center { margin-inline: auto; text-align: center; }

.kicker {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
}

h1, h2, h3, h4 { margin: 0; font-weight: 300; letter-spacing: -0.01em; }

h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.1; }
h2 { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.18; }
h3 { font-size: 20px; font-weight: 400; }

.lead {
  margin: 16px 0 0;
  font-size: 17px;
  color: var(--muted);
  line-height: 1.65;
}

.muted { color: var(--muted); }

/* ---- Hero ---- */

.hero {
  position: relative;
  padding: 84px 0 72px;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
}

.hero::before {
  content: "";
  position: absolute;
  top: -220px;
  left: 50%;
  width: 900px;
  height: 620px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(23, 153, 214, 0.22), transparent 72%);
  pointer-events: none;
  animation: heroPulse 9s ease-in-out infinite;
}

@keyframes heroPulse {
  0%, 100% { opacity: 0.75; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.08); }
}

.hero-inner { position: relative; max-width: 760px; }
.hero-inner.center { margin-inline: auto; text-align: center; }

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.hero-inner.center .hero-actions { justify-content: center; }

/* ---- Lưới thẻ ---- */

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--bg-elev);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 24px;
  transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s, background 0.25s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

a.card:hover, .card.is-hoverable:hover {
  transform: translateY(-4px);
  border-color: rgba(23, 153, 214, 0.5);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.card h3 { font-size: 18px; }
.card p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.6; }

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--blue-soft);
  color: var(--blue);
  margin-bottom: 4px;
}

.card-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-icon.green { background: rgba(46, 200, 102, 0.14); color: var(--green); }
.card-icon.violet { background: rgba(138, 92, 246, 0.14); color: var(--violet); }
.card-icon.amber { background: rgba(255, 180, 0, 0.14); color: var(--amber); }

.card-meta {
  margin-top: auto;
  padding-top: 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.card-link { color: var(--blue); font-size: 14px; text-decoration: none; }
.card-link:hover { text-decoration: underline; }

/* ---- Reveal ---- */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

[data-reveal].is-revealed { opacity: 1; transform: none; }

/* ---- Thống kê ---- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.stat {
  border-left: 2px solid var(--blue);
  padding: 4px 0 4px 18px;
}

.stat-value {
  display: block;
  font-size: 40px;
  font-weight: 200;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

/* ---- Tabs ---- */

.tabbar {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabbar::-webkit-scrollbar { display: none; }

.tab {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.04em;
  padding: 12px 16px;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  transition: color 0.2s;
}

.tab::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transition: transform 0.28s var(--ease);
}

.tab:hover { color: #fff; }
.tab.is-active { color: #fff; }
.tab.is-active::after { transform: scaleX(1); }

.tab-panel[hidden] { display: none; }
.tab-panel { animation: panelIn 0.35s var(--ease); }

@keyframes panelIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---- Accordion ---- */

.acc-item { border-bottom: 1px solid var(--line-soft); }

.acc-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: none;
  border: 0;
  color: #fff;
  font-size: 16px;
  text-align: left;
  padding: 20px 0;
  cursor: pointer;
}

.acc-head .plus {
  position: relative;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.acc-head .plus::before,
.acc-head .plus::after {
  content: "";
  position: absolute;
  background: var(--blue);
  transition: transform 0.28s var(--ease), opacity 0.2s;
}

.acc-head .plus::before { top: 6px; left: 0; width: 14px; height: 2px; }
.acc-head .plus::after { left: 6px; top: 0; width: 2px; height: 14px; }

.acc-item.is-open .plus::after { transform: rotate(90deg); opacity: 0; }

.acc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease);
}

.acc-body p {
  margin: 0 0 20px;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 720px;
}

/* ---- Hàng đặc điểm (ảnh + chữ) ---- */

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 44px 0;
}

.feature-row + .feature-row { border-top: 1px solid var(--line-soft); }
.feature-row.reverse .feature-media { order: -1; }

.feature-list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; }

.feature-list li {
  position: relative;
  padding-left: 26px;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(23, 153, 214, 0.16);
}

.feature-media {
  background: linear-gradient(160deg, var(--bg-elev), var(--bg-elev-2));
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 22px;
  min-height: 240px;
  display: grid;
  place-items: center;
}

/* ---- Dải CTA ---- */

.cta-band {
  background: linear-gradient(120deg, rgba(23, 153, 214, 0.18), rgba(138, 92, 246, 0.14));
  border-block: 1px solid var(--line-soft);
  padding: 54px 0;
  text-align: center;
}

.cta-band h2 { margin-bottom: 10px; }

/* ---- Bảng ---- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--bg-elev);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 560px;
}

table.data th, table.data td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
}

table.data th {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.03);
}

table.data tbody tr { transition: background 0.15s; }
table.data tbody tr:hover { background: rgba(255, 255, 255, 0.04); }
table.data tbody tr:last-child td { border-bottom: 0; }

.num { font-variant-numeric: tabular-nums; text-align: right; }

.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  color: var(--muted);
}

.pill.ok { color: var(--green); border-color: rgba(46, 200, 102, 0.4); background: rgba(46, 200, 102, 0.1); }
.pill.warn { color: var(--amber); border-color: rgba(255, 180, 0, 0.4); background: rgba(255, 180, 0, 0.1); }
.pill.info { color: var(--blue); border-color: rgba(23, 153, 214, 0.4); background: var(--blue-soft); }

/* ---- Bảng giá ---- */

.price-card { position: relative; }

.price-card.featured {
  border-color: rgba(23, 153, 214, 0.6);
  background: linear-gradient(180deg, rgba(23, 153, 214, 0.12), var(--bg-elev));
}

.price-tag {
  font-size: 38px;
  font-weight: 200;
  line-height: 1.1;
  margin: 6px 0 2px;
}

.price-tag small { font-size: 14px; color: var(--muted); }

.price-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
}

/* ---- Bản đồ mạng lưới ---- */

.map-shell {
  position: relative;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: linear-gradient(160deg, #171833, #12132a);
  overflow: hidden;
}

#networkMap { display: block; width: 100%; height: 420px; }

.map-legend {
  position: absolute;
  left: 16px;
  bottom: 14px;
  display: flex;
  gap: 18px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(20, 21, 38, 0.7);
  padding: 8px 12px;
  border-radius: 6px;
  backdrop-filter: blur(6px);
}

.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

/* ---- Danh sách bài viết ---- */

.article-thumb {
  height: 140px;
  border-radius: 6px;
  margin: -24px -24px 4px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(135deg, rgba(23, 153, 214, 0.35), rgba(138, 92, 246, 0.28));
  position: relative;
  overflow: hidden;
}

.article-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 26px);
}

a.card:hover .article-thumb { filter: brightness(1.12); }

/* ---- Trang kết quả ---- */

/* Canvas phải co theo khung, nếu không nó lấy kích thước từ thuộc tính width. */
#historyChart {
  display: block;
  width: 100%;
  height: 180px;
}

.results-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.empty-state {
  text-align: center;
  padding: 56px 20px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
}

.empty-state h3 { color: #fff; margin-bottom: 8px; }

.results-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

/* ---- Timeline ---- */

.timeline { list-style: none; margin: 0; padding: 0 0 0 26px; position: relative; }

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--line);
}

.timeline li { position: relative; padding-bottom: 26px; }

.timeline li::before {
  content: "";
  position: absolute;
  left: -25px;
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--blue);
}

.timeline h4 { font-size: 16px; font-weight: 500; }
.timeline p { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

.timeline time { font-size: 12px; color: var(--blue); letter-spacing: 0.1em; }

/* ---- Form liên hệ ---- */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; gap: 7px; }

.field label { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

.field input, .field textarea, .field select {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #fff;
  padding: 11px 13px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

.field textarea { resize: vertical; min-height: 120px; }

.form-note { font-size: 13px; color: var(--muted); margin: 14px 0 0; }

/* ---- Khối tải ứng dụng ---- */

.platform-visual {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  background: radial-gradient(circle at 50% 30%, rgba(23, 153, 214, 0.3), transparent 65%);
  display: grid;
  place-items: center;
}

.platform-visual svg {
  width: 88px;
  height: 88px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.2;
  opacity: 0.85;
}

.badge-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 16px;
  text-decoration: none;
  font-size: 13px;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.store-badge:hover {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}

.store-badge span { display: block; }
.store-badge small { display: block; font-size: 10px; color: var(--muted); letter-spacing: 0.1em; }

/* ---- Khối code ---- */

.code-block {
  background: #0f1022;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 18px 20px;
  overflow-x: auto;
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.75;
  color: #cdd3f0;
}

.code-block .c { color: var(--muted); }
.code-block .k { color: var(--blue); }
.code-block .s { color: var(--green); }

/* ---- Responsive ---- */

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .results-summary { grid-template-columns: repeat(2, 1fr); }
  .feature-row { grid-template-columns: 1fr; gap: 28px; }
  .feature-row.reverse .feature-media { order: 0; }
  .section { padding: 52px 0; }
}

@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .hero { padding: 60px 0 52px; }
}
