/**
 * @Project NUKEVIET 4.x — Theme DriveHub
 * @File themes/drivehub/css/theme.css
 * @Description Hệ thiết kế kiểu landing page (theo trang chủ DriveCenter Lite): màu chủ đạo 30% + màu nhấn 10%, thẻ bo
 *              tròn đổ bóng nhiều lớp, menu dính, chân trang tối. Màu lấy từ biến --th-primary / --th-accent (Cấu hình
 *              giao diện), các sắc độ khác tính bằng color-mix. Nạp sau Bootstrap 3 của NukeViet và "khoác áo" cho các
 *              thành phần Bootstrap của module lõi (panel, form, nút, bảng, phân trang).
 */

/* ===================== Biến ===================== */
:root {
    --th-primary: #15803d;
    --th-accent: #f59e0b;
    --th-primary-dark: color-mix(in srgb, var(--th-primary) 62%, #000);
    --th-primary-deep: color-mix(in srgb, var(--th-primary) 38%, #06120b);
    --th-primary-soft: color-mix(in srgb, var(--th-primary) 9%, #fff);
    --th-primary-light: color-mix(in srgb, var(--th-primary) 55%, #fff);
    --th-accent-dark: color-mix(in srgb, var(--th-accent) 80%, #000);
    --th-accent-soft: color-mix(in srgb, var(--th-accent) 12%, #fff);
    --th-ink: #0f172a;
    --th-text: #334155;
    --th-muted: #64748b;
    --th-line: #e5e7eb;
    --th-bg-muted: #f8fafc;
    --th-radius: 16px;
    --th-radius-sm: 10px;
    --th-shadow: 0 2px 6px rgba(0, 0, 0, .05), 0 8px 20px rgba(0, 0, 0, .07), 0 20px 40px rgba(0, 0, 0, .06), 0 0 0 1px color-mix(in srgb, var(--th-primary) 7%, transparent);
    --th-shadow-hover: 0 4px 10px rgba(0, 0, 0, .07), 0 12px 28px rgba(0, 0, 0, .10), 0 28px 56px rgba(0, 0, 0, .08), 0 0 0 1px color-mix(in srgb, var(--th-primary) 14%, transparent);
    --th-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --th-nav-h: 72px;
}

/* ===================== Nền tảng ===================== */
html { scroll-behavior: smooth; }
body.th-body {
    margin: 0;
    font-family: var(--th-font);
    font-size: 15px;
    line-height: 1.65;
    color: var(--th-text);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}
:where(body.th-body) a { color: var(--th-primary); }
:where(body.th-body) a:hover, :where(body.th-body) a:focus { color: var(--th-accent-dark); }
:where(body.th-body) :where(h1, h2, h3, h4) { color: var(--th-ink); font-family: var(--th-font); }
img { max-width: 100%; height: auto; }
.th-wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.th-wrap::after { content: ""; display: table; clear: both; }
.th-muted { color: var(--th-muted); }
.th-skip { position: absolute; left: -9999px; top: 8px; z-index: 2000; background: #fff; padding: 8px 14px; border-radius: 8px; }
.th-skip:focus { left: 12px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--th-accent) 55%, transparent); outline-offset: 2px; }

/* ===================== Nút ===================== */
.th-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 20px; border-radius: 10px; border: 2px solid transparent;
    font-weight: 700; font-size: 14px; line-height: 1.3; text-decoration: none !important;
    cursor: pointer; transition: background .2s, color .2s, transform .2s, box-shadow .2s;
    white-space: nowrap;
}
.th-btn-lg { padding: 14px 28px; font-size: 16px; border-radius: 12px; }
.th-btn-block { display: flex; width: 100%; }
.th-btn-primary { background: var(--th-primary); color: #fff !important; }
.th-btn-primary:hover { background: var(--th-primary-dark); }
.th-btn-accent { background: var(--th-accent); color: #fff !important; box-shadow: 0 6px 16px color-mix(in srgb, var(--th-accent) 30%, transparent); }
.th-btn-accent:hover { background: var(--th-accent-dark); }
.th-btn-ghost { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .35); color: #fff !important; backdrop-filter: blur(4px); }
.th-btn-ghost:hover { background: rgba(255, 255, 255, .2); }
.th-btn-outline { background: #fff; border-color: var(--th-primary); color: var(--th-primary) !important; }
.th-btn-outline:hover { background: var(--th-primary-soft); }

/* ===================== Thanh liên hệ ===================== */
.th-topbar { background: var(--th-primary-deep); color: rgba(255, 255, 255, .85); font-size: 12.5px; }
.th-topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 36px; }
.th-topbar-info { display: flex; flex-wrap: wrap; gap: 22px; }
.th-topbar .fa { color: var(--th-accent); margin-right: 4px; }
.th-topbar a { color: #fff !important; }
.th-topbar a:hover { color: var(--th-accent) !important; }
.th-topbar-social { display: flex; gap: 14px; }
.th-topbar-social .fa { color: rgba(255, 255, 255, .8); }

/* ===================== Menu chính ===================== */
.th-nav { position: sticky; top: 0; z-index: 1000; background: #fff; border-bottom: 1px solid #f1f5f9; transition: box-shadow .25s; }
.th-nav-scrolled { box-shadow: 0 2px 20px rgba(0, 0, 0, .12); }
.th-nav-inner { display: flex; align-items: center; gap: 20px; min-height: var(--th-nav-h); }
.th-brand { display: flex; align-items: center; gap: 12px; text-decoration: none !important; flex-shrink: 0; margin-right: 12px; }
.th-brand-logo { height: 52px; width: auto; object-fit: contain; }
.th-brand-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--th-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 19px; flex-shrink: 0; }
.th-brand-icon-accent { background: var(--th-accent); }
.th-brand-text { display: flex; flex-direction: column; min-width: 0; }
.th-brand-name { font-weight: 900; font-size: 17px; line-height: 1.2; color: var(--th-primary); }
.th-brand-tagline { white-space: nowrap; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #94a3b8; font-weight: 600; margin-top: 2px; }

.th-menu { flex: 1; display: flex; justify-content: center; min-width: 0; }
.th-menu-list, .th-submenu { list-style: none; margin: 0; padding: 0; }
.th-menu .th-menu-list { display: flex; align-items: center; gap: 2px; flex-wrap: nowrap; }
.th-menu .th-menu-list > li { position: relative; }
.th-menu .th-menu-list > li > a {
    display: block; position: relative; padding: 10px 11px; white-space: nowrap;
    color: #374151 !important; font-weight: 600; font-size: 14px; text-decoration: none !important;
}
.th-menu .th-menu-list > li > a::after {
    content: ""; position: absolute; left: 11px; right: 11px; bottom: 4px; height: 2px; border-radius: 2px;
    background: var(--th-accent); transform: scaleX(0); transition: transform .2s; transform-origin: left;
}
.th-menu .th-menu-list > li:hover > a::after, .th-menu .th-menu-list > li.active > a::after { transform: scaleX(1); }
.th-menu .th-menu-list > li.active > a { color: var(--th-primary) !important; }
.th-menu .th-menu-list > li > a .fa { font-size: 12px; margin-left: 2px; }
.th-menu .th-submenu {
    position: absolute; top: 100%; left: 0; min-width: 230px; z-index: 50; padding: 8px 0;
    background: #fff; border-radius: 14px; border: 1px solid #f1f5f9; box-shadow: 0 18px 40px rgba(15, 23, 42, .14);
    opacity: 0; visibility: hidden; transform: translateY(6px); transition: all .2s;
}
.th-menu li:hover > .th-submenu, .th-menu li:focus-within > .th-submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.th-menu .th-submenu .th-submenu { top: -8px; left: 100%; }
.th-menu .th-submenu a { display: block; padding: 9px 18px; font-size: 14px; color: #374151 !important; text-decoration: none !important; }
.th-menu .th-submenu a:hover { background: var(--th-bg-muted); color: var(--th-accent-dark) !important; }

.th-nav-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; margin-left: 12px; }
.th-icon-btn { width: 38px; height: 38px; border-radius: 50%; background: var(--th-primary-soft); color: var(--th-accent) !important; display: flex; align-items: center; justify-content: center; transition: all .2s; }
.th-icon-btn:hover { background: var(--th-primary); color: #fff !important; }
.th-dropdown { position: relative; padding-right: 14px; border-right: 1px solid var(--th-line); }
.th-login-btn { background: none; border: 0; padding: 8px 0; color: var(--th-primary) !important; font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none !important; display: inline-flex; gap: 6px; align-items: center; }
.th-login-btn:hover { color: var(--th-accent-dark) !important; }
.th-dropdown-menu {
    position: absolute; right: 0; top: 100%; min-width: 230px; padding: 8px 0; z-index: 60;
    background: #fff; border: 1px solid #f1f5f9; border-radius: 14px; box-shadow: 0 18px 40px rgba(15, 23, 42, .14);
    opacity: 0; visibility: hidden; transform: translateY(6px); transition: all .2s;
}
.th-dropdown:hover .th-dropdown-menu, .th-dropdown.th-open .th-dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.th-dropdown-menu a { display: block; padding: 9px 18px; font-size: 14px; color: #374151 !important; text-decoration: none !important; }
.th-dropdown-menu a .fa { color: var(--th-accent); margin-right: 6px; }
.th-dropdown-menu a:hover { background: var(--th-bg-muted); color: var(--th-accent-dark) !important; }
.th-divider { display: block; height: 1px; margin: 6px 0; background: #f1f5f9; }

.th-burger { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; border-radius: 10px; background: var(--th-primary-soft); color: var(--th-primary); font-size: 20px; cursor: pointer; }
.th-mobile { display: none; border-top: 1px solid #f1f5f9; padding: 12px 20px 20px; background: #fff; max-height: calc(100vh - var(--th-nav-h)); overflow-y: auto; }
.th-mobile.th-open { display: block; }
.th-mobile .th-menu-list > li > a, .th-mobile .th-submenu a, .th-mobile-login a {
    display: block; padding: 11px 6px; font-weight: 600; color: #374151 !important; text-decoration: none !important; border-bottom: 1px solid #f8fafc;
}
.th-mobile .th-menu-list > li > a .fa { display: none; }
.th-mobile .th-submenu { padding-left: 16px; }
.th-mobile .th-submenu a { font-weight: 500; font-size: 14px; color: var(--th-muted) !important; }
.th-mobile-login { margin: 12px 0; }
.th-mobile-title { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #94a3b8; padding: 8px 6px 4px; }
.th-mobile-login a { color: var(--th-primary) !important; }
.th-mobile-login .fa { color: var(--th-accent); margin-right: 6px; }

/* ===================== Hero ===================== */
.th-hero { position: relative; overflow: hidden; min-height: min(82vh, 760px); display: flex; align-items: center; background: var(--th-primary-deep); color: #fff; }
.th-hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .6; }
.th-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, color-mix(in srgb, var(--th-primary-deep) 78%, transparent) 0%, color-mix(in srgb, var(--th-primary) 52%, transparent) 45%, color-mix(in srgb, var(--th-primary-light) 26%, transparent) 100%);
}
.th-hero-inner { position: relative; z-index: 2; width: 100%; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 72px; }
.th-hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; margin-bottom: 22px; border-radius: 999px; font-size: 13.5px; font-weight: 600; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(4px); }
.th-pulse { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; animation: th-pulse 1.6s infinite; }
@keyframes th-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
body.th-body .th-hero-title { color: #fff; font-weight: 900; font-size: clamp(30px, 4.4vw, 52px); line-height: 1.12; margin: 0 0 22px; letter-spacing: -.01em; }
.th-hero-title span { display: block; color: var(--th-accent); }
.th-hero-desc { font-size: 18px; color: rgba(255, 255, 255, .82); max-width: 560px; margin: 0 0 32px; }
.th-hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 34px; }
.th-hero-actions .th-btn-primary { background: var(--th-accent); box-shadow: 0 10px 24px rgba(0, 0, 0, .25); }
.th-hero-actions .th-btn-primary:hover { background: var(--th-accent-dark); }
.th-hero-trust { display: flex; flex-wrap: wrap; gap: 22px; font-size: 14px; color: rgba(255, 255, 255, .75); }
.th-hero-trust .fa { color: #86efac; margin-right: 6px; }
.th-hero-card { background: #fff; color: var(--th-text); border-radius: 20px; padding: 30px; box-shadow: 0 25px 60px rgba(0, 0, 0, .3); max-width: 430px; justify-self: end; width: 100%; }
body.th-body .th-hero-card h3 { color: var(--th-primary); font-weight: 800; font-size: 22px; margin: 0 0 4px; }
.th-hero-card .th-muted { font-size: 14px; margin: 0 0 18px; }
.th-check-list { list-style: none; padding: 0; margin: 0 0 22px; }
.th-check-list li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; font-size: 14.5px; }
.th-check-list .fa { color: var(--th-primary); margin-top: 4px; }
.th-hero-card-note { margin: 14px 0 0; font-size: 12px; color: #94a3b8; text-align: center; }

/* ===================== Dải số liệu ===================== */
.th-stats { background: linear-gradient(90deg, var(--th-primary-dark) 0%, var(--th-primary) 100%); color: #fff; padding: 22px 0; }
.th-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 20px; text-align: center; }


.th-stat-value { font-size: 32px; font-weight: 900; line-height: 1.1; }
.th-stat-label { font-size: 13.5px; color: rgba(255, 255, 255, .78); margin-top: 4px; }

/* ===================== Khối nội dung ===================== */
.th-section { padding: 84px 0; background: #fff; }
.th-section-muted { background: var(--th-bg-muted); }
.th-section-head { text-align: center; max-width: 680px; margin: 0 auto 52px; }
.th-eyebrow { color: var(--th-accent-dark); font-weight: 700; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 8px; }
body.th-body .th-section-title { font-size: clamp(24px, 2.6vw, 32px); font-weight: 900; color: var(--th-primary); margin: 0; }
.th-section-title::after { content: ""; display: block; width: 60px; height: 4px; border-radius: 2px; background: var(--th-accent); margin: 14px auto 0; }
.th-section-intro { color: var(--th-muted); margin: 16px 0 0; }
.th-grid { display: grid; gap: 24px; }
.th-grid-4 { grid-template-columns: repeat(4, 1fr); }
.th-grid-3 { grid-template-columns: repeat(3, 1fr); max-width: 1080px; margin: 0 auto; gap: 30px; }
.th-card { background: #fff; border-radius: var(--th-radius); padding: 28px; box-shadow: var(--th-shadow); transition: transform .25s, box-shadow .25s; }
.th-card:hover { transform: translateY(-4px); box-shadow: var(--th-shadow-hover); }

.th-feature-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--th-primary-soft); color: var(--th-primary); display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 20px; }
.th-feature-icon.th-icon-accent { background: var(--th-accent-soft); color: var(--th-accent-dark); }
body.th-body .th-feature h3 { font-size: 18px; font-weight: 800; color: var(--th-primary); margin: 0 0 8px; }
.th-feature p { font-size: 14px; color: var(--th-muted); margin: 0; }

.th-testimonial-who { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.th-testimonial-who strong { display: block; color: var(--th-primary); }
.th-testimonial-who small { display: block; color: #94a3b8; font-size: 12px; }
.th-avatar { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; color: #fff; background: linear-gradient(135deg, var(--th-primary-light), var(--th-primary)); flex-shrink: 0; }
.th-avatar-accent { background: linear-gradient(135deg, var(--th-accent), var(--th-accent-dark)); }
.th-stars { color: var(--th-accent); letter-spacing: 2px; margin-bottom: 10px; }
.th-testimonial p { font-size: 14px; margin: 0 0 14px; }
.th-tag { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--th-primary-soft); color: var(--th-primary); }

.th-link-card { display: block; text-align: center; padding: 36px 30px; border-radius: 24px; text-decoration: none !important; color: var(--th-text) !important; }
.th-link-card:hover { transform: translateY(-6px); }
.th-link-card-icon { width: 80px; height: 80px; margin: 0 auto 24px; border-radius: 20px; background: var(--th-primary-soft); color: var(--th-primary); display: flex; align-items: center; justify-content: center; font-size: 32px; transition: background .3s, color .3s; }
.th-link-card:hover .th-link-card-icon { background: var(--th-accent); color: #fff; }
body.th-body .th-link-card h3 { font-weight: 900; font-size: 21px; color: var(--th-primary); margin: 0 0 12px; }
.th-link-card p { color: var(--th-muted); font-size: 14px; margin: 0 0 22px; }
.th-link-card-more { color: var(--th-accent-dark); font-weight: 700; font-size: 14px; }
.th-link-card-more .fa { transition: transform .2s; }
.th-link-card:hover .th-link-card-more .fa { transform: translateX(4px); }

/* ===================== Trang thường ===================== */
.th-page-head { background: linear-gradient(120deg, var(--th-primary-deep), var(--th-primary)); color: #fff; padding: 38px 0 32px; }
body.th-body .th-page-title { color: #fff; font-size: clamp(22px, 2.6vw, 32px); font-weight: 900; margin: 0 0 8px; }
.th-breadcrumbs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; font-size: 13.5px; }
.th-breadcrumbs li + li::before { content: "/"; margin: 0 8px; color: rgba(255, 255, 255, .45); }
.th-breadcrumbs a { color: rgba(255, 255, 255, .82) !important; }
.th-breadcrumbs a:hover { color: var(--th-accent) !important; }
.th-section-body { padding-top: 36px; padding-bottom: 56px; min-height: 40vh; }
.th-landing-module { min-height: 10px; }
.th-sidebar .panel { margin-bottom: 24px; }

/* Khoác áo các thành phần Bootstrap 3 của module lõi */
body.th-body .panel { border-radius: var(--th-radius); border: 0; box-shadow: var(--th-shadow); overflow: hidden; }
body.th-body .panel-default > .panel-heading, body.th-body .panel-primary > .panel-heading { background: #fff; color: var(--th-primary); border-bottom: 1px solid #f1f5f9; font-weight: 800; padding: 14px 18px; }
body.th-body .panel-heading a { color: var(--th-primary); }
body.th-body .panel-body { padding: 18px; }
body.th-body .well { border-radius: var(--th-radius); border: 0; background: var(--th-bg-muted); box-shadow: none; }
body.th-body .btn { border-radius: 10px; font-weight: 600; }
body.th-body .btn-primary, body.th-body .btn-info { background: var(--th-primary); border-color: var(--th-primary); color: #fff; }
body.th-body .btn-primary:hover, body.th-body .btn-primary:focus, body.th-body .btn-info:hover, body.th-body .btn-info:focus { background: var(--th-primary-dark); border-color: var(--th-primary-dark); }
body.th-body .btn-warning { background: var(--th-accent); border-color: var(--th-accent); color: #fff; }
body.th-body .form-control { border-radius: 10px; border-color: var(--th-line); box-shadow: none; height: auto; padding: 9px 13px; }
body.th-body textarea.form-control { min-height: 90px; }
body.th-body .form-control:focus { border-color: var(--th-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--th-accent) 25%, transparent); }
body.th-body .table > thead > tr > th { background: var(--th-bg-muted); color: var(--th-ink); border-bottom-width: 1px; }
body.th-body .pagination > li > a, body.th-body .pagination > li > span { color: var(--th-primary); border-color: var(--th-line); }
body.th-body .pagination > .active > a, body.th-body .pagination > .active > span { background: var(--th-primary); border-color: var(--th-primary); color: #fff; }
body.th-body .label-primary { background: var(--th-primary); }
body.th-body .nav-tabs > li.active > a { color: var(--th-primary); font-weight: 700; }
body.th-body .alert { border-radius: var(--th-radius-sm); }
body.th-body .news_column .panel-body h3 a, body.th-body .news-content h3 a { color: var(--th-ink); }

/* ===================== Chân trang ===================== */
.th-footer { background: #0f1f17; background: color-mix(in srgb, var(--th-primary-deep) 70%, #0b1220); color: rgba(255, 255, 255, .62); padding: 60px 0 26px; font-size: 14px; }
.th-footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.3fr; gap: 40px; margin-bottom: 44px; }
.th-footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; color: #fff !important; font-weight: 900; font-size: 18px; text-decoration: none !important; }
.th-footer-brand img { height: 42px; background: #fff; border-radius: 10px; padding: 4px; }
.th-footer-about { line-height: 1.7; margin: 0 0 18px; }
.th-footer-social { display: flex; gap: 10px; }
.th-footer-social a, .th-footer-social a:link { width: 36px; height: 36px; border-radius: 10px; background: rgba(255, 255, 255, .1); color: #fff !important; display: flex; align-items: center; justify-content: center; transition: background .2s; }
.th-footer-social a:hover { background: var(--th-accent); }
body.th-body .th-footer-title { color: rgba(255, 255, 255, .85); font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 16px; }
.th-footer-links, .th-footer-contact { list-style: none; margin: 0; padding: 0; }
.th-footer-links li, .th-footer-contact li { padding: 5px 0; }
.th-footer a { color: rgba(255, 255, 255, .62); }
.th-footer a:hover { color: var(--th-accent) !important; }
.th-footer-contact .fa { color: var(--th-accent); }
.th-legal { margin-top: 18px; padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); font-size: 12.5px; color: rgba(255, 255, 255, .72); }
.th-footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; color: rgba(255, 255, 255, .42); }
.th-footer-bottom-links a { color: rgba(255, 255, 255, .5); margin-left: 16px; }
.th-footer .panel, .th-footer .panel-body { background: transparent; box-shadow: none; padding: 0; color: inherit; }

/* Nút nổi + lên đầu trang */
.th-float-cta {
    position: fixed; right: 22px; bottom: 28px; z-index: 990; display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 20px; border-radius: 999px; background: var(--th-accent); color: #fff !important; font-weight: 700; font-size: 14px;
    text-decoration: none !important; box-shadow: 0 14px 30px rgba(0, 0, 0, .25); animation: th-bounce 2.2s infinite;
}
.th-float-cta:hover { background: var(--th-accent-dark); }
@keyframes th-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.th-to-top { position: fixed; right: 22px; bottom: 92px; z-index: 989; width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--th-primary); color: #fff; font-size: 20px; opacity: 0; visibility: hidden; transition: all .25s; cursor: pointer; box-shadow: 0 8px 18px rgba(0, 0, 0, .2); }
.th-to-top.th-show { opacity: 1; visibility: visible; }

/* Thông báo cookie / hết phiên của core */
.cookie-notice { position: fixed; left: 16px; bottom: 16px; z-index: 995; max-width: 420px; background: #fff; border-radius: 14px; padding: 14px 18px; box-shadow: var(--th-shadow-hover); font-size: 13px; }
.cookie-notice button { float: right; background: none; border: 0; font-size: 18px; line-height: 1; }
#timeoutsess { display: none; }

/* ===================== Responsive ===================== */
@media (max-width: 1279px) {
    .th-menu, .th-nav-actions { display: none; }
    .th-burger { display: inline-flex; align-items: center; justify-content: center; }
    .th-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .th-hide-md { display: none; }
}
@media (max-width: 991px) {
    .th-hero { min-height: 0; }
    .th-hero-inner { grid-template-columns: 1fr; gap: 32px; padding-top: 48px; padding-bottom: 56px; }
    .th-hero-card { justify-self: stretch; max-width: none; }
    .th-grid-3 { grid-template-columns: 1fr; max-width: 520px; }
    .th-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .th-section { padding: 60px 0; }
}
@media (max-width: 767px) {
    .th-topbar { display: none; }
    :root { --th-nav-h: 62px; }
    .th-brand-logo { height: 42px; }
    .th-brand-name { font-size: 15px; }
    .th-brand-tagline { display: none; }
    .th-grid-4 { grid-template-columns: 1fr; }
    .th-footer-grid { grid-template-columns: 1fr; }
    .th-hero-desc { font-size: 16px; }
    .th-btn-lg { padding: 13px 20px; font-size: 15px; }
    .th-hero-actions .th-btn { flex: 1 1 100%; }
    .th-stat-value { font-size: 26px; }
    .th-float-cta { right: 14px; bottom: 16px; padding: 11px 16px; }
    .th-to-top { right: 14px; bottom: 76px; }
    .th-wrap { padding: 0 16px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Hộp tiêu đề riêng của trang DriveHub nằm dưới dải tiêu đề của theme → kiểu thẻ sáng, tránh hai dải màu liền nhau */
.th-section-body .dh-page-head { background: var(--th-primary-soft); color: var(--th-text); box-shadow: none; }
.th-section-body .dh-page-head h2 { color: var(--th-primary); }
.th-section-body .dh-page-head p { color: var(--th-muted); }
.th-section-body .dh-page-head .fa { background: #fff; border-color: transparent; color: var(--th-accent-dark); }
.th-section-body .dh-page-head .dh-page-head-link { background: #fff; border-color: transparent; color: var(--th-primary) !important; box-shadow: 0 1px 3px rgba(15, 23, 42, .08); }
.th-section-body .dh-page-head .dh-page-head-link .fa { background: none; color: var(--th-accent-dark); }
@media (max-width: 991px) { .th-hero-inner { padding-top: 40px; } }

/* ══════════════ TRANG ĐĂNG NHẬP — khung 2 cột cân đối: form | chọn cổng (theme.php → nv_theme_drivehub_login_shell) ══════════════ */
.th-login { padding: 8px 0 12px; }
.th-login-grid {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: stretch;
    max-width: 1040px; margin: 0 auto;
}
.th-login-main, .th-login-side { border-radius: 20px; padding: 40px 40px 36px; }
.th-login-main { background: #fff; box-shadow: var(--th-shadow); display: flex; flex-direction: column; justify-content: center; }
.th-login-side {
    order: -1; color: #fff; display: flex; flex-direction: column;
    background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--th-accent) 22%, transparent) 0, transparent 55%),
                linear-gradient(150deg, var(--th-primary-deep), var(--th-primary));
}
.th-login-form-title { font-size: 26px; line-height: 1.25; font-weight: 800; color: var(--th-ink); margin: 0 0 6px; }
.th-login-kicker { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: color-mix(in srgb, var(--th-accent) 70%, #fff); }
.th-login-heading { margin: 0 0 10px; font-size: 26px; line-height: 1.25; font-weight: 800; color: #fff; }
.th-login-intro { margin: 0 0 24px; color: rgba(255, 255, 255, .82); font-size: 14.5px; line-height: 1.6; }
.th-login-portals { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.th-login-portal {
    display: flex; align-items: center; gap: 14px; padding: 14px 16px; min-height: 64px; border-radius: 14px;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); color: #fff !important; text-decoration: none !important;
    transition: background .2s, transform .2s, border-color .2s;
}
.th-login-portal:hover, .th-login-portal:focus-visible { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .32); transform: translateX(2px); }
.th-login-portal:focus-visible { outline: 3px solid var(--th-accent); outline-offset: 2px; }
.th-login-portal-icon {
    flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
    background: var(--th-accent); color: #fff; font-size: 18px;
}
.th-login-portal-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.th-login-portal-text strong { font-size: 15.5px; font-weight: 700; }
.th-login-portal-text small { font-size: 13px; color: rgba(255, 255, 255, .72); }
.th-login-portal-go { flex: none; font-size: 20px; opacity: .7; }
.th-login-badge { flex: none; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--th-primary-soft); color: var(--th-primary-dark); }
.th-login-portal.is-active { background: #fff; border-color: #fff; color: var(--th-ink) !important; }
.th-login-portal.is-active .th-login-portal-text small { color: var(--th-muted); }
.th-login-portal.is-active .th-login-portal-go { display: none; }
.th-login-help { margin: auto 0 0; padding-top: 24px; display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: rgba(255, 255, 255, .8); }
.th-login-help .fa { margin-top: 3px; color: var(--th-accent); }
.th-login-help a { color: #fff !important; font-weight: 700; }

/* Form của module users (template default) bên trong khung */
.th-login-main .centered, .th-login-main .login-box { display: block; width: auto; max-width: none; margin: 0; padding: 0; }
.th-login-main .login-box > .page { background: none; border: 0; box-shadow: none; margin: 0; }
.th-login-main .login-box > .page > .panel-body { padding: 0; }
.th-login-main .login-box h2, .th-login-main .login-box .logo { display: none; }
.th-login-main .nv-info { margin: 0 0 22px; padding: 0; background: none; border: 0; color: var(--th-muted); font-size: 14.5px; line-height: 1.55; }
.th-login-main .nv-info.error { color: #b91c1c; }
.th-login-main .form-group { margin-bottom: 14px; }
.th-login-main .input-group { display: flex; width: 100%; }
.th-login-main .input-group-addon {
    flex: none; width: 48px; height: 50px; display: grid; place-items: center; padding: 0;
    background: var(--th-bg-muted); border: 1px solid var(--th-line); border-right: 0; border-radius: 12px 0 0 12px; color: var(--th-muted);
}
.th-login-main .input-group .form-control {
    flex: 1; min-width: 0; height: 50px; float: none; font-size: 15px; padding: 0 14px;
    border: 1px solid var(--th-line); border-radius: 0 12px 12px 0; box-shadow: none;
}
.th-login-main .input-group:focus-within .input-group-addon { border-color: var(--th-primary); color: var(--th-primary); }
.th-login-main .input-group .form-control:focus { border-color: var(--th-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--th-primary) 18%, transparent); }
.th-login-main form .text-center.margin-bottom-lg { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 20px 0 6px !important; }
/* Như drilite: một nút Đăng nhập kéo hết bề ngang, bỏ nút "Thiết lập lại" (ít dùng, dễ bấm nhầm trên điện thoại) */
.th-login-main form .text-center.margin-bottom-lg input[type=button].btn-default { display: none; }
.th-login-main .th-pass-toggle {
    flex: none; width: 48px; height: 50px; margin-left: -1px; border: 1px solid var(--th-line); border-left: 0; border-radius: 0 12px 12px 0;
    background: #fff; color: var(--th-muted); cursor: pointer;
}
.th-login-main .th-pass-toggle:hover, .th-login-main .th-pass-toggle:focus-visible { color: var(--th-primary); }
.th-login-main .input-group.has-toggle .form-control { border-radius: 0; border-right: 0; }
.th-login-main .input-group.has-toggle:focus-within .th-pass-toggle { border-color: var(--th-primary); }
.th-login-main form .text-center.margin-bottom-lg .btn { height: 50px; border-radius: 12px; font-size: 15px; font-weight: 700; margin: 0; }
.th-login-main form .text-center.margin-bottom-lg .btn-default { background: #fff; border: 1px solid var(--th-line); color: var(--th-muted); }
.th-login-main form .text-center.margin-bottom-lg .btn-primary { background: var(--th-primary); border-color: var(--th-primary); }
.th-login-main form .text-center.margin-bottom-lg .btn-primary:hover { background: var(--th-primary-dark); }
.th-login-main .loginCaptcha .middle { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.th-login-main #other_form { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; margin: 18px 0 0 !important; padding-top: 18px; border-top: 1px solid var(--th-line); }
.th-login-main #other_form a { margin: 0 !important; font-weight: 600; color: var(--th-primary) !important; }
.th-login-main #other_form .fa { display: none; }

@media (max-width: 899px) {
    .th-login { padding-top: 20px; }
    .th-login-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .th-login-side { order: 0; }
    .th-login-main, .th-login-side { padding: 26px 20px 24px; border-radius: 18px; }
    .th-login-form-title, .th-login-heading { font-size: 22px; }
    .th-login-intro { margin-bottom: 18px; }
}

/* ══════════════ KHỐI TIN TỨC (blocks/global.news_*.php) ══════════════ */
/* Ô thay ảnh khi bài chưa có ảnh đại diện: nền màu theo chuyên mục + chữ cái đầu */
.th-news-media { position: relative; display: block; overflow: hidden; border-radius: 12px; background: var(--th-primary-soft); flex: none; }
.th-news-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
a.th-news-media:hover img { transform: scale(1.04); }
.th-news-media-lg { aspect-ratio: 16 / 9; }
.th-news-media-wide { aspect-ratio: 16 / 9; }
.th-news-media-md { width: 132px; aspect-ratio: 4 / 3; }
.th-news-media-sm { width: 76px; height: 58px; border-radius: 10px; }
.th-news-ph {
    position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; text-align: center;
    color: #fff; font-weight: 800; font-size: 15px; line-height: 1.3; letter-spacing: .02em;
    background: linear-gradient(135deg, var(--th-primary-deep), var(--th-primary));
}
.th-news-media-lg .th-news-ph { font-size: 64px; }
.th-news-media-sm .th-news-ph { font-size: 22px; padding: 4px; }
.th-news-tone-1 { background: linear-gradient(135deg, #b45309, #f59e0b); }
.th-news-tone-2 { background: linear-gradient(135deg, #0f766e, #14b8a6); }
.th-news-tone-3 { background: linear-gradient(135deg, #1d4ed8, #60a5fa); }
.th-news-tone-4 { background: linear-gradient(135deg, #6d28d9, #a78bfa); }
.th-news-tone-5 { background: linear-gradient(135deg, #be123c, #fb7185); }
.th-news-tone-6 { background: linear-gradient(135deg, #334155, #94a3b8); }
.th-news-tone-7 { background: linear-gradient(135deg, #047857, #34d399); }
.th-news-chip {
    display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
    background: var(--th-accent-soft); color: var(--th-accent-dark) !important; text-decoration: none !important;
}
.th-news-meta { margin: 6px 0 0; font-size: 12.5px; color: var(--th-muted); }
.th-news-meta .fa { margin-right: 2px; }
.th-news-excerpt { margin: 8px 0 0; color: var(--th-text); font-size: 14.5px; line-height: 1.6; }
.th-news-item-title { display: block; color: var(--th-ink) !important; font-weight: 600; font-size: 14.5px; line-height: 1.45; text-decoration: none !important; }
.th-news-item-title:hover { color: var(--th-primary) !important; }

/* Dải số liệu */
.th-news-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.th-news-stat { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #fff; border-radius: 14px; box-shadow: var(--th-shadow); }
.th-news-stat-icon { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--th-primary-soft); color: var(--th-primary); font-size: 18px; }
.th-news-stat-text { display: flex; flex-direction: column; min-width: 0; }
.th-news-stat-text strong { font-size: 22px; line-height: 1.1; color: var(--th-ink); font-weight: 800; }
.th-news-stat-text small { font-size: 12.5px; color: var(--th-muted); }

/* Nổi bật + mới nhất */
.th-news-feature { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; margin-bottom: 26px; }
.th-news-hero { background: #fff; border-radius: 18px; box-shadow: var(--th-shadow); overflow: hidden; display: flex; flex-direction: column; }
.th-news-hero .th-news-media { border-radius: 0; }
.th-news-hero-body { padding: 18px 22px 20px; }
.th-news-hero-title { margin: 10px 0 0; font-size: 22px; line-height: 1.3; font-weight: 800; }
.th-news-hero-title a { color: var(--th-ink) !important; text-decoration: none !important; }
.th-news-hero-title a:hover { color: var(--th-primary) !important; }
.th-news-latest { background: #fff; border-radius: 18px; box-shadow: var(--th-shadow); padding: 18px 18px 8px; }
.th-news-side-title { margin: 0 0 6px; font-size: 16px; font-weight: 800; color: var(--th-ink); padding-left: 10px; border-left: 4px solid var(--th-accent); }
.th-news-latest-list { list-style: none; margin: 0; padding: 0; }
.th-news-latest-list li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--th-line); }
.th-news-latest-list li:first-child { border-top: 0; }

/* Hộp ở cột phải: xem nhiều, chuyên mục */
.th-sidebar .th-news-box { margin-top: -2px; }
.th-news-box-note { margin: 0 0 6px; font-size: 12.5px; color: var(--th-muted); }
.th-news-rank { list-style: none; margin: 0; padding: 0; }
.th-news-rank li { display: flex; gap: 12px; padding: 11px 0; border-top: 1px solid var(--th-line); }
.th-news-rank li:first-child { border-top: 0; padding-top: 4px; }
.th-news-rank-no {
    flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
    font-weight: 800; font-size: 14px; background: var(--th-bg-muted); color: var(--th-muted);
}
.th-news-rank li:nth-child(-n+3) .th-news-rank-no { background: var(--th-accent); color: #fff; }
.th-news-rank-body { min-width: 0; }
.th-news-cats, .th-news-archive { list-style: none; margin: 0; padding: 0; }
.th-news-cats a, .th-news-archive a {
    display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 10px; margin: 0 -10px;
    border-radius: 10px; color: var(--th-text) !important; text-decoration: none !important; font-size: 14.5px;
}
.th-news-cats a:hover, .th-news-archive a:hover { background: var(--th-primary-soft); color: var(--th-primary) !important; }
.th-news-cats a.is-sub { padding-left: 26px; font-size: 14px; }
.th-news-cats a.is-active { background: var(--th-primary-soft); color: var(--th-primary) !important; font-weight: 700; }
.th-news-count {
    flex: none; min-width: 28px; padding: 1px 8px; border-radius: 999px; text-align: center;
    font-size: 12px; font-weight: 700; background: var(--th-bg-muted); color: var(--th-muted);
}
.th-news-box-sub { margin: 16px 0 6px; padding-top: 14px; border-top: 1px solid var(--th-line); font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--th-muted); }

@media (max-width: 991px) {
    .th-news-feature { grid-template-columns: minmax(0, 1fr); }
    .th-news-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
@media (max-width: 575px) {
    .th-news-stat { padding: 12px; gap: 10px; }
    .th-news-stat-icon { width: 36px; height: 36px; font-size: 16px; }
    .th-news-stat-text strong { font-size: 19px; }
    .th-news-hero-title { font-size: 19px; }
    .th-news-hero-body { padding: 16px; }
}

/* Khung block (layout/block.default.tpl): thẻ trắng có tiêu đề — dùng ở cột phải */
.th-block { background: #fff; border-radius: 16px; box-shadow: var(--th-shadow); padding: 18px 20px 14px; margin-bottom: 22px; }
.th-block-title { margin: 0 0 12px; font-size: 16px; font-weight: 800; color: var(--th-ink); padding-left: 10px; border-left: 4px solid var(--th-accent); line-height: 1.3; }
.th-block-body > :last-child { margin-bottom: 0; }
/* Ô thay ảnh có nhãn: biểu tượng + tên chuyên mục (khối nổi bật) */
.th-news-ph-label { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; }
.th-news-media-lg .th-news-ph-label { font-size: 22px; }
.th-news-ph-label .fa { font-size: 38px; opacity: .85; }
.th-news-media-lg .th-news-ph-label .fa { font-size: 54px; }

/* ══════════════ NỘI DUNG SOẠN BẰNG CKEDITOR (thân bài .bodytext) ══════════════
   CSS nội dung của trình soạn thảo chỉ nạp trong Admin CP → ngoài site phải tự tái hiện: ảnh mặc định canh giữa, canh
   trái/phải ôm chữ, ảnh đã đổi kích thước, chú thích, bảng. Quy ước lớp theo CKEditor 5 (và CKEditor 4 của theme default). */
.bodytext::after { content: ""; display: table; clear: both; }
.bodytext img { max-width: 100%; height: auto; }
.bodytext figure.image { display: table; clear: both; margin: 1.2em auto; text-align: center; max-width: 100%; }
.bodytext figure.image img { display: block; margin: 0 auto; border-radius: 12px; }
.bodytext figure.image > figcaption,
.bodytext figure.table > figcaption { display: table-caption; caption-side: bottom; padding: 8px 4px 0; font-size: 13.5px; color: var(--th-muted); text-align: center; font-style: italic; }
.bodytext figure.image.image_resized { display: block; box-sizing: border-box; }
.bodytext figure.image.image_resized img { width: 100%; }
.bodytext figure.image.image_resized > figcaption { display: block; }
.bodytext .image-style-align-center, .bodytext .image-center figure.image { margin-left: auto; margin-right: auto; float: none; }
.bodytext .image-style-align-left, .bodytext figure.image.image-left, .bodytext img.image-left { float: left; clear: none; margin: .3em 1.4em .8em 0; max-width: 50%; }
.bodytext .image-style-align-right, .bodytext figure.image.image-right, .bodytext img.image-right { float: right; clear: none; margin: .3em 0 .8em 1.4em; max-width: 50%; }
.bodytext .image-style-side { float: right; margin: .3em 0 .8em 1.4em; max-width: 50%; }
.bodytext .image-style-block-align-left { margin-left: 0; margin-right: auto; }
.bodytext .image-style-block-align-right { margin-left: auto; margin-right: 0; }
.bodytext img.image_resized { height: auto; }
.bodytext .image-inline { display: inline-flex; max-width: 100%; align-items: flex-start; }
.bodytext .image-inline img { flex-grow: 1; flex-shrink: 1; max-width: 100%; }
.bodytext figure.table { display: table; margin: 1.2em auto; max-width: 100%; overflow-x: auto; }
.bodytext figure.table table { border-collapse: collapse; width: 100%; border: 1px solid var(--th-line); }
.bodytext figure.table td, .bodytext figure.table th { border: 1px solid var(--th-line); padding: 8px 10px; overflow-wrap: break-word; }
.bodytext figure.table th { background: var(--th-bg-muted); font-weight: 700; }
.bodytext figure.media { margin: 1.2em auto; max-width: 100%; }
@media (max-width: 575px) {
    /* Màn hình hẹp: ảnh ôm chữ chiếm cả dòng, tránh chữ bị bóp thành cột hẹp */
    .bodytext .image-style-align-left, .bodytext .image-style-align-right, .bodytext .image-style-side,
    .bodytext figure.image.image-left, .bodytext figure.image.image-right { float: none; max-width: 100%; margin: 1em auto; }
}

/* Logo đơn vị dạng ảnh (rộng hơn biểu tượng): khối tên không co lại, chừa khoảng với menu; màn 1280–1499px thu nhỏ chữ */
.th-brand-text { flex-shrink: 0; }
@media (min-width: 1280px) and (max-width: 1499px) {
    .th-brand { gap: 10px; margin-right: 6px; }
    .th-brand-logo { height: 46px; }
    .th-brand-name { font-size: 15.5px; }
    .th-brand-tagline { font-size: 9px; letter-spacing: .1em; }
    .th-menu .th-menu-list > li > a { padding-left: 9px; padding-right: 9px; }
}
