/* =====================================================================
   Trang nội dung: Chính sách / FAQ / Liên hệ (v6.10.0) — views/client/{policy,faq,contact}.php
   Dùng biến màu của theme (--surface, --heading, --text, --border, --primary…) nên giao diện tối
   (mod/css/dark.css đổi các biến này) tự khớp. Nội dung admin soạn nằm trong .pg-prose.
   ===================================================================== */
.pg-hero {
    position: relative; overflow: hidden; color: #fff;
    background: linear-gradient(135deg, var(--primary, #002594) 0%, var(--primary1, #3d65c2) 100%);
    padding: 22px 0 20px;
}
.pg-hero::after {
    content: ""; position: absolute; right: -60px; top: -150px; width: 300px; height: 300px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 70%); pointer-events: none;
}
.pg-hero .container { position: relative; z-index: 1; }
.pg-crumb { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; padding: 0; list-style: none; font-size: 13px; }
.pg-crumb li { color: rgba(255, 255, 255, .85); }
.pg-crumb li + li::before { content: "›"; margin-right: 6px; color: rgba(255, 255, 255, .6); }
.pg-crumb a { color: #fff; text-decoration: none; }
.pg-crumb a:hover { text-decoration: underline; }
.pg-hero h1 { color: #fff; font-size: 26px; line-height: 1.3; font-weight: 700; margin: 0 0 4px; }
.pg-hero p.pg-lead { color: rgba(255, 255, 255, .9); font-size: 15px; line-height: 1.55; margin: 0; max-width: 960px; }
.pg-hero .pg-meta { margin-top: 6px; font-size: 13px; color: rgba(255, 255, 255, .85); }
html[data-theme="dark"] .pg-hero h1, html[data-theme="dark"] .pg-crumb a { color: #fff; }
html[data-theme="dark"] .pg-hero p.pg-lead, html[data-theme="dark"] .pg-crumb li, html[data-theme="dark"] .pg-hero .pg-meta { color: rgba(255, 255, 255, .88); }
@media (max-width: 767px) {
    .pg-hero { padding: 18px 0 16px; }
    .pg-hero h1 { font-size: 22px; }
}

.pg-section { padding: 28px 0 56px; }
.pg-card { background: var(--surface, #fff); border: 1px solid var(--border, #e8e8e8); border-radius: 14px; padding: 28px; }
@media (max-width: 767px) { .pg-card { padding: 20px 16px; } }

/* ---- Văn bản do admin soạn ---- */
.pg-prose { color: var(--text, #555); font-size: 16px; line-height: 1.75; overflow-wrap: anywhere; }
.pg-prose > :first-child { margin-top: 0; }
.pg-prose h2 { color: var(--heading, #39404a); font-size: 22px; line-height: 1.35; font-weight: 700; margin: 34px 0 12px; padding-top: 22px; border-top: 1px solid var(--border, #e8e8e8); scroll-margin-top: 120px; }
.pg-prose > h2:first-child { border-top: 0; padding-top: 0; }
.pg-prose h3 { color: var(--heading, #39404a); font-size: 18px; line-height: 1.4; font-weight: 700; margin: 24px 0 8px; scroll-margin-top: 120px; }
.pg-prose p { margin: 0 0 14px; }
/* Dấu đầu dòng tự vẽ: theme gốc reset list-style của ul/li nên dấu mặc định không hiện. */
.pg-prose ul, .pg-prose ol { margin: 0 0 16px; padding-left: 0; list-style: none; }
.pg-prose ol { counter-reset: pgol; }
.pg-prose li { position: relative; margin: 0 0 8px; padding-left: 24px; color: inherit; list-style: none; }
.pg-prose ul > li::before { content: ""; position: absolute; left: 6px; top: .72em; width: 7px; height: 7px; border-radius: 50%; background: var(--primary, #002594); }
.pg-prose ol > li { counter-increment: pgol; }
.pg-prose ol > li::before { content: counter(pgol) "."; position: absolute; left: 0; top: 0; font-weight: 700; color: var(--primary, #002594); }
.pg-prose a { color: var(--primary, #002594); text-decoration: underline; text-underline-offset: 2px; }
.pg-prose strong, .pg-prose b { color: var(--heading, #39404a); font-weight: 700; }
.pg-prose img { max-width: 100%; height: auto; border-radius: 10px; }
.pg-prose table { width: 100%; border-collapse: collapse; margin: 0 0 16px; display: block; overflow-x: auto; }
.pg-prose th, .pg-prose td { border: 1px solid var(--border, #e8e8e8); padding: 8px 10px; text-align: left; }
.pg-prose blockquote { margin: 0 0 16px; padding: 12px 16px; border-left: 4px solid var(--primary, #002594); background: var(--surface-2, #f7f8fa); border-radius: 0 8px 8px 0; }
html[data-theme="dark"] .pg-prose a { color: #8fb0ff; }
html[data-theme="dark"] .pg-prose ul > li::before { background: #8fb0ff; }
html[data-theme="dark"] .pg-prose ol > li::before { color: #8fb0ff; }

/* ---- Chính sách: mục lục + nội dung ---- */
.pg-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 28px; align-items: start; }
.pg-toc { position: sticky; top: 112px; background: var(--surface, #fff); border: 1px solid var(--border, #e8e8e8); border-radius: 14px; padding: 18px 14px; max-height: calc(100vh - 136px); overflow: auto; }
.pg-toc-title { font-size: 13px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--gray, #777); margin: 0 6px 10px; }
.pg-toc ol { list-style: none; margin: 0; padding: 0; }
.pg-toc li { margin: 0; }
.pg-toc a { display: block; padding: 7px 10px; border-radius: 8px; font-size: 14px; line-height: 1.4; color: var(--text, #555); text-decoration: none; border-left: 3px solid transparent; }
.pg-toc a:hover { background: var(--surface-2, #f7f8fa); color: var(--heading, #39404a); }
.pg-toc a.is-active { color: var(--primary, #002594); border-left-color: var(--primary, #002594); background: var(--surface-2, #f7f8fa); font-weight: 600; }
html[data-theme="dark"] .pg-toc a.is-active { color: #8fb0ff; border-left-color: #8fb0ff; }
.pg-toc-mobile { display: none; }
@media (max-width: 991px) {
    .pg-layout { grid-template-columns: minmax(0, 1fr); }
    .pg-toc { display: none; }
    .pg-toc-mobile { display: block; margin-bottom: 16px; background: var(--surface, #fff); border: 1px solid var(--border, #e8e8e8); border-radius: 12px; padding: 4px 14px; }
    .pg-toc-mobile summary { cursor: pointer; padding: 10px 0; font-weight: 600; color: var(--heading, #39404a); }
    .pg-toc-mobile ol { margin: 0 0 10px; padding-left: 18px; }
    .pg-toc-mobile li { margin: 0 0 6px; }
    .pg-toc-mobile a { color: var(--text, #555); text-decoration: none; }
}

/* ---- FAQ ---- */
.faq-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 22px; }
.faq-search { position: relative; flex: 1 1 320px; }
.faq-search input {
    width: 100%; height: 48px; padding: 0 16px 0 44px; border-radius: 12px; font-size: 15px;
    border: 1px solid var(--border, #e8e8e8); background: var(--surface, #fff); color: var(--heading, #39404a);
}
.faq-search input:focus { outline: none; border-color: var(--primary, #002594); box-shadow: 0 0 0 3px rgba(61, 101, 194, .18); }
.faq-search svg { position: absolute; left: 15px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--gray, #777); pointer-events: none; }
.faq-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.faq-chips a { padding: 8px 14px; border-radius: 999px; font-size: 14px; text-decoration: none; border: 1px solid var(--border, #e8e8e8); background: var(--surface, #fff); color: var(--text, #555); }
.faq-chips a:hover { border-color: var(--primary, #002594); color: var(--primary, #002594); }
html[data-theme="dark"] .faq-chips a:hover { color: #8fb0ff; border-color: #8fb0ff; }
/* Máy tính: nhóm câu hỏi nằm ở cột trái (giống mục lục Chính sách) nên ẩn hàng chip; điện thoại vẫn dùng chip. */
.faq-nav a { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.faq-nav .faq-n { flex: none; min-width: 26px; padding: 1px 8px; border-radius: 999px; font-size: 12px; text-align: center; background: var(--surface-2, #f1f3f6); color: var(--gray, #777); font-weight: 600; }
@media (min-width: 992px) { .pg-layout .faq-chips { display: none; } }
@media (max-width: 991px) {
    .faq-chips { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .faq-chips::-webkit-scrollbar { display: none; }
    .faq-chips a { flex: none; white-space: nowrap; }
}
.faq-group { margin-bottom: 28px; scroll-margin-top: 120px; }
.faq-group-title { font-size: 20px; font-weight: 700; color: var(--heading, #39404a); margin: 0 0 12px; }
.faq-item { background: var(--surface, #fff); border: 1px solid var(--border, #e8e8e8); border-radius: 12px; margin-bottom: 10px; scroll-margin-top: 120px; }
.faq-item summary {
    list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; justify-content: space-between;
    padding: 16px 18px; font-size: 16px; font-weight: 600; color: var(--heading, #39404a); min-height: 44px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: ""; flex: none; width: 10px; height: 10px; margin-right: 4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-3px); transition: transform .2s ease; opacity: .6;
}
.faq-item[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq-item[open] { border-color: var(--primary, #002594); }
html[data-theme="dark"] .faq-item[open] { border-color: #5b7fd6; }
.faq-item .faq-a { padding: 0 18px 14px; }
.faq-item .faq-a.pg-prose { font-size: 15px; }
.faq-empty { display: none; padding: 18px; text-align: center; color: var(--gray, #777); border: 1px dashed var(--border, #e8e8e8); border-radius: 12px; }
.faq-cta { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; padding: 22px 24px; border-radius: 14px; background: var(--surface-2, #f7f8fa); border: 1px solid var(--border, #e8e8e8); }
.faq-cta h2 { font-size: 18px; margin: 0 0 4px; color: var(--heading, #39404a); }
.faq-cta p { margin: 0; color: var(--text, #555); }
@media (prefers-reduced-motion: reduce) { .faq-item summary::after { transition: none; } }

/* ---- Nút dùng chung ---- */
.pg-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px;
    border-radius: 10px; font-weight: 600; font-size: 15px; text-decoration: none; border: 0; cursor: pointer;
    background: linear-gradient(90deg, var(--primary, #002594), var(--primary1, #3d65c2)); color: #fff;
}
.pg-btn:hover { color: #fff; filter: brightness(1.08); text-decoration: none; }
.pg-btn-ghost { background: transparent; color: var(--primary, #002594); border: 1px solid var(--primary, #002594); }
.pg-btn-ghost:hover { color: #fff; background: var(--primary, #002594); }
html[data-theme="dark"] .pg-btn, html[data-theme="dark"] .pg-btn:hover { color: #fff; }
html[data-theme="dark"] .pg-btn-ghost { color: #8fb0ff; border-color: #8fb0ff; }
html[data-theme="dark"] .pg-btn-ghost:hover { color: #0e1116; background: #8fb0ff; }

/* ---- Liên hệ ---- */
/* auto-fit: ít kênh thì thẻ giãn ra lấp kín hàng (auto-fill để trống nửa phải khi chỉ có 2 kênh). */
.ct-channels { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 28px; }
.ct-card {
    display: flex; align-items: center; gap: 16px; padding: 20px 22px; border-radius: 14px; text-decoration: none;
    background: var(--surface, #fff); border: 1px solid var(--border, #e8e8e8); transition: transform .15s ease, box-shadow .15s ease;
}
.ct-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, .08); text-decoration: none; }
.ct-body { flex: 1 1 auto; min-width: 0; }
.ct-ic { width: 48px; height: 48px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; }
.ct-ic svg { width: 24px; height: 24px; }
.ct-tg_support .ct-ic, .ct-tg_channel .ct-ic, .ct-tg_bot .ct-ic { background: #229ed9; }
.ct-zalo .ct-ic { background: #0068ff; }
.ct-phone .ct-ic { background: #15803d; }
.ct-facebook .ct-ic { background: #1877f2; }
.ct-email .ct-ic { background: #b45309; }
.ct-card-title { font-size: 17px; line-height: 1.35; font-weight: 700; color: var(--heading, #39404a); margin: 0; }
.ct-card-sub { font-size: 14px; line-height: 1.4; color: var(--gray, #777); margin: 2px 0 0; overflow-wrap: anywhere; }
.ct-card-desc { font-size: 14px; color: var(--text, #555); margin: 8px 0 0; line-height: 1.6; }
.ct-go { flex: none; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--surface-2, #f1f3f6); color: var(--primary, #002594); transition: background .15s ease, color .15s ease; }
.ct-go svg { width: 18px; height: 18px; }
.ct-card:hover .ct-go { background: var(--primary, #002594); color: #fff; }
html[data-theme="dark"] .ct-go { color: #8fb0ff; }
html[data-theme="dark"] .ct-card:hover .ct-go { color: #fff; }
@media (max-width: 575px) { .ct-card { padding: 16px; gap: 12px; } .ct-ic { width: 42px; height: 42px; } .ct-go { width: 34px; height: 34px; } }
html[data-theme="dark"] .ct-ic { color: #fff; }
.ct-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
@media (max-width: 991px) { .ct-grid { grid-template-columns: minmax(0, 1fr); } }
.ct-side h2 { font-size: 17px; font-weight: 700; color: var(--heading, #39404a); margin: 0 0 12px; }
.ct-links { list-style: none; margin: 0; padding: 0; }
.ct-links li { margin: 0; border-top: 1px solid var(--border, #e8e8e8); }
.ct-links li:first-child { border-top: 0; }
.ct-links a { display: flex; justify-content: space-between; align-items: center; padding: 12px 2px; color: var(--text, #555); text-decoration: none; font-size: 15px; min-height: 44px; }
.ct-links a:hover { color: var(--primary, #002594); }
html[data-theme="dark"] .ct-links a:hover { color: #8fb0ff; }
.ct-links a::after { content: "›"; font-size: 20px; opacity: .5; }
.pg-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
/* Theme gốc đặt line-height lớn cho h2/h3 (biến --h2height 48px) ⇒ tiêu đề khối 2 dòng bị giãn. */
.faq-group-title, .faq-cta h2, .ct-side h2, .ct-card-title { line-height: 1.35; }
