/* Utility: an truc quan nhung van doc duoc boi trinh doc man hinh - dung cho
   cac <label> cua o nhap chi dung placeholder truoc day (khong co label that
   se vi pham chuan accessibility). */
.dtlx-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* max-width tuyet doi (khong dung %) - dung % khien noi dung qua rong tren man hinh lon (kho doc)
   va qua hep tren dien thoai (80% cua 375px, tru them padding 2 ben chi con ~250px chu). */
.dtlx-page-wrap { max-width: 100%; width: 80%; margin: 0 auto; padding: 20px 24px 60px; }

/* Trang danh muc/single/Page co gan template rieng cua Flatsome (archive.php,
   single.php, page-left-sidebar.php, page-right-sidebar.php, page-full-width.php,
   page-blank.php...) - KHONG di qua .dtlx-page-wrap (chi Page dung template
   "Mac dinh" (Default) moi chay qua page.php cua child theme va co wrapper
   do). Flatsome LUON boc noi dung chinh cua MOI template bang cung 1 cap:
   <div class="page-wrapper ..."><div class="row ...">...</div></div> - du la
   .row hay .row.row-large - nen chi can nham dung con truc tiep cua
   .page-wrapper la bao quat duoc TAT CA bien the template, khong can liet ke
   tung template rieng. CHI o cap wrapper ngoai cung nay - KHONG dung selector
   chung ".row.row-large" moi noi vi no se an vao ca cac [row] shortcode long
   ben trong noi dung bai viet cu, lam sai layout goc da luu trong noi dung. */
.page-wrapper > .row {
    max-width: 100% !important;
    width: 80% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    float: none !important;
}

/* Template "Blank" cua Flatsome (page-blank.php) - dung cho cac Trang duoc
   dung hoan toan bang UX Builder [row] shortcode (Lien he, Ly thuyet cac
   hang, Mo phong, Tai lieu on thi...). Template nay KHONG co .page-wrapper
   hay .row bao ngoai nhu cac template khac - noi dung nam thang trong
   #content.content-area. Ap dung cung 1 chuan 80% o day cho dong bo. */
#content.content-area {
    max-width: 100% !important;
    width: 80% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    float: none !important;
}
.dtlx-page-wrap--home { max-width: none; width: 100%; padding: 0; }

/* Responsive theo tung khoang man hinh - man hinh nho hon thi ty le % rong
   hon de khong bi bop qua chat (padding co dinh 2 ben da chiem ty le lon hon
   tren man hinh nho). */
@media (max-width: 1024px) {
    .dtlx-page-wrap,
    .page-wrapper > .row,
    #content.content-area { width: 92% !important; }
}
@media (max-width: 768px) {
    .dtlx-page-wrap,
    .page-wrapper > .row,
    #content.content-area { width: 100% !important; }
}
@media (max-width: 600px) {
    .dtlx-page-wrap { width: 100%; padding: 20px 16px 40px; }
    .page-wrapper > .row,
    #content.content-area { padding-left: 16px !important; padding-right: 16px !important; box-sizing: border-box; }
}
.dtlx-page-wrap--home .dtlx-page-main,
.dtlx-page-wrap--home .dtlx-page-content { width: 100%; max-width: none; padding: 0; }

.dtlx-page-breadcrumb { font-size: 13px; color: #888; margin-bottom: 20px; }
.dtlx-page-breadcrumb a { color: #888; text-decoration: none; }
.dtlx-page-breadcrumb a:hover { color: #1e4fd8; }
.dtlx-breadcrumb-fallback .dtlx-crumb-sep { margin: 0 6px; color: #ccc; }

.dtlx-page-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
}
.dtlx-page-full { display: block; }
.dtlx-page-full .dtlx-page-content { padding: 0; }

.dtlx-page-title {
    text-align: center;
    font-size: 35px;
    font-weight: 600;
    line-height: 2;
    color: #123a9e;
    margin: 0 0 24px;
    transform: scaleY(1.2);
}

.dtlx-page-content { font-size: 15px; color: #333; line-height: 1.8; }
.dtlx-page-content img { max-width: 100%; height: auto; border-radius: 6px; }
.dtlx-page-content h2, .dtlx-page-content h3 { color: #123a9e; margin: 24px 0 12px; }
.dtlx-page-content ul, .dtlx-page-content ol { padding-left: 22px; }
.dtlx-page-content table { display: block; overflow-x: auto; border-collapse: collapse; max-width: 100%; }
.dtlx-page-content table td, .dtlx-page-content table th { border: 1px solid #ddd; padding: 6px 10px; }
.dtlx-page-content p { margin: 0 0 16px; }

.dtlx-page-share {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}
.dtlx-page-share-label { font-size: 13px; font-weight: 700; color: #333; }
.dtlx-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f2f4f7;
    color: #123a9e;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-size: 15px;
}
.dtlx-share-btn:hover { background: #1e4fd8; color: #fff; }

.dtlx-page-sidebar {
    background: #f7f8fa;
    border-radius: 8px;
    padding: 18px 20px 20px;
}
.dtlx-page-sidebar-title {
    font-size: 14px;
    font-weight: 800;
    color: #123a9e;
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e7e9ee;
}
.dtlx-related-item {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    margin-bottom: 14px;
}
.dtlx-related-thumb {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
}
.dtlx-related-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef0f5;
    color: #a8b0c2;
}
.dtlx-related-thumb-empty .dashicons { font-size: 22px; width: 22px; height: 22px; }
.dtlx-related-title {
    font-size: 13px;
    font-weight: 600;
    color: #222;
    line-height: 1.4;
}
.dtlx-related-item:hover .dtlx-related-title { color: #1e4fd8; }
.dtlx-related-empty { font-size: 13px; color: #999; }

@media (max-width: 900px) {
    .dtlx-page-grid { grid-template-columns: 1fr; }
}

/* Muc luc (trang chi tiet khoa hoc) */
.dtlx-toc {
    background: #f7f8fa;
    border: 1px solid #e7e9ee;
    border-radius: 8px;
    padding: 18px 22px;
    margin: 0 0 30px;
}
.dtlx-toc-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 800;
    color: #123a9e;
    margin-bottom: 12px;
}
.dtlx-toc-list { margin: 0; padding-left: 20px; }
.dtlx-toc-list li { margin-bottom: 8px; font-size: 13px; }
.dtlx-toc-list a { color: #333; text-decoration: none; }
.dtlx-toc-list a:hover { color: #1e4fd8; text-decoration: underline; }

/* Khoi lien he cuoi noi dung khoa hoc */
.dtlx-course-contact-box {
    background: #f7f8fa;
    border-left: 3px solid #1e4fd8;
    border-radius: 6px;
    padding: 18px 22px;
    margin: 30px 0 0;
}
.dtlx-course-contact-box p { font-size: 14px; color: #333; margin: 0 0 6px; }
.dtlx-course-contact-box p:first-child { margin-bottom: 10px; }

html { scroll-behavior: smooth; max-width: 100%; overflow-x: hidden; }
/* overflow-x: clip (khong phai hidden/auto/scroll) - chan tran ngang nhung
   KHONG pha position: sticky cua header nhu hidden se lam (spec: sticky chi
   hoat dong neu KHONG co ancestor nao overflow != visible, va clip la ngoai le
   duy nhat van giu duoc sticky). */
body { max-width: 100%; overflow-x: clip; }

/* Flatsome đặt nền của thẻ html theo màu footer. Child theme cũ của website
   chính có nền #fff cho vùng nội dung; khôi phục rõ ràng để archive/page không
   bị lộ nền xám đậm khi child theme mới được bật. */
body:not(.home) #main,
body:not(.home) .page-wrapper,
body:not(.home) .blog-wrapper {
    background: #fff;
}

/* Keep legacy Flatsome content inside the viewport without changing its data or URLs. */
.dtlx-page-content,
.dtlx-page-content .row,
.dtlx-page-content .col,
.dtlx-page-content .col-inner,
.entry-content,
.entry-content .row,
.entry-content .col,
.entry-content .col-inner {
    min-width: 0;
    max-width: 100%;
}
.dtlx-page-content img,
.entry-content img {
    max-width: 100% !important;
    height: auto !important;
}
/* Emoji that appear in old post content (vd icon dart/target) - WordPress
   tu chuyen thanh <img class="emoji"> va co san rule loi de giu nho (1em)
   trong wp-includes; rule ".entry-content img" o tren tung "width:auto
   !important" de qua cascade sau va lam vo hieu rule do, khien emoji phong
   to bang ca cot noi dung. Khoi phuc dung kich thuoc nho nhu van ban. */
.dtlx-page-content img.emoji,
.entry-content img.emoji {
    width: 1em !important;
    height: 1em !important;
    max-width: 1em !important;
    display: inline !important;
    margin: 0 .05em 0 .1em !important;
    vertical-align: -0.1em !important;
    border-radius: 0 !important;
}
.dtlx-page-content iframe,
.dtlx-page-content video,
.entry-content iframe,
.entry-content video {
    max-width: 100% !important;
}
.dtlx-page-content h1,
.dtlx-page-content h2,
.dtlx-page-content h3,
.entry-content h1,
.entry-content h2,
.entry-content h3 {
    overflow-wrap: anywhere;
}

@media (max-width: 600px) {
    .dtlx-page-wrap--home .img,
    .dtlx-page-wrap--home .img-inner {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }
    .dtlx-page-wrap--home .img img {
        display: block;
        width: 100% !important;
        max-width: 100% !important;
        object-fit: contain;
    }
    .dtlx-page-title,
    .dtlx-archive-title {
        font-size: clamp(24px, 8vw, 32px);
        line-height: 1.35;
        transform: none;
    }
}

/* Danh sach Thong bao (archive-thong_bao.php) */
.dtlx-archive-title {
    text-align: center;
    font-size: 35px;
    font-weight: 600;
    line-height: 2;
    color: #123a9e;
    margin: 0 0 30px;
    transform: scaleY(1.2)
}
.dtlx-archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 30px;
}
.dtlx-archive-card {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
    background: #fff;
}
.dtlx-archive-thumb {
    display: block;
    aspect-ratio: 4/3;
    background-size: cover;
    background-position: center;
    background-color: #f2f4f7;
}
.dtlx-archive-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef0f5;
    color: #a8b0c2;
}
.dtlx-archive-thumb-empty .dashicons { font-size: 48px; width: 48px; height: 48px; }
.dtlx-folder-intro { margin-bottom: 30px; }
.dtlx-archive-body { padding: 18px 20px; }
.dtlx-archive-body h3 { margin: 0 0 8px; font-size: 15px; line-height: 1.4; text-align: center; }
.dtlx-archive-body h3 a { color: #222; text-decoration: none; font-weight: 700; }
.dtlx-archive-body h3 a:hover { color: #1e4fd8; }
.dtlx-archive-body p { font-size: 13px; color: #666; line-height: 1.6; margin: 0 0 12px; text-align: center; }
.dtlx-archive-more {
    display: block;
    width: fit-content;
    margin: 0 auto;
    padding: 8px 18px;
    background: #0d2b6b;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}
.dtlx-archive-more:hover { background: #09204f; }

.dtlx-archive-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 40px;
}
.dtlx-archive-pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 6px;
    background: #f2f4f7;
    color: #123a9e;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}
.dtlx-archive-pagination .page-numbers.current { background: #1e4fd8; color: #fff; }
.dtlx-archive-pagination .page-numbers:hover:not(.current) { background: #e2e7f5; }

@media (max-width: 900px) {
    .dtlx-archive-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .dtlx-archive-grid { grid-template-columns: 1fr; }
}
