/* =========================================================
   Trang danh sách tin: /News, /News/{cat}/{page}, /ChatLuongNuoc
   Màu thương hiệu: #174095 (xanh đậm), #008fe2 (xanh nước)
   ========================================================= */
.np { padding: 32px 0 56px; background: #f4f6fa; }

/* Thanh lọc + đếm bài */
.np-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.np-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.np-tabs a {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 18px; border-radius: 30px;
    background: #fff; color: #174095; font-weight: 600; font-size: 14.5px;
    border: 1px solid #dbe4f0; transition: all .2s;
}
.np-tabs a:hover { border-color: #008fe2; color: #008fe2; text-decoration: none; }
.np-tabs a.active { background: #174095; border-color: #174095; color: #fff; }
.np-count { font-size: 14px; color: #6b7487; }

/* Ảnh dùng chung */
.np-thumb { display: block; position: relative; overflow: hidden; background: #e6eef8; }
.np-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
a:hover .np-thumb img { transform: scale(1.05); }
.np-date { display: block; font-size: 13px; color: #8a93a6; }
.np-date i { margin-right: 5px; }
.np-summary {
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
    font-size: 14.5px; line-height: 1.65; color: #5b6475;
}
.np-summary p { margin: 0; display: inline; }

/* Bài nổi bật (trang 1) */
.np-featured {
    display: flex; background: #fff; border-radius: 14px; overflow: hidden; margin-bottom: 24px;
    box-shadow: 0 2px 14px rgba(23, 64, 149, .08); color: #333; transition: box-shadow .25s, transform .25s;
}
.np-featured:hover { text-decoration: none; color: #333; box-shadow: 0 12px 30px rgba(23, 64, 149, .16); transform: translateY(-2px); }
.np-thumb-featured { flex: 0 0 55%; min-height: 300px; }
.np-badge {
    position: absolute; top: 14px; left: 14px; z-index: 1; padding: 4px 12px; border-radius: 20px;
    background: #e2541b; color: #fff; font-size: 12.5px; font-weight: 700; letter-spacing: .3px;
}
.np-featured-body { flex: 1; display: flex; flex-direction: column; padding: 26px 26px 22px; }
.np-featured-title { font-size: 22px; font-weight: 700; line-height: 1.4; color: #1d2b4f; margin: 8px 0 12px; transition: color .2s; }
.np-featured:hover .np-featured-title { color: #008fe2; }
.np-summary-lg { -webkit-line-clamp: 5; font-size: 15px; }
.np-readmore { margin-top: auto; padding-top: 16px; font-weight: 600; color: #008fe2; }
.np-readmore i { margin-left: 6px; transition: transform .2s; }
.np-featured:hover .np-readmore i { transform: translateX(4px); }

/* Lưới bài */
.np-col { display: flex; margin-bottom: 24px; }
.np-card {
    flex: 1; display: flex; flex-direction: column; background: #fff; border-radius: 12px; overflow: hidden;
    box-shadow: 0 2px 12px rgba(23, 64, 149, .07); color: #333; transition: box-shadow .25s, transform .25s;
}
.np-card:hover { text-decoration: none; color: #333; box-shadow: 0 12px 28px rgba(23, 64, 149, .15); transform: translateY(-3px); }
.np-card .np-thumb { padding-top: 56%; }
.np-card-body { padding: 16px 18px 20px; }
.np-card-title {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    font-size: 17px; font-weight: 700; line-height: 1.45; color: #1d2b4f; margin: 6px 0 8px; transition: color .2s;
}
.np-card:hover .np-card-title { color: #008fe2; }

/* Chưa có bài */
.np-empty {
    text-align: center; padding: 60px 20px; background: #fff; border-radius: 14px;
    border: 2px dashed #dbe4f0; color: #8a93a6;
}
.np-empty > i { font-size: 46px; color: #b9d9f2; margin-bottom: 12px; }
.np-empty p { font-size: 16px; margin-bottom: 18px; }

/* Phân trang */
.np-pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.np-page {
    min-width: 40px; height: 40px; padding: 0 12px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff; color: #174095; font-weight: 600; border: 1px solid #dbe4f0; transition: all .2s;
}
a.np-page:hover { border-color: #008fe2; color: #008fe2; text-decoration: none; }
.np-page.active { background: #008fe2; border-color: #008fe2; color: #fff; }
.np-dots { border: 0; background: transparent; color: #8a93a6; min-width: 24px; padding: 0; }

/* Cột phải */
.np-sticky { position: sticky; top: 20px; }
.np-box { background: #fff; border-radius: 12px; overflow: hidden; margin-bottom: 20px; box-shadow: 0 2px 12px rgba(23, 64, 149, .07); }
.np-box-title {
    padding: 14px 18px; font-weight: 700; font-size: 16px; color: #174095;
    border-bottom: 1px solid #edf0f5; border-left: 4px solid #008fe2;
}
.np-box-title i { color: #e2541b; margin-right: 6px; }
.np-recent { list-style: none; margin: 0; padding: 6px 18px; }
.np-recent li { border-bottom: 1px dashed #e3e8f0; }
.np-recent li:last-child { border-bottom: 0; }
.np-recent a { display: flex; align-items: center; padding: 12px 0; color: #333; }
.np-recent a:hover { text-decoration: none; }
.np-thumb-sm { flex: 0 0 84px; height: 60px; border-radius: 8px; margin-right: 12px; }
.np-recent-body { min-width: 0; }
.np-recent-title {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    font-size: 14px; font-weight: 600; line-height: 1.45; color: #1d2b4f; margin-bottom: 3px; transition: color .2s;
}
.np-recent a:hover .np-recent-title { color: #008fe2; }
.np-adv img { display: block; width: 100%; height: auto; }

@media (max-width: 991px) {
    .np-sticky { position: static; margin-top: 12px; }
}
@media (max-width: 767px) {
    .np { padding: 20px 0 36px; }
    .np-featured { flex-direction: column; }
    .np-thumb-featured { flex: none; min-height: 0; padding-top: 56%; }
    .np-featured-body { padding: 18px; }
    .np-featured-title { font-size: 19px; }
    .np-summary-lg { -webkit-line-clamp: 3; }
    .np-toolbar { margin-bottom: 18px; }
    .np-count { width: 100%; }
    .np-pager { gap: 4px; }
    .np-page { min-width: 32px; height: 34px; padding: 0 6px; border-radius: 8px; font-size: 14px; }
    .np-dots { min-width: 16px; }
}

/* =========================================================
   Trang chi tiết bài: /News/Details/{id}
   ========================================================= */
.head-page .left-side .head-page-label { margin: 0; font-size: 18px; font-weight: 500; text-transform: uppercase; }

.art { background: #fff; border-radius: 14px; padding: 32px 36px; box-shadow: 0 2px 14px rgba(23, 64, 149, .07); margin-bottom: 28px; }
.art-head { border-bottom: 1px solid #edf0f5; padding-bottom: 20px; margin-bottom: 24px; }
.art-cat {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 20px;
    background: #e6f4fd; color: #008fe2; font-size: 13.5px; font-weight: 600;
}
.art-cat:hover { background: #008fe2; color: #fff; text-decoration: none; }
#article-detail .art-title { font-size: 30px; line-height: 1.35; font-weight: 700; color: #1d2b4f; margin: 14px 0 12px; }
.art-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 14px; color: #8a93a6; }
.art-meta i { margin-right: 5px; color: #b0b9c9; }
.art-lead {
    margin-top: 18px; padding: 14px 18px; border-left: 4px solid #008fe2; background: #f4f8fd; border-radius: 0 8px 8px 0;
    font-size: 16.5px; line-height: 1.7; font-weight: 500; color: #33405e;
}
.art-lead p { margin: 0; }

/* Nội dung từ trình soạn thảo */
.art-body { font-size: 16.5px; line-height: 1.8; color: #2d3748; overflow-wrap: break-word; }
.art-body p { margin: 0 0 1.1em; }
.art-body h2, .art-body h3, .art-body h4 { color: #174095; font-weight: 700; line-height: 1.4; margin: 1.6em 0 .7em; }
.art-body h2 { font-size: 23px; } .art-body h3 { font-size: 20px; } .art-body h4 { font-size: 18px; }
.art-body a { color: #008fe2; text-decoration: underline; }
.art-body ul, .art-body ol { padding-left: 1.4em; margin-bottom: 1.1em; }
.art-body li { margin-bottom: .35em; }
.art-body blockquote { margin: 1.2em 0; padding: 12px 18px; border-left: 4px solid #dbe4f0; background: #f7f9fc; color: #4a5568; }
/* Ảnh: bỏ width cố định (vd width=500 từ trình soạn thảo) để ảnh rộng hết khung, dễ đọc phiếu kết quả */
.art-body img { display: block; max-width: 100%; width: auto; height: auto !important; margin: 1.2em auto; border-radius: 8px; box-shadow: 0 2px 12px rgba(23, 64, 149, .1); }
.art-body img.art-zoomable { cursor: zoom-in; }
.art-body iframe, .art-body video { display: block; max-width: 100%; margin: 1.2em auto; border-radius: 8px; }
.art-body iframe[src*="youtube"] { width: 100%; aspect-ratio: 16 / 9; height: auto; }
/* Bảng: cuộn ngang trên điện thoại thay vì làm vỡ khung */
.art-body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 1.2em 0; font-size: 15px; }
.art-body td, .art-body th { border: 1px solid #dbe4f0; padding: 8px 10px; }
.art-body th { background: #f4f8fd; color: #174095; }

/* Chia sẻ */
.art-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 28px; padding-top: 20px; border-top: 1px solid #edf0f5; }
.art-share-label { font-weight: 600; color: #4a5568; margin-right: 4px; }
.art-share-btn {
    display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 8px;
    font-size: 14px; font-weight: 600; color: #fff; border: 0; cursor: pointer; transition: opacity .2s, transform .2s;
}
.art-share-btn:hover { opacity: .9; transform: translateY(-1px); color: #fff; text-decoration: none; }
.art-share-btn.fb { background: #1877f2; }
.art-share-btn.zl { background: #0068ff; }
.art-share-btn.copy { background: #eef2f8; color: #174095; }
.art-share-btn.copy:hover { color: #174095; }
.art-share-btn.copy.done { background: #e3f6ea; color: #1e8a4c; }

/* Bài liên quan */
.art-related { margin-bottom: 28px; }
.art-related-title { font-size: 22px; font-weight: 700; color: #174095; margin: 0 0 18px; padding-left: 12px; border-left: 4px solid #008fe2; }
.art-related .art-related-card-title { font-size: 15.5px; -webkit-line-clamp: 3; margin-bottom: 0; }
.art-comments { margin-bottom: 20px; }

/* Xem ảnh lớn */
.art-lightbox {
    position: fixed; inset: 0; z-index: 100000; background: rgba(10, 20, 40, .92);
    display: flex; align-items: center; justify-content: center; padding: 20px; cursor: zoom-out;
}
.art-lightbox[hidden] { display: none; }
.art-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); cursor: default; }
.art-lightbox-close {
    position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 0;
    background: rgba(255, 255, 255, .15); color: #fff; font-size: 20px; cursor: pointer;
}
.art-lightbox-close:hover { background: rgba(255, 255, 255, .3); }

@media (max-width: 767px) {
    .art { padding: 20px 16px; border-radius: 10px; }
    #article-detail .art-title { font-size: 23px; }
    .art-body { font-size: 16px; }
    .art-lead { font-size: 15.5px; }
    .art-related-title { font-size: 19px; }
    .art-related .row { margin: 0 -6px; }
    .art-related .np-col { padding: 0 6px; margin-bottom: 12px; }
    .art-related .np-card-body { padding: 10px 10px 12px; }
    .art-related .art-related-card-title { font-size: 14px; }
}

/* =========================================================
   Trang /About/{id} (dùng chung .art của chi tiết tin)
   ========================================================= */
/* Giữ cách hiển thị bảng của bản cũ: xuống dòng theo nội dung soạn trong WebAdmin */
.about-body table td, .about-body table th { white-space: pre-wrap; }
.about-body > *:first-child { margin-top: 0; }

/* Danh sách hướng dẫn ở cột phải */
.ab-guides { list-style: none; margin: 0; padding: 6px 0; }
.ab-guides li a {
    display: flex; align-items: flex-start; gap: 8px; padding: 9px 18px;
    color: #33405e; font-size: 14.5px; line-height: 1.45; border-left: 3px solid transparent; transition: all .2s;
}
.ab-guides li a i { color: #b0b9c9; margin-top: 3px; transition: color .2s; }
.ab-guides li a:hover { background: #f4f8fd; color: #008fe2; text-decoration: none; }
.ab-guides li a:hover i { color: #008fe2; }
.ab-guides li.active a { background: #e6f4fd; color: #174095; font-weight: 700; border-left-color: #008fe2; }
.ab-guides li.active a i { color: #008fe2; }

.ab-help-body { padding: 14px 18px 18px; }
.ab-help-body p { font-size: 14px; color: #5b6475; margin-bottom: 12px; }
.ab-help-body .svc-btn { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 8px; }

/* Nội dung soạn trong WebAdmin hay chèn font Arial + giãn dòng cố định (vd line-height: 14.4pt) → dùng font/giãn dòng chung.
   Giữ nguyên cỡ chữ inline vì người soạn có thể cố ý làm chữ to/nhỏ. */
.art-body [style*="font-family"] { font-family: inherit !important; }
.art-body [style*="line-height"] { line-height: inherit !important; }

/* =========================================================
   Trang /Service/Details/{id}
   ========================================================= */
#service-detail #article-detail .art-title { text-transform: none; text-align: left; }
.sd-groups { margin: 14px 0 0; }
/* Nội dung dán từ Word: các dòng là danh sách nên giãn đoạn ít hơn bài tin */
.sd-body p { margin: 0 0 .5em; }
.sd-body { font-size: 16px; }
.sd-cta-inline { margin-top: 24px; }
.sd-cta-inline .svc-btn { display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 11px 26px; font-size: 15px; }

/* Thẻ đăng ký cột phải */
.sd-box { border-top: 4px solid #008fe2; }
.sd-thumb { padding-top: 52%; }
.sd-box-body { padding: 18px; }
.sd-box-title { font-weight: 700; color: #174095; font-size: 16px; margin-bottom: 10px; }
.sd-register {
    display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
    padding: 13px 16px; border-radius: 10px; font-size: 16.5px; font-weight: 700; color: #fff;
    background: linear-gradient(120deg, #008fe2, #174095); box-shadow: 0 8px 20px rgba(0, 143, 226, .3);
    transition: transform .2s, box-shadow .2s;
}
.sd-register:hover { color: #fff; text-decoration: none; transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0, 143, 226, .38); }
.sd-steps { list-style: none; margin: 16px 0 0; padding: 0; }
.sd-steps li { font-size: 13.5px; color: #4a5568; padding: 4px 0; }
.sd-steps li i { color: #1e8a4c; margin-right: 8px; }
.sd-links { display: flex; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #edf0f5; }
.sd-links a { flex: 1; text-align: center; font-size: 13.5px; font-weight: 600; color: #174095; padding: 8px 6px; border-radius: 8px; background: #f4f8fd; }
.sd-links a:hover { background: #e6f4fd; color: #008fe2; text-decoration: none; }

.sd-related { margin-top: 16px; }

/* Thanh đăng ký dính cuối màn hình (điện thoại) */
.sd-mobile-bar { display: none; }
@media (max-width: 991px) {
    .sd-mobile-bar {
        display: flex; align-items: center; justify-content: space-between; gap: 12px;
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 9000;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #fff;
        box-shadow: 0 -4px 18px rgba(23, 64, 149, .15);
    }
    .sd-mobile-price small { display: block; font-size: 12px; color: #8a93a6; }
    .sd-mobile-price b { color: #e2541b; font-size: 17px; }
    .sd-mobile-btn {
        flex: 0 0 auto; padding: 11px 22px; border-radius: 10px; font-weight: 700; color: #fff;
        background: linear-gradient(120deg, #008fe2, #174095);
    }
    .sd-mobile-btn:hover { color: #fff; text-decoration: none; }
    .sd { padding-bottom: 90px; }
    .sd-cta-inline { display: none; }
}
/* Trang có thanh đăng ký dính cuối màn hình: đẩy nút chat Zalo + khung QR lên trên thanh */
@media (max-width: 991px) {
    body:has(.sd-mobile-bar) .zalo-chat-widget { bottom: 84px !important; } /* nằm trên thanh đăng ký (~70px) */
    body:has(.sd-mobile-bar) .quicktools-modal .modal-dialog { bottom: 150px !important; }
}

/* =========================================================
   Trang /FAQDetails/{id}: hỏi - đáp
   ========================================================= */
.fq-block { display: flex; gap: 14px; margin-bottom: 20px; }
.fq-badge {
    flex: 0 0 40px; height: 40px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 17px; color: #fff;
}
.fq-badge-q { background: #e2541b; }
.fq-badge-a { background: linear-gradient(135deg, #008fe2, #174095); }
.fq-block-body { flex: 1; min-width: 0; }
.fq-label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; margin: 9px 0 8px; }
.fq-question .fq-label { color: #e2541b; }
.fq-answer .fq-label { color: #008fe2; }
.fq-question .fq-block-body > div:last-child {
    padding: 14px 18px; border-radius: 0 12px 12px 12px; background: #fff6f2; border: 1px solid #fde1d5;
    font-size: 16px; line-height: 1.7; color: #33405e;
}
.fq-question .fq-block-body p { margin: 0; }
.fq-body { padding: 16px 20px; border-radius: 0 12px 12px 12px; background: #f7fafe; border: 1px solid #e3edf8; }
.fq-body > *:first-child { margin-top: 0; }
.fq-body > *:last-child { margin-bottom: 0; }

.fq-helpful {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
    margin-top: 8px; padding: 14px 18px; border-radius: 12px; background: #f4f8fd; color: #33405e; font-weight: 500;
}
.fq-helpful .svc-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; }
.fq-search { padding: 14px 18px 4px; }
.art-related .hfaq-grid > div { margin-bottom: 12px; }

@media (max-width: 575px) {
    .fq-block { gap: 10px; }
    .fq-badge { flex-basis: 32px; height: 32px; font-size: 14px; }
    .fq-body { padding: 12px 14px; }
    .fq-helpful .svc-btn { width: 100%; justify-content: center; }
}

/* =========================================================
   Trang /FAQ: tìm kiếm + accordion câu hỏi
   ========================================================= */
.fl-wrap { max-width: 900px; margin: 0 auto; }
.fl-search { background: #fff; border-radius: 14px; padding: 20px 22px 14px; box-shadow: 0 2px 14px rgba(23, 64, 149, .07); margin-bottom: 22px; }
.fl-search .search .input-group { margin-bottom: 10px !important; }
.fq-search-group .form-control { height: 48px; border-radius: 10px 0 0 10px; border-color: #dbe4f0; font-size: 15.5px; }
.fq-search-group .form-control:focus { border-color: #008fe2; box-shadow: 0 0 0 3px rgba(0, 143, 226, .15); }
.fq-search-group .btn { height: 48px; padding: 0 22px; border-radius: 0 10px 10px 0; background: #008fe2; border-color: #008fe2; font-weight: 600; }
.fq-search-group .btn:hover { background: #174095; border-color: #174095; }
.fl-status { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 14px; color: #6b7487; }
.fl-status b { color: #174095; }
.fl-status a { color: #e2541b; font-weight: 600; }

.fl-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.fl-item { background: #fff; border-radius: 12px; border: 1px solid #e6ebf3; box-shadow: 0 1px 6px rgba(23, 64, 149, .05); transition: border-color .2s, box-shadow .2s; }
.fl-item[open] { border-color: #9fd3f5; box-shadow: 0 6px 20px rgba(0, 143, 226, .12); }
.fl-item summary {
    display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer; list-style: none;
    font-weight: 700; color: #174095; font-size: 16px; line-height: 1.45;
}
.fl-item summary::-webkit-details-marker { display: none; }
.fl-item summary:hover .fl-q { color: #008fe2; }
.fl-icon {
    flex: 0 0 32px; height: 32px; border-radius: 50%; background: #e6f4fd; color: #008fe2;
    display: inline-flex; align-items: center; justify-content: center; font-size: 14px; transition: all .2s;
}
.fl-item[open] .fl-icon { background: #008fe2; color: #fff; }
.fl-q { flex: 1; transition: color .2s; }
.fl-chevron { color: #8a93a6; transition: transform .25s; }
.fl-item[open] .fl-chevron { transform: rotate(180deg); color: #008fe2; }
.fl-body { padding: 0 18px 18px 64px; color: #4a5568; font-size: 15px; line-height: 1.7; }
.fl-ask { color: #6b7487; margin-bottom: 8px; }
.fl-answer { margin-bottom: 10px; }
.fl-more { font-weight: 600; color: #008fe2; }
.fl-more i { margin-left: 6px; transition: transform .2s; }
.fl-more:hover { color: #174095; text-decoration: none; }
.fl-more:hover i { transform: translateX(3px); }
.fl-help { margin-top: 28px; }

@media (max-width: 575px) {
    .fl-search { padding: 14px 14px 10px; }
    .fl-item summary { padding: 14px; gap: 10px; font-size: 15px; }
    .fl-body { padding: 0 14px 16px 14px; }
}

/* Icon nhỏ trong nội dung (emoji copy từ Facebook...): nằm cùng dòng chữ, không tách thành khối ảnh */
.art-body img.art-icon {
    display: inline-block; width: auto; max-height: 1.4em; margin: 0 .15em; vertical-align: -0.2em;
    border-radius: 0; box-shadow: none; cursor: default;
}
.art-body .art-emoji { font-style: normal; line-height: 1; margin: 0 .1em; }
