/* =====================================================================
   OnMeeting – blog: lưu trữ tin tức, bài viết đơn, sidebar, mục lục, phân trang (glass sáng/tối)
   ===================================================================== */

.om-blog-wrap .om-wrap { padding-top: var(--om-sec-first); padding-bottom: 0; }
.om-blog { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
@media (max-width: 989px) { .om-blog { grid-template-columns: minmax(0, 1fr); } }

.om-empty { grid-column: 1 / -1; padding: 28px; text-align: center; color: var(--om-ink-3); }

/* ---------- Lưới bài viết ---------- */
.om-posts-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.om-pc { display: flex; flex-direction: column; border-radius: var(--om-r-xl); overflow: hidden; background: var(--om-glass-2); border: 1px solid var(--om-line-2); box-shadow: 0 0 0 1px var(--om-edge), inset 0 1px 0 var(--om-hi-2), var(--om-shadow-1); -webkit-backdrop-filter: blur(var(--om-blur)) saturate(160%); backdrop-filter: blur(var(--om-blur)) saturate(160%); transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.om-pc:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--om-accent) 45%, var(--om-line-1)); }
.om-pc-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--om-tile); }
.om-pc-media .om-pc-img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.om-pc:hover .om-pc-img { transform: scale(1.04); }
.om-pc-media .om-thumb { width: 100%; height: 100%; aspect-ratio: auto; }
.om-pc-body { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px 26px; }
.om-pc-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; line-height: 20px; color: var(--om-ink-3); }
.om-pc-dot { width: 1px; height: 14px; background: var(--om-divider); }
.om-pc-cat { font-weight: 600; color: var(--om-accent-text); }
.om-pc-title { margin: 0; font-size: 19px; line-height: 1.4; font-weight: 700; letter-spacing: -.01em; }
.om-pc-title a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: inherit; text-decoration: none; }
body.om-theme .om-pc-title a:hover { color: var(--om-accent-text); }
.om-pc-ex { margin: 0; font-size: 15px; line-height: 24px; color: var(--om-ink-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 640px) { .om-posts-2 { grid-template-columns: minmax(0, 1fr); } }

/* Thumb dự phòng (chưa có ảnh đại diện) */
.om-thumb { position: relative; width: 100%; aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; color: #fff; }
.om-thumb.thumb-1 { background: radial-gradient(60% 80% at 85% 10%, color-mix(in srgb, var(--om-accent) 55%, transparent), transparent 70%), linear-gradient(135deg, #141c36, #2a3466); }
.om-thumb.thumb-2 { background: radial-gradient(60% 80% at 15% 10%, color-mix(in srgb, var(--om-blue) 55%, transparent), transparent 70%), linear-gradient(135deg, #101830, #25305e); }
.om-thumb.thumb-3 { background: radial-gradient(60% 80% at 80% 90%, color-mix(in srgb, var(--om-violet) 55%, transparent), transparent 70%), linear-gradient(135deg, #12162e, #2c2658); }
.om-thumb::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px); background-size: 28px 28px; }
.om-thumb-ic { position: relative; width: 72px; height: 72px; border-radius: 20px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); display: flex; align-items: center; justify-content: center; }

/* ---------- Phân trang ---------- */
.om-pager { margin-top: 36px; }
.om-pager ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.om-pager li { margin: 0; }
.om-pager .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 12px; border-radius: 14px; background: var(--om-glass-3); border: 1px solid var(--om-line-2); box-shadow: 0 0 0 1px var(--om-edge); font-weight: 600; font-size: 15px; color: var(--om-ink); text-decoration: none; transition: border-color .15s ease, background-color .15s ease; }
body.om-theme .om-pager a.page-numbers:hover { border-color: var(--om-accent); background: var(--om-tile-hover); color: var(--om-ink); }
.om-pager .page-numbers.current { background: var(--om-accent); border-color: var(--om-accent); color: var(--om-on-accent); }
.om-pager .page-numbers.dots { background: transparent; border-color: transparent; box-shadow: none; }

/* ---------- Sidebar ---------- */
.om-side { display: flex; flex-direction: column; gap: 24px; }
.om-side-card, .om-side-widgets .widget { border-radius: var(--om-r-xl); padding: 22px 20px; margin: 0 0 24px; background: var(--om-glass-2); border: 1px solid var(--om-line-2); box-shadow: 0 0 0 1px var(--om-edge), inset 0 1px 0 var(--om-hi-2), var(--om-shadow-1); -webkit-backdrop-filter: blur(var(--om-blur)) saturate(160%); backdrop-filter: blur(var(--om-blur)) saturate(160%); }
.om-side-title, .om-side-widgets .widget-title, .om-side-widgets .widgettitle { display: block; margin: 0 0 14px; font-family: var(--om-mono); font-size: 13px; line-height: 20px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--om-accent-text); }
.om-side-list { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.om-side-list li { margin: 0; }
.om-side-item { display: flex; align-items: center; gap: 14px; padding: 8px 6px; border-radius: 14px; color: var(--om-ink); text-decoration: none; transition: background-color .15s ease; }
body.om-theme .om-side-item:hover { background: var(--om-tile-hover); color: var(--om-ink); }
.om-side-thumb { flex: none; width: 84px; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: var(--om-tile); }
.om-side-thumb img, .om-side-thumb .om-pc-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.om-side-thumb .om-thumb { width: 100%; height: 100%; aspect-ratio: auto; }
.om-side-thumb .om-thumb-ic { width: 32px; height: 32px; border-radius: 10px; }
.om-side-thumb .om-thumb-ic .om-icon { width: 18px; height: 18px; }
.om-side-name { min-width: 0; font-size: 14.5px; line-height: 21px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Bài viết đơn ---------- */
.om-single-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 18px; }
.om-single-info { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: 14px; line-height: 22px; color: var(--om-ink-3); }
body.om-theme .om-single-cat { display: inline-flex; align-items: center; height: 28px; padding: 0 14px; border-radius: var(--om-pill); background: color-mix(in srgb, var(--om-accent) 16%, transparent); border: 1px solid color-mix(in srgb, var(--om-accent) 40%, transparent); color: var(--om-accent-text); font-size: 13px; font-weight: 700; text-decoration: none; }
body.om-theme .om-single-cat:hover { background: var(--om-accent); color: var(--om-on-accent); }
.om-share { display: flex; gap: 8px; }
.om-share-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: 0; padding: 0; border: 1px solid var(--om-line-1); border-radius: 50%; background: var(--om-glass-3); color: var(--om-ink); cursor: pointer; transition: border-color .15s ease, background-color .15s ease, color .15s ease; }
body.om-theme .om-share-btn:hover { border-color: var(--om-accent); background: var(--om-tile-hover); color: var(--om-accent-text); }
.om-share-btn.is-done { border-color: #2fbf71; color: #2fbf71; }

.om-entry-card, .om-page-card { padding: var(--om-pad-card); }
.om-page-card { max-width: none; margin: 0; }
@media (max-width: 640px) { .om-entry-card, .om-page-card { padding: 22px 18px; } }

/* Nội dung bài viết */
.om-entry { font-size: 17px; line-height: 30px; color: var(--om-ink-2); overflow-wrap: break-word; }
.om-entry > *:first-child { margin-top: 0; }
.om-entry p, .om-entry ul, .om-entry ol, .om-entry blockquote, .om-entry table, .om-entry figure, .om-entry pre { margin: 0 0 1.2em; }
.om-entry h2 { margin: 1.9em 0 .6em; font-size: 28px; line-height: 1.25; scroll-margin-top: 110px; }
.om-entry h3 { margin: 1.6em 0 .5em; font-size: 22px; line-height: 1.3; scroll-margin-top: 110px; }
.om-entry h4 { margin: 1.4em 0 .4em; font-size: 18px; line-height: 1.35; }
body.om-theme .om-entry a { color: var(--om-accent-text); font-weight: 600; text-decoration: none; }
body.om-theme .om-entry a:hover { text-decoration: underline; text-underline-offset: 3px; }
.om-entry ul { list-style: disc; padding-left: 1.4em; }
.om-entry ol { list-style: decimal; padding-left: 1.5em; }
.om-entry li { margin-bottom: .45em; }
.om-entry li::marker { color: var(--om-accent-text); }
.om-entry strong { color: var(--om-ink); font-weight: 700; }
.om-entry img { display: block; max-width: 100%; height: auto; border-radius: var(--om-r-md); margin: 1.2em auto; }
.om-entry figure { margin-left: 0; margin-right: 0; }
.om-entry figcaption { margin-top: -.6em; text-align: center; font-size: 14px; line-height: 22px; color: var(--om-ink-3); }
.om-entry blockquote { padding: 16px 22px; border: 0; border-left: 4px solid var(--om-accent); border-radius: 0 var(--om-r-sm) var(--om-r-sm) 0; background: var(--om-tile); font-style: normal; color: var(--om-ink); }
.om-entry blockquote p:last-child { margin-bottom: 0; }
.om-entry code { padding: 2px 7px; border-radius: 6px; background: var(--om-tile-hover); color: var(--om-accent-text); font-family: var(--om-mono); font-size: .88em; }
.om-entry pre { padding: 18px 20px; overflow-x: auto; border-radius: var(--om-r-md); background: #0d1224; color: #e6ebff; font-family: var(--om-mono); font-size: 14px; line-height: 24px; border: 1px solid var(--om-line-3); }
.om-entry pre code { padding: 0; background: transparent; color: inherit; }
.om-entry table { display: block; width: 100%; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 15.5px; line-height: 24px; }
.om-entry th, .om-entry td { padding: 12px 14px; border: 1px solid var(--om-divider); text-align: left; vertical-align: top; }
.om-entry th { background: var(--om-tile); color: var(--om-ink); font-weight: 700; }
.om-entry hr { margin: 2em 0; border: 0; border-top: 1px solid var(--om-divider); }
.om-entry.entry-content { padding: 0; }
@media (max-width: 640px) {
	.om-entry { font-size: 16.5px; line-height: 28px; }
	.om-entry h2 { font-size: 24px; }
	.om-entry h3 { font-size: 20px; }
}

/* Mục lục */
.om-toc { margin: 1.6em 0; border: 1px solid var(--om-line-3); border-radius: var(--om-r-md); background: var(--om-tile); }
.om-toc summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 18px; cursor: pointer; font-size: 16px; line-height: 24px; font-weight: 700; color: var(--om-ink); }
.om-toc summary::-webkit-details-marker { display: none; }
.om-toc summary::marker { content: ""; }
.om-toc summary .om-icon:first-child { color: var(--om-accent-text); }
.om-toc summary span { flex: 1; }
.om-toc .om-toc-chev { transition: transform .2s ease; color: var(--om-ink-3); }
.om-toc:not([open]) .om-toc-chev { transform: rotate(-90deg); }
.om-toc-list { margin: 0; padding: 0 18px 16px; list-style: none; counter-reset: omtoc; }
.om-toc-list > li { counter-increment: omtoc; margin: 0; padding: 4px 0; }
body.om-theme .om-toc-list a, body.om-theme .om-entry .om-toc-list a { font-weight: 500; color: var(--om-ink-2); text-decoration: none; font-size: 15.5px; line-height: 24px; }
body.om-theme .om-toc-list a:hover { color: var(--om-accent-text); text-decoration: none; }
.om-toc-list a.lv2 { font-weight: 600; }
.om-toc-list a.lv2::before { content: counter(omtoc) ". "; color: var(--om-accent-text); }
.om-toc-sub { margin: 4px 0 4px 22px; padding: 0; list-style: none; border-left: 2px solid var(--om-divider); }
.om-toc-sub li { margin: 0; padding: 2px 0 2px 14px; }
.om-toc-sub a { font-size: 14.5px; color: var(--om-ink-3); }
.om-entry .om-toc-list, .om-entry .om-toc-sub { list-style: none; }
.om-entry .om-toc-list li::marker { content: ""; }

/* Hộp tác giả */
.om-author { display: flex; align-items: flex-start; gap: 16px; margin-top: 32px; padding: 18px 20px; border: 1px solid var(--om-line-3); border-radius: var(--om-r-md); background: var(--om-tile); }
.om-author-av { flex: none; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--om-accent) 18%, transparent); color: var(--om-accent-text); }
.om-author-av .om-author-img { width: 100%; height: 100%; margin: 0; border-radius: 0; object-fit: cover; }
.om-author-tx { min-width: 0; }
.om-author-tx b { display: block; font-size: 16px; line-height: 24px; color: var(--om-ink); }
.om-author-tx p { margin: 4px 0 0; font-size: 14.5px; line-height: 23px; color: var(--om-ink-3); }

/* Có thể bạn thích */
.om-related { margin-top: 36px; }
.om-related-title { margin: 0 0 16px; font-size: 24px; line-height: 1.3; font-weight: 800; }
.om-related-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 640px) { .om-related-grid { grid-template-columns: minmax(0, 1fr); } }

/* Cuộn mượt tới #id */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
