/* ============================================
   MaSoThue Clone - Stylesheet (Mobile-first optimized)
   ============================================ */

:root {
    --primary: #1976d2;
    --primary-dark: #0d47a1;
    --primary-light: #e3f2fd;
    --accent: #ff6b35;
    --text-dark: #212121;
    --text-body: #424242;
    --text-muted: #757575;
    --border: #e0e0e0;
    --bg-light: #f5f7fa;
    --bg-white: #ffffff;
    --success: #2e7d32;
    --warning: #f57c00;
    --danger: #c62828;
    --radius: 6px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --header-h: 60px;
    --tap: 44px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-body);
    background: var(--bg-light);
    overflow-x: hidden;
}
body.menu-open, body.filter-open { overflow: hidden; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* ============================================
   TOP BAR (hidden on mobile)
   ============================================ */
.topbar {
    background: var(--primary-dark);
    color: #fff;
    font-size: 12px;
    padding: 6px 0;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; }
.topbar a { color: rgba(255,255,255,0.85); margin-left: 14px; }
.topbar a:hover { color: #fff; text-decoration: none; }

/* ============================================
   HEADER
   ============================================ */
.site-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: padding 0.2s;
}
.header-inner {
    display: flex;
    align-items: center;
    padding: 14px 0;
    gap: 24px;
    min-height: var(--header-h);
}
.site-header.header-shrink .header-inner { padding: 8px 0; }

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    white-space: nowrap;
}
.logo .logo-icon {
    width: 34px;
    height: 34px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.logo .logo-dot { color: var(--accent); }

/* ============================================
   CUSTOM LOGO (do user upload trong Customizer)
   Chỉ giới hạn chiều rộng — chiều cao auto theo tỉ lệ.
   ============================================ */
.custom-logo-link,
a.custom-logo-link.logo {
    display: inline-flex;
    align-items: center;
    line-height: 0;
    text-decoration: none;
    flex-shrink: 0;
    padding: 0;
}
.custom-logo-link:hover { text-decoration: none; }

.custom-logo {
    display: block;
    max-width: 220px;       /* desktop default */
    width: auto;
    height: auto;           /* auto theo tỉ lệ ảnh */
    transition: opacity 0.15s;
}
.custom-logo-link:hover .custom-logo { opacity: 0.85; }

/* Hamburger button (mobile) */
.menu-toggle {
    display: none;
    width: var(--tap);
    height: var(--tap);
    background: transparent;
    border: none;
    color: var(--text-dark);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    border-radius: var(--radius);
}
.menu-toggle:hover { background: var(--bg-light); }
.menu-toggle .bars {
    width: 22px; height: 2px; background: currentColor; position: relative; display: block;
    transition: background 0.15s;
}
.menu-toggle .bars::before,
.menu-toggle .bars::after {
    content: ''; position: absolute; left: 0; width: 100%; height: 2px;
    background: currentColor; transition: transform 0.25s;
}
.menu-toggle .bars::before { top: -7px; }
.menu-toggle .bars::after  { top: 7px; }
body.menu-open .menu-toggle .bars { background: transparent; }
body.menu-open .menu-toggle .bars::before { transform: translateY(7px) rotate(45deg); }
body.menu-open .menu-toggle .bars::after  { transform: translateY(-7px) rotate(-45deg); }

.main-nav { flex: 1; }
.main-nav ul { list-style: none; display: flex; gap: 4px; }
.main-nav a {
    display: block;
    padding: 8px 14px;
    color: var(--text-dark);
    font-weight: 500;
    border-radius: var(--radius);
    transition: background 0.15s;
}
.main-nav a:hover { background: var(--primary-light); color: var(--primary-dark); text-decoration: none; }
.main-nav a.active { background: var(--primary-light); color: var(--primary-dark); }

.header-actions { display: flex; gap: 8px; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
    min-height: 40px;
    white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; text-decoration: none; }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text-dark); }
.btn-outline:hover { background: var(--bg-light); text-decoration: none; }

.nav-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    opacity: 0;
    transition: opacity 0.25s;
}

/* ============================================
   HERO / SEARCH
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 50px 0 60px;
    text-align: center;
}
.hero h1 { font-size: 30px; font-weight: 800; margin-bottom: 10px; line-height: 1.25; }
.hero .hero-sub { font-size: 15px; opacity: 0.9; margin-bottom: 24px; }
.hero .hero-sub strong { color: #ffd54f; }

.search-box {
    max-width: 760px;
    margin: 0 auto;
    background: #fff;
    border-radius: 10px;
    padding: 6px;
    display: flex;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.search-box select {
    border: none;
    padding: 0 14px;
    background: transparent;
    font-size: 14px;
    color: var(--text-dark);
    border-right: 1px solid var(--border);
    outline: none;
    cursor: pointer;
    min-height: var(--tap);
}
.search-box input {
    flex: 1;
    border: none;
    padding: 14px 16px;
    font-size: 16px; /* >=16px to prevent iOS zoom */
    outline: none;
    min-width: 0;
    min-height: var(--tap);
}
.search-box button {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0 22px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    min-height: var(--tap);
}
.search-box button:hover { background: #e55525; }

.search-tags { margin-top: 16px; font-size: 13px; opacity: 0.95; }
.search-tags a { color: #fff; margin: 0 6px; border-bottom: 1px dashed rgba(255,255,255,0.5); display: inline-block; padding: 2px 0; }

/* ============================================
   STATS BAR
   ============================================ */
.stats-bar { background: #fff; border-bottom: 1px solid var(--border); padding: 18px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; text-align: center; }
.stat-item .num { font-size: 22px; font-weight: 700; color: var(--primary); }
.stat-item .lbl { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* ============================================
   MAIN LAYOUT
   ============================================ */
.main-wrap { padding: 20px 0 80px; }
.layout { display: grid; grid-template-columns: 260px 1fr; gap: 24px; }

/* Mobile filter trigger row */
.mobile-toolbar {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0 14px;
    gap: 10px;
}
.mobile-toolbar .filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-dark);
    font-weight: 500;
    cursor: pointer;
    min-height: var(--tap);
}
.mobile-toolbar .result-count { font-size: 12px; color: var(--text-muted); }
.filter-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
}

/* ----- Sidebar ----- */
.sidebar {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 0;
    align-self: start;
    position: sticky;
    top: calc(var(--header-h) + 14px);
}
.sidebar .sidebar-close { display: none; }
.sidebar h3 {
    font-size: 13px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 14px 16px 8px;
    border-bottom: 1px solid var(--border);
    letter-spacing: 0.5px;
}
.sidebar ul { list-style: none; padding: 6px 0; margin: 0; }
.sidebar ul li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    color: var(--text-dark);
    font-size: 13.5px;
    border-left: 3px solid transparent;
    transition: all 0.15s;
    min-height: 40px;
}
.sidebar ul li a:hover,
.sidebar ul li a.active {
    background: var(--primary-light);
    border-left-color: var(--primary);
    color: var(--primary-dark);
    text-decoration: none;
}
.sidebar ul li a .count {
    background: #eef2f7;
    color: var(--text-muted);
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

/* ----- Content ----- */
.content { min-width: 0; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.section-title h2 { font-size: 20px; color: var(--text-dark); font-weight: 700; }
.section-title .meta { font-size: 13px; color: var(--text-muted); }

/* ----- Company Card ----- */
.company-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.15s, transform 0.15s;
    border: 1px solid transparent;
}
.company-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary-light); }
.company-card h3 { font-size: 15.5px; font-weight: 700; margin-bottom: 8px; line-height: 1.4; }
.company-card h3 a { color: var(--primary-dark); }
.company-card .status-badge {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 4px;
    vertical-align: middle;
    font-weight: 600;
    white-space: nowrap;
}
.status-active { background: #e8f5e9; color: var(--success); }
.status-suspended { background: #fff3e0; color: var(--warning); }
.status-closed { background: #ffebee; color: var(--danger); }

.company-info { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 20px; font-size: 13.5px; color: var(--text-body); }
.company-info .label { color: var(--text-muted); margin-right: 6px; min-width: 88px; display: inline-block; }
.company-info .row { display: flex; align-items: flex-start; padding: 2px 0; }
.company-info .row.full { grid-column: 1 / -1; }

/* ============================================
   PAGINATION
   ============================================ */
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 24px; }
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--radius);
    background: #fff;
    color: var(--text-dark);
    border: 1px solid var(--border);
    font-size: 13px;
    font-weight: 500;
}
.pagination a:hover { background: var(--primary-light); color: var(--primary-dark); text-decoration: none; }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .disabled { opacity: 0.4; pointer-events: none; }

/* ============================================
   COMPANY DETAIL
   ============================================ */
.breadcrumb { font-size: 13px; color: var(--text-muted); padding: 12px 0; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
.breadcrumb::-webkit-scrollbar { display: none; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { margin: 0 6px; }

.company-detail { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.detail-header { padding: 22px 24px; border-bottom: 1px solid var(--border); background: linear-gradient(to bottom, #f9fbfd, #fff); }
.detail-header h1 { font-size: 22px; color: var(--text-dark); font-weight: 700; margin-bottom: 8px; line-height: 1.3; }
.detail-header .tax-id-big { font-size: 17px; font-weight: 700; color: var(--accent); font-family: "Courier New", monospace; letter-spacing: 1px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }

/* ============================================
   BRANCH BANNER (Chi nhánh)
   ============================================ */
.branch-banner {
    background: linear-gradient(to right, #fff3e0, #fff8e1);
    border-left: 5px solid var(--accent);
    padding: 14px 20px;
    margin: 0;
    font-size: 14.5px;
    color: var(--text-dark);
    border-radius: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
}
.branch-banner strong { color: var(--accent); }
.branch-banner a {
    color: var(--primary-dark);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 2px solid var(--primary-light);
}
.branch-banner a:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
.branch-banner .parent-mst {
    margin-left: auto;
    font-size: 13px;
    color: var(--text-muted);
}
.branch-banner .parent-mst code {
    background: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
    color: var(--accent);
    font-weight: 600;
}

/* Tag "kế thừa từ DN mẹ" */
.inherit-tag {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 8px;
    font-size: 11px;
    background: rgba(255, 107, 53, 0.12);
    color: var(--accent);
    border-radius: 10px;
    font-weight: 500;
    cursor: help;
    border: 1px dashed rgba(255, 107, 53, 0.4);
}

@media (max-width: 600px) {
    .branch-banner { flex-direction: column; align-items: flex-start; padding: 12px 16px; }
    .branch-banner .parent-mst { margin-left: 0; }
}
.detail-views {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--bg-light);
    border-radius: 20px;
    font-size: 12.5px;
    color: var(--text-muted);
    font-weight: 500;
}

.detail-table { width: 100%; border-collapse: collapse; }
.detail-table th,
.detail-table td { padding: 12px 24px; text-align: left; border-bottom: 1px solid #f0f0f0; font-size: 14px; vertical-align: top; }
.detail-table th { width: 220px; color: var(--text-muted); font-weight: 500; background: #fafbfc; }
.detail-table td { color: var(--text-dark); word-break: break-word; }
.detail-table tr:last-child th,
.detail-table tr:last-child td { border-bottom: none; }

.related-section { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px 22px; margin-top: 16px; }
.related-section h3 { font-size: 16px; margin-bottom: 12px; color: var(--text-dark); }
.related-section ul { list-style: none; }
.related-section ul li { padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.related-section ul li:last-child { border-bottom: none; }
.related-section ul li::before { content: "▸"; color: var(--primary); margin-right: 8px; }

/* ============================================
   SINGLE POST (bài viết thường) — optimized
   ============================================ */
/* Thanh tiến trình đọc */
.reading-progress {
    position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 200;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width .08s linear;
}

.single-article { max-width: 800px; margin: 0 auto; }

/* --- Header bài viết --- */
.post-header { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 30px 34px; }
.post-cats { margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.post-cats a {
    display: inline-block; padding: 4px 12px; background: var(--primary-light);
    color: var(--primary-dark); border-radius: 20px; font-size: 12px; font-weight: 700;
    text-decoration: none; transition: background .15s, color .15s;
}
.post-cats a:hover { background: var(--primary); color: #fff; text-decoration: none; }
.post-title { font-size: 30px; line-height: 1.25; font-weight: 800; color: var(--text-dark); letter-spacing: -.02em; margin-bottom: 16px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 13.5px; color: var(--text-muted); }
.post-meta .meta-item { display: inline-flex; align-items: center; gap: 6px; }
.post-meta .meta-author { gap: 8px; }
.post-meta .meta-author img { width: 28px; height: 28px; border-radius: 50%; }
.post-meta .meta-author strong { color: var(--text-body); font-weight: 600; }

/* --- Ảnh bìa --- */
.post-featured { margin-top: 16px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.post-featured img { width: 100%; height: auto; display: block; }

/* --- Thân bài --- */
.post-body { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 26px 34px; margin-top: 16px; }
.entry-content { font-size: 16.5px; line-height: 1.8; color: var(--text-body); }
.entry-content > *:first-child { margin-top: 0; }
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content p { margin-bottom: 1.15em; }
.entry-content h2 { font-size: 23px; font-weight: 700; color: var(--text-dark); line-height: 1.3; margin: 1.6em 0 .6em; padding-bottom: .3em; border-bottom: 1px solid var(--border); }
.entry-content h3 { font-size: 19px; font-weight: 700; color: var(--text-dark); margin: 1.4em 0 .5em; }
.entry-content h4 { font-size: 17px; font-weight: 700; color: var(--text-dark); margin: 1.2em 0 .5em; }
.entry-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.entry-content a:hover { color: var(--primary-dark); }
.entry-content ul, .entry-content ol { margin: 0 0 1.15em 1.45em; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: .5em; }
.entry-content img { max-width: 100%; height: auto; border-radius: var(--radius); }
.entry-content figure { margin: 1.4em 0; }
.entry-content figcaption { font-size: 13px; color: var(--text-muted); text-align: center; margin-top: 8px; }
.entry-content blockquote {
    border-left: 4px solid var(--primary); background: var(--bg-light);
    padding: 14px 20px; margin: 1.5em 0; border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text-body); font-style: italic;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content pre {
    background: #1e1e1e; color: #d4d4d4; padding: 16px 18px; border-radius: var(--radius);
    overflow: auto; font-size: 13.5px; line-height: 1.6; margin: 1.2em 0;
}
.entry-content code { background: var(--bg-light); padding: 2px 6px; border-radius: 4px; font-size: .92em; color: var(--accent); }
.entry-content pre code { background: none; padding: 0; color: inherit; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: 14.5px; }
.entry-content th, .entry-content td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; }
.entry-content th { background: var(--bg-light); font-weight: 600; }
.entry-content hr { border: none; border-top: 1px solid var(--border); margin: 1.8em 0; }

/* --- Thanh chia sẻ + tags --- */
.post-footer-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.post-tags { font-size: 13px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.post-tags a { display: inline-block; padding: 4px 11px; background: var(--bg-light); border-radius: 20px; color: var(--text-muted); text-decoration: none; transition: background .15s, color .15s; }
.post-tags a:hover { background: var(--primary-light); color: var(--primary-dark); }
.post-share { display: flex; align-items: center; gap: 8px; }
.post-share .share-label { font-size: 13px; color: var(--text-muted); }
.share-btn {
    width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: var(--bg-light); color: var(--text-dark); border: 1px solid var(--border); cursor: pointer;
    font-size: 15px; text-decoration: none; transition: transform .15s, background .15s, color .15s, border-color .15s;
}
.share-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); transform: translateY(-2px); text-decoration: none; }

/* --- Hộp tác giả --- */
.author-box { display: flex; gap: 16px; align-items: flex-start; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 20px 24px; margin-top: 16px; }
.author-box .avatar img { width: 64px; height: 64px; border-radius: 50%; display: block; }
.author-box .author-info h4 { font-size: 16px; color: var(--text-dark); margin-bottom: 2px; }
.author-box .author-role { font-size: 12.5px; color: var(--text-muted); margin-bottom: 8px; }
.author-box .author-bio { font-size: 14px; color: var(--text-body); line-height: 1.6; margin-bottom: 8px; }
.author-box .author-link { font-size: 13px; font-weight: 600; }

/* --- Điều hướng bài trước/sau --- */
.post-nav { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.post-nav-link {
    flex: 1 1 0; min-width: 220px; display: flex; flex-direction: column; gap: 4px;
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 14px 18px; box-shadow: var(--shadow-sm); text-decoration: none;
    transition: transform .15s, box-shadow .15s, border-color .15s;
}
.post-nav-link:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px); text-decoration: none; }
.post-nav-link .dir { font-size: 12px; font-weight: 600; color: var(--primary); }
.post-nav-link .ttl { font-size: 14.5px; font-weight: 600; color: var(--text-dark); line-height: 1.4; }
.post-nav-link.next { text-align: right; align-items: flex-end; }

/* --- Bài viết liên quan (card có ảnh) --- */
.related-posts { margin-top: 26px; }
.related-posts > h3 { font-size: 18px; color: var(--text-dark); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.related-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.related-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.related-card .thumb { aspect-ratio: 16 / 9; overflow: hidden; background: var(--primary-light); }
.related-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.related-card .thumb.no-img { display: flex; align-items: center; justify-content: center; font-size: 30px; color: var(--primary); background: linear-gradient(135deg, var(--primary-light), #fff); }
.related-card .rc-body { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; }
.related-card .rc-title { font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--text-dark); }
.related-card .rc-title a { color: inherit; }
.related-card .rc-title a:hover { color: var(--primary); text-decoration: none; }
.related-card .rc-date { font-size: 12px; color: var(--text-muted); margin-top: auto; padding-top: 8px; }

.page-links { margin-top: 18px; font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.page-links a, .page-links > span { padding: 4px 11px; border: 1px solid var(--border); border-radius: 6px; text-decoration: none; }
.page-links a:hover { background: var(--primary-light); }
.page-links > .post-page-numbers.current { background: var(--primary); color: #fff; border-color: var(--primary); }

@media (max-width: 768px) {
    .post-header { padding: 20px 18px; }
    .post-title { font-size: 23px; }
    .post-body { padding: 20px 18px; }
    .entry-content { font-size: 16px; line-height: 1.75; }
    .entry-content h2 { font-size: 20px; }
    .entry-content h3 { font-size: 18px; }
    .post-footer-bar { flex-direction: column; align-items: flex-start; }
    .author-box { flex-direction: column; gap: 12px; }
    .author-box .avatar img { width: 54px; height: 54px; }
    .related-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .related-grid { grid-template-columns: 1fr; }
}

/* ============================================
   FOOTER (Enhanced)
   ============================================ */
.site-footer {
    background: #0f1923;
    color: #94a3b8;
    margin-top: 50px;
    position: relative;
}
.site-footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 50%, #ffd54f 100%);
}

/* Newsletter strip */
.footer-newsletter {
    background: linear-gradient(135deg, #1976d2 0%, #0d47a1 100%);
    padding: 36px 0;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.footer-newsletter::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23ffffff' fill-opacity='0.04' d='M0 0h40v40H0z M20 20l10-10H10z'/%3E%3C/svg%3E");
    opacity: 0.6;
}
.newsletter-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 24px;
}
.newsletter-text h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #fff;
}
.newsletter-text p { font-size: 14px; opacity: 0.9; }
.newsletter-form {
    display: flex;
    background: #fff;
    border-radius: 10px;
    padding: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.newsletter-form input {
    flex: 1;
    border: none;
    padding: 12px 16px;
    font-size: 14px;
    outline: none;
    color: var(--text-dark);
    min-width: 0;
}
.newsletter-form button {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}
.newsletter-form button:hover { background: #e55525; }

/* Main footer grid */
.footer-main { padding: 50px 0 30px; }
.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr 1.2fr;
    gap: 36px;
}
.footer-col h4 {
    color: #fff;
    font-size: 14px;
    margin-bottom: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    position: relative;
    padding-bottom: 10px;
}
.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 32px; height: 2px;
    background: var(--accent);
    border-radius: 2px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { padding: 5px 0; }
.footer-col a {
    color: #94a3b8;
    font-size: 13.5px;
    transition: color 0.15s, padding-left 0.2s;
    display: inline-block;
}
.footer-col a:hover { color: #fff; text-decoration: none; padding-left: 4px; }

/* About column */
.footer-about .footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 14px;
}
.footer-about .footer-logo .logo-icon {
    width: 38px; height: 38px;
    background: var(--primary);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
}
.footer-about p { font-size: 13.5px; line-height: 1.7; margin-bottom: 18px; }
.footer-social {
    display: flex;
    gap: 8px;
}
.footer-social a {
    width: 38px; height: 38px;
    background: rgba(255,255,255,0.06);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #94a3b8;
    transition: all 0.2s;
}
.footer-social a:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    text-decoration: none;
}

/* Contact column */
.footer-contact-list { list-style: none; padding: 0; }
.footer-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 0;
    font-size: 13.5px;
    line-height: 1.6;
    color: #94a3b8;
}
.footer-contact-list .ico {
    width: 32px; height: 32px;
    background: rgba(25,118,210,0.15);
    color: #64b5f6;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 2px;
}
.footer-contact-list strong { color: #fff; display: block; font-size: 14px; margin-bottom: 1px; font-weight: 600; }
.footer-contact-list a { color: #94a3b8; }

/* App download badges */
.app-badges { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.app-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #1a2530;
    border: 1px solid #2c3e50;
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
}
.app-badge:hover { background: #243240; border-color: var(--primary); text-decoration: none; transform: translateY(-1px); }
.app-badge .icon { font-size: 22px; color: #fff; line-height: 1; }
.app-badge .text { display: flex; flex-direction: column; line-height: 1.2; }
.app-badge .text .small { font-size: 10.5px; color: #94a3b8; }
.app-badge .text .big { font-size: 14px; font-weight: 600; color: #fff; }

/* Trust badges row */
.footer-trust {
    border-top: 1px solid #1a2530;
    padding: 22px 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 28px;
    align-items: center;
}
.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 12px;
}
.trust-badge .ico {
    width: 28px; height: 28px;
    background: rgba(255,255,255,0.04);
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #94a3b8;
}
.trust-badge strong { color: #cbd5e1; font-size: 13px; }

/* Bottom bar */
.footer-bottom {
    border-top: 1px solid #1a2530;
    padding: 18px 0;
    background: #0a1219;
}
.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.footer-bottom .copyright {
    font-size: 12.5px;
    color: #64748b;
}
.footer-bottom .copyright strong { color: #cbd5e1; }
.footer-bottom-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}
.footer-bottom-links a {
    color: #64748b;
    font-size: 12.5px;
    transition: color 0.15s;
}
.footer-bottom-links a:hover { color: #fff; text-decoration: none; }
.lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid #1a2530;
    border-radius: 6px;
    color: #cbd5e1;
    font-size: 12.5px;
    cursor: pointer;
}
.lang-switcher:hover { background: rgba(255,255,255,0.08); }

/* ============================================
   FLOATING BACK TO TOP (mobile)
   ============================================ */
.back-to-top {
    position: fixed;
    right: 14px;
    bottom: 80px;
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: 90;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.2s, transform 0.2s;
}
.back-to-top.show { opacity: 1; transform: translateY(0); }

/* ============================================
   BOTTOM NAV (mobile only)
   ============================================ */
.bottom-nav {
    display: none;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: #fff;
    border-top: 1px solid var(--border);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.04);
    z-index: 95;
    padding: 6px 4px;
    padding-bottom: calc(6px + env(safe-area-inset-bottom));
}
.bottom-nav-inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 4px;
    color: var(--text-muted);
    font-size: 11px;
    gap: 2px;
    min-height: 52px;
    border-radius: var(--radius);
}
.bottom-nav a .icon { font-size: 20px; line-height: 1; }
.bottom-nav a.active, .bottom-nav a:hover { color: var(--primary); text-decoration: none; }

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */
@media (max-width: 992px) {
    .layout { grid-template-columns: 1fr; gap: 0; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .footer-grid { grid-template-columns: 1fr 1fr 1fr; gap: 28px; }
    .footer-grid .footer-about { grid-column: 1 / -1; }

    /* Sidebar becomes mobile drawer */
    .sidebar {
        position: fixed;
        top: 0; left: 0;
        width: 84%;
        max-width: 320px;
        height: 100vh;
        overflow-y: auto;
        border-radius: 0;
        z-index: 210;
        transform: translateX(-100%);
        transition: transform 0.28s ease;
        box-shadow: var(--shadow-lg);
        padding-bottom: 60px;
    }
    body.filter-open .sidebar { transform: translateX(0); }
    body.filter-open .filter-overlay { display: block; }

    .sidebar .sidebar-close {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 16px;
        font-weight: 600;
        font-size: 16px;
        color: var(--text-dark);
        border-bottom: 1px solid var(--border);
        position: sticky;
        top: 0;
        background: #fff;
        z-index: 1;
    }
    .sidebar .sidebar-close button {
        width: 36px; height: 36px;
        border: none; background: var(--bg-light);
        border-radius: var(--radius);
        cursor: pointer; font-size: 18px;
    }

    .mobile-toolbar { display: flex; }
}

@media (max-width: 768px) {
    .topbar { display: none; }

    .header-inner { padding: 10px 0; gap: 10px; min-height: 56px; }
    .logo { font-size: 17px; }
    .logo .logo-icon { width: 32px; height: 32px; font-size: 16px; }
    /* Custom logo trên mobile: thu nhỏ chiều rộng */
    .custom-logo { max-width: 140px; }

    .menu-toggle { display: inline-flex; }
    .header-actions { display: none; }

    /* Mobile nav: full-screen drawer from right */
    .main-nav {
        position: fixed;
        top: 0; right: 0;
        width: 78%;
        max-width: 300px;
        height: 100vh;
        background: #fff;
        z-index: 210;
        transform: translateX(100%);
        transition: transform 0.28s ease;
        flex: none;
        overflow-y: auto;
        padding: 70px 0 30px;
        box-shadow: var(--shadow-lg);
    }
    body.menu-open .main-nav { transform: translateX(0); }
    body.menu-open .nav-overlay { display: block; opacity: 1; }
    .nav-overlay { display: block; opacity: 0; pointer-events: none; }
    body.menu-open .nav-overlay { pointer-events: auto; }

    .main-nav ul { flex-direction: column; gap: 0; padding: 0 8px; }
    .main-nav ul li a {
        padding: 14px 16px;
        font-size: 15px;
        border-radius: var(--radius);
        border-bottom: 1px solid #f0f0f0;
    }
    .main-nav ul li:last-child a { border-bottom: none; }

    .hero { padding: 30px 0 40px; }
    .hero h1 { font-size: 22px; }
    .hero .hero-sub { font-size: 13.5px; margin-bottom: 18px; }

    .search-box {
        flex-direction: column;
        padding: 8px;
        border-radius: 8px;
        gap: 6px;
    }
    .search-box select {
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 12px 14px;
        background: var(--bg-light);
        border-radius: 6px;
        width: 100%;
    }
    .search-box input { padding: 12px 14px; font-size: 16px; }
    .search-box button { padding: 14px; width: 100%; }

    .search-tags { font-size: 12px; line-height: 2; padding: 0 6px; }
    .search-tags a { margin: 2px 4px; }

    .stats-bar { padding: 12px 0; }
    .stat-item .num { font-size: 18px; }
    .stat-item .lbl { font-size: 10px; }

    .main-wrap { padding: 12px 0 90px; }
    .section-title h2 { font-size: 17px; }
    .section-title .meta { font-size: 12px; }

    /* Company card mobile */
    .company-card { padding: 12px 14px; }
    .company-card h3 { font-size: 15px; }
    .company-card h3 a { display: inline; }
    .company-card .status-badge { display: inline-block; margin-left: 0; margin-top: 4px; }
    .company-info { grid-template-columns: 1fr; gap: 4px; font-size: 13px; }
    .company-info .label { min-width: 86px; font-size: 12px; }

    /* Detail page */
    .detail-header { padding: 16px 16px; }
    .detail-header h1 { font-size: 17px; line-height: 1.35; }
    .detail-header .tax-id-big { font-size: 15px; }
    .detail-actions .btn { padding: 8px 12px; font-size: 13px; flex: 1 0 auto; min-height: 38px; }

    .detail-table { display: block; }
    .detail-table tbody, .detail-table tr { display: block; width: 100%; }
    .detail-table th, .detail-table td {
        display: block;
        padding: 4px 16px;
        width: 100%;
        background: transparent;
    }
    .detail-table th {
        padding-top: 12px;
        padding-bottom: 2px;
        font-size: 11.5px;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        color: var(--text-muted);
        border-bottom: none;
    }
    .detail-table td {
        padding-bottom: 10px;
        font-size: 14px;
        font-weight: 500;
        color: var(--text-dark);
        border-bottom: 1px solid #f0f0f0;
    }
    .detail-table tr:last-child td { border-bottom: none; }

    .related-section { padding: 14px 16px; }
    .related-section h3 { font-size: 15px; }
    .related-section ul li { font-size: 13.5px; }

    .pagination a, .pagination span { min-width: 40px; height: 40px; padding: 0 10px; font-size: 13px; }
    .pagination .ellipsis, .pagination span:not(.current):not(.disabled) { display: none; }
    .pagination .current, .pagination a, .pagination .disabled { display: inline-flex; }

    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .footer-grid .footer-col h4 { margin-bottom: 12px; padding-bottom: 8px; }
    .footer-main { padding: 32px 0 20px; }
    .site-footer { margin-top: 24px; }
    .footer-newsletter { padding: 24px 0; }
    .newsletter-inner { grid-template-columns: 1fr; gap: 16px; text-align: center; }
    .newsletter-text h3 { font-size: 18px; }
    .newsletter-text p { font-size: 13px; }
    .newsletter-form { flex-direction: column; padding: 8px; gap: 6px; }
    .newsletter-form input { width: 100%; padding: 12px 14px; background: var(--bg-light); border-radius: 6px; }
    .newsletter-form button { padding: 12px; width: 100%; }
    .footer-trust { gap: 18px; padding: 18px 0; }
    .footer-bottom-inner { flex-direction: column; text-align: center; }
    .footer-bottom-links { justify-content: center; }
    .app-badges { flex-direction: row; flex-wrap: wrap; }

    .back-to-top { display: flex; }
    .bottom-nav { display: block; }
}

@media (max-width: 380px) {
    .logo { font-size: 15px; }
    .logo .logo-dot { display: inline; }
    .hero h1 { font-size: 19px; }
    .company-card h3 { font-size: 14px; }
}

/* ============================================
   ENHANCED HOMEPAGE
   ============================================ */

/* ----- Hero v2 ----- */
.hero-v2 {
    position: relative;
    background: linear-gradient(135deg, #1976d2 0%, #0d47a1 60%, #002171 100%);
    color: #fff;
    padding: 70px 0 90px;
    text-align: center;
    overflow: hidden;
}
.hero-v2::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        radial-gradient(circle at 15% 20%, rgba(255,255,255,0.08) 0, transparent 35%),
        radial-gradient(circle at 85% 80%, rgba(255,213,79,0.1) 0, transparent 35%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}
.hero-v2 .container { position: relative; z-index: 2; }
.hero-v2 .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    margin-bottom: 18px;
}
.hero-v2 .hero-badge .dot {
    width: 7px; height: 7px;
    background: #4caf50;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(76,175,80,0.25);
    animation: pulse 1.6s infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(76,175,80,0.25); }
    50%      { box-shadow: 0 0 0 8px rgba(76,175,80,0); }
}
.hero-v2 h1 {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 14px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}
.hero-v2 h1 .highlight {
    background: linear-gradient(120deg, #ffd54f 0%, #ff8a65 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-v2 .hero-sub {
    font-size: 16px;
    opacity: 0.92;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Search v2 with tabs */
.search-wrap { max-width: 800px; margin: 0 auto; }
.search-tabs {
    display: inline-flex;
    background: rgba(255,255,255,0.1);
    border-radius: 10px 10px 0 0;
    padding: 4px;
    gap: 2px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    border-bottom: none;
}
.search-tabs button {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.75);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.search-tabs button.active { background: #fff; color: var(--primary-dark); }
.search-tabs button:hover:not(.active) { background: rgba(255,255,255,0.1); color: #fff; }

.search-box-v2 {
    background: #fff;
    border-radius: 0 14px 14px 14px;
    padding: 8px;
    display: flex;
    align-items: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    gap: 4px;
}
.search-box-v2 .search-icon {
    color: var(--text-muted);
    padding: 0 8px 0 16px;
    font-size: 20px;
    flex-shrink: 0;
}
.search-box-v2 input {
    flex: 1;
    border: none;
    padding: 16px 8px;
    font-size: 16px;
    outline: none;
    min-width: 0;
    color: var(--text-dark);
}
.search-box-v2 input::placeholder { color: var(--text-muted); }
.search-box-v2 button {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(255,107,53,0.4);
    transition: transform 0.15s, box-shadow 0.15s;
}
.search-box-v2 button:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(255,107,53,0.5); }

.search-quick { margin-top: 20px; font-size: 13.5px; }
.search-quick .label { opacity: 0.7; margin-right: 4px; }
.search-quick a {
    display: inline-block;
    color: #fff;
    background: rgba(255,255,255,0.13);
    padding: 5px 12px;
    border-radius: 999px;
    margin: 4px;
    font-size: 12.5px;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.15s;
}
.search-quick a:hover { background: rgba(255,255,255,0.22); text-decoration: none; }

/* Inline stats in hero */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 36px;
    flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat .n { font-size: 24px; font-weight: 800; color: #ffd54f; }
.hero-stat .l { font-size: 12px; opacity: 0.85; text-transform: uppercase; letter-spacing: 0.5px; }

/* ----- Section base ----- */
.section { padding: 56px 0; }
.section-head { text-align: center; margin-bottom: 36px; }
.section-head .eyebrow {
    display: inline-block;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}
.section-head h2 { font-size: 30px; color: var(--text-dark); font-weight: 800; margin-bottom: 10px; line-height: 1.25; }
.section-head p { color: var(--text-muted); font-size: 15px; max-width: 600px; margin: 0 auto; }

/* ----- Provinces grid ----- */
.provinces-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.province-card {
    background: #fff;
    border-radius: 12px;
    padding: 22px 18px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}
.province-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
    text-decoration: none;
}
.province-card .flag {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--primary-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 12px;
}
.province-card .name { font-weight: 700; color: var(--text-dark); font-size: 16px; margin-bottom: 4px; }
.province-card .count { color: var(--primary); font-size: 13px; font-weight: 600; }

/* ----- Industries grid ----- */
.industries-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}
.industry-card {
    background: #fff;
    border-radius: 10px;
    padding: 18px 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
    border: 1px solid transparent;
}
.industry-card:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    transform: translateY(-2px);
    text-decoration: none;
}
.industry-card .ico { font-size: 28px; margin-bottom: 8px; line-height: 1; }
.industry-card .nm { font-size: 12.5px; font-weight: 600; color: var(--text-dark); line-height: 1.3; }
.industry-card .ct { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ----- Features ----- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.feature-card {
    background: #fff;
    padding: 28px 22px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: all 0.2s;
    border: 1px solid #eef2f7;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-card .ico {
    width: 60px; height: 60px;
    margin: 0 auto 16px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}
.feature-card .ico.bg-blue { background: linear-gradient(135deg, #e3f2fd, #bbdefb); color: #1976d2; }
.feature-card .ico.bg-orange { background: linear-gradient(135deg, #ffe0b2, #ffcc80); color: #ef6c00; }
.feature-card .ico.bg-green { background: linear-gradient(135deg, #c8e6c9, #a5d6a7); color: #2e7d32; }
.feature-card .ico.bg-purple { background: linear-gradient(135deg, #e1bee7, #ce93d8); color: #6a1b9a; }
.feature-card h3 { font-size: 16px; font-weight: 700; color: var(--text-dark); margin-bottom: 8px; }
.feature-card p { font-size: 13.5px; color: var(--text-muted); line-height: 1.6; }

/* ----- Section: Latest companies (improved) ----- */
.section-latest { background: #fff; }
.companies-list-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.company-card.v2 { box-shadow: var(--shadow-sm); border: 1px solid #f0f3f6; }
.company-card.v2:hover { border-color: var(--primary-light); }
.view-all-wrap { text-align: center; margin-top: 28px; }

/* ----- FAQ ----- */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
    background: #fff;
    border-radius: 10px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.faq-item summary {
    padding: 16px 22px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    list-style: none;
    user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+';
    font-size: 24px;
    font-weight: 400;
    color: var(--primary);
    transition: transform 0.2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body {
    padding: 0 22px 18px;
    color: var(--text-body);
    font-size: 14px;
    line-height: 1.7;
    border-top: 1px solid #f0f3f6;
    padding-top: 14px;
}

/* ----- CTA Banner ----- */
.cta-banner {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
    border-radius: 16px;
    padding: 40px;
    color: #fff;
    text-align: center;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(255,107,53,0.3);
    position: relative;
    overflow: hidden;
}
.cta-banner::before {
    content: '';
    position: absolute;
    top: -50%; right: -10%;
    width: 300px; height: 300px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}
.cta-banner > * { position: relative; z-index: 1; }
.cta-banner h2 { font-size: 28px; font-weight: 800; margin-bottom: 10px; }
.cta-banner p { font-size: 15px; opacity: 0.95; margin-bottom: 22px; max-width: 600px; margin-left: auto; margin-right: auto; }
.cta-banner .btn {
    background: #fff;
    color: var(--accent);
    font-weight: 700;
    padding: 12px 28px;
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.cta-banner .btn:hover { transform: translateY(-2px); }

/* ----- Section background variations ----- */
.section-alt { background: #fff; }
.section-dark-soft { background: linear-gradient(180deg, #f5f7fa 0%, #e8eef5 100%); }

/* ----- Responsive enhancements ----- */
@media (max-width: 992px) {
    .provinces-grid { grid-template-columns: repeat(3, 1fr); }
    .industries-grid { grid-template-columns: repeat(4, 1fr); }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .companies-list-2col { grid-template-columns: 1fr; }
    .hero-v2 h1 { font-size: 32px; }
}

@media (max-width: 768px) {
    .hero-v2 { padding: 40px 0 50px; }
    .hero-v2 h1 { font-size: 24px; }
    .hero-v2 .hero-sub { font-size: 14px; margin-bottom: 22px; }
    .hero-v2 .hero-badge { font-size: 11.5px; padding: 5px 12px; }

    .search-tabs { display: flex; width: 100%; overflow-x: auto; border-radius: 10px 10px 0 0; }
    .search-tabs::-webkit-scrollbar { display: none; }
    .search-tabs button { flex: 1 0 auto; font-size: 12px; padding: 8px 10px; white-space: nowrap; }

    .search-box-v2 {
        flex-direction: column;
        padding: 10px;
        gap: 8px;
        border-radius: 0 12px 12px 12px;
    }
    .search-box-v2 .search-icon { display: none; }
    .search-box-v2 input { padding: 12px 14px; width: 100%; background: var(--bg-light); border-radius: 8px; }
    .search-box-v2 button { padding: 14px; width: 100%; justify-content: center; }

    .search-quick a { font-size: 11.5px; padding: 4px 10px; }
    .hero-stats { gap: 22px; margin-top: 24px; }
    .hero-stat .n { font-size: 19px; }
    .hero-stat .l { font-size: 10.5px; }

    .section { padding: 36px 0; }
    .section-head { margin-bottom: 24px; }
    .section-head h2 { font-size: 22px; }
    .section-head p { font-size: 13.5px; }
    .section-head .eyebrow { font-size: 11px; }

    .provinces-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .province-card { padding: 16px 12px; }
    .province-card .flag { width: 46px; height: 46px; font-size: 22px; margin-bottom: 8px; }
    .province-card .name { font-size: 14px; }
    .province-card .count { font-size: 12px; }

    .industries-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .industry-card { padding: 14px 8px; }
    .industry-card .ico { font-size: 22px; }
    .industry-card .nm { font-size: 11.5px; }

    .features-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .feature-card { padding: 18px 14px; }
    .feature-card .ico { width: 48px; height: 48px; font-size: 22px; margin-bottom: 10px; }
    .feature-card h3 { font-size: 14px; }
    .feature-card p { font-size: 12.5px; }

    .cta-banner { padding: 28px 20px; border-radius: 12px; }
    .cta-banner h2 { font-size: 20px; }
    .cta-banner p { font-size: 13.5px; }

    .faq-item summary { padding: 13px 16px; font-size: 13.5px; }
    .faq-item .faq-body { padding: 12px 16px 16px; font-size: 13px; }
}

@media (max-width: 380px) {
    .industries-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-v2 h1 { font-size: 21px; }
}

/* ============================================
   LIVE SEARCH SUGGEST DROPDOWN
   ============================================ */
.mst-search-suggest {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    max-height: 480px;
    overflow-y: auto;
    z-index: 200;
    text-align: left;
    border: 1px solid #e8eef5;
}
.mst-suggest-item {
    display: block;
    padding: 12px 16px;
    color: var(--text-dark);
    text-decoration: none;
    border-bottom: 1px solid #f0f3f6;
    transition: background 0.1s;
}
.mst-suggest-item:last-of-type { border-bottom: none; }
.mst-suggest-item:hover,
.mst-suggest-item.mst-suggest-active {
    background: var(--primary-light);
    text-decoration: none;
}
.mst-suggest-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
    line-height: 1.4;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.mst-suggest-badge {
    font-size: 10.5px;
    background: var(--bg-light);
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: 10px;
    flex-shrink: 0;
    font-weight: 500;
}
.mst-suggest-meta {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.4;
}
.mst-suggest-mst { font-family: monospace; color: var(--accent); font-weight: 600; }
.mst-suggest-empty,
.mst-suggest-loading {
    padding: 18px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13.5px;
}
.mst-suggest-loading::before {
    content: "";
    display: inline-block;
    width: 12px; height: 12px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: -2px;
    animation: mst-spin 0.8s linear infinite;
}
@keyframes mst-spin { to { transform: rotate(360deg); } }
.mst-suggest-viewall {
    display: block;
    padding: 12px 16px;
    background: linear-gradient(to bottom, #fff, #f9fbfd);
    color: var(--primary);
    text-align: center;
    font-weight: 600;
    font-size: 13.5px;
    border-top: 1px solid var(--border);
    text-decoration: none;
    position: sticky;
    bottom: 0;
}
.mst-suggest-viewall:hover { background: var(--primary-light); text-decoration: none; }
.mst-suggest-viewall.mst-suggest-active { background: var(--primary-light); }

@media (max-width: 768px) {
    .mst-search-suggest { max-height: 350px; }
    .mst-suggest-title { font-size: 13.5px; }
    .mst-suggest-meta { font-size: 11.5px; }
}

