/* Phần CSS chỉ dành riêng cho WordPress — nạp SAU CÙNG, sau mười tệp chép nguyên văn từ html-view.
   Mỗi nhóm quy tắc ghi rõ lý do; không sửa các tệp chép từ html-view. */

/* ---- 1. Thanh quản trị WordPress (chỉ khi đăng nhập): menu dính và thanh đọc không chui xuống dưới thanh quản trị ---- */
body.admin-bar .site-nav { top: 32px; }
body.admin-bar .reading-progress { top: 32px; }
@media (max-width: 782px) {
  body.admin-bar .site-nav { top: 46px; }
  body.admin-bar .reading-progress { top: 46px; }
}
@media (max-width: 600px) {
  /* Dưới 600px thanh quản trị không còn cố định (cuộn theo trang) */
  body.admin-bar .site-nav { top: 0; }
  body.admin-bar .reading-progress { top: 0; }
}

/* ---- 2. Quảng cáo: mã dán từ khu quản trị (thay cho ảnh minh hoạ của html-view) ---- */
/* Ô giữ chỗ (chỉ quản trị thấy): banner 728×90 cạnh logo */
.ad-slot--leader.ad-slot--giu-cho .ad-slot__inner { width: 728px; height: 90px; border-radius: 6px; }
/* Ô giữ chỗ 300×250 ở cột bên các trang trong */
.ad-slot--300 .ad-slot__inner { min-height: 250px; border-radius: 10px; }
/* Có mã thật: khối co theo nội dung quảng cáo, không ép chiều cao của ô giữ chỗ */
.ad-slot--co-ma { min-height: 0; }
.ad-slot--tall.ad-slot--co-ma { padding: 0; }
.ad-slot--co-ma .quang-cao { display: block; }
/* Banner đầu trang (leader) bị loại trừ: kích thước và trần 728px của nó do responsive.css của html-view quyết định. */
.ad-slot--co-ma:not(.ad-slot--leader) .quang-cao img, .ad-slot--co-ma .quang-cao iframe { max-width: 100%; }
.ad-slot--300.ad-slot--co-ma .quang-cao img, .ad-slot--tall.ad-slot--co-ma .quang-cao img { width: 100%; height: auto; border-radius: 10px; }
.ad-slot--leader.ad-slot--co-ma .quang-cao { display: block; }
/* Kích thước ảnh banner đầu trang do chính quy tắc của html-view quyết định (728×90, co dần theo màn hình trong responsive.css);
   không đặt lại ở đây vì selector dài hơn sẽ đè các quy tắc co theo màn hình. */
/* Cặp ô ngang có mã thật: mã có hai phần tử thì chia đôi, một phần tử thì chiếm hết dòng */
.ad-pair--co-ma { display: block; }
.ad-pair--co-ma .quang-cao { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ad-pair--co-ma .quang-cao > :only-child { grid-column: 1 / -1; }
.ad-pair--co-ma .quang-cao img { width: 100%; height: auto; border-radius: 12px; }
.ad-pair--co-ma .quang-cao a { display: block; }
/* Lời nhắc dành cho quản trị khi mã quảng cáo chạy ra rỗng (do giao diện cha sinh ra) */
.quang-cao .nhac-quan-tri { margin: 8px 0; padding: 10px 14px; border: 1px dashed #c9a227; border-radius: 8px; background: #fff8e1; color: #5d4a00; font-size: 13px; }

/* ---- 3. Chân trang: số cột thay đổi theo dữ liệu thật (cột nào không có nội dung thì ẩn) ---- */
@media (min-width: 1101px) {
  .site-footer__grid--3 { grid-template-columns: 1.75fr 1.5fr 1fr; }
  .site-footer__grid--2 { grid-template-columns: 1.75fr 1.5fr; }
  .site-footer__grid--1 { grid-template-columns: minmax(0, 1fr); }
}
.footer-contact li > span { color: #cfdcf0; }

/* ---- 4. Phân trang: dấu ba chấm giữa các số trang ---- */
.page-link--dots { border-color: transparent; background: transparent; min-width: 24px; padding: 0; color: var(--c-muted); }

/* ---- 5. Nội dung bài viết do WordPress sinh ra (trình soạn thảo cổ điển) ---- */
.prose .alignleft { float: left; margin: .3em 1.2em .6em 0; max-width: 50%; }
.prose .alignright { float: right; margin: .3em 0 .6em 1.2em; max-width: 50%; }
.prose .aligncenter { display: block; margin-inline: auto; }
.prose .wp-caption { max-width: 100%; }
.prose .wp-caption img { width: 100%; height: auto; }
.prose .wp-caption-text, .prose .wp-caption .wp-caption-text { margin-top: 8px; font-size: 13.5px; line-height: 1.5; color: var(--c-muted); text-align: center; font-style: italic; }
.prose iframe, .prose video, .prose embed { max-width: 100%; }
.prose iframe { border: 0; }
.prose::after { content: ""; display: table; clear: both; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---- 6. Khung ảnh rỗng (bài chưa có ảnh đại diện): giữ nguyên bố cục, có nền để không trông như lỗi ---- */
.thumb:empty { background: linear-gradient(135deg, #dfe8f6, #c9d9f1); }

/* ---- 7. Phân trang trong bài (<!--nextpage-->) ---- */
.post-single .pagination, .page-single .pagination { margin-top: 22px; }

/* ---- Banner mặc định (11/11/2026): đầu trang 910×125, ô giữa/cuối, cột bên 300×300 ---- */
.site-header__inner { height: auto; min-height: 105px; padding-block: 8px; }
.ad-slot--leader { flex: 0 1 910px; min-width: 0; margin-left: auto; }
.ad-slot--leader .quang-cao, .ad-slot--leader .qc-banner { display: block; }
.ad-slot--leader .qc-banner img, .ad-slot--leader.ad-slot--co-ma .quang-cao img { display: block; width: 100%; max-width: 910px; height: auto; aspect-ratio: 910 / 125; border-radius: 6px; margin-left: auto; }
.ad-slot--leader.ad-slot--giu-cho .ad-slot__inner { width: 910px; max-width: 100%; height: 125px; }
.qc-banner { display: block; }
.qc-banner img { display: block; width: 100%; height: auto; border-radius: 12px; }
.ad-slot--300 .qc-banner img, .ad-slot--tall .qc-banner img { border-radius: 10px; box-shadow: var(--shadow-md); }
@media (max-width: 1100px) { .ad-slot--leader { flex: 1 1 100%; width: 100%; } }
/* banner: không phóng to quá kích thước gốc ở cột bên; điện thoại xếp 1 cột cho mỗi ô quảng cáo đôi */
.ad-slot--co-ma.ad-slot--300 .quang-cao .qc-banner img, .ad-slot--co-ma.ad-slot--tall .quang-cao .qc-banner img { max-width: 300px; margin-inline: auto; }
@media (max-width: 767px) { .ad-pair--co-ma .quang-cao { grid-template-columns: minmax(0, 1fr); gap: 12px; } }
