.kb-hero {
    background: linear-gradient(160deg, #0f172a 0%, #1e1b4b 55%, #312e81 100%);
    padding: 56px 0 48px;
    color: #fff;
}

.kb-hero h1 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 800;
    margin: 0;
}

.kb-hero .lead {
    color: rgba(255, 255, 255, 0.72);
    margin: 0.75rem auto 0;
    max-width: 640px;
}

.kb-search .form-control {
    border: none;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.18);
}

.kb-search .btn-primary {
    background: #4f46e5;
    border-color: #4f46e5;
}

.kb-search-wrap {
    position: relative;
}

.kb-search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 1050;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
    overflow: hidden;
    max-height: 360px;
    overflow-y: auto;
    text-align: left;
}

.kb-search-item,
.kb-search-all,
.kb-search-status {
    display: block;
    padding: 0.85rem 1rem;
    text-decoration: none;
    color: inherit;
}

.kb-search-item + .kb-search-item,
.kb-search-all,
.kb-search-status {
    border-top: 1px solid #e2e8f0;
}

.kb-search-item:hover,
.kb-search-all:hover {
    background: #f8fafc;
}

.kb-search-item-title {
    display: block;
    font-weight: 600;
    color: #0f172a;
}

.kb-search-item-meta {
    display: block;
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 0.15rem;
}

.kb-search-item-excerpt {
    display: block;
    font-size: 0.82rem;
    color: #64748b;
    margin-top: 0.25rem;
    line-height: 1.45;
}

.kb-search-all {
    font-size: 0.85rem;
    font-weight: 600;
    color: #4f46e5;
    background: #fafafa;
}

.kb-search-status {
    color: #64748b;
    font-size: 0.9rem;
}

.kb-layout {
    padding: 2.5rem 0 3rem;
    background: #f8fafc;
}

.kb-card {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    background: #fff;
}

.kb-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(79, 70, 229, 0.12);
}

.kb-card .card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}

.kb-card .card-text {
    min-height: 2.5rem;
}

.kb-sidebar {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.25rem;
    position: sticky;
    top: 96px;
}

.kb-sidebar h6 {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 0.75rem;
}

.kb-sidebar a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    color: #475569;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 2px;
}

.kb-sidebar a:hover {
    background: #f1f5f9;
    color: #4f46e5;
}

.kb-sidebar a.is-active {
    background: rgba(79, 70, 229, 0.08);
    color: #4f46e5;
    font-weight: 600;
}

.kb-sidebar .kb-count {
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
}

.kb-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.04);
}

.kb-list .list-group-item {
    border-color: #e2e8f0;
    padding: 1rem 1.25rem;
}

.kb-list .list-group-item:hover {
    background: #f8fafc;
}

.kb-article-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.04);
}

.kb-article-card h1 {
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    font-weight: 800;
    color: #0f172a;
}

.kb-article-meta {
    color: #64748b;
    font-size: 0.875rem;
}

.article-content {
    color: #334155;
    font-size: 0.95rem;
    line-height: 1.75;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    font-weight: 700;
    color: #0f172a;
    margin: 1.75rem 0 0.75rem;
}

.article-content p {
    margin-bottom: 1rem;
}

.article-content ul,
.article-content ol {
    padding-left: 1.25rem;
    margin-bottom: 1rem;
}

.article-content li {
    margin-bottom: 0.35rem;
}

.article-content a {
    color: #4f46e5;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

@media (max-width: 991px) {
    .kb-sidebar {
        position: static;
        margin-bottom: 1.25rem;
    }
}
