html { font-size: 16px; max-width: 100%; overflow-x: hidden; }
body { max-width: 100%; overflow-x: hidden; color: #182235; font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; }
*, *::before, *::after { box-sizing: border-box; }
img, video, iframe { max-width: 100%; }
table { max-width: 100%; }
main { min-width: 0; overflow-x: clip; }
.container, .container-fluid { --bs-gutter-x: 1.5rem; }
.navbar { min-width: 0; }
.navbar-brand { min-width: 0; max-width: 65%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.navbar-collapse { min-width: 0; }
.form-control, .form-select { min-height: 44px; font-size: 1rem; }
.form-control { max-width: 100%; }
.table-responsive { border-radius: .5rem; }
a { color: #0758c9; }
h1 { font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.2; overflow-wrap: break-word; word-break: normal; }
.admin-content { max-width: 1400px; }
.admin-data-table { min-width: 760px; }
.partner-editor { max-width: 1100px; }
.public-partners { max-width: 1400px; }
.public-partners .blockquote { color: #063b78; }
.public-partners .blockquote p { color: #063b78; }
.partner-image { display: block; width: 100%; height: 180px; object-fit: contain; }
.hero { background: linear-gradient(120deg, #eef7ff 0%, #f7f3ff 100%); }
.hero-card { background: linear-gradient(145deg, #123d90, #6329a6); color: white; border-radius: 1.25rem; min-height: 260px; padding: 2rem; font-size: 1.35rem; box-shadow: 0 20px 45px rgba(18,61,144,.25); }
.hero-card span { display: block; font-weight: 800; font-size: 4.5rem; line-height: 1; opacity: .85; margin-bottom: 3rem; }
.content { width: 100%; max-width: 820px; }
.article { overflow-wrap: break-word; word-break: normal; }
.article h1 { font-size: clamp(1.85rem, 4vw, 3rem); line-height: 1.2; overflow-wrap: break-word; word-break: normal; }
.article p { max-width: 100%; font-size: 1.12rem; line-height: 1.7; overflow-wrap: break-word; word-break: normal; white-space: normal; }
.rich-editor .ql-editor { min-height: 280px; font-size: 1rem; line-height: 1.6; }
.rich-editor .ql-editor p { margin: 0; }
.rich-editor .ql-editor p:empty { display: none; }
.rich-editor { width: 100%; min-height: 320px; }
.local-rich-editor { width: 100%; min-width: 0; border: 1px solid #ced4da; border-radius: .375rem; overflow: hidden; background: #fff; }
.local-rich-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; padding: .45rem; border-bottom: 1px solid #ced4da; background: #f8f9fa; max-height: 140px; overflow-y: auto; }
.local-rich-button, .local-rich-select { min-height: 34px; border: 1px solid #adb5bd; border-radius: .25rem; background: #fff; color: #212529; padding: .25rem .5rem; font: inherit; cursor: pointer; }
.local-rich-button:hover, .local-rich-button:focus-visible, .local-rich-button.active { background: #e7f1ff; border-color: #0d6efd; color: #084298; }
.local-rich-button[title="Đậm"] { font-weight: 700; }
.local-rich-button[title="Nghiêng"] { font-style: italic; }
.local-rich-button[title="Gạch chân"] { text-decoration: underline; }
.local-rich-content { min-height: 320px; max-height: 620px; overflow: auto; padding: 1rem; outline: 0; font-family: Arial, sans-serif; font-size: 1rem; line-height: 1.6; overflow-wrap: break-word; word-break: normal; }
.local-rich-content:focus { box-shadow: inset 0 0 0 2px rgba(13,110,253,.2); }
.local-rich-content table { width: 100%; border-collapse: collapse; table-layout: fixed; margin: 1rem 0; }
.local-rich-content th, .local-rich-content td { border: 1px solid #adb5bd; padding: .5rem; min-width: 3rem; vertical-align: top; overflow-wrap: break-word; word-break: normal; }
.local-rich-editor textarea.rich-editor:not([hidden]) { display: block; width: 100%; min-height: 320px; border: 0; border-radius: 0; resize: vertical; font-family: Consolas, monospace; font-size: .95rem; line-height: 1.5; padding: 1rem; }
.rich-content, .rich-content * { max-width: 100%; overflow-wrap: break-word; word-break: normal; }
.rich-content { min-width: 0; font-size: 1.08rem; line-height: 1.7; white-space: normal; }
.rich-content > :first-child { margin-top: 0; }
.rich-content > :last-child { margin-bottom: 0; }
.rich-content p, .rich-content li { margin-bottom: .75rem; white-space: normal; }
.rich-content > br { display: block; content: ""; margin-bottom: .75rem; }
.rich-content ol, .rich-content ul { padding-left: 2rem; margin-bottom: 1rem; }
.rich-content blockquote { border-left: .25rem solid #0d6efd; margin: 1rem 0; padding: .5rem 1rem; color: #495057; }
.rich-content pre, .rich-content code { overflow-wrap: anywhere; word-break: break-word; }
.rich-content pre { max-width: 100%; overflow-x: auto; padding: 1rem; border-radius: .5rem; background: #f8f9fa; }
.rich-content table { width: 100%; max-width: 100%; border-collapse: collapse; margin: 1rem 0; table-layout: fixed; }
.rich-content th, .rich-content td { border: 1px solid #adb5bd; padding: .5rem; vertical-align: top; overflow-wrap: break-word; word-break: normal; }
.rich-content img { display: block; max-width: 100%; height: auto; margin: 1rem auto; }
.rich-content .ql-align-center { text-align: center; }
.rich-content .ql-align-right { text-align: right; }
.rich-content .ql-align-justify { text-align: justify; }
.course-summary { overflow-wrap: break-word; word-break: normal; }
.course-summary p { margin-bottom: .5rem; }
.course-summary ul, .course-summary ol { padding-left: 1.5rem; margin-bottom: .75rem; }
.card { border-radius: .8rem; }
.site-footer { background: #dff1ff; color: #063b78; }
.site-footer h2 { color: #063b78; }
.site-footer p, .site-footer a { color: #063b78 !important; }
.site-footer a:hover, .site-footer a:focus-visible { color: #032b59 !important; }
.navbar-brand { letter-spacing: .05em; }
.site-logo { display: block; max-width: 220px; height: 48px; object-fit: contain; }
.site-banner { display: block; width: 100%; max-height: 420px; object-fit: cover; }
.course-card-image, .article-card-image { display: block; width: 100%; height: 190px; object-fit: cover; }
.product-card .card-body { min-height: 130px; }
.product-card h2, .product-card h3 { overflow-wrap: break-word; word-break: normal; }
.product-image-link { display: block; color: inherit; }
.product-image-link:focus-visible { outline: 3px solid rgba(13,110,253,.45); outline-offset: -3px; }
.product-title-link { color: inherit; text-decoration: none; }
.product-title-link:hover, .product-title-link:focus-visible { color: #0758c9; text-decoration: underline; }
.product-duration { font-size: .95rem; white-space: nowrap; }
.article-hero-image { display: block; width: 100%; max-height: 460px; object-fit: cover; border-radius: .75rem; }
.image-preview { height: 140px; padding: .5rem; border: 1px solid #dee2e6; border-radius: .5rem; background: #f8f9fa; }
.image-preview img { width: 100%; height: 100%; object-fit: contain; }
.zalo-floating { position: fixed; right: 24px; bottom: 28px; z-index: 1040; display: grid; place-items: center; width: 72px; height: 72px; border: 5px solid #fff; border-radius: 50%; background: #0866ff; color: #0866ff; text-decoration: none; box-shadow: 0 8px 24px rgba(0, 64, 160, .32); transition: transform .2s ease, box-shadow .2s ease; }
.zalo-floating::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: #fff; }
.zalo-floating::after { content: ""; position: absolute; right: 5px; bottom: 4px; width: 18px; height: 18px; background: #fff; clip-path: polygon(0 0, 100% 0, 100% 100%); transform: rotate(12deg); }
.zalo-floating-label { position: relative; z-index: 1; font-size: 1.25rem; font-weight: 700; letter-spacing: -.04em; }
.zalo-floating:hover, .zalo-floating:focus-visible { color: #0758dc; transform: translateY(-3px) scale(1.04); box-shadow: 0 12px 30px rgba(0, 64, 160, .42); }
.admin-menu { position: sticky; top: 73px; z-index: 1010; background: rgba(255,255,255,.97); border-bottom: 1px solid #dee2e6; box-shadow: 0 .15rem .45rem rgba(0,0,0,.05); }
.admin-menu-scroll { display: flex; gap: .75rem; padding: 1rem 0; overflow-x: auto; white-space: nowrap; scrollbar-width: thin; }
.admin-menu .btn { flex: 0 0 auto; padding: .65rem 1.1rem; }
.admin-menu .btn.active { color: #fff; background-color: #0d6efd; border-color: #0d6efd; }
@media (min-width: 992px) {
    .admin-menu-scroll { overflow-x: visible; flex-wrap: wrap; }
}
@media (max-width: 576px) {
    .display-4 { font-size: 2.35rem; }
    .admin-menu { top: 69px; }
    .zalo-floating { right: 16px; bottom: 18px; width: 64px; height: 64px; }
    .article { padding-left: 1rem; padding-right: 1rem; }
    .article h1 { font-size: clamp(1.65rem, 8vw, 2.2rem); }
    .article p, .rich-content { font-size: 1rem; line-height: 1.6; }
    .container, .container-fluid { --bs-gutter-x: 1rem; }
    .navbar { padding-top: .7rem !important; padding-bottom: .7rem !important; }
    .site-logo { max-width: 170px; height: 40px; }
    .navbar-collapse { padding-top: .75rem; }
    .navbar-nav { align-items: stretch !important; gap: .15rem !important; }
    .navbar-nav .nav-link, .navbar-nav .btn { display: block; width: 100%; text-align: left; padding: .7rem .75rem; }
    .navbar-nav .btn { margin-left: 0 !important; }
    .admin-menu { top: 64px; }
    .admin-menu-scroll { gap: .5rem; padding: .7rem 0; }
    .admin-menu .btn { padding: .6rem .8rem; font-size: .95rem; }
    .partner-editor h1 { font-size: 2rem; }
    .public-partners h1 { font-size: 2rem; }
    .display-4 { line-height: 1.15; }
    .card-body { overflow-wrap: break-word; word-break: normal; }
}
@media (min-width: 577px) and (max-width: 991.98px) {
    .navbar-collapse { padding-top: .75rem; }
    .navbar-nav { align-items: stretch !important; }
    .navbar-nav .nav-link, .navbar-nav .btn { display: block; width: 100%; text-align: left; }
}
