﻿/* ============================================================================
   AN TOÀN VỆ SINH THỰC PHẨM - GIAO DIỆN NỀN TRẮNG & XANH ĐẬM CHỦ ĐẠO
   Cấu trúc module theo phong cách TuVanISO2020 (hiện đại, dễ đọc, chuẩn Mobile)
   ============================================================================ */

:root {
    --atv-primary: #0b3d7a;
    --atv-primary-dark: #072a57;
    --atv-primary-light: #1659ab;
    --atv-accent: #0ea5e9;
    --atv-bg: #ffffff;
    --atv-surface: #f8fafc;
    --atv-surface-blue: #eff6ff;
    --atv-border: #e2e8f0;
    --atv-text: #1e293b;
    --atv-muted: #64748b;
}

body {
    margin: 0;
    color: var(--atv-text);
    background-color: var(--atv-bg);
    font-family: UTMAvo, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 15.5px;
    line-height: 1.75;
}

a {
    font-weight: normal;
    color: var(--atv-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--atv-primary-light);
    text-decoration: none;
}

h1 {
    margin: 6px 0 12px 0;
    font-size: 24px !important;
    font-family: UTMAvoBold, UTMAvo, Arial, sans-serif;
    padding: 0;
    font-weight: 700;
    color: var(--atv-primary-dark);
    line-height: 1.35;
}

h2 {
    margin: 0 0 10px 0;
    padding: 8px 0;
    font-size: 20px !important;
    font-family: UTMAvoBold, UTMAvo, Arial, sans-serif;
    font-weight: 700;
    color: var(--atv-primary);
    line-height: 1.4;
}

h3 {
    margin: 0 0 8px 0;
    padding: 6px 0;
    font-size: 17px !important;
    font-family: UTMAvoBold, UTMAvo, Arial, sans-serif;
    color: var(--atv-primary-dark);
}

h4 {
    margin: 0 0 6px 0;
    padding: 6px 0;
    font-size: 15.5px !important;
    font-family: UTMAvoBold, UTMAvo, Arial, sans-serif;
    color: var(--atv-primary);
}

ul li { list-style: none; }
th, td, tr { padding: 8px 10px; }

.clearfix:before, .clearfix:after { content: " "; display: table; }
.clearfix:after { clear: both; }
.clear { clear: both; overflow: hidden; }
.text-justify { text-align: justify; }
.text-right { text-align: right; }

/* ===================== TOP BAR & HEADER ===================== */
.menuTop {
    clear: both;
    background-color: var(--atv-primary-dark);
    color: #e2e8f0;
    font-size: 13.5px;
    padding: 6px 0;
}
.menuTop ul { margin: 0; padding: 0; }
.menuTop ul li { display: inline-block; padding-right: 16px; }
.menuTop a { color: #f8fafc; }
.menuTop a:hover { color: #7dd3fc; }

.bodyWrapper {
    clear: both;
    width: 100%;
    z-index: 999;
    padding: 0;
    background-color: #ffffff;
    border-bottom: 1px solid var(--atv-border);
    box-shadow: 0 2px 10px rgba(11, 61, 122, 0.06);
}

.Header {
    min-height: auto;
    position: relative;
}

.headerTopBand {
    padding: 12px 0;
    align-items: center;
}

.Logo {
    padding: 4px 0;
}
.Logo img {
    max-height: 82px;
    width: auto;
    max-width: 100%;
}

/* Search Bar trong Header (kiểu TuVanISO2020) */
.headerSearchWrap {
    position: relative;
}
.search-block {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}
.search-block input[type="text"] {
    flex: 1;
    height: 42px;
    padding: 8px 14px;
    border: 2px solid var(--atv-primary);
    border-right: none;
    border-radius: 6px 0 0 6px;
    font-size: 14.5px;
    color: var(--atv-text);
    background-color: #fff;
    outline: none;
}
.search-block input[type="text"]:focus {
    background-color: #f8fafc;
}
.search-block input[type="submit"] {
    height: 42px;
    padding: 0 18px;
    background-color: var(--atv-primary);
    color: #fff;
    border: 2px solid var(--atv-primary);
    border-radius: 0 6px 6px 0;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.search-block input[type="submit"]:hover {
    background-color: var(--atv-primary-dark);
}

.headerHotline {
    text-align: right;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}
.headerHotline .btn-consult {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--atv-primary);
    color: #fff !important;
    padding: 9px 16px;
    border-radius: 99px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 3px 8px rgba(11, 61, 122, 0.2);
    transition: all 0.2s ease;
}
.headerHotline .btn-consult:hover {
    background-color: var(--atv-primary-dark);
    transform: translateY(-1px);
}

/* Thanh Navigation xanh đậm toàn chiều rộng */
.mnTopBar {
    width: 100%;
    background-color: var(--atv-primary);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
}
.mnTopInner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}
.mnTop {
    margin: 0;
    padding: 0;
    background-color: transparent;
}
.mnTop i, .mnTop a {
    color: #ffffff;
    font-weight: 600;
    font-size: 14.5px;
}
.mnTop a:hover {
    color: #bae6fd;
}
.stickyConsult {
    display: none;
    flex-shrink: 0;
}
.mnTopBar.is-sticky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background-color: var(--atv-primary-dark);
    box-shadow: 0 4px 16px rgba(7, 42, 87, 0.28);
}
.mnTopBar.is-sticky .stickyConsult {
    display: inline-flex;
    align-items: center;
}
.btn-consult-sticky {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #f59e0b;
    color: #0f172a !important;
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 13.5px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s ease, transform 0.2s ease;
}
.btn-consult-sticky:hover {
    background-color: #fbbf24;
    color: #0f172a !important;
    transform: translateY(-1px);
}

.menuMobile, .mobileMenu { display: none; }
.topmenu { display: none; }

.btnZalo {
    background: linear-gradient(90deg, #0ea5e9 0%, #0284c7 100%);
    border: 0;
    padding: 4px 12px !important;
    border-radius: 99px;
    margin: 5px 0 5px 10px;
}
.btnZalo a { color: #fff !important; font-weight: 600; }
.btnZalo a:hover { color: #e0f2fe !important; }

/* ===================== MAIN BODY & BREADCRUMBS ===================== */
.bodyCenter {
    clear: both;
    overflow: hidden;
    margin: auto;
    padding: 18px 0 32px 0;
    background-color: var(--atv-bg);
}

.breadcrumbs {
    clear: both;
    color: var(--atv-muted);
    padding: 10px 14px;
    margin: 0 0 18px 0;
    width: 100%;
    font-size: 13.5px;
    background-color: var(--atv-surface);
    border: 1px solid var(--atv-border);
    border-radius: 6px;
}
.breadcrumbs a {
    color: var(--atv-primary);
    font-weight: 500;
}
.breadcrumbs a:hover {
    color: var(--atv-primary-light);
    text-decoration: underline;
}

/* ===================== HOME MODULES (KIỂU TUVANISO2020) ===================== */
.hIntro {
    clear: both;
    overflow: hidden;
    background-color: var(--atv-surface);
    border: 1px solid var(--atv-border);
    border-radius: 10px;
    padding: 28px 24px;
    margin-bottom: 28px;
}
.hIntro h1 {
    text-align: center;
    color: var(--atv-primary-dark);
    text-transform: uppercase;
    margin-bottom: 14px;
}
.hIntro .nContent {
    max-width: 960px;
    margin: 0 auto;
    color: var(--atv-text);
}

.hIdea {
    clear: both;
    background-color: var(--atv-surface-blue);
    border-left: 5px solid var(--atv-primary);
    border-radius: 8px;
    overflow: hidden;
    color: var(--atv-text);
    padding: 22px 24px;
    margin-bottom: 28px;
    line-height: 1.7;
}
.hIdea h2, .hIdea h3 {
    color: var(--atv-primary-dark);
}

.hGuide {
    clear: both;
    overflow: hidden;
    color: #fff;
    margin-bottom: 32px;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(11, 61, 122, 0.12);
    background-color: var(--atv-primary);
}
.hGuide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hGuide .bg-primary {
    background-color: var(--atv-primary) !important;
    padding: 26px 28px;
}
.hGuide h2 {
    color: #ffffff;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.hGuide p { color: #e2e8f0; }
.hGuide a { color: #fff; }
.hGuide .btn-warning {
    background-color: #f59e0b;
    border-color: #f59e0b;
    font-weight: 600;
    border-radius: 6px;
    padding: 8px 20px;
}
.hGuide .btn-warning a { color: #0f172a; font-weight: 700; }
.hGuide .btn-warning:hover { background-color: #d97706; }

.hAdver, .adFooter, .adRight, .adDetail {
    clear: both;
    text-align: center;
    margin: 14px 0;
}
.hAdver img, .adDetail img, .adRight img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

/* ===================== BOXES & HEADINGS ===================== */
.pBox {
    clear: both;
    margin: 0 0 24px 0;
    padding: 0;
}
.pBox .title {
    border-bottom: 2px solid var(--atv-primary);
    margin-bottom: 16px;
    padding-bottom: 6px;
}
.pBox .title h1, .pBox .title h2 {
    color: var(--atv-primary-dark);
    padding: 4px 0;
    margin: 0;
    font-size: 22px !important;
    text-transform: uppercase;
}
.pBox .content {
    padding: 0;
    line-height: 1.75;
}
.pBox .desc {
    clear: both;
    text-align: justify;
    font-size: 15px;
    color: var(--atv-muted);
    padding-bottom: 14px;
}
.desc img { max-height: 60px; float: left; margin-right: 12px; border-radius: 4px; }

.pBoxFull {
    overflow: hidden;
    clear: both;
    margin-bottom: 28px;
}
.pBoxFull .title {
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--atv-primary);
    overflow: hidden;
    color: var(--atv-primary-dark);
    font-weight: 700;
}
.pBoxFull .title a {
    color: var(--atv-primary-dark);
    font-size: 19px;
    font-weight: 700;
    text-transform: uppercase;
}
.pBoxFull .title a:hover { color: var(--atv-primary-light); }
.pBoxFull .content { clear: both; line-height: 1.75; padding: 0; }

/* ===================== NEWS CARDS (NỀN TRẮNG + VIỀN NHẸ) ===================== */
.newsItem {
    overflow: hidden;
    padding: 16px;
    background-color: #ffffff;
    border: 1px solid var(--atv-border);
    border-radius: 8px;
    text-align: left;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.newsItem:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(11, 61, 122, 0.1);
    border-color: #93c5fd;
}
.newsItem img {
    width: 100%;
    height: 175px;
    object-fit: cover;
    margin-bottom: 12px;
    border-radius: 6px;
}
.newsItem .title {
    width: 100%;
    text-align: left;
    min-height: 52px;
    overflow: hidden;
    padding: 0 0 6px 0;
    font-family: UTMAvoBold, UTMAvo, Arial, sans-serif;
}
.newsItem .title a {
    font-size: 16px;
    font-weight: 700;
    color: var(--atv-primary-dark);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.newsItem .title a:hover { color: var(--atv-primary-light); }
.newsItem .desc {
    width: 100%;
    overflow: hidden;
    text-align: justify;
    font-size: 14px;
    color: var(--atv-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* ===================== RIGHT SIDEBAR (KIỂU TUVANISO2020) ===================== */
.Right { padding-top: 0; }
.leftBoxContainer {
    margin: 0 0 24px 0;
    padding: 0;
    position: relative;
    background-color: #ffffff;
    border: 1px solid var(--atv-border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}
h3.leftBoxHeading {
    color: #ffffff;
    background-color: var(--atv-primary);
    text-transform: uppercase;
    font-size: 15px !important;
    font-weight: 700;
    padding: 11px 16px;
    margin: 0;
    border-bottom: none;
}
h3.leftBoxHeading a { color: #ffffff; font-weight: 700; }
h3.leftBoxHeading a:hover { color: #bae6fd; }
.leftBoxContent {
    clear: both;
    padding: 12px 16px;
}
.leftBoxContent ul { padding: 0 !important; margin: 0 !important; }
.mnLeftItem {
    clear: both;
    padding: 8px 4px 8px 18px;
    border-bottom: 1px dashed var(--atv-border);
    background: url(../../images/arrow.gif) no-repeat 4px center;
}
.mnLeftItem:last-child { border-bottom: none; }
.mnLeftItem a { color: var(--atv-text); font-weight: 500; font-size: 14.5px; }
.mnLeftItem a:hover { color: var(--atv-primary); }

.rightNew ul li, .rightRadom ul li, ul.rightHotNews li {
    clear: both;
    width: 100%;
    padding: 9px 0;
    border-bottom: 1px dashed var(--atv-border);
    overflow: hidden;
    font-size: 14.5px;
}
.rightNew ul li:last-child, ul.rightHotNews li:last-child { border-bottom: none; }
.rightNew ul li img, ul.rightHotNews img {
    width: 72px;
    height: 54px;
    object-fit: cover;
    float: left;
    margin: 0 10px 4px 0;
    border-radius: 4px;
}

/* ===================== ARTICLE DETAIL & EEAT ===================== */
.centerBoxWrapper {
    margin: 0 0 24px 0;
    clear: both;
    padding: 20px;
    position: relative;
    background-color: #ffffff;
    border: 1px solid var(--atv-border);
    border-radius: 8px;
}
.centerBoxWrapper h2, h3.centerBoxHeading {
    font-weight: 700;
    color: var(--atv-primary-dark);
    border-bottom: 2px solid var(--atv-primary);
    padding-bottom: 8px;
    margin-bottom: 14px;
    text-transform: uppercase;
}
.scrollWrapper { clear: both; padding: 0; overflow: hidden; }

.nDetail { clear: both; }
h1.nTitle {
    text-align: left;
    font-size: 25px !important;
    padding: 0 0 10px 0;
    color: var(--atv-primary-dark);
    border-bottom: 2px solid var(--atv-surface-blue);
}
.nIntro {
    font-weight: 600;
    font-size: 16px;
    clear: both;
    text-align: justify;
    color: #334155;
    background-color: var(--atv-surface);
    padding: 14px 16px;
    border-left: 4px solid var(--atv-primary);
    border-radius: 0 6px 6px 0;
    margin: 12px 0 18px 0;
}
.nDate {
    text-align: right;
    clear: both;
    color: var(--atv-muted);
    padding: 6px 0;
    font-size: 13.5px;
}
.nContent {
    text-align: justify;
    line-height: 1.8;
    padding: 10px 0;
    color: var(--atv-text);
}
.nContent img {
    max-width: 100%;
    height: auto;
    margin: 12px auto;
    display: block;
    border-radius: 6px;
}
.nContent a { color: var(--atv-primary-light); font-weight: 500; }
.nContent a:hover { text-decoration: underline; }
.nContent ul, .nContent ol { padding-left: 22px; margin-bottom: 14px; }
.nContent ul li { list-style: disc; margin-bottom: 6px; }
.nContent table, .nGallery table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
    border: 1px solid var(--atv-border);
}
.nContent thead tr, .nGallery thead tr {
    background-color: var(--atv-primary);
    color: #fff;
}
.nContent td, .nGallery td {
    border: 1px solid var(--atv-border);
    padding: 8px 10px;
}

.mucLuc { clear: both; overflow: hidden; margin-bottom: 20px; }
.mucLuc .table-of-contents {
    padding: 14px 18px;
    background-color: var(--atv-surface-blue);
    border: 1px solid #bfdbfe;
    border-left: 4px solid var(--atv-primary);
    border-radius: 6px;
}
.mucLuc .table-of-contents h2 {
    font-size: 16px !important;
    margin-bottom: 8px;
    padding: 0;
    color: var(--atv-primary-dark);
}
.mucLuc ul { padding: 0; margin: 0; }
.mucLuc .table-of-contents li { padding: 3px 0 3px 10px; list-style: none; }
.mucLuc .table-of-contents a { color: var(--atv-primary); font-weight: 500; }
.mucLuc .table-of-contents a:hover { text-decoration: underline; }

.eeat-author-box {
    background-color: var(--atv-surface) !important;
    border: 1px solid var(--atv-border) !important;
    border-left: 4px solid var(--atv-primary) !important;
    border-radius: 8px !important;
}

.nTitleOther {
    clear: both;
    padding: 6px 0 6px 8px;
    border-bottom: 1px dashed var(--atv-border);
}
.nTitleOther:last-child { border-bottom: none; }
.nTitleOther a { color: var(--atv-text); font-weight: 500; }
.nTitleOther a:hover { color: var(--atv-primary); }

.nAuthor, .nSource, .nButton { clear: both; text-align: right; padding: 5px; }

/* Pagination */
.pagination { margin-top: 20px; }
.pagination .page-link { color: var(--atv-primary); border-color: var(--atv-border); }
.pagination li.current a {
    background-color: var(--atv-primary);
    color: #ffffff;
    border-color: var(--atv-primary);
    font-weight: 700;
}

/* Search Autocomplete */
.search-autocomplete {
    position: absolute;
    background: #fff;
    width: 100%;
    border: 1px solid var(--atv-border);
    border-top: 2px solid var(--atv-primary);
    border-radius: 0 0 6px 6px;
    display: none;
    box-shadow: 0 10px 25px rgba(11, 61, 122, 0.14);
    z-index: 9999;
    top: 44px;
    left: 0;
    padding: 8px 0;
}
p.ps-item { clear: both; text-align: left; padding: 8px 12px; margin: 0; }
p.ps-item:hover { background-color: var(--atv-surface-blue); }
p.ps-item img { float: left; margin-right: 10px; border-radius: 4px; }
p.ps-item .post-date { color: var(--atv-muted); font-size: 12px; }
.search-block .result {
    clear: both;
    text-align: left;
    border-top: 1px solid var(--atv-border);
    padding: 8px 12px;
}
.search-block span#result_close {
    cursor: pointer;
    float: right;
    font-size: 12px;
    color: #fff;
    background: var(--atv-primary);
    padding: 4px 10px;
    border-radius: 4px;
}

/* FAQ & Notes */
.nNote {
    clear: both;
    padding: 14px 16px;
    margin: 0 0 12px 0;
    background-color: var(--atv-surface);
    border: 1px solid var(--atv-border);
    font-style: italic;
    font-size: 14px;
    border-radius: 6px;
}
.nQuestion, .nFAQ { clear: both; margin-bottom: 20px; overflow: hidden; }
.fContent { margin-bottom: 15px; clear: both; }
blockquote {
    padding: 12px 20px;
    margin: 0 0 18px;
    font-size: 16px;
    border-left: 4px solid var(--atv-primary);
    background-color: var(--atv-surface);
}

/* ===================== FOOTER (XANH ĐẬM CHUYÊN NGHIỆP) ===================== */
.Footer {
    clear: both;
    color: #e2e8f0;
    padding: 36px 0 24px 0;
    overflow: hidden;
    background-color: var(--atv-primary-dark);
    border-top: 4px solid var(--atv-primary-light);
}
.Footer a { color: #f1f5f9; }
.Footer a:hover { color: #7dd3fc; }
.FooterCopyright {
    clear: both;
    width: 100%;
    padding: 8px 0;
    font-size: 14px;
    line-height: 1.75;
}
.FooterCopyright h2, .FooterCopyright h3 {
    color: #ffffff;
    font-size: 17px !important;
    padding: 4px 0;
}
.FooterCopyright ul { margin: 0; padding: 0; }

.rSocial { position: fixed; bottom: 70px; right: 12px; z-index: 999; }
.rSocial ul { margin: 0; padding: 0; }
.rSocial ul li { padding: 3px 0; clear: both; text-align: right; }
.rSocial ul li img { max-width: 46px; border-radius: 50%; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2); }

.Error-box {
    color: #b91c1c;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 12px;
}
