/* =====================================================================================
 * Theme dienbien - raovat.ctsdienbien.vn (dựa trên NukeViet Default, nạp sau style.css)
 * Thiết kế: docs/THIET-KE-GIAO-DIEN.md
 * ===================================================================================== */

/* ---------- Font Be Vietnam Pro (OFL, tự lưu trữ) ---------- */
@font-face { font-family: 'Be Vietnam Pro'; font-style: normal; font-display: swap; font-weight: 400; src: url(../fonts/bevietnampro/be-vietnam-pro-vietnamese-400-normal.woff2) format('woff2'); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: 'Be Vietnam Pro'; font-style: normal; font-display: swap; font-weight: 400; src: url(../fonts/bevietnampro/be-vietnam-pro-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Be Vietnam Pro'; font-style: normal; font-display: swap; font-weight: 500; src: url(../fonts/bevietnampro/be-vietnam-pro-vietnamese-500-normal.woff2) format('woff2'); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: 'Be Vietnam Pro'; font-style: normal; font-display: swap; font-weight: 500; src: url(../fonts/bevietnampro/be-vietnam-pro-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Be Vietnam Pro'; font-style: normal; font-display: swap; font-weight: 600; src: url(../fonts/bevietnampro/be-vietnam-pro-vietnamese-600-normal.woff2) format('woff2'); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: 'Be Vietnam Pro'; font-style: normal; font-display: swap; font-weight: 600; src: url(../fonts/bevietnampro/be-vietnam-pro-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Be Vietnam Pro'; font-style: normal; font-display: swap; font-weight: 700; src: url(../fonts/bevietnampro/be-vietnam-pro-vietnamese-700-normal.woff2) format('woff2'); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: 'Be Vietnam Pro'; font-style: normal; font-display: swap; font-weight: 700; src: url(../fonts/bevietnampro/be-vietnam-pro-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* ---------- Biến thiết kế ---------- */
:root {
    --db-green: #1b7a3d;
    --db-green-dark: #135c2d;
    --db-green-soft: #e7f4ec;
    --db-blue: #0d47a1;
    --db-accent: #f26b1d;
    --db-accent-dark: #d4550b;
    --db-price: #c2410c;
    --db-bg: #f3f6f4;
    --db-surface: #ffffff;
    --db-border: #e2e8e4;
    /* Nền nhấn cho thanh breadcrumb và tiêu đề khối: xanh nhạt chuyển trắng, góc phải ánh vàng nhạt (cùng màu gạch chân menu) */
    --db-tint: radial-gradient(160px 70px at 100% 0, rgba(255, 210, 122, .32), rgba(255, 210, 122, 0) 70%), linear-gradient(100deg, #d7ede0 0%, #e7f4ec 42%, #f6fbf8 100%);
    --db-tint-border: #cbe4d4;
    --db-text: #1f2a24;
    --db-muted: #5f6f66;
    --db-radius: 14px;
    --db-radius-sm: 10px;
    --db-shadow: 0 1px 2px rgba(16, 40, 24, .06), 0 4px 14px rgba(16, 40, 24, .06);
    --db-shadow-hover: 0 4px 10px rgba(16, 40, 24, .08), 0 14px 32px rgba(16, 40, 24, .12);
    --db-ease: cubic-bezier(.2, .8, .2, 1);
    --db-header-h: 68px;
}

/* ---------- Nền tảng ---------- */
html { scroll-behavior: smooth; }
/* style.css gốc đặt html, body { height: 100% } làm đầu trang sticky chỉ dính trong 1 màn hình đầu */
html, body { height: auto !important; }
body { min-height: 100vh; }
body {
    font-family: 'Be Vietnam Pro', 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--db-text);
    background: var(--db-bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4 { font-family: inherit; font-weight: 700; color: var(--db-text); letter-spacing: -.01em; }
a { color: var(--db-blue); transition: color .16s var(--db-ease); }
a:hover, a:focus { color: var(--db-green-dark); }
:focus-visible { outline: 3px solid rgba(242, 107, 29, .55); outline-offset: 2px; }
img { max-width: 100%; }
::selection { background: rgba(27, 122, 61, .18); }
.wraper { width: 100%; max-width: 1240px; padding: 0 16px; }
.section-body { padding-top: 18px; }

.db-skip { position: absolute; left: 12px; top: -60px; z-index: 2000; background: var(--db-accent); color: #fff; padding: 8px 14px; border-radius: 0 0 10px 10px; transition: top .2s; }
.db-skip:focus { top: 0; color: #fff; }

/* ---------- Nút ---------- */
.btn { border-radius: var(--db-radius-sm); font-weight: 600; transition: transform .12s var(--db-ease), box-shadow .16s var(--db-ease), background-color .16s, border-color .16s, color .16s; }
/* style.css của NukeViet đặt a.btn { color: #fff } cho nút nền màu => nút nền sáng dạng liên kết bị chữ trắng trên nền trắng */
a.btn-default { color: var(--db-text); border-color: #d5ded8; }
a.btn-default:hover, a.btn-default:focus { color: var(--db-green-dark); background: var(--db-green-soft); border-color: var(--db-green); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--db-green); border-color: var(--db-green); }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active { background: var(--db-green-dark) !important; border-color: var(--db-green-dark) !important; }
.btn-success { background: var(--db-green); border-color: var(--db-green); }
.btn-lg { border-radius: 12px; padding: 12px 22px; }
.form-control { border-radius: var(--db-radius-sm); border-color: var(--db-border); box-shadow: none; height: 40px; transition: border-color .16s, box-shadow .16s; }
textarea.form-control { height: auto; }
.form-control:focus { border-color: var(--db-green); box-shadow: 0 0 0 3px rgba(27, 122, 61, .15); }

.db-btn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 999px; font-weight: 600; font-size: 14px; white-space: nowrap; text-decoration: none !important; border: 1px solid transparent; transition: transform .12s var(--db-ease), background-color .16s, color .16s, box-shadow .16s; }
.db-btn:active { transform: scale(.96); }
.db-btn--accent { background: var(--db-accent); color: #fff !important; box-shadow: 0 6px 16px rgba(242, 107, 29, .28); }
.db-btn--accent:hover, .db-btn--accent:focus { background: var(--db-accent-dark); color: #fff; }
.db-btn--ghost { background: var(--db-green-soft); color: var(--db-green-dark) !important; }
.db-btn--ghost:hover { background: #d6ecdf; }
.db-btn--light { background: rgba(255, 255, 255, .12); color: #fff !important; border-color: rgba(255, 255, 255, .35); }
.db-btn--light:hover { background: rgba(255, 255, 255, .22); }

/* ---------- Đầu trang dính ---------- */
.db-header { position: sticky; top: 0; z-index: 1030; background: var(--db-surface); box-shadow: 0 1px 0 var(--db-border); transition: box-shadow .2s var(--db-ease); }
.db-header.is-scrolled { box-shadow: 0 6px 24px rgba(16, 40, 24, .10); }
.db-header__inner { display: flex; align-items: center; gap: 18px; height: var(--db-header-h); transition: height .2s var(--db-ease); }
.db-header.is-scrolled .db-header__inner { height: 58px; }
.db-logo { flex: 0 0 auto; }
.db-logo img { display: block; height: 50px; width: auto; transition: height .2s var(--db-ease); }
.db-header.is-scrolled .db-logo img { height: 42px; }
.db-search { position: relative; flex: 1 1 auto; max-width: 560px; display: flex; align-items: center; background: #f1f4f2; border: 1px solid var(--db-border); border-radius: 999px; padding: 4px 4px 4px 40px; transition: border-color .16s, box-shadow .16s, background-color .16s; }
.db-search:focus-within { background: #fff; border-color: var(--db-green); box-shadow: 0 0 0 3px rgba(27, 122, 61, .14); }
.db-search__icon { position: absolute; left: 15px; color: var(--db-muted); }
.db-search .form-control { flex: 1; border: 0; background: transparent; height: 36px; padding: 0 6px; box-shadow: none !important; }
.db-search .btn { height: 36px; border-radius: 999px; background: var(--db-green); color: #fff; border: 0; padding: 0 18px; }
.db-search .btn:hover { background: var(--db-green-dark); color: #fff; }
.db-search.has-error, .db-search .has-error { border-color: #e53935; }
.db-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.db-actions .personalArea { padding: 0; }
.personalArea .pa, .personalArea a.button { display: inline-flex !important; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; background: var(--db-green-soft); color: var(--db-green-dark) !important; transition: background-color .16s, transform .12s; }
.personalArea .pa:hover { background: #d6ecdf; }
.personalArea .pa img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.right-ads-wrap:empty { display: none; }

/* Menu chính */
.db-nav { background: var(--db-green); }
.db-nav .second-nav { margin: 0; }
#menusite .navbar-default { background: transparent; border: 0; border-radius: 0; min-height: 0; margin: 0; z-index: 2; }
#menusite .navbar-default .navbar-nav > li { margin: 0; }
#menusite .navbar-default .navbar-nav > li > a { position: relative; color: rgba(255, 255, 255, .92); font-weight: 600; font-size: 14.5px; padding: 12px 15px; background: transparent; transition: color .16s, background-color .16s; }
#menusite .navbar-default .navbar-nav > li > a::after { content: ''; position: absolute; left: 15px; right: 15px; bottom: 6px; height: 3px; border-radius: 3px; background: #ffd27a; transform: scaleX(0); transform-origin: left; transition: transform .22s var(--db-ease); }
#menusite .navbar-default .navbar-nav > li > a:hover::after, #menusite .navbar-default .navbar-nav > .active > a::after { transform: scaleX(1); }
#menusite .navbar-default .navbar-nav > li > a:hover,
#menusite .navbar-default .navbar-nav > li > a:focus,
#menusite .navbar-default .navbar-nav > .active > a,
#menusite .navbar-default .navbar-nav > .active > a:hover,
#menusite .navbar-default .navbar-nav > .active > a:focus,
#menusite .navbar-default .navbar-nav > .open > a { background: rgba(255, 255, 255, .08) !important; color: #fff !important; }
#menusite .dropdown-menu { border: 0; border-radius: 12px; box-shadow: var(--db-shadow-hover); padding: 6px; }
#menusite .dropdown-menu > li > a { border-radius: 8px; padding: 8px 12px; }

/* ---------- Breadcrumbs: thanh nền nhấn, mục đầu có biểu tượng nhà, trang đang xem nổi thành nhãn trắng ----------
   Thay kiểu mũi tên xám của style.css; các mục do nvbreadcrumbs() (js/main.js) dựng lại, mục không vừa chuyển vào .subs-breadcrumbs */
.db-breadcrumbs { margin: 0 0 14px; }
.db-breadcrumbs .breadcrumbs-wrap { background: var(--db-tint); border: 1px solid var(--db-tint-border); border-radius: 12px; padding: 0 8px; }
.db-breadcrumbs .breadcrumbs-wrap .display { height: 44px; display: flex; align-items: center; }
.db-breadcrumbs .breadcrumbs { display: flex; align-items: center; margin: 0; padding: 0; }
.db-breadcrumbs .breadcrumbs li { float: none; margin: 0; display: flex; align-items: center; white-space: nowrap; }
.db-breadcrumbs .breadcrumbs li + li::before { content: '\f105'; font: normal 15px/1 FontAwesome; color: #8db39a; margin: 0 3px; }
.db-breadcrumbs .breadcrumbs a { float: none; background: none; padding: 6px 11px; border-radius: 8px; color: var(--db-muted); font-size: 13.5px; font-weight: 600; line-height: 1.35; transition: background-color .16s, color .16s; }
.db-breadcrumbs .breadcrumbs a::before, .db-breadcrumbs .breadcrumbs a::after, .db-breadcrumbs .show-subs-breadcrumbs::after { content: none; }
.db-breadcrumbs .breadcrumbs a:hover, .db-breadcrumbs .breadcrumbs a:focus { background: rgba(27, 122, 61, .1); color: var(--db-green-dark); }
/* #brcr_0 là mục Trang nhất (nvbreadcrumbs đánh số theo vị trí); khi thanh không đủ chỗ, mục này nằm trong .subs-breadcrumbs */
.db-breadcrumbs .breadcrumbs #brcr_0 a span::before { content: '\f015'; font: normal 15px/1 FontAwesome; margin-right: 6px; color: var(--db-green); }
.db-breadcrumbs .breadcrumbs li:last-child:not(#brcr_0) a { background: #fff; color: var(--db-green-dark); box-shadow: 0 1px 3px rgba(16, 40, 24, .1); }
.db-breadcrumbs .show-subs-breadcrumbs { float: none; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; margin: 0 4px 0 0; border-radius: 8px; background: #fff; color: var(--db-green-dark); }
.db-breadcrumbs .show-subs-breadcrumbs:hover { background: var(--db-green-soft); }
.db-breadcrumbs .subs-breadcrumbs { top: 48px; background: #fff; border: 1px solid var(--db-border); border-radius: 12px; box-shadow: var(--db-shadow-hover); overflow: hidden; }
.db-breadcrumbs .subs-breadcrumbs li { background: #fff; }
.db-breadcrumbs .subs-breadcrumbs a { color: var(--db-text); }
.db-breadcrumbs .subs-breadcrumbs a:hover { background: var(--db-green-soft); color: var(--db-green-dark); }

/* ---------- Khối (block) cột phải: tiêu đề khối dùng cùng nền nhấn với breadcrumb ---------- */
.panel { border: 1px solid var(--db-border); border-radius: var(--db-radius); box-shadow: var(--db-shadow); overflow: hidden; }
.panel-primary { border-color: var(--db-border); }
/* style.css gắn nền xám cho .panel-heading bằng background-image !important nên phải ghi đè cùng mức */
.panel-primary > .panel-heading, .panel-default > .panel-heading, .panel-success > .panel-heading { background-color: var(--db-green-soft); background-image: var(--db-tint) !important; color: var(--db-green-dark); border-bottom: 1px solid var(--db-tint-border); font-weight: 700; font-size: 15.5px; padding: 13px 16px; }
.panel-heading h2, .panel-heading h3, .panel-heading h4 { color: inherit; }
/* Hộp ghi chú (.well, ví dụ lời mở đầu trang Liên hệ): nền xanh rất nhạt thay nền xám */
.well { background: #f4f9f6; border: 1px solid #dcebe1; border-radius: 12px; box-shadow: none; }
.panel-primary > .panel-heading::before { content: ''; display: inline-block; width: 4px; height: 18px; border-radius: 2px; background: linear-gradient(180deg, #2fa45c, var(--db-green-dark)); box-shadow: 0 0 0 3px rgba(27, 122, 61, .12); margin-right: 10px; vertical-align: -3px; }
.panel-heading a { color: inherit; }

/* ---------- Chân trang ---------- */
/* style.css tô chân trang xanh dương, chữ xám bằng #footer (ưu tiên cao hơn lớp) nên ghi đè cùng mức #footer.db-footer */
#footer.db-footer { margin-top: 36px; background: #10331d linear-gradient(160deg, #134d2a 0%, #0f2d1b 70%); border: 0; color: rgba(255, 255, 255, .78); padding: 40px 0 10px; }
#footer.db-footer a { color: #fff; }
#footer.db-footer a:hover { color: #ffd27a; }
#footer.db-footer .menu li a { border-bottom-color: rgba(255, 255, 255, .18); }
#footer.db-footer .menu li a:hover { border-bottom-color: #ffd27a; }
#footer.db-footer .menu li a:hover::before { color: #ffd27a; }
/* Nút QR-code, lượt truy cập: bỏ màu xanh dương của .btn-primary.active (Bootstrap); chữ phải !important vì nút có lớp .text-black */
#footer.db-footer .qr-code-wraper .btn { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22); color: #fff !important; box-shadow: none; padding: 3px 10px; border-radius: 999px; }
#footer.db-footer .qr-code-wraper .btn:hover, #footer.db-footer .qr-code-wraper .btn:focus { background: rgba(255, 255, 255, .2) !important; border-color: rgba(255, 255, 255, .35) !important; color: #fff; }
.db-footer__logo img { height: 52px; width: auto; filter: brightness(0) invert(1); opacity: .95; margin-bottom: 12px; }
.db-footer__about p { line-height: 1.7; max-width: 640px; }
.db-footer__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.db-footer h3, .db-footer .panel-heading, .db-footer .h3 { color: #fff; font-size: 16px; }
.db-footer .panel, .db-footer .panel-heading, .db-footer .panel-body { background: transparent; border: 0; box-shadow: none; color: inherit; padding-left: 0; padding-right: 0; }
.db-footer .panel-heading { background-image: none !important; }
.db-footer ul { padding-left: 0; list-style: none; }
.db-footer ul li { padding: 3px 0; }
.db-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 18px; padding-top: 14px; font-size: 13.5px; }
/* Khối "Sản phẩm của CTS" (freecontent, vị trí [FEATURED_PRODUCT]): thẻ gọn để cột phải cao xấp xỉ hai cột bên cạnh.
   Ảnh bìa nhỏ bên trái; tên và nút "Xem chi tiết" bên phải; đoạn giới thiệu cắt 3 dòng ở dưới; danh sách phân hệ (ul) ẩn, xem ở trang sản phẩm.
   .db-product__text dùng display: contents để đoạn văn, nút trong mô tả (soạn ở quản trị) xếp thẳng vào lưới của thẻ.
   Dùng tiền tố #footer vì style.css đặt màu chữ, lề đoạn văn của chân trang bằng #footer */
#footer .db-product { max-width: 440px; margin-bottom: 14px; }
#footer .db-product__item { display: grid; grid-template-columns: 148px minmax(0, 1fr); grid-template-areas: "media title" "media more" "text text"; gap: 8px 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--db-radius); padding: 12px; }
#footer .db-product__item + .db-product__item { margin-top: 12px; }
#footer .db-product__media { grid-area: media; display: block; align-self: start; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: #0b1a2e; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); }
#footer .db-product__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
#footer .db-product__title { grid-area: title; margin: 0; font-size: 14.5px; font-weight: 700; line-height: 1.4; color: #fff; text-wrap: balance; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
#footer .db-product__title a { color: #fff; }
#footer .db-product__title a:hover { color: #ffd27a; }
#footer .db-product__text { display: contents; }
#footer .db-product__text > * { grid-column: 1 / -1; margin: 0; }
#footer .db-product__text > p:first-child { grid-area: text; font-size: 13px; line-height: 1.55; color: rgba(255, 255, 255, .72); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
#footer .db-product__text > ul { display: none; }
#footer .db-product__text > p:last-child:not(:first-child) { grid-area: more; align-self: end; }
#footer .db-product__text > p:last-child:not(:first-child) a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 13px; border-radius: 999px; background: var(--db-accent); color: #fff; font-size: 13px; font-weight: 600; text-decoration: none; box-shadow: 0 4px 12px rgba(242, 107, 29, .3); transition: background-color .16s; }
#footer .db-product__text > p:last-child:not(:first-child) a::after { content: '\f08e'; font: normal 11px/1 FontAwesome; }
#footer .db-product__text > p:last-child:not(:first-child) a:hover { background: var(--db-accent-dark); color: #fff; }
/* Điện thoại hẹp: cột chữ cạnh ảnh không đủ cho nút, chuyển nút xuống cuối thẻ */
@media (max-width: 479.98px) {
    #footer .db-product__item { grid-template-columns: 116px minmax(0, 1fr); grid-template-areas: "media title" "text text" "more more"; gap: 10px 12px; }
    #footer .db-product__title { align-self: center; }
}
@media (prefers-reduced-motion: no-preference) {
    #footer .db-product__media img { transition: transform .45s var(--db-ease); }
    #footer .db-product__media:hover img { transform: scale(1.04); }
}
.footerNav2 { background: #0b2414; border: 0; }
.bttop a { width: 44px; height: 44px; border-radius: 50%; background: var(--db-accent) !important; color: #fff !important; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(0, 0, 0, .2); }

/* ---------- Thanh điều hướng đáy (điện thoại) ---------- */
.db-tabbar { display: none; }

/* ---------- Hiệu ứng xuất hiện ---------- */
.db-reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s var(--db-ease), transform .5s var(--db-ease); }
.db-reveal.is-visible { opacity: 1; transform: none; }
img.db-fade { opacity: 0; transition: opacity .4s var(--db-ease); }
img.db-fade.is-loaded { opacity: 1; }

/* ---------- Tin tức (module news) ---------- */
.news_column .panel-body, .news-gird .thumbnail, .viewcat_grid_new .thumbnail { border-radius: var(--db-radius); }
.thumbnail { border: 1px solid var(--db-border); border-radius: var(--db-radius); box-shadow: var(--db-shadow); overflow: hidden; padding: 0; transition: transform .2s var(--db-ease), box-shadow .2s var(--db-ease); }
.thumbnail:hover { transform: translateY(-3px); box-shadow: var(--db-shadow-hover); }
.thumbnail .caption { padding: 12px 14px; }
.news_column .panel-body.featured { padding: 16px; }
.news_column .featured .imghome { float: none !important; width: 100% !important; max-width: none; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border: 0; padding: 0; border-radius: 12px; margin: 0 0 14px; }
.news_column .featured h2 { font-size: 22px; line-height: 1.35; margin-top: 0; }
.news_column .featured h2 a { color: var(--db-text); }
.thumbnail img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .45s var(--db-ease); }
.thumbnail:hover img { transform: scale(1.04); }
.thumbnail .caption h3, .thumbnail .caption h4 { font-size: 15.5px; line-height: 1.4; }
.thumbnail .caption a { color: var(--db-text); }
.bodytext { font-size: 16.5px; line-height: 1.8; }
.bodytext h2 { font-size: 21px; margin-top: 26px; }
.bodytext li { margin-bottom: 6px; }
.news-sources { font-size: 14px; }
.image-caption, .bodytext .image-caption { font-size: 13px; color: var(--db-muted); }
.bodytext figure { max-width: 760px; margin: 22px auto; }
.bodytext figure img { display: block; width: 100%; height: auto; }
.bodytext figure img, .bodytext img { border-radius: 12px; max-width: 100%; height: auto; }
.bodytext figcaption, .bodytext .image-caption { font-size: 13px; color: var(--db-muted); text-align: center; margin-top: 6px; }
.news-detail .title, .news_column h1 { font-size: 28px; line-height: 1.3; }

/* ---------- Điện thoại / máy tính bảng ---------- */
@media (max-width: 991.98px) {
    .db-header__inner { gap: 12px; }
    .db-actions .db-btn--ghost { display: none !important; }
    .db-footer__about { margin-bottom: 22px; }
}

@media (max-width: 767.98px) {
    :root { --db-header-h: 56px; }
    body { font-size: 15px; padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
    .db-header__inner { position: relative; flex-wrap: wrap; height: auto; padding-top: 6px; padding-bottom: 8px; gap: 6px 10px; }
    .db-header.is-scrolled .db-header__inner { height: auto; }
    .db-logo { order: 1; flex: 1 1 auto; text-align: center; height: 44px; display: flex; align-items: center; justify-content: center; }
    .db-logo img, .db-header.is-scrolled .db-logo img { height: 40px; }
    .db-actions { order: 2; position: absolute; right: 12px; top: 7px; }
    .personalArea .pa, .personalArea a.button { width: 40px; height: 40px; }
    .db-search { order: 3; flex: 1 1 100%; max-width: none; transition: max-height .2s var(--db-ease), opacity .2s, margin .2s; max-height: 60px; }
    .db-header.is-scrolled .db-search { max-height: 0; opacity: 0; padding-top: 0; padding-bottom: 0; border-width: 0; overflow: hidden; margin: -6px 0 0; }
    .db-search .btn { padding: 0 14px; }

    /* Menu: nút ☰ góc trái đầu trang, danh sách thả xuống */
    .db-nav { background: transparent; height: 0; }
    .db-nav > .wraper { position: static; }
    .second-nav { position: absolute; left: 0; top: 0; width: 100%; height: 0; }
    #menusite .navbar-default { background: transparent; }
    #menusite .navbar-toggle { top: 8px; left: 12px; margin: 0; width: 42px; height: 40px; padding: 10px; border-radius: 10px; border: 0; background: var(--db-green-soft); z-index: 3; }
    #menusite .navbar-toggle .icon-bar { background: var(--db-green-dark); width: 20px; }
    #menusite .navbar-toggle:hover, #menusite .navbar-toggle:focus { background: #d6ecdf; }
    #menusite .navbar-collapse { top: 56px; left: 8px; right: 8px; width: auto; background: #fff; border-radius: 14px; box-shadow: var(--db-shadow-hover); overflow: hidden; }
    #menusite .navbar-default .navbar-nav > li > a { color: var(--db-text) !important; background: #fff !important; padding: 13px 18px; border-top: 1px solid var(--db-border); }
    #menusite .navbar-default .navbar-nav > li > a::after { display: none; }
    #menusite .navbar-default .navbar-nav > .active > a { color: var(--db-green-dark) !important; background: var(--db-green-soft) !important; }
    #menusite .navbar-nav { margin: 0; }
    .db-breadcrumbs { display: none; }
    .section-body { padding-top: 12px; }
    .section-footer-bottom .bttop { bottom: 80px; }

    .db-tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1035; background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: saturate(160%) blur(10px); backdrop-filter: saturate(160%) blur(10px); border-top: 1px solid var(--db-border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; align-items: flex-end; }
    .db-tabbar__item { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 48px; justify-content: center; color: var(--db-muted) !important; font-size: 11.5px; font-weight: 600; text-decoration: none !important; border-radius: 12px; transition: color .16s, transform .12s; }
    .db-tabbar__item .fa { font-size: 20px; }
    .db-tabbar__item:active { transform: scale(.94); }
    .db-tabbar__item.is-active { color: var(--db-green) !important; }
    .db-tabbar__item--post .fa { width: 50px; height: 50px; margin-top: -24px; border-radius: 50%; background: var(--db-accent); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 18px rgba(242, 107, 29, .4); font-size: 22px; border: 4px solid #fff; }
    .db-tabbar__item--post { color: var(--db-accent-dark) !important; }

    /* Nút "Gửi phản hồi" nổi của khối liên hệ: đẩy lên trên thanh điều hướng đáy */
    /* Nút "Gửi phản hồi" nổi che nội dung trên điện thoại: ẩn (vẫn có mục Liên hệ trong menu) */
    #contactButton { display: none !important; }
    .db-footer { padding-bottom: 20px; }
    .news-detail .title, .news_column h1 { font-size: 23px; }
}

@media print {
    .db-header, .db-nav, .db-tabbar, .db-footer, .footerNav2, #contactButton { display: none !important; }
    .db-reveal, img.db-fade { opacity: 1 !important; transform: none !important; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
    .db-reveal { opacity: 1; transform: none; }
}

/* ---------- Khối "Danh mục rao vặt" (themes/default/modules/raovat/block.cats.tpl) ----------
   Đặt ở CSS chung của theme vì khối hiện ở mọi trang (tin tức, liên hệ, thành viên...), nơi raovat.css không được nạp.
   Mỗi danh mục: ô biểu tượng màu riêng + tên + viên số tin; rê chuột: nền xanh nhạt, trượt nhẹ, ô biểu tượng đổi màu đậm.
   Danh mục đang xem: tô nổi + vạch xanh bên trái; danh mục chưa có tin: số mờ. Cuối khối: nút Bản đồ số nhà trọ. */
.panel-body > .rv-catnav { margin: -9px; }
.rv-catnav__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rv-catnav__item { position: relative; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 12px; color: var(--db-text, #1f2a24) !important; text-decoration: none !important; transition: background-color .22s ease, transform .22s cubic-bezier(.2, .8, .2, 1), box-shadow .22s ease; }
.rv-catnav__item:hover, .rv-catnav__item:focus-visible { background: var(--db-green-soft, #e7f4ec); transform: translateX(3px); outline: none; }
.rv-catnav__item:focus-visible { box-shadow: 0 0 0 2px var(--db-green, #1b7a3d); }
.rv-catnav__icon { --c: #1b7a3d; --bg: #e7f4ec; flex: 0 0 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--bg); color: var(--c); font-size: 15px; transition: background-color .22s ease, color .22s ease, transform .3s cubic-bezier(.34, 1.56, .64, 1); }
.rv-catnav__list li:nth-child(6n+2) .rv-catnav__icon { --c: #1565c0; --bg: #e4eefb; }
.rv-catnav__list li:nth-child(6n+3) .rv-catnav__icon { --c: #c2410c; --bg: #fdeee4; }
.rv-catnav__list li:nth-child(6n+4) .rv-catnav__icon { --c: #6a4c93; --bg: #efe9f7; }
.rv-catnav__list li:nth-child(6n+5) .rv-catnav__icon { --c: #00796b; --bg: #e0f3f0; }
.rv-catnav__list li:nth-child(6n+6) .rv-catnav__icon { --c: #ad1457; --bg: #fbe7ef; }
.rv-catnav__item:hover .rv-catnav__icon, .rv-catnav__item:focus-visible .rv-catnav__icon { background: var(--c); color: #fff; transform: scale(1.06) rotate(-6deg); }
.rv-catnav__title { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; line-height: 1.3; }
.rv-catnav__count { flex: 0 0 auto; min-width: 28px; padding: 2px 8px; border-radius: 999px; background: var(--db-green-soft, #e7f4ec); color: var(--db-green-dark, #135c2d); font-size: 12.5px; font-weight: 700; line-height: 1.4; text-align: center; font-variant-numeric: tabular-nums; transition: background-color .22s ease, color .22s ease; }
.rv-catnav__item:hover .rv-catnav__count { background: var(--db-green, #1b7a3d); color: #fff; }
.rv-catnav__item.is-empty .rv-catnav__count { background: #f1f4f2; color: #98a69e; font-weight: 600; }
.rv-catnav__item.is-empty:hover .rv-catnav__count { background: #e3e9e5; color: #6b7b72; }
.rv-catnav__item.is-active { background: var(--db-green-soft, #e7f4ec); box-shadow: inset 3px 0 0 var(--db-green, #1b7a3d); }
.rv-catnav__item.is-active .rv-catnav__title { color: var(--db-green-dark, #135c2d); }
.rv-catnav__item.is-active .rv-catnav__icon { background: var(--db-green, #1b7a3d); color: #fff; }
.rv-catnav__map { display: flex; align-items: center; gap: 12px; margin: 10px 4px 4px; padding: 12px 14px; border-radius: 14px; background: linear-gradient(120deg, #1b7a3d, #239150); color: #fff !important; text-decoration: none !important; box-shadow: 0 8px 20px rgba(27, 122, 61, .22); transition: transform .22s cubic-bezier(.2, .8, .2, 1), box-shadow .22s ease; }
.rv-catnav__map:hover, .rv-catnav__map:focus-visible { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(27, 122, 61, .3); outline: none; }
.rv-catnav__map-icon { flex: 0 0 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgba(255, 255, 255, .18); font-size: 17px; }
.rv-catnav__map-text { flex: 1; min-width: 0; line-height: 1.3; }
.rv-catnav__map-text strong { display: block; font-size: 14.5px; }
.rv-catnav__map-text small { display: block; font-size: 12px; opacity: .85; }
.rv-catnav__arrow { font-size: 20px; transition: transform .22s ease; }
.rv-catnav__map:hover .rv-catnav__arrow { transform: translateX(4px); }
/* Điện thoại ngang / máy tính bảng nhỏ: khối nằm dưới nội dung, chia 2 cột cho gọn */
@media (min-width: 480px) and (max-width: 767.98px) {
    .rv-catnav__list { grid-template-columns: 1fr 1fr; column-gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
    .rv-catnav__item, .rv-catnav__icon, .rv-catnav__map, .rv-catnav__arrow { transition: none; }
    .rv-catnav__item:hover, .rv-catnav__map:hover, .rv-catnav__item:hover .rv-catnav__icon, .rv-catnav__map:hover .rv-catnav__arrow { transform: none; }
}

/* ---------- Khối "Chuyên mục tin" (themes/dienbien/modules/news/block_category.tpl) ----------
   Dùng chung .rv-catnav ở trên; chuyên mục tin không có số bài nên thay viên số bằng mũi tên. Biểu tượng theo alias chuyên mục
   (tools/seed/03-xoa-du-lieu-mau.php), chuyên mục khác dùng biểu tượng thư mục mặc định trong template. */
.rv-catnav--news [data-alias="tin-hoat-dong"] .rv-catnav__icon .fa::before { content: "\f0a1"; }
.rv-catnav--news [data-alias="cam-nang-thue-tro"] .rv-catnav__icon .fa::before { content: "\f02d"; }
.rv-catnav--news [data-alias="huong-dan"] .rv-catnav__icon .fa::before { content: "\f059"; }
.rv-catnav--news [data-alias="dia-ban-dien-bien"] .rv-catnav__icon .fa::before { content: "\f041"; }
.rv-catnav__chevron { flex: 0 0 auto; color: #b5c2ba; font-size: 18px; transition: transform .22s ease, color .22s ease; }
.rv-catnav__item:hover .rv-catnav__chevron, .rv-catnav__item:focus-visible .rv-catnav__chevron, .rv-catnav__item.is-active .rv-catnav__chevron { color: var(--db-green); transform: translateX(3px); }
.rv-catnav__sub { list-style: none; margin: 2px 0 6px 50px; padding: 0 0 0 8px; border-left: 2px solid var(--db-border); }
.rv-catnav__subitem { display: block; padding: 5px 10px; border-radius: 8px; font-size: 13.5px; color: var(--db-muted) !important; text-decoration: none !important; transition: background-color .2s ease, color .2s ease; }
.rv-catnav__subitem:hover, .rv-catnav__subitem.is-active { background: var(--db-green-soft); color: var(--db-green-dark) !important; }
@media (prefers-reduced-motion: reduce) {
    .rv-catnav__item:hover .rv-catnav__chevron, .rv-catnav__item.is-active .rv-catnav__chevron { transform: none; }
}
