/*
Theme Name: Dexuat Child
Theme URI: https://dexuat.com
Description: Child theme cho GeneratePress, dựng lại giao diện template dexuat.com (kiểm tra domain & săn deal hosting). Giữ nguyên design system gốc (Inter, brand green #1fa45b), responsive.
Author: dexuat.com
Author URI: https://dexuat.com
Template: generatepress
Version: 1.0.0
Text Domain: dexuat-child
*/

/* ============================================================
   dexuat.com — shared design system
   Primary: #1fa45b · Font: Inter · Style: clean modern SaaS
   ============================================================ */

:root {
  /* Brand green scale */
  --green-50:  #eef9f2;
  --green-100: #d8f1e1;
  --green-200: #b1e4c6;
  --green-300: #7fd1a4;
  --green-400: #45ba7f;
  --green-500: #1fa45b;   /* PRIMARY (logo) */
  --green-600: #178a4c;
  --green-700: #12713e;
  --green-800: #0f5a32;
  --green-900: #0b3f24;

  /* Ink / neutrals (subtle green-warm tint) */
  --ink:       #10211a;
  --slate-800: #1d2e26;
  --slate-700: #33433b;
  --slate-600: #4a5a52;
  --slate-500: #5f6f67;
  --slate-400: #85938c;
  --muted:     #7d8a83;
  --line:      #e6ece9;
  --line-soft: #eef2f0;

  /* Surfaces */
  --bg:        #ffffff;
  --bg-soft:   #f5f9f7;
  --bg-tint:   #f0f8f3;

  /* Warm accent for promos / discounts */
  --amber-500: #e8893d;
  --amber-50:  #fdf3ea;
  --rose-500:  #d4493f;

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 18px;
  --radius-xl: 26px;

  --shadow-sm: 0 1px 2px rgba(16,33,26,.05), 0 1px 3px rgba(16,33,26,.06);
  --shadow:    0 4px 14px rgba(16,33,26,.06), 0 2px 6px rgba(16,33,26,.04);
  --shadow-lg: 0 18px 48px rgba(16,33,26,.10), 0 6px 16px rgba(16,33,26,.06);
  --shadow-green: 0 10px 26px rgba(31,164,91,.28);

  --maxw: 1200px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--slate-700);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

h1, h2, h3, h4 {
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
  text-wrap: balance;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 84px 0; }
.section-sm { padding: 56px 0; }
.bg-soft { background: var(--bg-soft); }
.bg-tint { background: var(--bg-tint); }
.bg-ink  { background: var(--ink); }

/* ---------- Eyebrow + section head ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--green-600);
  background: var(--green-50); border: 1px solid var(--green-100);
  padding: 6px 12px; border-radius: 100px;
}
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); margin: 16px 0 12px; }
.section-head p { font-size: 17px; color: var(--slate-500); }
.lead { font-size: 18px; color: var(--slate-500); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 700; font-size: 15px; line-height: 1;
  padding: 14px 22px; border-radius: 11px; white-space: nowrap;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--green-500); color: #fff; box-shadow: var(--shadow-green); }
.btn-primary:hover { background: var(--green-600); transform: translateY(-1px); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--slate-800); transform: translateY(-1px); }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--green-300); color: var(--green-700); }
.btn-soft { background: var(--green-50); color: var(--green-700); border: 1px solid var(--green-100); }
.btn-soft:hover { background: var(--green-100); }
.btn-sm { padding: 10px 16px; font-size: 14px; border-radius: 9px; }
.btn-lg { padding: 17px 28px; font-size: 16px; }
.btn-block { width: 100%; }

/* ---------- Badges / pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 7px;
  letter-spacing: .01em;
}
.badge-green { background: var(--green-50); color: var(--green-700); }
.badge-amber { background: var(--amber-50); color: var(--amber-500); }
.badge-ink   { background: rgba(16,33,26,.06); color: var(--slate-700); }
.badge-hot   { background: var(--amber-500); color: #fff; }
.badge-discount { background: var(--green-500); color: #fff; font-size: 13px; padding: 5px 11px; }

/* ---------- Cards ---------- */
.card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .25s ease, border-color .2s ease;
}
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--green-200); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav { display: flex; align-items: center; gap: 32px; height: 72px; }
.nav .logo img { height: 30px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav-links a {
  font-size: 14.5px; font-weight: 600; color: var(--slate-600);
  padding: 9px 14px; border-radius: 9px; transition: background .15s, color .15s;
}
.nav-links a:hover { color: var(--ink); background: var(--bg-soft); }
.nav-links a.active { color: var(--green-700); background: var(--green-50); }
.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #b9c6bf; padding: 64px 0 32px; }
.site-footer h4 { color: #fff; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 16px; font-weight: 700; }
.site-footer a { color: #b9c6bf; font-size: 14.5px; line-height: 2.1; transition: color .15s; }
.site-footer a:hover { color: var(--green-300); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 44px; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-grid .brand img { height: 30px; margin-bottom: 18px; }
.footer-grid .brand p { color: #93a39b; font-size: 14.5px; max-width: 280px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; color: #7e8e86; font-size: 13.5px; flex-wrap: wrap; gap: 12px; }

/* ---------- Provider badge (no real logos) ---------- */
.prov {
  display: inline-flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink);
}
.prov-mark {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  font-size: 16px; font-weight: 800; color: #fff; letter-spacing: -.02em;
}
.prov-inet    { background: linear-gradient(135deg,#2b7de9,#1a5fc4); }
.prov-tino    { background: linear-gradient(135deg,#13b6c9,#0e93a3); }
.prov-azdigi  { background: linear-gradient(135deg,#ef5b3c,#d23f22); }
.prov-vietnix { background: linear-gradient(135deg,#7c4dff,#5b2ee0); }
.prov-name { font-size: 16px; line-height: 1.1; }
.prov-name small { display: block; font-size: 11.5px; font-weight: 600; color: var(--muted); letter-spacing: 0; }

/* ---------- Tables ---------- */
.tbl-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
table.price { width: 100%; border-collapse: collapse; }
table.price th {
  text-align: left; font-size: 12.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  color: var(--muted); padding: 16px 20px; background: var(--bg-soft); border-bottom: 1px solid var(--line);
}
table.price td { padding: 18px 20px; border-bottom: 1px solid var(--line-soft); font-size: 15px; vertical-align: middle; }
table.price tbody tr:last-child td { border-bottom: none; }
table.price tbody tr { transition: background .12s; }
table.price tbody tr:hover { background: var(--bg-tint); }
.price-old { color: var(--muted); text-decoration: line-through; font-size: 13.5px; }
.price-now { color: var(--ink); font-weight: 800; font-size: 17px; }
.price-now small { font-weight: 600; color: var(--muted); font-size: 12.5px; }

/* ---------- Misc utilities ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.text-center { text-align: center; }
.muted { color: var(--muted); }
.green { color: var(--green-600); }
.divider { height: 1px; background: var(--line); border: none; }
.stat-num { font-size: 30px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.stat-label { font-size: 13.5px; color: var(--muted); font-weight: 600; }

/* ---------- Subpage hero (căn giữa, polished) ---------- */
.page-hero { padding: 52px 0 36px; position: relative; overflow: hidden; text-align: center; }
.page-hero::before {
  content:""; position:absolute; inset:0; z-index:-1;
  background:
    radial-gradient(680px 320px at 50% -30%, rgba(31,164,91,.12), transparent 62%),
    linear-gradient(180deg, var(--bg-tint), var(--bg));
}
.page-hero .eyebrow { margin-bottom: 16px; }
.page-hero h1 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 12px; }
.page-hero p { font-size: 17px; color: var(--slate-500); max-width: 600px; margin: 0 auto; }
.crumbs { display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--muted); margin-bottom: 16px; font-weight: 600; }
.crumbs a:hover { color: var(--green-600); }
.crumbs span { margin: 0 8px; opacity: .5; }

/* ---------- Filter chips / tabs ---------- */
.chips { display: flex; gap: 9px; flex-wrap: wrap; }
.chip {
  font-size: 14px; font-weight: 600; color: var(--slate-600);
  background: #fff; border: 1px solid var(--line); padding: 9px 16px; border-radius: 100px;
  transition: all .15s; cursor: pointer;
}
.chip:hover { border-color: var(--green-300); color: var(--green-700); }
.chip.active { background: var(--green-500); border-color: var(--green-500); color: #fff; box-shadow: var(--shadow-green); }

/* ---------- Coupon ---------- */
.coupon {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px;
  background: #fff; border: 1px dashed var(--green-300); border-radius: var(--radius);
}
.coupon-pct { font-size: 30px; font-weight: 800; color: var(--green-600); letter-spacing: -.03em; line-height: 1; }
.coupon-body { flex: 1; }
.coupon-body b { color: var(--ink); font-size: 15px; display: block; }
.coupon-body small { color: var(--muted); font-size: 13px; }
.coupon-code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-weight: 700; font-size: 14px;
  color: var(--green-700); background: var(--green-50); border: 1px solid var(--green-100);
  padding: 9px 14px; border-radius: 9px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border-style: dashed;
}
.coupon-code:hover { background: var(--green-100); }

/* ---------- Star rating ---------- */
.stars { display: inline-flex; gap: 2px; color: var(--amber-500); }
.stars svg { width: 15px; height: 15px; }

/* ---------- Placeholder image ---------- */
.ph {
  background:
    repeating-linear-gradient(135deg, #eef2f0 0 10px, #f6f9f7 10px 20px);
  border: 1px solid var(--line); border-radius: var(--radius);
  display: grid; place-items: center; color: var(--muted);
  font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; letter-spacing: .02em;
}

@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .nav-links { display: none; }
}
@media (max-width: 640px) {
  .section { padding: 56px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Mobile nav toggle (child responsive) ---------- */
.nav-toggle {
  display: none; margin-left: auto;
  width: 42px; height: 42px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff;
  align-items: center; justify-content: center; color: var(--ink);
}
.nav-toggle svg { width: 24px !important; height: 24px !important; flex-shrink: 0; top: 0; }
.nav-toggle svg path { stroke: currentColor; }
@media (max-width: 980px) {
  /* Header mobile: nền trắng đặc cho rõ ràng. */
  .site-header { position: sticky; background: #fff; }
  .nav { gap: 12px; }
  .nav-toggle { display: inline-flex; }
  .nav-cta { display: none; }

  /* Dropdown menu mobile: phủ lên nội dung, item full-width dễ bấm. */
  .site-header .nav-links.is-open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; left: 0; right: 0; top: 72px;
    background: #fff; border-top: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg); padding: 8px; gap: 0; margin: 0; z-index: 60;
  }
  .site-header .nav-links.is-open li { width: 100%; }
  .site-header .nav-links.is-open a {
    display: block; width: 100%; padding: 14px 14px; font-size: 16px;
    border-radius: 10px; border-bottom: 1px solid var(--line-soft);
  }
  .site-header .nav-links.is-open li:last-child a { border-bottom: none; }
}

/* ---------- Header menu: bỏ bullet "•" khi gán menu WP (wp_nav_menu xuất <li>) ---------- */
.site-header .nav-links { list-style: none; margin: 0; padding: 0; }
.site-header .nav-links li { list-style: none; margin: 0; padding: 0; }
.site-header .nav-links li::marker { content: ""; }
.site-header .nav-links li::before { content: none; }

/* ---------- An toàn mobile: chống tràn ngang, mượt khoảng cách ---------- */
@media (max-width: 640px) {
  html, body { overflow-x: hidden; max-width: 100%; }
  .container { padding-left: 18px; padding-right: 18px; }
  .section { padding: 44px 0; }
  .section-sm { padding: 32px 0; }
  h1 { word-break: break-word; }
}

/* ---------- Chống tràn hero trên mobile (grid/flex item phải co được) ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-grid > * { min-width: 0; max-width: 100%; }
  .preview { max-width: 100%; min-width: 0; overflow: hidden; }
  .preview .spark { width: 100%; }
  .check-box { max-width: 100%; min-width: 0; }
  .check-box input { min-width: 0; width: 100%; }
  /* mọi lưới đa cột co về vừa khung, không đẩy tràn */
  .grid { min-width: 0; }
  .grid > * { min-width: 0; }
}
@media (max-width: 640px) {
  .check-box { flex-direction: column; }
  .check-box .btn { width: 100%; }
  .hero-stats { gap: 20px; }
}

/* ---------- Trust strip gọn gàng trên mobile ---------- */
@media (max-width: 640px) {
  .trust-strip { gap: 18px 26px; row-gap: 18px; }
  .trust-strip .label { flex: 0 0 100%; width: 100%; text-align: center; margin: 0; }
  .trust-strip .prov { justify-content: center; }
}

/* ---------- Mobile: căn giữa các khối giới thiệu cho cân đối ---------- */
@media (max-width: 980px) {
  /* Hero */
  .hero-grid > div:first-child { text-align: center; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .hero .check-box { margin-left: auto; margin-right: auto; }
  .hero .check-meta { justify-content: center; }
  .hero-stats { justify-content: center; }
  /* Mọi section-head chưa center -> center */
  .section-head:not(.center) { text-align: center; margin-left: auto; margin-right: auto; }
}
@media (max-width: 640px) {
  /* Khối text trong lưới 2 cột (vd "Bảng giá tên miền"), trừ bảng/feature/card */
  .grid-2 > div:not(.tbl-wrap):not(.feat):not([class*="card"]) { text-align: center; }
  .grid-2 > div:not(.tbl-wrap):not(.feat) .lead { margin-left: auto; margin-right: auto; }
  /* Hàng "tiêu đề + nút Xem tất cả" của khối Deals */
  .section .flex.items-center[style*="space-between"] { justify-content: center !important; text-align: center; }
}
