/* Public CSS - KnowledgeHub (Clean, Minimalist, User Custom Navigation) */
:root {
    --bg-main: #ffffff;
    --bg-surface: #f9fafb;
    --bg-card: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    --primary: #000000;
    --primary-hover: #374151;
    --border: #e5e7eb;
    --border-light: #f3f4f6;
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    --radius: 6px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-stack);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.75;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--primary); }

.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 20px;
}

/* TOP BRAND HEADER */
.site-brand-header {
    background: #ffffff;
    padding: 24px 0 16px 0;
    text-align: center;
}
.brand-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #111827;
    margin-bottom: 4px;
}
.brand-slogan {
    font-size: 14px;
    color: var(--text-muted);
}

/* HORIZONTAL NAVIGATION BAR (Theo đúng ảnh mẫu người dùng cung cấp) */
.nav-tabs-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border);
    border-top: 1px solid var(--border-light);
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 50;
    flex-wrap: wrap;
}
.nav-tab-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 28px;
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    position: relative;
    transition: all 0.15s ease;
}
.nav-tab-item:hover {
    color: #000000;
}
.nav-tab-item.active {
    color: #000000;
    font-weight: 700;
}
.nav-tab-item.active::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: #000000;
}
.nav-tab-divider {
    color: #d1d5db;
    font-size: 14px;
    font-weight: 300;
    user-select: none;
}

/* CONTENT CONTAINER (Để trắng theo yêu cầu người dùng) */
.blank-content-section {
    padding: 60px 0;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.blank-state-icon {
    font-size: 40px;
    margin-bottom: 16px;
    color: #9ca3af;
}
.blank-state-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}
.blank-state-desc {
    font-size: 15px;
    color: #6b7280;
    max-width: 480px;
    line-height: 1.6;
    margin-bottom: 24px;
}
.btn-write {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #111827;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    transition: background 0.15s ease;
}
.btn-write:hover {
    background: #374151;
    color: #ffffff;
}

/* Article Lists (Khi người dùng viết bài) */
.posts-list {
    display: flex;
    flex-direction: column;
    padding: 24px 0;
}
.post-item {
    padding: 24px 0;
    border-bottom: 1px solid var(--border-light);
}
.post-item:first-child { padding-top: 0; }
.post-item-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.post-tag {
    background: var(--bg-surface);
    color: #475569;
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}
.post-item-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
}
.post-item-title a { color: var(--text-main); }
.post-item-title a:hover { color: #2563eb; }
.post-item-excerpt {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Callouts (Nhẹ nhàng, thanh lịch) */
.callout {
    border-radius: var(--radius);
    padding: 16px 20px;
    margin: 20px 0;
    border-left: 4px solid;
    font-size: 15px;
    line-height: 1.65;
}
.callout-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin-bottom: 6px;
}
.callout-tip { background: #f0f7ff; border-color: #2563eb; color: #1e40af; }
.callout-note { background: #f8fafc; border-color: #64748b; color: #334155; }
.callout-warning { background: #fffbeb; border-color: #d97706; color: #92400e; }
.callout-important { background: #faf5ff; border-color: #7c3aed; color: #5b21b6; }

/* Floating Action Buttons (Góc màn hình) */
.floating-actions {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 40;
}
.fab-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #4b5563;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: all 0.15s ease;
}
.fab-btn:hover {
    transform: translateY(-2px);
    color: var(--text-main);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}
.fab-facebook:hover { color: #1877f2; border-color: #1877f2; }
.fab-telegram:hover { color: #229ed9; border-color: #229ed9; }

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
    margin-top: 48px;
    font-size: 13px;
    color: var(--text-muted);
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

@media (max-width: 640px) {
    .nav-tab-item { padding: 12px 14px; font-size: 14px; }
    .nav-tab-divider { display: none; }
}
