/*
Theme Name: HoaDonDienTu.vn
Theme URI: https://hoadondientu.vn
Author: hoadondientu.vn
Description: Theme giới thiệu và bán các gói dịch vụ hóa đơn điện tử. Dùng kèm plugin "HĐĐT Core" để quản lý nhà cung cấp, bảng giá và đơn đăng ký.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: hoadondientu
*/

:root {
	--hd-primary: #0b5bd3;
	--hd-primary-dark: #0847a6;
	--hd-primary-soft: #e8f0fd;
	--hd-accent: #ff7a1a;
	--hd-text: #0f1b2d;
	--hd-muted: #5b6b82;
	--hd-line: #e3e9f2;
	--hd-surface: #ffffff;
	--hd-soft: #f3f7fd;
	--hd-dark: #0a1a33;
	--hd-radius: 14px;
	--hd-shadow: 0 12px 30px rgba(15, 27, 45, .08);
	--hd-container: 1200px;
	--hd-font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------- Nền tảng ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body {
	margin: 0; font-family: var(--hd-font); font-size: 16px; line-height: 1.65;
	color: var(--hd-text); background: var(--hd-surface); -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--hd-primary); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; color: var(--hd-text); }
p { margin: 0 0 1em; }
button { font-family: inherit; }
:focus-visible { outline: 3px solid var(--hd-accent); outline-offset: 2px; }

.hd-icon { width: 1.1em; height: 1.1em; flex: none; vertical-align: -.15em; }
.hd-container { width: 100%; max-width: var(--hd-container); margin: 0 auto; padding: 0 20px; }
.hd-narrow { max-width: 860px; }
.hd-skip { position: absolute; left: -9999px; top: 0; z-index: 1000; padding: 10px 16px; background: var(--hd-primary); color: #fff; }
.hd-skip:focus { left: 10px; top: 10px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.hd-btn-lg { padding: 1em 1.6em; font-size: 1.02rem; }

/* ---------- Thanh trên cùng ---------- */
.hd-topbar { background: var(--hd-dark); color: #c9d6ea; font-size: .84rem; }
.hd-topbar__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 38px; }
.hd-topbar__note { display: flex; align-items: center; gap: 6px; }
.hd-topbar__contact { display: flex; gap: 20px; flex: none; white-space: nowrap; }
.hd-topbar__contact a, .hd-topbar__contact span { display: inline-flex; align-items: center; gap: 6px; color: #c9d6ea; text-decoration: none; }
.hd-topbar__contact a:hover { color: #fff; }

/* ---------- Header ---------- */
.hd-header {
	position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .96);
	backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid var(--hd-line); transition: box-shadow .2s;
}
.hd-header.is-scrolled { box-shadow: 0 6px 20px rgba(15, 27, 45, .08); }
.hd-header__inner { display: flex; align-items: center; gap: 16px; min-height: 76px; }

.hd-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.hd-brand__text { font-size: 1.3rem; font-weight: 800; color: var(--hd-text); letter-spacing: -.02em; }
.hd-brand__text span { color: var(--hd-accent); }
.custom-logo { max-height: 56px; width: auto; }

.hd-nav { margin-left: auto; }
.hd-menu { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.hd-menu a {
	display: block; padding: 10px 9px; white-space: nowrap; border-radius: 8px; color: var(--hd-text);
	font-weight: 600; font-size: .96rem; text-decoration: none; transition: color .2s, background .2s;
}
.hd-menu a:hover, .hd-menu .current-menu-item > a, .hd-menu .current_page_item > a { color: var(--hd-primary); background: var(--hd-primary-soft); }
.hd-menu li { position: relative; }
.hd-menu .sub-menu {
	position: absolute; top: 100%; left: 0; min-width: 220px; margin: 0; padding: 8px; list-style: none;
	background: #fff; border: 1px solid var(--hd-line); border-radius: 12px; box-shadow: var(--hd-shadow);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s;
}
.hd-menu li:hover > .sub-menu, .hd-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.hd-nav__mobile-cta { display: none; }

.hd-header__actions { display: flex; align-items: center; gap: 16px; }
.hd-hotline { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--hd-text); }
.hd-hotline__icon {
	display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
	background: var(--hd-primary-soft); color: var(--hd-primary); animation: hd-ring 2.4s infinite;
}
.hd-hotline__text { display: flex; flex-direction: column; line-height: 1.2; }
.hd-hotline__text small { color: var(--hd-muted); font-size: .76rem; }
.hd-hotline__text strong { font-size: 1.05rem; color: var(--hd-primary); }
@keyframes hd-ring { 0%, 100% { box-shadow: 0 0 0 0 rgba(11, 91, 211, .35); } 50% { box-shadow: 0 0 0 8px rgba(11, 91, 211, 0); } }

.hd-burger { display: none; width: 44px; height: 44px; border: 1px solid var(--hd-line); border-radius: 10px; background: #fff; color: var(--hd-text); cursor: pointer; }
.hd-burger .hd-icon { width: 22px; height: 22px; }
.hd-burger__close { display: none; }
.hd-burger[aria-expanded="true"] .hd-burger__open { display: none; }
.hd-burger[aria-expanded="true"] .hd-burger__close { display: inline; }

/* ---------- Banner ---------- */
.hd-hero {
	position: relative; overflow: hidden; padding: 72px 0 88px;
	background:
		radial-gradient(1000px 500px at 85% -10%, rgba(11, 91, 211, .14), transparent 60%),
		radial-gradient(700px 400px at -10% 110%, rgba(255, 122, 26, .10), transparent 60%),
		linear-gradient(180deg, #f6f9ff 0%, #fff 100%);
}
.hd-hero__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hd-badge {
	display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; margin-bottom: 18px;
	border-radius: 30px; background: #fff; border: 1px solid #cfe0fb; color: var(--hd-primary);
	font-weight: 600; font-size: .88rem;
}
.hd-hero__title { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.15; margin-bottom: 18px; }
.hd-hero__desc { font-size: 1.1rem; color: var(--hd-muted); max-width: 580px; margin-bottom: 28px; }
.hd-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.hd-hero__trust { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; margin: 0; padding: 0; color: var(--hd-text); font-weight: 500; font-size: .95rem; }
.hd-hero__trust li { display: flex; align-items: center; gap: 6px; }
.hd-hero__trust .hd-icon { color: #16a34a; }

.hd-hero__visual { position: relative; padding: 30px 20px; }
.hd-invoice {
	position: relative; padding: 26px; background: #fff; border-radius: 18px;
	box-shadow: 0 30px 60px rgba(11, 45, 100, .15), 0 0 0 1px rgba(11, 45, 100, .05);
	transform: rotate(-2deg);
}
.hd-invoice__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 16px; border-bottom: 2px solid var(--hd-line); }
.hd-invoice__head strong { display: block; font-size: .95rem; color: var(--hd-primary); }
.hd-invoice__head span { font-size: .78rem; color: var(--hd-muted); }
.hd-invoice__stamp {
	flex: none; padding: 4px 10px; border: 2px solid #16a34a; border-radius: 6px;
	color: #16a34a !important; font-weight: 700; font-size: .72rem !important; text-transform: uppercase; transform: rotate(6deg);
}
.hd-invoice__rows { display: grid; gap: 12px; padding: 18px 0; }
.hd-invoice__row { display: grid; grid-template-columns: 3fr 1fr 1.4fr; gap: 12px; }
.hd-invoice__row span { height: 10px; border-radius: 5px; background: #edf2fa; }
.hd-invoice__row span:last-child { background: #dbe6f8; }
.hd-invoice__total { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-radius: 10px; background: var(--hd-soft); font-size: .88rem; color: var(--hd-muted); }
.hd-invoice__total strong { font-size: 1.2rem; color: var(--hd-text); }
.hd-invoice__sign { display: flex; justify-content: space-between; margin-top: 16px; font-size: .8rem; color: var(--hd-muted); }
.hd-invoice__sign span:first-child { display: inline-flex; align-items: center; gap: 4px; color: #16a34a; font-weight: 600; }

.hd-float-card {
	position: absolute; display: flex; align-items: center; gap: 10px; padding: 12px 16px;
	background: #fff; border-radius: 14px; box-shadow: 0 16px 40px rgba(11, 45, 100, .16); font-size: .88rem;
	animation: hd-float 5s ease-in-out infinite;
}
.hd-float-card span:last-child { display: flex; flex-direction: column; line-height: 1.3; }
.hd-float-card small { color: var(--hd-muted); }
.hd-float-card__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: #fff1e6; color: var(--hd-accent); }
.hd-float-card__icon--green { background: #dcfce7; color: #16a34a; }
.hd-float-card--a { top: -6px; left: -18px; }
.hd-float-card--b { bottom: -4px; right: -18px; animation-delay: -2.5s; }
@keyframes hd-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- Logo nhà cung cấp ---------- */
.hd-logos { padding: 36px 0; border-top: 1px solid var(--hd-line); border-bottom: 1px solid var(--hd-line); background: #fff; }
.hd-logos__title { text-align: center; color: var(--hd-muted); font-weight: 600; font-size: .92rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 22px; }
.hd-logos__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; list-style: none; margin: 0; padding: 0; align-items: center; }
.hd-logos__list li { min-width: 0; }
.hd-logos__list a { display: flex; justify-content: center; align-items: center; height: 60px; padding: 8px; filter: grayscale(1); opacity: .75; transition: filter .25s, opacity .25s; }
.hd-logos__list a:hover { filter: none; opacity: 1; }
.hd-logos__img { max-height: 44px; max-width: 190px; width: auto; height: auto; object-fit: contain; }

/* ---------- Section ---------- */
.hd-section { padding: 88px 0; }
.hd-section--tight { padding: 48px 0 80px; }
.hd-section--soft { background: var(--hd-soft); }
.hd-section--dark { background: var(--hd-dark); color: #d4def0; }
.hd-section--dark .hd-section__title, .hd-section--dark h3 { color: #fff; }
.hd-section__head { max-width: 720px; margin: 0 auto 44px; text-align: center; }
.hd-section__head--left { text-align: left; margin: 0; }
.hd-section__head--row { display: flex; justify-content: space-between; align-items: flex-end; max-width: none; text-align: left; gap: 20px; }
.hd-eyebrow { display: inline-block; margin-bottom: 10px; color: var(--hd-accent); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.hd-section__title { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; letter-spacing: -.02em; }
.hd-section__desc { color: var(--hd-muted); font-size: 1.05rem; margin: 0; }
.hd-section--dark .hd-section__desc { color: #a9b8d0; }

/* Lý do chọn */
.hd-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.hd-feature { padding: 28px; background: #fff; border: 1px solid var(--hd-line); border-radius: var(--hd-radius); transition: transform .2s, box-shadow .2s; }
.hd-feature:hover { transform: translateY(-3px); box-shadow: var(--hd-shadow); }
.hd-feature__icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 16px; border-radius: 14px; background: var(--hd-primary-soft); color: var(--hd-primary); }
.hd-feature__icon .hd-icon { width: 26px; height: 26px; }
.hd-feature h3 { font-size: 1.12rem; }
.hd-feature p { margin: 0; color: var(--hd-muted); font-size: .96rem; }

/* Quy trình */
.hd-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; list-style: none; margin: 0; padding: 0; counter-reset: step; }
.hd-steps li { position: relative; padding: 28px 24px; border-radius: var(--hd-radius); background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); counter-increment: step; }
.hd-steps li::before {
	content: counter(step, decimal-leading-zero); display: block; margin-bottom: 14px;
	font-size: 2.2rem; font-weight: 800; line-height: 1; color: var(--hd-accent);
}
.hd-steps h3 { font-size: 1.1rem; }
.hd-steps p { margin: 0; font-size: .95rem; color: #a9b8d0; }

/* Hỏi đáp */
.hd-faq-wrap { display: grid; grid-template-columns: 1fr 1.6fr; gap: 56px; align-items: start; }
.hd-faq-wrap .hd-section__head { position: sticky; top: 110px; }
.hd-faq-wrap .hd-section__desc { margin-bottom: 20px; }
.hd-faq { display: grid; gap: 12px; }
.hd-faq__item { border: 1px solid var(--hd-line); border-radius: 12px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.hd-faq__item[open] { border-color: #b9cff3; box-shadow: var(--hd-shadow); }
.hd-faq__item summary {
	position: relative; padding: 18px 52px 18px 20px; font-weight: 700; cursor: pointer; list-style: none;
}
.hd-faq__item summary::-webkit-details-marker { display: none; }
.hd-faq__item summary::after {
	content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
	display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
	background: var(--hd-primary-soft); color: var(--hd-primary); font-size: 1.2rem; font-weight: 600; line-height: 1;
}
.hd-faq__item[open] summary::after { content: "−"; background: var(--hd-primary); color: #fff; }
.hd-faq__item p { margin: 0; padding: 0 20px 20px; color: var(--hd-muted); }

/* Đăng ký */
.hd-register { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: center; }
.hd-register__info p { color: var(--hd-muted); font-size: 1.05rem; }
.hd-register__list { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 10px; }
.hd-register__list li { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.hd-register__list .hd-icon { color: #16a34a; margin-top: .2em; }
.hd-register__call { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: var(--hd-text); }
.hd-register__call > span:first-child { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--hd-accent); color: #fff; }
.hd-register__call > span:last-child { display: flex; flex-direction: column; line-height: 1.25; }
.hd-register__call small { color: var(--hd-muted); }
.hd-register__call strong { font-size: 1.4rem; color: var(--hd-primary); }
.hd-register__form, .hd-card-box { padding: 32px; background: #fff; border-radius: 20px; box-shadow: 0 24px 60px rgba(11, 45, 100, .1); border: 1px solid var(--hd-line); }

/* Tin tức */
.hd-posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.hd-post-card { display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--hd-line); border-radius: var(--hd-radius); transition: box-shadow .2s, transform .2s; }
.hd-post-card:hover { box-shadow: var(--hd-shadow); transform: translateY(-3px); }
.hd-post-card__thumb { display: block; aspect-ratio: 16 / 9; background: var(--hd-primary-soft); }
.hd-post-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.hd-post-card__placeholder { display: grid; place-items: center; height: 100%; color: var(--hd-primary); }
.hd-post-card__placeholder .hd-icon { width: 42px; height: 42px; opacity: .6; }
.hd-post-card__body { padding: 20px; }
.hd-post-card__date { font-size: .84rem; color: var(--hd-muted); }
.hd-post-card__title { font-size: 1.1rem; margin: 6px 0 8px; }
.hd-post-card__title a { color: var(--hd-text); text-decoration: none; }
.hd-post-card__title a:hover { color: var(--hd-primary); }
.hd-post-card__excerpt { margin: 0; color: var(--hd-muted); font-size: .94rem; }
.nav-links { display: flex; justify-content: center; gap: 6px; margin-top: 40px; }
.nav-links .page-numbers { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 10px; border: 1px solid var(--hd-line); border-radius: 10px; text-decoration: none; color: var(--hd-text); }
.nav-links .page-numbers.current { background: var(--hd-primary); border-color: var(--hd-primary); color: #fff; }

/* ---------- Trang con ---------- */
.hd-page-hero { padding: 48px 0 44px; background: linear-gradient(180deg, #f3f7fd, #fff); border-bottom: 1px solid var(--hd-line); }
.hd-page-hero__title { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; letter-spacing: -.02em; margin: 0; }
.hd-page-hero__desc { margin: 12px 0 0; color: var(--hd-muted); font-size: 1.08rem; max-width: 720px; }
.hd-breadcrumb { margin-bottom: 14px; font-size: .88rem; color: var(--hd-muted); }
.hd-breadcrumb a { color: var(--hd-muted); text-decoration: none; }
.hd-breadcrumb a:hover { color: var(--hd-primary); }
.hd-breadcrumb__sep { margin: 0 4px; opacity: .5; }
.hd-post-meta { margin: 12px 0 0; color: var(--hd-muted); font-size: .92rem; }
.hd-post-meta a { color: inherit; }

.hd-provider-hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.hd-page-hero--provider { padding: 56px 0; }
.hd-page-hero--provider .hd-hero__actions { margin: 24px 0 0; }
.hd-provider-hero__logo { display: grid; place-items: center; padding: 40px; background: #fff; border-radius: 20px; box-shadow: var(--hd-shadow); border: 1px solid var(--hd-line); min-height: 200px; }
.hd-provider-hero__logo img { max-height: 90px; width: auto; object-fit: contain; }
.hd-provider-hero__stats { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 24px; }
.hd-provider-hero__stats div { display: flex; flex-direction: column; padding: 12px 18px; background: #fff; border: 1px solid var(--hd-line); border-radius: 12px; }
.hd-provider-hero__stats small { color: var(--hd-muted); font-size: .8rem; }
.hd-provider-hero__stats strong { font-size: 1.2rem; color: var(--hd-primary); }

.hd-provider-body { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: start; }
.hd-highlight-box { padding: 28px; background: #fff; border-radius: var(--hd-radius); border: 1px solid var(--hd-line); }
.hd-highlight-box h2 { font-size: 1.2rem; }
.hd-highlight-box ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hd-highlight-box li { display: flex; gap: 10px; align-items: flex-start; }
.hd-highlight-box li .hd-icon { color: #16a34a; margin-top: .25em; }
.hd-highlight-box__company { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--hd-line); font-size: .92rem; color: var(--hd-muted); }

.hd-others { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.hd-others__item { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px; background: #fff; border: 1px solid var(--hd-line); border-radius: var(--hd-radius); text-decoration: none; font-weight: 600; font-size: .92rem; transition: box-shadow .2s; }
.hd-others__item:hover { box-shadow: var(--hd-shadow); }
.hd-others__item img { max-height: 40px; width: auto; object-fit: contain; }

/* Nội dung soạn thảo */
.hd-prose { font-size: 1.04rem; }
.hd-prose--wide { min-width: 0; }
.hd-prose h2 { font-size: 1.6rem; margin-top: 1.6em; }
.hd-prose h3 { font-size: 1.25rem; margin-top: 1.4em; }
.hd-prose > :first-child { margin-top: 0; }
.hd-prose ul, .hd-prose ol { padding-left: 1.3em; }
.hd-prose li { margin-bottom: .4em; }
.hd-prose img { border-radius: 12px; }
.hd-prose blockquote { margin: 1.5em 0; padding: 16px 22px; border-left: 4px solid var(--hd-primary); background: var(--hd-soft); border-radius: 0 12px 12px 0; }
.hd-prose table { width: 100%; border-collapse: collapse; }
.hd-prose table th, .hd-prose table td { padding: 10px; border: 1px solid var(--hd-line); }
.hd-prose .hddt-pricing, .hd-prose .hddt-compare, .hd-prose .hddt-form { margin: 24px 0 40px; }
.hd-post-thumb { margin: 0 0 28px; }
.hd-post-thumb img { width: 100%; border-radius: 16px; }

.hd-cta-box { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 48px 0 32px; padding: 28px 32px; border-radius: 18px; background: linear-gradient(120deg, var(--hd-primary), #2b7bf0); color: #fff; }
.hd-cta-box h2 { color: #fff; font-size: 1.35rem; margin: 0 0 4px; }
.hd-cta-box p { margin: 0; opacity: .9; }
.hd-cta-box .hddt-btn { background: #fff; color: var(--hd-primary); border-color: #fff; flex: none; }
.hd-cta-box .hddt-btn:hover { background: var(--hd-accent); border-color: var(--hd-accent); color: #fff; }
.post-navigation .nav-links { justify-content: space-between; }
.post-navigation a { text-decoration: none; font-weight: 600; }

.hd-404 { text-align: center; }
.hd-404__code { font-size: 7rem; font-weight: 800; line-height: 1; color: var(--hd-primary); margin: 0 0 10px; }
.hd-404 .hd-hero__actions { justify-content: center; margin-top: 24px; }
.hd-empty-state { text-align: center; padding: 40px; }

/* ---------- Footer ---------- */
.hd-footer { background: var(--hd-dark); color: #a9b8d0; font-size: .95rem; }
.hd-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px; padding-top: 64px; padding-bottom: 48px; }
.hd-footer .hd-brand__text { color: #fff; }
.hd-footer__about p { margin: 16px 0 0; }
.hd-footer__small { font-size: .88rem; }
.hd-footer__title { color: #fff; font-size: 1.02rem; margin-bottom: 16px; }
.hd-footer__links, .hd-footer__contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hd-footer a { color: #a9b8d0; text-decoration: none; }
.hd-footer a:hover { color: #fff; }
.hd-footer__contact li { display: flex; gap: 10px; align-items: flex-start; }
.hd-footer__contact .hd-icon { color: var(--hd-accent); margin-top: .25em; }
.hd-footer__bottom { padding: 18px 0; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .85rem; }

/* Nút liên hệ nổi */
.hd-float { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: flex; flex-direction: column; gap: 12px; }
.hd-float__btn { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; color: #fff; text-decoration: none; font-weight: 800; font-size: .85rem; box-shadow: 0 10px 24px rgba(0, 0, 0, .2); transition: transform .2s; }
.hd-float__btn:hover { transform: scale(1.08); color: #fff; }
.hd-float__btn--zalo { background: #0068ff; }
.hd-float__btn--call { background: var(--hd-accent); animation: hd-ring-accent 2s infinite; }
.hd-float__btn--call .hd-icon { width: 24px; height: 24px; }
@keyframes hd-ring-accent { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 122, 26, .5); } 50% { box-shadow: 0 0 0 12px rgba(255, 122, 26, 0); } }

/* ---------- Form tìm kiếm / bình luận ---------- */
.search-form { display: flex; gap: 8px; max-width: 420px; margin: 0 auto; }
.search-form label { flex: 1; }
.search-field, .comment-form input[type="text"], .comment-form input[type="email"], .comment-form textarea {
	width: 100%; padding: .7em .9em; border: 1px solid #cdd7e6; border-radius: 10px; font: inherit;
}
.search-submit, .comment-form .submit { padding: .7em 1.2em; border: 0; border-radius: 10px; background: var(--hd-primary); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
	.hd-hotline { display: none; }
}

@media (max-width: 1100px) {
	.hd-header__cta { display: none; }
	.hd-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 960px) {
	.hd-burger { display: grid; place-items: center; }
	.hd-topbar__contact { display: none; }
	.hd-header__cta { display: none; }
	/* backdrop-filter biến header thành khung chứa của phần tử fixed → menu bị ép chiều cao. Mobile dùng nền đặc. */
	.hd-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }
	.hd-nav {
		position: fixed; top: var(--hd-nav-top, 76px); right: 0; bottom: 0; left: 0; z-index: 99; margin: 0; padding: 16px 20px 32px;
		background: #fff; overflow-y: auto; opacity: 0; transform: translateY(-8px); visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s;
	}
	.hd-nav.is-open { opacity: 1; transform: none; visibility: visible; }
	.hd-menu { flex-direction: column; gap: 2px; }
	.hd-menu a { padding: 14px 12px; font-size: 1.05rem; border-bottom: 1px solid var(--hd-line); border-radius: 0; }
	.hd-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 16px; }
	.hd-nav__mobile-cta { display: block; margin-top: 20px; }
	.hd-nav__mobile-cta .hddt-btn { width: 100%; }
	.hd-header__actions { margin-left: auto; }
	body.hd-nav-open { overflow: hidden; }

	.hd-hero { padding: 48px 0 64px; }
	.hd-hero__inner, .hd-register, .hd-faq-wrap, .hd-provider-hero, .hd-provider-body { grid-template-columns: 1fr; }
	.hd-hero__visual { max-width: 480px; margin: 0 auto; width: 100%; }
	.hd-faq-wrap { gap: 28px; }
	.hd-faq-wrap .hd-section__head { position: static; }
	.hd-features, .hd-posts { grid-template-columns: repeat(2, 1fr); }
	.hd-steps { grid-template-columns: repeat(2, 1fr); }
	.hd-provider-hero__logo { min-height: 140px; order: -1; }
	.hd-section { padding: 64px 0; }
}

@media (max-width: 640px) {
	.hd-container { padding: 0 16px; }
	.hd-topbar__note { font-size: .78rem; line-height: 1.4; padding: 6px 0; }
	.hd-header__inner { min-height: 64px; gap: 12px; }
	.hd-nav { top: var(--hd-nav-top, 64px); }
	.hd-brand__text { font-size: 1.1rem; }
	.hd-brand__mark svg { width: 34px; height: 34px; }
	.hd-hero__actions .hddt-btn { flex: 1 1 100%; }
	.hd-float-card { display: none; }
	.hd-hero__visual { padding: 0; }
	.hd-invoice { transform: none; padding: 20px; }
	.hd-features, .hd-posts, .hd-steps, .hd-footer__grid { grid-template-columns: 1fr; }
	.hd-section { padding: 52px 0; }
	.hd-section__head { margin-bottom: 30px; }
	.hd-section__head--row { flex-direction: column; align-items: flex-start; }
	.hd-register__form, .hd-card-box { padding: 20px 16px; }
	.hd-cta-box { flex-direction: column; align-items: flex-start; padding: 24px; }
	.hd-logos__list { grid-template-columns: repeat(2, 1fr); gap: 12px; }
	.hd-logos__img { max-width: 140px; max-height: 36px; }
	.hd-float { right: 12px; bottom: 12px; }
	.hd-float__btn { width: 48px; height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Trang Liên hệ ---------- */
.hd-contact { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; align-items: start; }
.hd-contact > * { min-width: 0; }
.hd-contact__info { display: grid; gap: 14px; }
.hd-contact__intro { color: var(--hd-muted); font-size: 1.05rem; margin: 0 0 6px; }
.hd-contact__item { display: flex; gap: 14px; align-items: flex-start; padding: 18px; background: var(--hd-soft); border-radius: var(--hd-radius); color: var(--hd-text); text-decoration: none; overflow-wrap: anywhere; }
a.hd-contact__item:hover { background: var(--hd-primary-soft); }
.hd-contact__icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; background: #fff; color: var(--hd-primary); }
.hd-contact__item small { display: block; color: var(--hd-muted); font-size: .84rem; }
.hd-contact__item strong { font-size: 1.02rem; }
.hd-contact__form h2 { font-size: 1.35rem; margin-bottom: 18px; }
.hd-contact .hd-prose { margin-top: 8px; }
@media (max-width: 960px) {
	.hd-contact { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------- Tải về ---------- */
.hd-dl-search { position: relative; max-width: 640px; margin-top: 22px; }
.hd-dl-search .hd-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--hd-muted); }
.hd-dl-search input {
	width: 100%; padding: 14px 16px 14px 46px; border: 1px solid #cdd7e6; border-radius: 12px; background: #fff;
	font: inherit; font-size: 1rem; box-shadow: 0 6px 18px rgba(15, 27, 45, .06);
}
.hd-dl-search input:focus { outline: none; border-color: var(--hd-primary); box-shadow: 0 0 0 3px rgba(11, 91, 211, .15); }

.hd-dl-layout { display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: start; }
.hd-dl-layout > * { min-width: 0; }
.hd-dl-filter { position: sticky; top: 100px; display: grid; gap: 12px; }
.hd-dl-filter__title { margin: 8px 0 0; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--hd-muted); }
.hd-dl-cats { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.hd-dl-cats a {
	display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px;
	color: var(--hd-text); font-weight: 600; text-decoration: none; transition: background .2s, color .2s;
}
.hd-dl-cats a span { min-width: 26px; padding: 1px 8px; border-radius: 10px; background: var(--hd-soft); color: var(--hd-muted); font-size: .8rem; text-align: center; }
.hd-dl-cats a:hover { background: var(--hd-soft); }
.hd-dl-cats a.is-active { background: var(--hd-primary-soft); color: var(--hd-primary); }
.hd-dl-cats a.is-active span { background: var(--hd-primary); color: #fff; }
.hd-dl-ncc { width: 100%; padding: 10px 12px; border: 1px solid #cdd7e6; border-radius: 10px; background: #fff; font: inherit; }
.hd-dl-help { margin-top: 8px; padding: 16px; border-radius: 14px; background: var(--hd-soft); display: grid; gap: 8px; }
.hd-dl-help p { margin: 0; color: var(--hd-muted); font-size: .9rem; }

.hd-dl-status { margin: 0 0 12px; color: var(--hd-muted); font-size: .92rem; }
.hd-dl-status:empty { display: none; }
.hd-dl-group + .hd-dl-group { margin-top: 36px; }
.hd-dl-group__head { margin-bottom: 14px; }
.hd-dl-group__head h2 { margin: 0; font-size: 1.3rem; }
.hd-dl-group__head p { margin: 4px 0 0; color: var(--hd-muted); font-size: .94rem; }
.hd-dl-list { display: grid; gap: 12px; }

.hd-dl {
	display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 16px 18px;
	background: #fff; border: 1px solid var(--hd-line); border-radius: var(--hd-radius); transition: box-shadow .2s, border-color .2s;
}
.hd-dl:hover { border-color: #c9d6ea; box-shadow: var(--hd-shadow); }
.hd-dl[hidden] { display: none; }
.hd-dl__icon {
	display: grid; place-items: center; width: 52px; height: 60px; border-radius: 8px 16px 8px 8px; color: #fff;
	font-size: .72rem; font-weight: 800; letter-spacing: .04em; background: #64748b; flex: none;
}
.hd-dl__icon--pdf { background: #dc2626; }
.hd-dl__icon--doc { background: #2563eb; }
.hd-dl__icon--xls { background: #16a34a; }
.hd-dl__icon--zip { background: #a16207; }
.hd-dl__icon--exe { background: #7c3aed; }
.hd-dl__icon--app { background: #0f172a; }
.hd-dl__icon--link { background: var(--hd-primary); }
.hd-dl__icon--lg { width: 76px; height: 88px; font-size: .95rem; }
.hd-dl__title { margin: 0; font-size: 1.04rem; }
.hd-dl__title a { color: var(--hd-text); text-decoration: none; }
.hd-dl__title a:hover { color: var(--hd-primary); }
.hd-dl__desc { margin: 4px 0 0; color: var(--hd-muted); font-size: .9rem; line-height: 1.5; }
.hd-dl__meta { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 8px 0 0; padding: 0; }
.hd-dl__meta li { padding: 2px 9px; border-radius: 20px; background: var(--hd-soft); color: var(--hd-muted); font-size: .76rem; }
.hd-dl__meta .hd-dl__provider { background: var(--hd-primary-soft); color: var(--hd-primary); font-weight: 600; }
.hd-dl__actions { display: flex; flex-direction: column; align-items: stretch; gap: 6px; text-align: center; }
.hd-dl__actions .hddt-btn { white-space: nowrap; }
.hd-dl__more { font-size: .86rem; color: var(--hd-muted); text-decoration: none; }
.hd-dl__more:hover { color: var(--hd-primary); }
.hd-dl-empty { padding: 32px; border: 1px dashed #c9d6ea; border-radius: var(--hd-radius); text-align: center; color: var(--hd-muted); }
.hd-dl-empty[hidden] { display: none; }
.hd-dl-empty p { margin: 4px 0; }

.hd-dl-hero { display: flex; gap: 24px; align-items: center; }
.hd-dl-hero__text { min-width: 0; }
.hd-dl-single { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: start; }
.hd-dl-single > * { min-width: 0; }
.hd-dl-box { position: sticky; top: 100px; display: grid; gap: 14px; padding: 22px; background: #fff; border: 1px solid var(--hd-line); border-radius: 18px; box-shadow: var(--hd-shadow); }
.hd-dl-box__note { margin: 0; color: var(--hd-muted); font-size: .86rem; text-align: center; }
.hd-dl-box__info { margin: 0; display: grid; }
.hd-dl-box__info div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--hd-line); font-size: .92rem; }
.hd-dl-box__info div:last-child { border-bottom: 0; }
.hd-dl-box__info dt { color: var(--hd-muted); }
.hd-dl-box__info dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.hd-dl-box__help { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--hd-line); font-size: .9rem; }
.hd-dl-box__help a { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; }

@media (max-width: 960px) {
	.hd-dl-layout, .hd-dl-single { grid-template-columns: 1fr; }
	.hd-dl-filter, .hd-dl-box { position: static; }
	.hd-dl-cats { display: flex; flex-wrap: wrap; gap: 6px; }
	.hd-dl-cats a { padding: 8px 12px; border: 1px solid var(--hd-line); }
	.hd-dl-help { display: none; }
}
@media (max-width: 640px) {
	.hd-dl { grid-template-columns: auto 1fr; gap: 12px; padding: 14px; }
	.hd-dl__actions { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
	.hd-dl__icon { width: 44px; height: 52px; }
	.hd-dl-hero { align-items: flex-start; }
	.hd-dl__icon--lg { width: 56px; height: 66px; font-size: .8rem; }
}

.hd-header__cta { white-space: nowrap; padding-left: 1.1em; padding-right: 1.1em; }
.hd-dl__new { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #ecfdf3; color: #067647; font-size: .72rem; font-weight: 700; vertical-align: middle; white-space: nowrap; }
.hd-dl__icon--img { background: none; border-radius: 0; width: 56px; height: 56px; }
.hd-dl__icon--img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.hd-dl__icon--img.hd-dl__icon--lg { width: 88px; height: 88px; }

/* ---------- Khuyến mãi: băng chạy ---------- */
.hd-ticker { background: #fff7ed; border-bottom: 1px solid #fed7aa; color: var(--hd-text); font-size: .9rem; }
.hd-ticker__inner { display: flex; align-items: center; gap: 12px; min-height: 42px; }
.hd-ticker__label { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--hd-accent); color: #fff; font-weight: 700; font-size: .82rem; text-decoration: none; white-space: nowrap; }
.hd-ticker__label span { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #fff; color: var(--hd-accent); font-size: .72rem; font-weight: 800; }
.hd-ticker__viewport { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
.hd-ticker__viewport:focus-visible { outline-offset: -3px; }
.hd-ticker__track { display: flex; width: max-content; animation: hd-ticker var(--hd-ticker-duration, 30s) linear infinite; }
.hd-ticker:hover .hd-ticker__track, .hd-ticker__viewport:focus-within .hd-ticker__track { animation-play-state: paused; }
.hd-ticker__list { display: flex; flex: none; margin: 0; padding: 0; list-style: none; }
.hd-ticker__item a { display: inline-flex; align-items: center; gap: 8px; padding: 0 28px; color: var(--hd-text); text-decoration: none; white-space: nowrap; line-height: 42px; }
.hd-ticker__item a::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--hd-accent); margin-right: 4px; }
.hd-ticker__item a:hover span { color: var(--hd-primary); text-decoration: underline; }
.hd-ticker__item strong { color: var(--hd-primary-dark); }
.hd-ticker__item em { font-style: normal; font-weight: 700; color: #c2410c; background: #ffedd5; padding: 1px 8px; border-radius: 6px; font-size: .82rem; line-height: 1.6; }
.hd-ticker__all { flex: none; font-weight: 600; font-size: .84rem; white-space: nowrap; }
@keyframes hd-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
	.hd-ticker__track { animation: none; }
	.hd-ticker__viewport { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
	.hd-ticker__list[aria-hidden="true"] { display: none; }
}
@media (max-width: 640px) {
	.hd-ticker__inner { gap: 8px; padding-right: 0; }
	.hd-ticker__label { padding: 3px 9px; font-size: .76rem; }
	.hd-ticker__all { display: none; }
	.hd-ticker__item a { padding: 0 18px; }
}

/* ---------- Khuyến mãi: trang tổng hợp ---------- */
.hd-page-hero--promo { background: linear-gradient(180deg, #fff4ea, #fff); }
.hd-promo-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.hd-promo-filter button { padding: 7px 16px; border: 1px solid var(--hd-line); border-radius: 999px; background: #fff; color: var(--hd-text); font-size: .9rem; font-weight: 600; cursor: pointer; }
.hd-promo-filter button:hover { border-color: var(--hd-primary); color: var(--hd-primary); }
.hd-promo-filter button.is-active { background: var(--hd-primary); border-color: var(--hd-primary); color: #fff; }
.hd-promo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 20px; }
.hd-promo { position: relative; display: flex; flex-direction: column; padding: 24px; background: #fff; border: 1px solid var(--hd-line); border-radius: var(--hd-radius); transition: box-shadow .2s, transform .2s; }
.hd-promo::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; border-radius: var(--hd-radius) var(--hd-radius) 0 0; background: linear-gradient(90deg, var(--hd-accent), #ffb020); }
.hd-promo:hover { box-shadow: var(--hd-shadow); transform: translateY(-2px); }
.hd-promo[hidden] { display: none; }
.hd-promo__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; min-height: 40px; }
.hd-promo__logo { display: inline-flex; align-items: center; text-decoration: none; }
.hd-promo__logo-img { max-height: 36px; max-width: 150px; width: auto; height: auto; object-fit: contain; }
.hd-promo__logo--side { display: flex; justify-content: center; padding: 8px 0 20px; margin-bottom: 16px; border-bottom: 1px solid var(--hd-line); }
.hd-promo__logo--side .hd-promo__logo-img { max-height: 52px; max-width: 200px; }
.hd-promo__status { flex: none; padding: 2px 10px; border-radius: 999px; background: #ecfdf3; color: #067647; font-size: .76rem; font-weight: 700; }
.hd-promo--upcoming .hd-promo__status, .hd-promo__status--upcoming { background: var(--hd-primary-soft); color: var(--hd-primary-dark); }
.hd-promo--ended .hd-promo__status, .hd-promo__status--ended { background: #f1f3f6; color: var(--hd-muted); }
.hd-promo__badge { align-self: flex-start; margin: 0 0 10px; padding: 4px 12px; border-radius: 8px; background: #fff1e6; color: #c2410c; font-weight: 800; font-size: 1.02rem; }
.hd-promo__badge--inline { display: inline-block; margin: 0; font-size: .86rem; }
.hd-promo__title { font-size: 1.15rem; margin: 0 0 8px; }
.hd-promo__title a { color: var(--hd-text); text-decoration: none; }
.hd-promo__title a:hover { color: var(--hd-primary); }
.hd-promo__desc { color: var(--hd-muted); font-size: .94rem; margin: 0 0 12px; }
.hd-promo__period { display: flex; align-items: center; gap: 6px; margin: auto 0 16px; padding-top: 4px; color: var(--hd-muted); font-size: .86rem; }
.hd-promo__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hd-promo--ended { opacity: .75; }
.hd-promo--ended::before { background: #cbd5e1; }
.hd-promo-ended__title { font-size: 1.3rem; margin: 48px 0 20px; }
.hd-section--soft .hd-promo-ended__title { margin-top: 0; }
.hd-promo-note { margin: 32px 0 0; color: var(--hd-muted); font-size: .86rem; }
.hd-promo-hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.hd-promo-side__actions { display: grid; gap: 10px; margin-top: 20px; }
.hd-promo-side__actions .hd-promo-note { margin: 0; }
