/*
Theme Name: 789C SEO Theme v13 Pro (Flatsome Edition)
Theme URI: https://789c.com/
Author: 789C Dev
Description: Giao diện WordPress chuẩn SEO v5.0: Footer 4 cột chuyên nghiệp (Logo/Mô tả, Menu bài con Hướng dẫn, Menu bài con Về chúng tôi, Liên hệ & Hashtags), Menu Dropdown bài viết con trên Header, 10 Mục nội dung tự chỉnh (~3.500 từ), 5 FAQ tự chỉnh, Từ khóa chính {KEY}, Mục lục Sticky cố định giữa màn hình gọn sạch, tự động rel="nofollow" toàn bộ link trang chủ.
Version: 13.0.0
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: c789-theme
*/

/* =========================================================
   1. DESIGN TOKENS (DARK & LIGHT MODE)
========================================================= */
:root,
html[data-theme="dark"] {
  color-scheme: dark;
  --c789-sticky-offset: 88px;
  --c789-bg: #070b14;
  --c789-surface: #0f172a;
  --c789-card: #162036;
  --c789-card-hover: #1d2a46;
  --c789-glass: rgba(15, 23, 42, 0.94);
  --c789-text: #f8fafc;
  --c789-muted: #94a3b8;
  --c789-border: rgba(255, 255, 255, 0.08);
  --c789-primary: #f5b041;
  --c789-accent: #10b981;
  --c789-font: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
  --c789-font-size: 16px;
  --c789-container: 1240px;
  --c789-toc-width: 310px;
  --c789-shadow: 0 14px 36px rgba(0, 0, 0, 0.38);
}

html[data-theme="light"] {
  color-scheme: light;
  --c789-bg: #f4f7fb;
  --c789-surface: #ffffff;
  --c789-card: #f1f5f9;
  --c789-card-hover: #e2e8f0;
  --c789-glass: rgba(255, 255, 255, 0.96);
  --c789-text: #0f172a;
  --c789-muted: #475569;
  --c789-border: rgba(15, 23, 42, 0.1);
  --c789-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--c789-sticky-offset, 88px);
  font-size: var(--c789-font-size);
}

body {
  font-family: var(--c789-font);
  background-color: var(--c789-bg);
  color: var(--c789-text);
  line-height: 1.78;
  transition: background-color 0.25s ease, color 0.25s ease;
  overflow-x: clip;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.c789-container {
  max-width: var(--c789-container);
  margin: 0 auto;
  padding: 0 20px;
}

/* =========================================================
   2. READING PROGRESS BAR
========================================================= */
.c789-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--c789-primary), var(--c789-accent));
  z-index: 9999;
}

/* =========================================================
   3. STICKY HEADER + DROPDOWN SUB-MENU BÀI CON
========================================================= */
.c789-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c789-glass);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--c789-border);
}

body.admin-bar .c789-header {
  top: 32px;
}

.c789-header-inner {
  min-height: 70px;
  height: auto;
  padding-top: 8px;
  padding-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
}

.c789-brand {
  font-size: 1.48rem;
  font-weight: 800;
  color: var(--c789-primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.c789-brand img {
  max-height: 44px;
  width: auto;
}

.c789-nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--c789-muted);
}

.c789-nav-menu > li {
  position: relative;
}

.c789-nav-menu > li > a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 10px 12px;
  border-radius: 9px;
  transition: color 0.2s, background-color 0.2s;
}

.c789-nav-menu > li > a:hover,
.c789-nav-menu > li:hover > a,
.c789-nav-menu > li > a.active {
  color: var(--c789-primary);
  background: var(--c789-card);
}

.c789-nav-menu > li.menu-item-has-children > a::after,
.c789-nav-menu > li.has-dropdown > a::after {
  content: "▾";
  font-size: 0.78rem;
  opacity: 0.85;
}

/* Dropdown Sub-menu cho Bài con / Chuyên mục con */
.c789-nav-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 245px;
  background: var(--c789-surface);
  border: 1px solid var(--c789-border);
  border-top: 3px solid var(--c789-primary);
  border-radius: 12px;
  padding: 8px;
  list-style: none;
  box-shadow: var(--c789-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
  z-index: 200;
}

.c789-nav-menu > li:hover > .sub-menu,
.c789-nav-menu > li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.c789-nav-menu .sub-menu li a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--c789-muted);
  border-bottom: 1px solid var(--c789-border);
  transition: all 0.18s ease;
}

.c789-nav-menu .sub-menu li:last-child a {
  border-bottom: none;
}

.c789-nav-menu .sub-menu li a:hover {
  color: var(--c789-primary);
  background: var(--c789-card);
  padding-left: 16px;
}

.c789-header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.c789-btn {
  background: var(--c789-card);
  border: 1px solid var(--c789-border);
  color: var(--c789-text);
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}

.c789-btn:hover {
  border-color: var(--c789-primary);
  transform: translateY(-1px);
}

.c789-font-controls {
  display: inline-flex;
  border: 1px solid var(--c789-border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--c789-card);
}

.c789-font-controls button {
  background: transparent;
  border: none;
  color: var(--c789-text);
  padding: 7px 10px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.c789-font-controls button:hover {
  color: var(--c789-primary);
}

.c789-mobile-toggle {
  display: none;
}

/* =========================================================
   4. HERO BENTO + BANNER
========================================================= */
.c789-hero {
  padding: 28px 0 20px;
  background: radial-gradient(circle at 85% 10%, rgba(245, 176, 65, 0.12), transparent 50%),
              radial-gradient(circle at 10% 85%, rgba(16, 185, 129, 0.08), transparent 45%);
}

.c789-banner-slot {
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid var(--c789-border);
  box-shadow: var(--c789-shadow);
  background: var(--c789-surface);
}

.c789-banner-slot img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  cursor: zoom-in;
}

.c789-hero-box {
  background: var(--c789-surface);
  border: 1px solid var(--c789-border);
  border-radius: 22px;
  padding: 30px 28px;
  box-shadow: var(--c789-shadow);
}

.c789-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.c789-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--c789-accent);
  font-size: 0.78rem;
  font-weight: 700;
}

.c789-read-time {
  font-size: 0.8rem;
  color: var(--c789-muted);
  background: var(--c789-card);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--c789-border);
}

.c789-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c789-accent);
}

.c789-hero h1 {
  font-size: clamp(1.75rem, 3.4vw, 2.45rem);
  line-height: 1.25;
  font-weight: 800;
  margin-bottom: 14px;
}

.c789-hero h1 span {
  color: var(--c789-primary);
}

.c789-hero-desc {
  color: var(--c789-muted);
  font-size: 1rem;
  max-width: 880px;
  margin-bottom: 20px;
}

.c789-quick-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.c789-copy-pill {
  background: var(--c789-card);
  border: 1px dashed var(--c789-primary);
  color: var(--c789-text);
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-family: inherit;
  cursor: pointer;
}

.c789-copy-pill strong {
  color: var(--c789-primary);
}

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

.c789-stat-card {
  background: var(--c789-card);
  border: 1px solid var(--c789-border);
  border-radius: 14px;
  padding: 16px 12px;
  text-align: center;
}

.c789-stat-card strong {
  display: block;
  font-size: 1.4rem;
  color: var(--c789-primary);
  font-weight: 800;
}

.c789-stat-card span {
  font-size: 0.82rem;
  color: var(--c789-muted);
}

/* =========================================================
   5. MARQUEE
========================================================= */
.c789-marquee {
  overflow: hidden;
  background: var(--c789-surface);
  border-top: 1px solid var(--c789-border);
  border-bottom: 1px solid var(--c789-border);
  padding: 10px 0;
  margin: 14px 0 32px;
}

.c789-marquee-track {
  display: flex;
  width: max-content;
  gap: 36px;
  animation: c789-scroll 26s linear infinite;
}

.c789-marquee:hover .c789-marquee-track {
  animation-play-state: paused;
}

.c789-marquee-item {
  font-size: 0.88rem;
  color: var(--c789-muted);
  white-space: nowrap;
}

.c789-marquee-item b {
  color: var(--c789-primary);
}

@keyframes c789-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* =========================================================
   6. BỐ CỤC 2 CỘT: MỤC LỤC CỐ ĐỊNH GIỮA MÀN HÌNH + BÀI VIẾT CUỘN
========================================================= */
.c789-main-layout {
  display: grid;
  grid-template-columns: var(--c789-toc-width) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.c789-main-layout.toc-right {
  grid-template-columns: minmax(0, 1fr) var(--c789-toc-width);
}

.c789-main-layout.toc-right .c789-toc-sidebar {
  order: 2;
}

body.admin-bar {
  --c789-sticky-offset: 120px;
}

.c789-toc-sidebar {
  position: sticky;
  top: var(--c789-sticky-offset, 88px);
  align-self: start;
  width: 100%;
  max-height: calc(100vh - var(--c789-sticky-offset, 88px) - 20px);
  display: flex;
  flex-direction: column;
  background: var(--c789-surface);
  border: 1px solid var(--c789-border);
  border-left: 4px solid var(--c789-primary);
  border-radius: 16px;
  padding: 16px 15px;
  box-shadow: var(--c789-shadow);
  z-index: 20;
}

.c789-toc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.c789-toc-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--c789-primary);
}

.c789-search-input {
  width: 100%;
  background: var(--c789-card);
  border: 1px solid var(--c789-border);
  color: var(--c789-text);
  padding: 7px 11px;
  border-radius: 9px;
  font-size: 0.82rem;
  font-family: inherit;
  margin-bottom: 10px;
  outline: none;
}

.c789-search-input:focus {
  border-color: var(--c789-primary);
}

.c789-toc-list {
  list-style: none;
  margin: 0;
  padding: 0 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 176, 65, 0.36) transparent;
}

.c789-toc-list::-webkit-scrollbar {
  width: 5px;
}

.c789-toc-list::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 999px;
}

.c789-toc-list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.28);
  border-radius: 999px;
}

.c789-toc-list:hover::-webkit-scrollbar-thumb {
  background: rgba(245, 176, 65, 0.58);
}

.c789-toc-list.hidden {
  display: none;
}

.c789-toc-list a {
  display: block;
  width: 100%;
  padding: 8px 11px;
  background: var(--c789-card);
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--c789-muted);
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, padding-left 0.18s ease;
}

.c789-toc-list a:hover,
.c789-toc-list a.active {
  color: var(--c789-text);
  border-color: var(--c789-primary);
  background: var(--c789-card-hover);
  font-weight: 700;
  padding-left: 14px;
}

/* =========================================================
   7. CỘT BÀI VIẾT CUỘN (10 MỤC + BLOCKS + FAQ)
========================================================= */
.c789-content-col {
  min-width: 0;
}

.c789-section,
.c789-wp-article {
  background: var(--c789-surface);
  border: 1px solid var(--c789-border);
  border-radius: 20px;
  padding: 28px 26px;
  margin-bottom: 24px;
  box-shadow: var(--c789-shadow);
}

.c789-section h2,
.c789-wp-article h2 {
  font-size: 1.42rem;
  font-weight: 800;
  margin: 0 0 16px;
  padding-left: 14px;
  border-left: 4px solid var(--c789-primary);
  color: var(--c789-text);
}

.c789-section h3,
.c789-wp-article h3 {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--c789-primary);
  margin: 18px 0 10px;
}

.c789-section p,
.c789-wp-article p {
  color: var(--c789-muted);
  margin-bottom: 14px;
}

.c789-section ul,
.c789-section ol,
.c789-wp-article ul,
.c789-wp-article ol {
  margin: 0 0 16px 22px;
  color: var(--c789-muted);
}

.c789-section li,
.c789-wp-article li {
  margin-bottom: 8px;
}

.c789-section strong,
.c789-wp-article strong {
  color: var(--c789-text);
}

.c789-section img,
.c789-wp-article img {
  border-radius: 14px;
  border: 1px solid var(--c789-border);
  margin: 18px auto;
  cursor: zoom-in;
}

.c789-sec-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--c789-primary);
  background: rgba(245, 176, 65, 0.12);
  padding: 3px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.c789-overview-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 18px;
  align-items: start;
}

.c789-media-card {
  background: var(--c789-card);
  border: 1px solid var(--c789-border);
  border-radius: 14px;
  padding: 8px;
}

.c789-media-card img {
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
  cursor: zoom-in;
}

.c789-media-caption {
  font-size: 0.8rem;
  color: var(--c789-muted);
  text-align: center;
  padding: 6px 4px 2px;
}

.c789-table-box {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--c789-border);
  background: var(--c789-card);
}

.c789-table,
.c789-wp-article table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.91rem;
}

.c789-table th, .c789-table td,
.c789-wp-article th, .c789-wp-article td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--c789-border);
}

.c789-table th,
.c789-wp-article th {
  background: rgba(245, 176, 65, 0.08);
  color: var(--c789-primary);
  font-weight: 700;
  width: 32%;
}

.c789-tabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.c789-tab-btn {
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--c789-card);
  border: 1px solid var(--c789-border);
  color: var(--c789-muted);
  font-size: 0.86rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.c789-tab-btn.active,
.c789-tab-btn:hover {
  background: var(--c789-primary);
  color: #070b14;
  border-color: var(--c789-primary);
}

.c789-tab-panel {
  display: none;
  background: var(--c789-card);
  border: 1px solid var(--c789-border);
  border-radius: 14px;
  padding: 20px;
}

.c789-tab-panel.active {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
  align-items: center;
}

.c789-tab-panel.no-img.active {
  grid-template-columns: 1fr;
}

.c789-tab-img {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--c789-border);
}

.c789-tab-img img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  cursor: zoom-in;
}

/* FAQ */
.c789-faq-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.c789-faq-head h2 {
  margin: 0;
}

.c789-faq-item {
  background: var(--c789-card);
  border: 1px solid var(--c789-border);
  border-radius: 12px;
  margin-bottom: 10px;
}

.c789-faq-item summary {
  padding: 15px 18px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.c789-faq-item summary::after {
  content: "+";
  color: var(--c789-primary);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.c789-faq-item[open] summary::after {
  content: "−";
}

.c789-faq-body {
  padding: 12px 18px 16px;
  border-top: 1px solid var(--c789-border);
  color: var(--c789-muted);
  font-size: 0.92rem;
}

/* =========================================================
   8. RICH 4-COLUMN FOOTER (GIỐNG MẪU + MENU BÀI CON)
========================================================= */
.c789-footer {
  border-top: 1px solid var(--c789-border);
  background: var(--c789-surface);
  margin-top: 48px;
  padding-top: 42px;
  color: var(--c789-muted);
  font-size: 0.9rem;
}

.c789-footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr 1.25fr;
  gap: 30px;
  padding-bottom: 34px;
}

.c789-footer-logo {
  font-size: 2rem;
  font-weight: 900;
  color: var(--c789-primary);
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  display: inline-block;
}

.c789-footer-logo img {
  max-height: 58px;
  width: auto;
}

.c789-footer-about {
  font-size: 0.88rem;
  line-height: 1.68;
  color: var(--c789-muted);
  margin-bottom: 14px;
}

.c789-footer-badge-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--c789-card);
  border: 1px solid var(--c789-border);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--c789-text);
  transition: border-color 0.2s, color 0.2s;
}

.c789-footer-badge-link:hover {
  border-color: var(--c789-primary);
  color: var(--c789-primary);
}

.c789-footer-col-title {
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--c789-text);
  padding-left: 12px;
  border-left: 3px solid var(--c789-primary);
  margin-bottom: 16px;
  letter-spacing: 0.4px;
}

.c789-footer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.c789-footer-menu li {
  border-bottom: 1px solid var(--c789-border);
}

.c789-footer-menu li:last-child {
  border-bottom: none;
}

.c789-footer-menu a {
  display: block;
  padding: 9px 4px;
  font-size: 0.88rem;
  color: var(--c789-muted);
  transition: color 0.18s ease, padding-left 0.18s ease;
}

.c789-footer-menu a:hover {
  color: var(--c789-primary);
  padding-left: 8px;
}

.c789-footer-contact {
  list-style: disc;
  padding-left: 18px;
  margin: 0;
  font-size: 0.87rem;
  color: var(--c789-muted);
}

.c789-footer-contact li {
  margin-bottom: 9px;
  line-height: 1.55;
}

.c789-footer-contact strong {
  color: var(--c789-text);
}

.c789-footer-contact a {
  color: var(--c789-primary);
  font-weight: 600;
}

.c789-footer-bottom {
  border-top: 1px solid var(--c789-border);
  padding: 18px 0;
  text-align: center;
  font-size: 0.84rem;
  color: var(--c789-muted);
}

/* Lightbox, Toast, Back-to-top */
.c789-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 10000;
  cursor: zoom-out;
}

.c789-lightbox.open {
  display: flex;
}

.c789-lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 12px;
}

.c789-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--c789-accent);
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 9999;
}

.c789-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.c789-back-top {
  position: fixed;
  right: 22px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--c789-primary);
  color: #070b14;
  border: none;
  font-size: 1.2rem;
  font-weight: 900;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--c789-shadow);
  z-index: 999;
}

.c789-back-top.show {
  display: flex;
}

@media (max-width: 992px) {
  .c789-main-layout,
  .c789-main-layout.toc-right {
    grid-template-columns: 1fr;
  }
  .c789-main-layout.toc-right .c789-toc-sidebar {
    order: 0;
  }
  .c789-toc-sidebar {
    position: relative;
    top: 0;
    max-height: none;
  }
  .c789-nav-menu {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--c789-surface);
    border-bottom: 1px solid var(--c789-border);
    flex-direction: column;
    align-items: stretch;
    padding: 14px 20px;
    gap: 4px;
  }
  .c789-nav-menu.open { display: flex; }
  .c789-nav-menu .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border-top: none;
    margin: 4px 0 6px 14px;
  }
  .c789-mobile-toggle { display: inline-flex; }
  .c789-overview-grid,
  .c789-tab-panel.active { grid-template-columns: 1fr; }
  .c789-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .c789-footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .c789-hero-box, .c789-section, .c789-wp-article { padding: 20px 16px; }
  .c789-footer-grid { grid-template-columns: 1fr; }
}

/* Footer inline links inside description */
.c789-footer-about a {
  color: var(--c789-primary);
  text-decoration: underline;
  font-weight: 600;
}
.c789-footer-about a:hover {
  opacity: 0.85;
}

/* Inline paragraph anchor links (Hero Sapo, Footer, Body, FAQ) */
.c789-hero-desc a,
.c789-footer-about a {
  color: var(--c789-primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s ease;
}

.c789-hero-desc a:hover,
.c789-footer-about a:hover {
  opacity: 0.82;
}

.c789-sec-body a,
.c789-wp-article a,
.c789-faq-body a {
  color: var(--c789-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.c789-sec-body a:hover,
.c789-wp-article a:hover,
.c789-faq-body a:hover {
  opacity: 0.85;
}


/* =========================================================
   10. UNLIMITED CUSTOM BUTTON SYSTEM (6 STYLES, SHAPES, ANIMATIONS)
========================================================= */
.c789-btn-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
}

.c789-btn-group.c789-btn-group-header {
  margin: 0;
  gap: 8px;
}

.c789-btn-group.c789-btn-group-mid {
  background: var(--c789-surface);
  border: 1px solid var(--c789-border);
  border-radius: 16px;
  padding: 18px 22px;
  justify-content: center;
  box-shadow: var(--c789-shadow);
}

.c789-btn-group.c789-btn-group-bottom {
  background: linear-gradient(135deg, rgba(245, 176, 65, 0.12), rgba(16, 185, 129, 0.08));
  border: 1px solid var(--c789-border);
  border-radius: 18px;
  padding: 24px 22px;
  justify-content: center;
  margin-top: 24px;
}

.c789-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none !important;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease, border-color 0.22s ease;
  user-select: none;
}

.c789-cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.c789-cta:active {
  transform: translateY(0);
}

/* Shapes */
.c789-shape-pill .c789-cta,
.c789-cta.c789-shape-pill {
  border-radius: 999px;
}

.c789-shape-sharp .c789-cta,
.c789-cta.c789-shape-sharp {
  border-radius: 6px;
}

/* Sizes */
.c789-size-sm .c789-cta,
.c789-cta.c789-size-sm {
  padding: 7px 14px;
  font-size: 0.82rem;
}

.c789-size-lg .c789-cta,
.c789-cta.c789-size-lg {
  padding: 14px 28px;
  font-size: 1.02rem;
}

.c789-btn-group-header .c789-cta {
  padding: 7px 14px;
  font-size: 0.82rem;
}

/* 6 Button Styles */
.c789-cta-gold {
  background: linear-gradient(135deg, var(--c789-primary), #d97706);
  color: #070b14 !important;
  box-shadow: 0 6px 20px rgba(245, 176, 65, 0.32);
}

.c789-cta-emerald {
  background: linear-gradient(135deg, var(--c789-accent), #059669);
  color: #ffffff !important;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.c789-cta-crimson {
  background: linear-gradient(135deg, #f43f5e, #be123c);
  color: #ffffff !important;
  box-shadow: 0 6px 20px rgba(244, 63, 94, 0.32);
}

.c789-cta-neon {
  background: rgba(245, 176, 65, 0.12);
  color: var(--c789-primary) !important;
  border-color: var(--c789-primary);
  box-shadow: 0 0 16px rgba(245, 176, 65, 0.22);
}

.c789-cta-neon:hover {
  background: var(--c789-primary);
  color: #070b14 !important;
}

.c789-cta-outline {
  background: var(--c789-card);
  color: var(--c789-text) !important;
  border-color: var(--c789-border);
}

.c789-cta-outline:hover {
  border-color: var(--c789-primary);
  color: var(--c789-primary) !important;
}

.c789-cta-dark {
  background: #0f172a;
  color: #f8fafc !important;
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .c789-cta-dark {
  background: #1e293b;
}

/* Shimmer & Pulse Animations */
.c789-anim-shimmer .c789-cta::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 65%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-22deg);
  animation: c789-btn-shimmer 3.2s infinite;
}

@keyframes c789-btn-shimmer {
  0% { left: -120%; }
  45%, 100% { left: 150%; }
}

.c789-anim-pulse .c789-cta {
  animation: c789-btn-pulse 2.2s infinite;
}

@keyframes c789-btn-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 176, 65, 0.45); }
  50% { box-shadow: 0 0 0 8px rgba(245, 176, 65, 0); }
}

/* Floating CTA Stack (Bottom Left or Above Back-to-Top) */
.c789-floating-ctas {
  position: fixed;
  left: 20px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 95;
}

.c789-floating-ctas .c789-cta {
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.38);
}

/* Mobile & Tablet Header Button Layout (Hiển thị đẹp trên điện thoại) */
@media (max-width: 992px) {
  .c789-header-inner {
    height: auto;
    min-height: 62px;
    padding-top: 8px;
    padding-bottom: 8px;
    gap: 8px;
  }
  .c789-brand {
    font-size: 1.28rem;
  }
  .c789-brand img {
    max-height: 36px;
  }
  .c789-header-tools {
    flex: 1 1 auto;
    justify-content: flex-end;
    min-width: 0;
    gap: 6px;
  }
  .c789-btn-group-header {
    display: flex !important;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: 100%;
    gap: 6px;
    padding: 2px 0;
  }
  .c789-btn-group-header::-webkit-scrollbar {
    display: none;
  }
  .c789-btn-group-header .c789-cta {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 6px 11px;
    font-size: 0.78rem;
    gap: 5px;
  }
  .c789-nav-menu {
    top: 100%;
  }
}

@media (max-width: 540px) {
  .c789-header-inner {
    flex-wrap: wrap;
  }
  .c789-brand {
    order: 1;
  }
  .c789-header-utility {
    order: 2;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  /* Nếu có nút ở Thanh Header trên, tự xếp thành 1 hàng nút đẹp mắt ngay dưới Logo trên màn hình nhỏ */
  .c789-btn-group-header {
    order: 3;
    flex: 1 0 100%;
    width: 100%;
    justify-content: stretch;
    padding-top: 6px;
    border-top: 1px solid var(--c789-border);
  }
  .c789-btn-group-header .c789-cta {
    flex: 1 1 0;
    justify-content: center;
    padding: 8px 10px;
    font-size: 0.82rem;
  }
  .c789-floating-ctas {
    left: 12px;
    right: 74px;
    bottom: 16px;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .c789-floating-ctas .c789-cta {
    flex: 1 1 auto;
    padding: 9px 12px;
    font-size: 0.82rem;
  }
}


/* =========================================================
   11. V10 UPGRADE: UNLIMITED REGISTER / LOGIN BUTTONS & CUSTOM COLORS
========================================================= */
.c789-header-tools {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.c789-btn-group.c789-btn-group-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.c789-btn-group.c789-align-center {
  justify-content: center;
}

.c789-btn-group.c789-btn-group-single {
  margin: 16px 0;
}

.c789-btn-group.c789-btn-group-footer {
  margin: 12px 0 14px;
  gap: 8px;
}

.c789-btn-group-footer .c789-cta {
  padding: 8px 15px;
  font-size: 0.84rem;
}

.c789-inline-cta {
  margin: 6px 6px 6px 0;
  vertical-align: middle;
}

.c789-cta-text-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
}

.c789-cta.has-subtext {
  padding-top: 9px;
  padding-bottom: 9px;
}

.c789-cta-sub {
  font-size: 0.7rem;
  font-weight: 500;
  opacity: 0.88;
  margin-top: 2px;
}

/* Additional Preset Colors + Custom Color Picker Support */
.c789-cta-royal {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #ffffff !important;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.32);
}

.c789-cta-purple {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #ffffff !important;
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.32);
}

.c789-cta-custom {
  background: var(--c789-custom-bg, #f5b041);
  color: var(--c789-custom-txt, #070b14) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.c789-cta-shimmer::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 65%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-22deg);
  animation: c789-btn-shimmer 3.2s infinite;
}

@media (max-width: 1200px) {
  .c789-theme-txt {
    display: none;
  }
}

@media (max-width: 540px) {
  /* Đa nút trên Header Mobile: Tự động chia đều đẹp mắt kể cả khi thêm 2, 3, 4+ nút */
  .c789-btn-group.c789-btn-group-header {
    flex-wrap: wrap !important;
    overflow-x: visible;
    gap: 6px;
  }
  .c789-btn-group.c789-btn-group-header .c789-cta {
    flex: 1 1 calc(50% - 6px);
    min-width: 120px;
  }

  /* Thanh nút nổi ghim dưới đáy điện thoại (Mobile Sticky Dock) */
  .c789-floating-ctas.c789-mobile-dock {
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: var(--c789-glass);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--c789-border);
    border-radius: 0;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    z-index: 998;
  }
  .c789-floating-ctas.c789-mobile-dock .c789-cta {
    flex: 1 1 calc(50% - 8px);
    padding: 10px 12px;
    font-size: 0.84rem;
  }
  body:has(.c789-floating-ctas.c789-mobile-dock) .c789-back-top {
    bottom: 74px;
  }
}
