/* THEME Baonham - giao diện trang tin Giáo xứ Bảo Nham. Chỉ dùng class tiền tố .bn-; Bootstrap chỉ cho modal/biểu mẫu/lưới footer. */
:root {
  --bn-red: #a8183c;
  --bn-red-dark: #7e1230;
  --bn-line: #a8183c;
  --bn-ink: #1f1f1f;
  --bn-muted: #666;
  --bn-border: #e5e5e5;
  --bn-dark: #8a8a8a;
  --bn-darker: #a8183c;
  --bn-w: 1280px;
  --bn-side: 340px;
  --bn-font: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

/* ---------- Nền tảng ---------- */
.bn-body { margin: 0; background: #eceff1; color: var(--bn-ink); font: 400 15px/1.55 var(--bn-font); overflow-x: hidden; }
:where(.bn-body) a { color: var(--bn-muted); text-decoration: none; transition: color .2s; }
:where(.bn-body) a:hover { color: var(--bn-red-dark); }
:where(.bn-body) img { max-width: 100%; height: auto; }
.bn-wrap { max-width: var(--bn-w); margin: 0 auto; background: #fff; box-shadow: 0 0 12px rgb(0 0 0 / .18); }
.bn-main { padding: 12px 10px 20px; }
.bn-muted { color: var(--bn-muted); }

/* ---------- Banner ---------- */
.bn-banner { display: block; line-height: 0; }
.bn-banner img { display: block; width: 100%; height: auto; }
.bn-banner__text { display: block; padding: 26px 20px; font: 700 30px/1.2 var(--bn-font); color: var(--bn-red); text-transform: uppercase; }

/* ---------- Menu chính ---------- */
.bn-nav { position: relative; z-index: 20; background: var(--bn-red); padding:8px;}
.bn-nav__bar { display: flex; align-items: stretch; }
.bn-nav__list { display: flex; flex-wrap: wrap; flex: 1; margin: 0; padding: 0; list-style: none; }
.bn-nav__list > li { position: relative; }
.bn-nav__list > li > a { display: block; padding: 16px 14px; color: #fff; font-size: 16px; font-weight: 700; line-height: 1.2; text-transform: uppercase; white-space: nowrap; }
.bn-nav__list > li > a:hover,
.bn-nav__list > li:focus-within > a { background: var(--bn-red-dark); color: #fff; }
.bn-has-sub > a::after { content: ""; display: inline-block; margin-left: 6px; border: 4px solid transparent; border-top-color: currentColor; border-bottom: 0; vertical-align: middle; }
.bn-sub { display: none; position: absolute; top: 100%; left: 0; min-width: 250px; margin: 0; padding: 6px 0; list-style: none; background: var(--bn-red-dark); box-shadow: 0 6px 14px rgb(0 0 0 / .22); }
.bn-has-sub:hover > .bn-sub,
.bn-has-sub:focus-within > .bn-sub,
.bn-has-sub.is-open > .bn-sub { display: block; }
.bn-sub a { display: block; padding: 8px 16px; color: #fff; font-size: 14px; }
.bn-sub a:hover { background: rgb(255 255 255 / .16); color: #fff; }
.bn-sub-toggle, .bn-burger { display: none; }
.bn-search { flex: none; width: 44px; border: 0; background: transparent; color: #fff; font-size: 15px; cursor: pointer; }
.bn-search:hover { background: var(--bn-red-dark); }

/* ---------- Khung 2 cột + cột bên ---------- */
.bn-cols { display: grid; grid-template-columns: minmax(0, 1fr) var(--bn-side); gap: 30px; align-items: start; }
.bn-cols--full { grid-template-columns: minmax(0, 1fr); }
.bn-col-main { min-width: 0; }
.bn-side { min-width: 0; }
.bn-widget { margin-bottom: 26px; }
.bn-widget__title { position: relative; margin: 0 0 16px; padding-bottom: 12px; border-bottom: 2px solid var(--bn-line); color: #222; font: 700 17px/1.3 var(--bn-font); text-transform: uppercase; }
.bn-widget__title::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 45%; height: 2px; background: var(--bn-muted); }
.bn-links img { display: block; width: 100%; margin-bottom: 8px; }
.bn-fb { display: block; width: 100%; max-width: 100%; height: 500px; border: 0; }
.bn-panel { margin-top: 28px; }

/* ---------- Tiêu đề khối (2 vạch xanh hai bên) ---------- */
.bn-block { margin-bottom: 30px; }
.bn-title { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; color: var(--bn-muted); font: 700 15px/1.2 var(--bn-font); text-transform: uppercase; }
.bn-title::before, .bn-title::after { content: ""; flex: 1; height: 7px; background: linear-gradient(var(--bn-line) 0 3px, transparent 3px 4px, var(--bn-line) 4px 7px); }
.bn-title a { color: inherit; }

/* ---------- Hero: slider + ảnh nhỏ ---------- */
.bn-hero { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 12px; margin-bottom: 26px; }
.bn-slider { position: relative; overflow: hidden; background: #111; }
.bn-slider__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; }
.bn-slider__track::-webkit-scrollbar { display: none; }
.bn-slide { position: relative; display: block; flex: 0 0 100%; aspect-ratio: 1.9 / 1; scroll-snap-align: start; }
.bn-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bn-slide__cap { position: absolute; inset: auto 0 0; padding: 30px 60px 14px; background: linear-gradient(transparent, rgb(0 0 0 / .72)); color: #fff; font-size: 18px; line-height: 1.35; text-align: center; text-shadow: 0 1px 3px rgb(0 0 0 / .6); }
.bn-slider__nav { position: absolute; top: 50%; width: 34px; height: 44px; margin-top: -22px; border: 0; background: var(--bn-red); color: #fff; cursor: pointer; opacity: .9; }
.bn-slider__nav:hover { opacity: 1; background: var(--bn-red-dark); }
.bn-slider__prev { left: 8px; }
.bn-slider__next { right: 8px; }
.bn-thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-content: start; margin: 0; padding: 0; list-style: none; }
.bn-thumbs a { display: block; height: 100%; padding: 4px; border: 1px solid var(--bn-border); background: #fff; font-size: 12px; line-height: 1.4; }
.bn-thumbs img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: 4px; }
.bn-thumbs span { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bn-thumbs a:hover { border-color: var(--bn-line); }

/* ---------- Khối tin: 1 bài lớn + danh sách ---------- */
.bn-news { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.bn-news--single { grid-template-columns: minmax(0, 1fr); }
.bn-news__img { display: block; overflow: hidden; line-height: 0; }
.bn-news__img img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .4s; }
.bn-news__img:hover img { transform: scale(1.05); }
.bn-news__big h3 { margin: 14px 0 6px; font-size: 16px; font-weight: 400; line-height: 1.5; }
.bn-news__big h3 a { color: #383838; }
.bn-news__excerpt { margin: 6px 0 0; color: #555; font-size: 14px; }
.bn-news__list { display: block; max-height: 330px; margin: 0; padding: 0 6px 0 0; overflow-y: auto; list-style: none; scrollbar-width: thin; }
.bn-news__list li { display: flex; gap: 12px; padding: 0 0 10px; margin-bottom: 10px; border-bottom: 1px dotted var(--bn-border); }
.bn-news__thumb { flex: none; width: 100px; line-height: 0; }
.bn-news__thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.bn-news__title { display: block; font-size: 15px; line-height: 1.4; }

.bn-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 4px 0 0; color: #999; font-size: 12px; }
.bn-meta i { margin-right: 4px; }
.bn-meta a { color: inherit; }

/* ---------- Cột bên: 2 tab bài ---------- */
.bn-tabs__nav { display: flex; gap: 4px; border-bottom: 2px solid var(--bn-line); }
.bn-tabs__nav button { margin-bottom: -2px; padding: 9px 14px; border: 1px solid transparent; border-bottom: 0; background: none; color: var(--bn-muted); font: 500 13px var(--bn-font); cursor: pointer; }
.bn-tabs__nav button.is-active { border-color: var(--bn-line); background: #fff; color: var(--bn-red-dark); }
.bn-tabs__panel { padding-top: 16px; }
.bn-mini { margin: 0; padding: 0; list-style: none; }
.bn-mini li { display: flex; gap: 10px; margin-bottom: 14px; }
.bn-mini__thumb { flex: none; width: 100px; padding: 2px; border: 1px solid #d3d3d3; line-height: 0; }
.bn-mini__thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.bn-mini__title { font-size: 15px; line-height: 1.4; }

/* ---------- Trang danh sách / bài viết ---------- */
.bn-crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; font-size: 13px; color: var(--bn-muted); }
.bn-crumbs a { color: var(--bn-red); }
.bn-crumbs strong { font-weight: 400; color: #383838; }
.bn-lead { margin: 0 0 18px; color: #444; font-size: 16px; }
.bn-empty { padding: 30px 0; text-align: center; color: var(--bn-muted); }
.bn-items { display: grid; gap: 0; }
.bn-item { display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px dotted #d6d6d6; }
.bn-item:first-child { padding-top: 0; }
.bn-item__thumb { flex: none; width: 220px; line-height: 0; }
.bn-item__thumb img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.bn-item__noimg { display: grid; place-items: center; aspect-ratio: 3 / 2; background: #f1f3f4; color: #b5bdc2; font-size: 28px; }
.bn-item__body { min-width: 0; }
.bn-item__title { margin: 0 0 4px; font-size: 18px; font-weight: 500; line-height: 1.35; }
.bn-item__title a { color: #2d3b44; }
.bn-item__excerpt { margin: 8px 0 0; color: #555; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bn-post__title { margin: 0 0 8px; color: #2d3b44; font: 700 26px/1.3 var(--bn-font); }
.bn-post__meta { margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px dotted #d6d6d6; }
.bn-content { overflow-wrap: anywhere; font-size: 16px; line-height: 1.7; }
.bn-content img { max-width: 100%; height: auto; }
.bn-content iframe, .bn-content video { max-width: 100%; }
.bn-content table { display: block; max-width: 100%; overflow-x: auto; }
.bn-content blockquote { margin: 16px 0; padding: 8px 16px; border-left: 4px solid var(--bn-line); background: #fbf3f5; font-style: italic; }
.bn-content a { color: var(--bn-red-dark); }
.bn-comments { margin-top: 30px; }
.bn-related { margin-top: 34px; }

/* ---------- Phân trang ---------- */
.bn-pager { display: flex; flex-wrap: wrap; gap: 6px; margin: 22px 0 6px; }
.bn-pager a, .bn-pager span { display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 8px; border: 1px solid var(--bn-border); color: #555; font-size: 14px; }
.bn-pager a:hover { border-color: var(--bn-red); color: var(--bn-red-dark); }
.bn-pager .is-current { border-color: var(--bn-red); background: var(--bn-red); color: #fff; }
.bn-pager .bn-pager__gap { border-color: transparent; }

/* ---------- Video ---------- */
.bn-vgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.bn-vcard__thumb { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 9; background: #111; }
.bn-vcard__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s, opacity .2s; }
.bn-vcard__thumb:hover img { transform: scale(1.04); opacity: .85; }
.bn-vcard__play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 22px; pointer-events: none; }
.bn-vcard__play i { display: grid; place-items: center; width: 54px; height: 54px; padding-left: 3px; border-radius: 50%; background: rgb(0 0 0 / .55); }
.bn-vcard__title { margin: 10px 0 0; font-size: 16px; font-weight: 500; line-height: 1.4; }
.bn-vcard__title a { color: #2d3b44; }

/* ---------- Thư viện hình: album + ảnh ---------- */
.bn-agrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.bn-acard { display: block; }
.bn-acard__img { display: grid; place-items: center; overflow: hidden; aspect-ratio: 3 / 2; background: #eef2f4; color: #b5bdc2; font-size: 34px; }
.bn-acard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.bn-acard:hover .bn-acard__img img { transform: scale(1.06); }
.bn-acard__title { display: block; margin-top: 8px; color: #2d3b44; font-size: 15px; font-weight: 500; line-height: 1.35; }
.bn-acard__meta { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 2px; color: #999; font-size: 12px; }
.bn-acard__meta i { margin-right: 4px; }
.bn-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.bn-photos a { position: relative; display: block; overflow: hidden; aspect-ratio: 3 / 2; background: #eef2f4; }
.bn-photos img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.bn-photos a:hover img, .bn-photos a:focus-visible img { transform: scale(1.07); }
.bn-btn { display: inline-block; padding: 8px 18px; border: 1px solid var(--bn-red); color: var(--bn-red-dark); font-size: 14px; }
:where(.bn-body) .bn-btn:hover { background: var(--bn-red); color: #fff; }

/* ---------- Chân trang ---------- */
.bn-footer { margin-top: 30px; border-top: 10px solid var(--bn-muted); background: var(--bn-dark); color: #ddd; }
.bn-footer__in { max-width: var(--bn-w); margin: 0 auto; padding: 18px 15px 8px; }
.bn-footer .footer-widget-title { margin: 0 0 10px; color: var(--bn-red); font-size: 18px; font-weight: 700; text-transform: uppercase; }
.bn-footer p { margin: 0 0 8px; font-size: 14px; }
.bn-footer a { color: #ffe3ea; }
.bn-footer a:hover { color: #fff; }
.bn-footer__bottom { background: var(--bn-darker); color: #949494; font-size: 12px; }
.bn-footer__bottom-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; max-width: var(--bn-w); margin: 0 auto; padding: 12px 15px; }
.bn-footer__bottom a { color: #b9c3c8; }

.bn-totop { position: fixed; right: 24px; bottom: 28px; z-index: 30; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--bn-red); background: #fff; color: var(--bn-red-dark); font-size: 22px; opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.bn-totop.is-show { opacity: 1; visibility: visible; }
:where(.bn-body) .bn-totop:hover { background: var(--bn-red); color: #fff; }

/* ---------- Hộp tìm kiếm ---------- */
.bn-searchbox { border: 0; border-radius: 0; }
.bn-searchbox__form { display: flex; }
.bn-searchbox__form input { flex: 1; min-width: 0; padding: 10px 14px; border: 1px solid var(--bn-line); border-right: 0; font-size: 16px; }
.bn-searchbox__form input:focus { outline: 2px solid var(--bn-red); outline-offset: -2px; }
.bn-searchbox__form button { width: 52px; border: 0; background: var(--bn-red); color: #fff; cursor: pointer; }
.bn-searchbox__form button:hover { background: var(--bn-red-dark); }

/* ---------- Màn hình nhỏ ---------- */
@media (max-width: 991px) {
  .bn-cols { grid-template-columns: minmax(0, 1fr); }
  .bn-burger { display: flex; flex-direction: column; justify-content: center; gap: 4px; width: 48px; padding: 0 13px; border: 0; background: transparent; cursor: pointer; }
  .bn-burger span { display: block; height: 2px; background: #fff; }
  .bn-nav__bar { flex-wrap: wrap; justify-content: space-between; }
  .bn-nav__list { display: none; order: 3; flex: 0 0 100%; flex-direction: column; }
  .bn-nav__list.is-open { display: flex; }
  .bn-nav__list > li { border-top: 1px solid rgb(255 255 255 / .18); }
  .bn-nav__list > li > a { padding-right: 52px; white-space: normal; }
  .bn-has-sub > a::after { display: none; }
  .bn-sub-toggle { position: absolute; top: 0; right: 0; display: grid; place-items: center; width: 48px; height: 41px; border: 0; background: transparent; color: #fff; cursor: pointer; }
  .bn-sub { position: static; min-width: 0; padding: 0; box-shadow: none; background: rgb(0 0 0 / .12); }
  .bn-has-sub:hover > .bn-sub, .bn-has-sub:focus-within > .bn-sub { display: none; }
  .bn-has-sub.is-open > .bn-sub { display: block; }
  .bn-sub a { padding-left: 28px; }
}
@media (max-width: 767px) {
  .bn-hero { grid-template-columns: minmax(0, 1fr); }
  .bn-slide__cap { padding: 24px 52px 10px; font-size: 15px; }
  .bn-news { grid-template-columns: minmax(0, 1fr); }
  .bn-news__list { max-height: none; overflow: visible; padding: 0; }
  .bn-item__thumb { width: 130px; }
  .bn-item__title { font-size: 16px; }
  .bn-item__excerpt { display: none; }
  .bn-post__title { font-size: 22px; }
  .bn-vgrid { grid-template-columns: minmax(0, 1fr); }
  .bn-agrid, .bn-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .bn-banner__text { font-size: 22px; }
}
@media (max-width: 480px) {
  .bn-thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bn-item { flex-direction: column; gap: 8px; }
  .bn-item__thumb { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .bn-slider__track { scroll-behavior: auto; }
  .bn-news__img img, .bn-vcard__thumb img { transition: none; }
}

/* ---- Banner quảng cáo (component Banner: Header_Top / Footer_Top / Content_*) ---- */
.bn-adbar { padding: 8px 12px 0; }
.bn-adbar .cms-banner__item { margin: 0 0 8px !important; text-align: center; }
.bn-adbar img { margin-inline: auto; }
.bn-wrap .cms-banner { margin: 0 0 16px; }
.bn-wrap .cms-banner__item:last-child { margin-bottom: 0 !important; }

/* ---- Lời Chúa hằng ngày (widget + trang /loi-chua-hang-ngay) ---- */
.bn-gospel-widget__img img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 10px; }
.bn-gospel-widget__title { margin: 0 0 6px; font-size: 17px; line-height: 1.35; }
.bn-gospel-widget__title a { color: var(--bn-text, #222); text-decoration: none; }
.bn-gospel-widget__title a:hover { color: var(--bn-red-dark, #7e1230); }
.bn-gospel-widget__excerpt { margin: 6px 0 8px; color: #555; font-size: 14px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.bn-widget__title a { color: inherit; text-decoration: none; }
.bn-more { font-size: 14px; font-weight: 600; color: var(--bn-red-dark, #7e1230); }
.bn-gospel .bn-content p { margin: 0 0 1em; text-align: justify; }
.bn-source { margin: 26px 0 0; padding-top: 12px; border-top: 1px dashed var(--bn-line, #ddd); font-size: 13px; color: #666; }
.bn-gospel-list img { object-fit: cover; }
.bn-empty { padding: 14px 0; color: #666; }
.bn-gospel__lead { font-style: italic; padding: 12px 0; border-block: 1px solid var(--bn-line, #ddd); text-align: justify; }

/* ---- Liên hệ ---- */
.bn-contact { display: grid; grid-template-columns: 1fr; gap: 28px; }
.bn-contact__name { margin: 0 0 8px; font-size: 20px; color: var(--bn-red-dark, #7e1230); }
.bn-contact__list { margin: 12px 0 0; padding: 0; list-style: none; }
.bn-contact__list li { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 10px; }
.bn-contact__list i { width: 18px; margin-top: 4px; color: var(--bn-red); text-align: center; }
.bn-contact__form .form-control, .bn-contact__form .form-select { border-radius: 0; }
.bn-contact__form .btn-primary { border: 0; border-radius: 0; background: var(--bn-red); }
.bn-contact__form .btn-primary:hover { background: var(--bn-red-dark, #7e1230); }
.bn-map iframe { display: block; width: 100%; height: 380px; border: 0; }
.bn-muted { color: #666; }
@media (max-width: 767px) { .bn-contact { grid-template-columns: 1fr; } }

/* ---- Tìm kiếm ---- */
.bn-searchbar { display: flex; max-width: 560px; margin: 0 0 18px; }
.bn-searchbar input { flex: 1; min-width: 0; height: 42px; padding: 0 12px; border: 1px solid var(--bn-line, #ccc); border-right: 0; font-size: 15px; }
.bn-searchbar button { height: 42px; padding: 0 18px; border: 0; background: var(--bn-red); color: #fff; font-weight: 500; cursor: pointer; }
.bn-searchbar button:hover { background: var(--bn-red-dark, #7e1230); }
.bn-searchbar--center { margin-inline: auto; }
.bn-tabs-lite { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; padding: 0; list-style: none; }
.bn-tabs-lite a { display: inline-block; padding: 6px 14px; border: 1px solid var(--bn-line, #ddd); color: #444; text-decoration: none; font-size: 14px; }
.bn-tabs-lite a.is-active, .bn-tabs-lite a:hover { border-color: var(--bn-red); background: var(--bn-red); color: #fff; }
.bn-count { margin-left: 4px; font-size: 12px; opacity: .85; }
.bn-viewall { margin: 10px 0 0; text-align: right; }
.bn-viewall a { font-weight: 600; color: var(--bn-red-dark, #7e1230); }

/* ---- Video chi tiết ---- */
.bn-video { position: relative; aspect-ratio: 16 / 9; margin: 0 0 18px; background: #000; }
.bn-video iframe, .bn-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.bn-video__none { position: absolute; inset: 0; display: grid; place-items: center; color: #bbb; }

/* ---- 404 / Lỗi ---- */
.bn-notfound { padding: 40px 0 30px; text-align: center; }
.bn-notfound__code { font-size: 96px; font-weight: 700; line-height: 1; color: var(--bn-red); }
.bn-notfound__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.bn-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 20px; background: var(--bn-red); color: #fff; text-decoration: none; font-weight: 500; }
.bn-btn:hover { background: var(--bn-red-dark, #7e1230); color: #fff; }
.bn-btn--ghost { background: transparent; border: 1px solid var(--bn-red); color: var(--bn-red-dark, #7e1230); }
.bn-btn--ghost:hover { background: var(--bn-red); }


/* ================= BAONHAM: khác biệt so với bản gốc ================= */
.bn-body { background: #f2f2f2; }
.bn-topbar { background: #3d3d3d; color: #eee; font-size: 12px; }
.bn-topbar__in { display: flex; justify-content: flex-end; align-items: center; gap: 18px; max-width: var(--bn-w); margin: 0 auto; padding: 6px 15px; }
.bn-topbar a { color: #eee; }
.bn-topbar a:hover { color: #ffc9d5; }
.bn-topbar .social-links-inline { display: flex; gap: 12px; }
.bn-topbar .social-links-inline-item { color: #eee !important; font-size: 13px; }
.bn-topbar .social-links, .bn-topbar ul { display: flex; gap: 12px; margin: 0; padding: 0; list-style: none; }

/* Tiêu đề khối: nhãn đỏ + đường kẻ mảnh */
.bn-title { display: block; margin: 0 0 16px; border-bottom: 1px solid var(--bn-red); line-height: 1; }
.bn-title::before, .bn-title::after { content: none; }
.bn-title > a, .bn-title > span { display: inline-block; padding: 12px 14px; background: var(--bn-red); color: #fff; font-size: 16px; font-weight: 700; text-transform: uppercase; }
/* Biểu tượng crosshairs (fa-crosshairs) trước mọi tiêu đề khối; tiêu đề đã có biểu tượng riêng (Tin liên quan) thì bỏ */
.bn-title > a::before, .bn-title > span::before, .bn-widget__title > a::before, .bn-widget__title > span::before { content: "\f05b"; font: var(--fa-font-solid, normal 900 1em/1 "Font Awesome 7 Free"); margin-right: 8px; font-size: .95em; }
.bn-title:has(> span > i)::before, .bn-title > span:has(> i)::before { content: none; }
.bn-widget__title { border-bottom: 1px solid var(--bn-red); padding: 0; margin: 0 0 14px; }
.bn-widget__title::after { content: none; }
.bn-widget__title > span, .bn-widget__title > a { display: inline-block; padding: 12px 14px; background: var(--bn-red); color: #fff; font-size: 16px; text-transform: uppercase; }
.bn-widget__title { color: #fff; font-size: 13px; }
.bn-widget__title:not(:has(> span, > a)) { padding: 8px 14px; background: var(--bn-red); display: inline-block; border-bottom: 0; }

/* Menu */

/* Slider đầu trang: chỉ ảnh + chú thích, nằm trong cột chính */
.bn-hero { display: block; margin-bottom: 22px; }
.bn-slide { aspect-ratio: 1.75 / 1; }
.bn-slide__cap { font-size: 20px; font-weight: 700; text-transform: uppercase; }

/* Danh sách cột bên (xem nhiều / thông báo / bài mới) */
.bn-side-list { margin: 0; padding: 0; list-style: none; }
.bn-side-list li { display: flex; gap: 10px; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px dotted var(--bn-border); }
.bn-side-list__thumb { flex: none; width: 90px; line-height: 0; }
.bn-side-list__thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.bn-side-list__title { display: block; color: #222; font-size: 14px; font-weight: 700; line-height: 1.35; }
.bn-side-list__title:hover { color: var(--bn-red); }
.bn-side-list .bn-meta { margin-top: 3px; }

/* Thư viện hình / video: toàn chiều ngang bên dưới */
.bn-bottom { margin-top: 10px; }
.bn-bottom .bn-block { margin-bottom: 26px; }
.bn-bottom .bn-agrid, .bn-bottom .bn-vgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Chân trang: nền xám, thanh dưới đỏ */
.bn-footer { border-top: 0; background: linear-gradient(#9a9a9a, #7d7d7d); color: #fff; }
.bn-footer .footer-widget-title { color: #fff; display:none !important; }
.bn-footer a { color: #fff; text-decoration: underline; }
.bn-footer__bottom { background: var(--bn-red); color: #ffd9e1; }
.bn-footer__bottom a { color: #fff; }

@media (max-width: 767px) {
  .bn-bottom .bn-agrid, .bn-bottom .bn-vgrid { grid-template-columns: minmax(0, 1fr); }
  .bn-topbar__in { justify-content: center; }
  .bn-slide__cap { font-size: 15px; }
}


/* ---- Header 2 cột: logo trái, banner phải ---- */
.bn-header { display: grid; grid-template-columns: minmax(0, 33%) minmax(0, 1fr); align-items: center; gap: 18px; padding: 14px 15px; background: #fff; }
.bn-logo { display: block; line-height: 0; }
.bn-logo img { display: block; width: auto; max-width: 100%; max-height: 120px; height: auto; }
.bn-header__banner { min-width: 0; line-height: 0; }
.bn-header__banner .cms-banner__item { margin: 0 !important; }
.bn-header__banner img { display: block; width: 100%; height: auto; }
.bn-header:not(:has(.bn-header__banner)) { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 767px) { .bn-header { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 10px; } .bn-logo img { max-height: 90px; margin-inline: auto; } }

/* ---- Chân trang: logo trái (4/12, canh phải) + thông tin phải (8/12) ----
   Dùng được cả HTML gốc (col-md-4 + col-md-8 trong một widget) lẫn mẫu gọn .bn-fcontact */
.bn-footer { background: radial-gradient(circle at 30% 45%, #c9c9c9 0%, #9a9a9a 35%, #7a7a7a 75%); color: var(--bn-red); }
.bn-footer__in { padding: 36px 15px 24px; }
.bn-footer p, .bn-footer li { color: var(--bn-red); font-size: 16px; }
.bn-footer a { color: #ffc61a; text-decoration: none; }
.bn-footer a:hover { color: #fff; }
.bn-footer .fa, .bn-footer .fa-solid, .bn-footer .fas { width: 20px; margin-right: 6px; color: var(--bn-red); text-align: center; }
.bn-footer .single-footer-widget:has(> [class*="col-md-4"]):has(> [class*="col-md-8"]),
.bn-fcontact { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 0; }
.bn-fcontact__logo { flex: 0 0 36%; max-width: 36%; padding-right: 36px; text-align: right; }
.bn-fcontact__info { flex: 1 1 0; min-width: 0; }
.bn-footer .single-footer-widget > .text-right img, .bn-fcontact__logo img { max-width: 100%; height: auto; max-height: 200px; }
.bn-footer .footer-widget p, .bn-fcontact__info p { margin: 0 0 14px; }
.bn-footer .footer-widget p:first-child strong, .bn-fcontact__info p:first-child strong { font-size: 17px; text-transform: uppercase; }
.bn-footer .social-links-inline { display: flex; justify-content: center; gap: 4px; margin-top: 14px; }
.bn-footer .social-links-inline-item { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--bn-red); font-size: 18px; }
.bn-footer .social-links-inline-item i, .bn-footer .social-links-inline-item .fa, .bn-footer .social-links-inline-item .fa-brands { width: auto; margin: 0; color: #fff !important; }
.bn-footer .social-links-inline-item:hover { background: var(--bn-red-dark); }
.bn-footer .social-links-inline-item img { width: 20px; height: 20px; }
@media (max-width: 767px) {
  /* Mobile: hình (logo) ở trên, chữ ở dưới, cùng canh giữa - áp cho cả HTML gốc (col-md-4 + col-md-8) lẫn .bn-fcontact */
  .bn-footer__in { padding: 26px 15px 18px; }
  .bn-footer .single-footer-widget:has(> [class*="col-md-4"]):has(> [class*="col-md-8"]),
  .bn-fcontact { flex-direction: column; align-items: stretch; gap: 18px; }
  .bn-fcontact__logo,
  .bn-footer .single-footer-widget > [class*="col-md-4"],
  .bn-footer .single-footer-widget > [class*="col-md-8"],
  .bn-fcontact__info { flex: 0 0 auto; width: 100%; max-width: 100%; padding: 0; }
  .bn-fcontact__logo,
  .bn-footer .single-footer-widget > [class*="col-md-4"] { order: -1; text-align: center !important; }
  .bn-footer .single-footer-widget > [class*="col-md-4"] img,
  .bn-fcontact__logo img { display: inline-block; max-width: 260px; max-height: 150px; }
  .bn-footer .footer-widget, .bn-fcontact__info { text-align: left; }
  .bn-footer .text-right, .bn-footer .alignright { float: none !important; text-align: center !important; }
}

/* ---- Tin liên quan: lưới 3 cột desktop, 1 cột mobile; chỉ ảnh + tiêu đề (tối đa 3 dòng) ---- */
.bn-rel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 18px; }
.bn-rel__item { display: block; color: #222; }
.bn-rel__img { display: grid; place-items: center; overflow: hidden; aspect-ratio: 4 / 3; background: #eee; color: #bbb; font-size: 34px; }
.bn-rel__img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.bn-rel__item:hover .bn-rel__img img { transform: scale(1.05); }
.bn-rel__title { display: -webkit-box; margin-top: 10px; overflow: hidden; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; color: #222; font-size: 17px; font-weight: 700; line-height: 1.35; }
.bn-rel__item:hover .bn-rel__title { color: var(--bn-red); }
.bn-title > span > i { margin-right: 6px; }
@media (max-width: 991px) { .bn-rel { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575px) { .bn-rel { grid-template-columns: minmax(0, 1fr); } }

/* ---- Liên hệ: dòng 1 = thông tin (trái) + form (phải); dòng 2 = bản đồ toàn ngang ---- */
@media (min-width: 768px) { .bn-contact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; align-items: start; } }
.bn-contact + .bn-block { margin-top: 28px; }
.bn-map iframe { height: 420px; }

/* ---- Lưới ảnh (album.grid_lightbox): ô đều 4:3, rê chuột góc dưới-trái cuộn như trang sách + tiêu đề ---- */
.bn-gal { display: grid; grid-template-columns: repeat(var(--bn-gal-cols, 4), minmax(0, 1fr)); gap: 12px; }
.bn-gal__item { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 3; background: #eef2f4; }
.bn-gal__item img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.bn-gal__item:hover img, .bn-gal__item:focus-visible img { transform: scale(1.06); }
/* phần "mặt dưới trang giấy" lộ ra khi cuộn */
.bn-gal__curl { position: absolute; left: 0; bottom: 0; width: 0; height: 0; transition: width .35s ease, height .35s ease; pointer-events: none; }
.bn-gal__curl::before, .bn-gal__curl::after { content: ""; position: absolute; inset: 0; }
.bn-gal__curl::before { background: var(--bn-red-dark); clip-path: polygon(0 0, 0 100%, 100% 100%); }            /* vùng lộ ra */
.bn-gal__curl::after { background: linear-gradient(135deg, #fff 0%, #f1f1f1 45%, #bdbdbd 100%); clip-path: polygon(0 0, 100% 100%, 100% 0); box-shadow: -3px 3px 8px rgba(0,0,0,.35); } /* nếp gấp */
.bn-gal__item:hover .bn-gal__curl, .bn-gal__item:focus-visible .bn-gal__curl { width: 64px; height: 64px; }
/* tiêu đề hiện từ dưới lên, chừa chỗ cho nếp cuộn */
.bn-gal__cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 10px 74px; color: #fff; font-size: 15px; font-weight: 500; line-height: 1.3;
  background: linear-gradient(transparent, rgba(0,0,0,.78)); transform: translateY(100%); opacity: 0; transition: transform .35s ease, opacity .35s ease;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; pointer-events: none; }
.bn-gal__item:hover .bn-gal__cap, .bn-gal__item:focus-visible .bn-gal__cap { transform: none; opacity: 1; }
@media (max-width: 991px) { .bn-gal { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 575px) { .bn-gal { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }
/* thiết bị cảm ứng (không có hover): luôn hiện tiêu đề, bỏ nếp cuộn */
@media (hover: none) { .bn-gal__cap { transform: none; opacity: 1; padding-left: 12px; } .bn-gal__curl { display: none; } }
