/* =========================================================
   Bổ sung cho WordPress – không sửa style.css gốc.
   - Footer 4 cột: mỗi cột là một khu vực widget (.footer-col--1..4)
   - Link thay nút ở chỗ PHP dựng sẵn (phân trang, tab chuyên mục, chip bỏ lọc)
   - Nội dung soạn bằng Classic Editor (ảnh căn trái/phải, chú thích, bảng)
   ========================================================= */

/* ---------- Footer: cột widget ---------- */
.footer-col { display: grid; align-content: start; gap: 32px; min-width: 0; }
.footer-widget > nav { display: contents; }

@media (max-width: 1180px) {
  .footer-col--4 { grid-column: 1 / -1; }
  .footer-col--4 .footer-contact ul,
  .footer-col--4 .footer-contact > ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 40px; }
}
@media (max-width: 960px) {
  .footer-col--1 { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .footer-col--4 .footer-contact ul { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .footer-col--1,
  .footer-col--4 { grid-column: 1 / -1; }
}

/* ---------- Thân trang chủ không có cột trái ---------- */
.layout.no-sidebar { grid-template-columns: minmax(0, 1fr); grid-template-areas: "content"; }

/* ---------- Phân trang dạng link (PHP) giống nút (JS) ---------- */
a.page-btn { text-decoration: none; }
a.page-btn:hover { border-color: var(--g-800); color: var(--g-800); }
a.page-btn.is-current:hover { color: var(--white); }
span.page-btn[aria-disabled="true"] { opacity: .4; cursor: not-allowed; }

/* ---------- Tab chuyên mục dạng link ---------- */
a.news-tab { text-decoration: none; }
.news-tab[aria-current="page"] { border-color: var(--g-800); background: var(--g-800); color: var(--white); }
.news-tab[aria-current="page"] .count { background: rgba(255, 255, 255, .18); color: var(--white); }

/* ---------- Chip bỏ lọc dạng link ---------- */
a.chip-clear { text-decoration: none; }

/* ---------- Liên hệ: thẻ kênh và form là hai khối liền nhau ---------- */
.contact-section.is-cards { padding-bottom: 0; }
.contact-layout.no-office { grid-template-columns: minmax(0, 1fr); }

/* ---------- Ảnh đại diện nhân viên ---------- */
.agent-avatar { overflow: hidden; }
.agent-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Ô bẫy spam của form: ẩn với người dùng ---------- */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Menu 404 dùng menu WordPress ---------- */
.error-links > li > a > .icon:not(:first-child) { display: none; }

/* ---------- Khối nội dung tự do ---------- */
.prose-center { margin-inline: auto; }

/* ---------- Chi tiết bài viết: nội dung trong thẻ trắng có lề trong, cột phải cố định khi cuộn ---------- */
.article-main {
  padding: clamp(20px, 3.5vw, 44px);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}
.article-main .article-cover { margin-bottom: clamp(24px, 3vw, 36px); box-shadow: none; }
/* Chữ trải hết bề ngang thẻ cho thẳng hàng với ảnh bìa và dòng Từ khóa / Chia sẻ (~80 ký tự/dòng). */
.article-main .prose { max-width: none; }
.article-main .prose > :last-child { margin-bottom: 0; }
.article-main .article-foot { margin-top: clamp(28px, 3vw, 40px); }
/* Bài trước / sau nằm trong thẻ trắng: dùng viền thay cho bóng để không thành "thẻ trong thẻ". */
.article-main .article-nav-item { border: 1px solid var(--line); background: var(--bg); box-shadow: none; }
.article-main .article-nav-item:hover { border-color: var(--g-800); box-shadow: none; }

/* Khoảng cách giữa cột nội dung và cột phải (gốc: clamp(28px, 4vw, 56px)). */
.article-layout { gap: clamp(20px, 2.5vw, 32px); }

/* Cột phải dính dưới header khi cuộn; cột cao hơn màn hình thì main.js chỉnh `top` theo hướng cuộn. */
@media (min-width: 961px) {
  .article-aside { position: sticky; top: calc(var(--header-h) + 16px); }
}

/* ---------- Khối "Bài viết liên quan" / "Kho xưởng tương tự" gọn hơn (gốc .page-section: 56–96px) ---------- */
.related-section { padding-block: clamp(36px, 4.5vw, 56px); }

/* ---------- Trang khu vực (/khu-vuc/…) ---------- */
.region-areas { padding-block: clamp(28px, 3.5vw, 44px) 0; }
.region-areas-title { margin: 0 0 14px; font-size: 1rem; font-weight: 700; color: var(--ink); }
.region-areas-title:empty { display: none; }
.region-section { padding-block: clamp(36px, 4.5vw, 56px); }

.detail-place a { color: inherit; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.detail-place a:hover { color: var(--o-600); }

/* ---------- Dải kêu gọi: bớt khoảng trống phía trên (gốc: clamp(64px, 8vw, 104px)) ---------- */
.cta-band { margin-top: clamp(40px, 5vw, 64px); }

/* ---------- Nội dung soạn bằng Classic Editor ---------- */
.prose img { height: auto; border-radius: var(--radius); }
.prose .alignleft { float: left; margin: .3em 1.5em 1em 0; }
.prose .alignright { float: right; margin: .3em 0 1em 1.5em; }
.prose .aligncenter { display: block; margin-inline: auto; }
.prose .wp-caption { max-width: 100%; }
.prose .wp-caption-text { margin-top: 8px; font-size: .875rem; color: var(--muted); text-align: center; }
.prose ol { padding-left: 1.4em; }
.prose table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.prose th,
.prose td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; }
.prose th { background: var(--g-50); }
.prose a { color: var(--g-800); }
.prose::after { content: ""; display: table; clear: both; }
.detail-card > p { margin: 0 0 1em; line-height: 1.75; }

@media (max-width: 600px) {
  .prose .alignleft,
  .prose .alignright { float: none; margin: 0 0 1em; }
}

/* ---------- Thanh quản trị WordPress khi đăng nhập ---------- */
.admin-bar .site-header { top: var(--wp-admin--admin-bar--height, 32px); }
