/*
 * Học Vật Lý theme 3.0 — nền tảng: biến màu, bài viết, danh sách, bảng lọc nội dung.
 * Các biến --blue, --navy, --ink, --muted, --line, --bg, --surface, --radius, --shadow được plugin
 * HVL LMS đọc (kèm giá trị dự phòng), nên giữ nguyên tên.
 */
:root{
  --blue:#075ee8;--blue-dark:#064bbd;--navy:#05275d;--ink:#071c43;--muted:#607089;--line:#e2e9f3;--bg:#f5f8fc;--surface:#fff;
  --green:#11865b;--orange:#f59e0b;
  --radius-sm:12px;--radius:18px;--radius-lg:26px;
  --shadow-sm:0 6px 18px rgba(12,42,88,.06);--shadow:0 18px 48px rgba(12,42,88,.10);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;color:var(--ink);font-family:Inter,"Segoe UI",Arial,sans-serif;background:var(--surface);line-height:1.6;text-rendering:optimizeLegibility}
a{color:inherit;text-decoration:none}
img{max-width:100%;height:auto}
.hvl-sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.hvl-skip-link{position:absolute;left:12px;top:-60px;z-index:200;padding:10px 14px;border-radius:10px;background:var(--navy);color:#fff;font-weight:700;transition:top .15s}
.hvl-skip-link:focus{top:10px}
.ui-icon{width:1.25em;height:1.25em;display:inline-block;vertical-align:-.18em;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{transition:none!important;animation:none!important}}

/* Nút */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:48px;padding:12px 20px;border-radius:12px;background:var(--blue);color:#fff!important;font-weight:800;box-shadow:0 10px 24px rgba(7,94,232,.18);transition:transform .18s,box-shadow .18s}
.btn:hover{transform:translateY(-2px);box-shadow:0 14px 30px rgba(7,94,232,.24)}
.btn .ui-icon{width:19px;height:19px}
.btn.secondary{background:#fff;color:var(--blue)!important;border:1px solid #cbd9ec;box-shadow:none}

/* Bài viết */
.article-shell{max-width:1180px;margin:0 auto;padding:34px 30px 70px}
.breadcrumbs{font-size:14px;color:#65748d;display:flex;gap:11px;flex-wrap:wrap;margin:0 0 20px}
.breadcrumbs a:hover{color:var(--blue)}
.article-header h1{font-size:42px;line-height:1.18;letter-spacing:-.8px;margin:0 0 28px}
.article-meta{display:flex;align-items:center;gap:7px;margin:-16px 0 26px;color:var(--muted);font-size:14px}
.article-meta .ui-icon{width:18px;height:18px}
.article-content{font-size:17px;color:#17243a}
.article-content>*{max-width:100%}
.article-content h2{font-size:28px;color:var(--navy);margin-top:42px}
.article-content h3{font-size:22px}
.article-content p{margin:0 0 1.15em}
.article-content img{border-radius:10px}
.article-content pre,.article-content code{max-width:100%;overflow:auto}
.article-content iframe{max-width:100%}
.article-content .alignwide{width:min(1320px,calc(100vw - 40px));max-width:none;margin-left:50%;transform:translateX(-50%)}
.article-content .alignfull{width:100vw;max-width:none;margin-left:50%;transform:translateX(-50%)}
.fullwidth-shell{max-width:none;margin:0;padding:0}
.fullwidth-shell>*{max-width:none}
.learning-shell{min-height:60vh;background:var(--bg)}

/* Trang chứa shortcode của plugin (HAT Question Bank, HVL LMS): khung rộng, plugin tự có phần đầu trang */
.hvl-plugin-shell{max-width:none;min-height:60vh;margin:0;padding:0 0 40px;background:var(--bg)}
.hvl-qb-page .hvl-plugin-shell{padding:6px 12px 40px}

/* Danh sách bài viết */
.listing{max-width:1280px;margin:auto;padding:50px 30px}
.posts-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}
.post-card{background:#fff;border:1px solid var(--line);border-radius:17px;overflow:hidden;box-shadow:var(--shadow-sm);transition:transform .2s,box-shadow .2s}
.post-card:hover{transform:translateY(-3px);box-shadow:var(--shadow)}
.post-card>a{display:block;padding-bottom:16px}
.post-card img{width:100%;aspect-ratio:16/9;object-fit:cover}
.post-card h2,.post-card h3,.post-card p{margin-left:16px;margin-right:16px}
.post-card h2,.post-card h3{font-size:17px;line-height:1.45}
.post-card p{font-size:14px;color:var(--muted)}
.empty{text-align:center;padding:100px 20px}
.empty h1{font-size:80px;margin:0}

/* Thông báo trang cũ [hatquiz_2027] */
.hvl-legacy-notice{max-width:640px;margin:60px auto;padding:30px;border:1px solid var(--line);border-radius:var(--radius);background:#fff;text-align:center;box-shadow:var(--shadow-sm)}
.hvl-legacy-notice h2{margin:0 0 10px;color:var(--navy);font-size:22px}

/* ===== Trung tâm nội dung / trang lọc ===== */
.hvl-hub{max-width:1240px;margin:0 auto;padding:48px 22px 70px}
.filter-panel{border:1px solid #dfe7f2;border-radius:20px;padding:24px;background:#fff;box-shadow:0 12px 35px rgba(11,36,84,.05)}
.topic-tabs{display:flex;gap:10px;flex-wrap:wrap;padding-bottom:20px;border-bottom:1px solid #e8edf5}
.topic-tab{display:inline-flex;gap:7px;align-items:center;min-height:44px;padding:0 17px;border:1px solid #dce4ef;border-radius:12px;color:#35435d;font-weight:800;background:#fff;transition:.2s}
.topic-tab span{color:#9aa6b9}
.topic-tab:hover{border-color:#80b2f4;color:#075ccf}
.topic-tab.active{background:#075fcf;color:#fff;border-color:#075fcf;box-shadow:0 7px 18px rgba(7,95,207,.18)}
.topic-tab.active span{color:#dceaff}
.chapter-tabs{padding-top:14px}
.filter-tools{display:grid;grid-template-columns:1fr auto;gap:12px;margin:16px 0 20px}
.select-tabs{display:block;padding-bottom:14px}
.topic-select-wrap{max-width:340px}
.topic-select{width:100%;border:0;outline:0;background:transparent;font:inherit;font-weight:700;color:#35435d;padding:0 4px}
.select-wrap,.search-wrap{height:48px;border:1px solid #d9e2ef;border-radius:13px;display:flex;align-items:center;background:#fff}
.select-wrap{padding:0 12px}
.filter-icon{font-size:11px;color:#075fcf;margin-right:7px}
.search-wrap{padding:0 16px;gap:10px}
.search-wrap span{font-size:24px;color:#075fcf}
.search-wrap input{width:100%;border:0;outline:0;font:inherit;color:#26334b}
.filter-submit{border:0;border-radius:12px;padding:0 24px;background:#075fcf;color:#fff;font-weight:800;cursor:pointer}
.result-count{margin:-5px 0 12px;color:#74829a;font-size:13px}
.result-count strong{color:#0b2454}
.hub-table-wrap{overflow:auto;border-radius:15px;border:1px solid #e1e7f0}
.hub-table{width:100%;border-collapse:collapse;min-width:1000px}
.hub-table th{background:#082e68;color:#fff;text-align:left;padding:16px 18px;font-size:12px;letter-spacing:.08em}
.hub-table th:first-child{width:70px}
.hub-table td{padding:16px 18px;border-bottom:1px solid #e6ebf3;border-right:1px solid #eef2f7;color:#26334b;vertical-align:middle}
.hub-table tr:last-child td{border-bottom:0}
.hub-table tbody tr:hover{background:#f7faff}
.row-no{font-family:monospace;color:#71809a}
.post-name{font-weight:750;color:#162a4e}
.post-name:hover{color:#075fcf}
.type-pill{display:inline-flex;align-items:center;padding:6px 11px;border-radius:999px;background:#eaf3ff;border:1px solid #b8d5ff;color:#075fcf;font-size:12px;font-weight:800}
.type-pill.neutral{background:#f3f5f8;border-color:#dfe4eb;color:#68758b}
.empty-state{text-align:center!important;padding:44px!important;color:#71809a!important}
.hub-pagination{display:flex;justify-content:center;gap:7px;margin-top:20px}
.hub-pagination a{width:38px;height:38px;border:1px solid #dce4ef;border-radius:10px;display:grid;place-items:center;color:#355071;font-weight:800}
.hub-pagination a.active{background:#075fcf;color:#fff;border-color:#075fcf}

@media(max-width:1000px){.posts-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){
  body{padding-bottom:68px}
  .article-shell{padding:24px 18px 50px}
  .article-header h1{font-size:30px}
  .article-content{font-size:16px}
  .listing{padding:32px 16px}
  .hvl-hub{padding:28px 14px 30px}
  .filter-panel{padding:15px;border-radius:16px}
  .topic-tabs{padding-bottom:14px}
  .topic-tab{min-height:40px;padding:0 13px}
  .topic-select-wrap{max-width:none}
  .filter-tools{grid-template-columns:1fr}
  .filter-submit{height:46px}
  .hub-table-wrap{border:0;overflow:visible}
  .hub-table{min-width:0}
  .hub-table thead{display:none}
  .hub-table,.hub-table tbody,.hub-table tr,.hub-table td{display:block;width:100%}
  .hub-table tr{border:1px solid #e1e7f0;border-radius:14px;margin-bottom:12px;padding:10px 12px;background:#fff;box-shadow:0 5px 18px rgba(11,36,84,.04)}
  .hub-table td{border:0;padding:6px 0;display:grid;grid-template-columns:88px 1fr;gap:10px}
  .hub-table td:before{content:attr(data-label);font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:#8b98ac;font-weight:800}
  .hub-table td:first-child{display:none}
}
@media(max-width:560px){
  .posts-grid{grid-template-columns:1fr}
  .article-content .alignwide{width:100%;margin-left:0;transform:none}
}
