/* KnowBase Pro Enhanced Styling */
/* Matches the all4business theme design patterns */

/* ===== HERO SECTION ENHANCEMENTS ===== */
.knowbase-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.knowbase-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.knowbase-hero .container {
    position: relative;
    z-index: 2;
}

.knowbase-hero h2 {
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.knowbase-hero .lead {
    font-size: 1.25rem;
    font-weight: 300;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* ===== ENHANCED INPUT GROUPS ===== */
.knowbase-input-group {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
}

.knowbase-input-group:hover {
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.knowbase-input-group .input-group-text {
    background: white;
    border: none;
    padding: 1rem;
}

.knowbase-input-group .form-select,
.knowbase-input-group .form-control {
    border: none;
    padding: 1rem;
    font-size: 1rem;
    background: white;
}

.knowbase-input-group .form-select:focus,
.knowbase-input-group .form-control:focus {
    box-shadow: none;
    border-color: transparent;
}

/* ===== SIMPLE BOOTSTRAP 5 STYLING ===== */

/* Clean input group styling */
.input-group {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.input-group .input-group-text {
    background: white;
    border: 1px solid #e9ecef;
    border-right: none;
}

.input-group .form-select {
    border: 1px solid #e9ecef;
    border-left: none;
}

.input-group .form-select:focus {
    box-shadow: none;
    border-color: #e9ecef;
}

.input-group .form-control {
    border: 1px solid #e9ecef;
    border-left: none;
    border-right: none;
}

.input-group .form-control:focus {
    box-shadow: none;
    border-color: #e9ecef;
}

.input-group .btn {
    border: 1px solid #e9ecef;
    border-left: none;
}

/* Ensure hero section doesn't clip dropdown */
.knowbase-hero {
    overflow: visible !important;
}

.knowbase-hero .container {
    overflow: visible !important;
}

.knowbase-hero form {
    overflow: visible !important;
    position: relative !important;
    z-index: 200 !important;
}

/* ===== ENHANCED CARDS ===== */
.knowbase-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    overflow: hidden;
    background: white;
}

.knowbase-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    transform: translateY(-4px);
}

.knowbase-card .card-body {
    padding: 2rem;
}

.knowbase-card .card-title {
    color: #2d3748;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.knowbase-card .card-title i {
    font-size: 1.2em;
}

/* ===== CATEGORY CARDS ===== */
.knowbase-category-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    overflow: hidden;
    background: white;
    position: relative;
}

.knowbase-category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.knowbase-category-card:hover::before {
    opacity: 1;
}

.knowbase-category-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    transform: translateY(-4px);
}

.knowbase-category-card .card-body {
    padding: 1.5rem;
}

.knowbase-category-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s ease;
}

.knowbase-category-card:hover .knowbase-category-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.knowbase-category-icon i {
    font-size: 1.2rem;
    color: white;
}

/* ===== ARTICLE LINKS ===== */
.knowbase-article-link {
    display: block;
    padding: 0.75rem 0;
    color: #4a5568;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
    padding-left: 2rem;
}

.knowbase-article-link:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    padding-left: 2.5rem;
    transform: translateX(4px);
}

.knowbase-article-link i {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.2s ease;
}

.knowbase-article-link:hover i {
    color: #667eea;
    transform: translateY(-50%) scale(1.1);
}

/* ===== POPULAR CATEGORIES LIST ===== */
.knowbase-popular-item {
    border: none;
    background: transparent;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.knowbase-popular-item:hover {
    background: rgba(102, 126, 234, 0.05);
    padding-left: 1rem;
    border-radius: 8px;
    border-bottom-color: transparent;
}

.knowbase-popular-item:last-child {
    border-bottom: none;
}

.knowbase-popular-link {
    color: #4a5568;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: color 0.2s ease;
}

.knowbase-popular-link:hover {
    color: #667eea;
}

.knowbase-popular-link .badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

/* ===== SEARCH ENHANCEMENTS ===== */
.knowbase-search-form .btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 1rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.knowbase-search-form .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* ===== LOADING STATES ===== */
.knowbase-loading {
    text-align: center;
    padding: 3rem;
}

.knowbase-loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 3px solid rgba(102, 126, 234, 0.2);
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: knowbase-spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes knowbase-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.knowbase-loading-text {
    color: #667eea;
    font-weight: 500;
    font-size: 1.1rem;
}

/* ===== QUICK TIPS STYLING ===== */
.knowbase-tips {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.knowbase-tips h4 {
    color: #2d3748;
    font-weight: 600;
    margin-bottom: 1rem;
}

.knowbase-tips li {
    padding: 0.5rem 0;
    color: #4a5568;
}

.knowbase-tips i {
    margin-right: 0.75rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .knowbase-hero h2 {
        font-size: 2.5rem;
    }
    
    .knowbase-hero .lead {
        font-size: 1.1rem;
    }
    
    .knowbase-card .card-body {
        padding: 1.5rem;
    }
    
    .knowbase-category-card .card-body {
        padding: 1.25rem;
    }
    
    .knowbase-input-group .form-select,
    .knowbase-input-group .form-control {
        padding: 0.875rem;
    }
}

@media (max-width: 576px) {
    .knowbase-hero {
        padding: 3rem 0;
    }
    
    .knowbase-hero h2 {
        font-size: 2rem;
    }
    
    .knowbase-input-group {
        margin-bottom: 1rem;
    }
}

/* ===== ACCESSIBILITY ENHANCEMENTS ===== */
.knowbase-card:focus-within,
.knowbase-category-card:focus-within {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.knowbase-article-link:focus,
.knowbase-popular-link:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== ANIMATION CLASSES ===== */
.knowbase-fade-in {
    animation: knowbase-fadeIn 0.6s ease-out;
}

@keyframes knowbase-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.knowbase-slide-up {
    animation: knowbase-slideUp 0.5s ease-out;
}

@keyframes knowbase-slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== EMPTY STATE STYLING ===== */
.knowbase-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #718096;
}

.knowbase-empty-state i {
    font-size: 4rem;
    color: #cbd5e0;
    margin-bottom: 1.5rem;
}

.knowbase-empty-state h3 {
    color: #4a5568;
    margin-bottom: 1rem;
}

.knowbase-empty-state p {
    font-size: 1.1rem;
    max-width: 400px;
    margin: 0 auto;
}

/* ===== SIDEBAR STYLING ===== */
.knowbase-sidebar {
    background: linear-gradient(135deg, #f8f9ff 0%, #e3e8ff 100%);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
    position: sticky;
    top: 2rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.knowbase-sidebar::-webkit-scrollbar {
    width: 6px;
}

.knowbase-sidebar::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 3px;
}

.knowbase-sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
}

.knowbase-sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.knowbase-sidebar .card {
    border: none;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.knowbase-sidebar .card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.knowbase-sidebar .card-title {
    color: #2d3748;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.knowbase-sidebar .card-title::before {
    content: '📚';
    font-size: 1.2rem;
}

.knowbase-sidebar .form-control {
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 8px;
    padding: 0.75rem;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.9);
}

.knowbase-sidebar .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    background: white;
}

.knowbase-sidebar .form-control::placeholder {
    color: #a0aec0;
    font-style: italic;
}

/* ===== ACCORDION ENHANCEMENTS ===== */
.knowbase-accordion .accordion-item {
    border: none;
    margin-bottom: 0.75rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.knowbase-accordion .accordion-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    transform: translateY(-1px);
}

.knowbase-accordion .accordion-button {
    background: white;
    border: none;
    color: #4a5568;
    font-weight: 500;
    padding: 1rem 1.25rem;
    transition: all 0.3s ease;
    position: relative;
    text-align: left;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    line-height: 1.4;
    white-space: normal;
}

.knowbase-accordion .accordion-button:hover {
    background: rgba(102, 126, 234, 0.05);
    color: #667eea;
}

.knowbase-accordion .accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: none;
}

.knowbase-accordion .accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    border-color: transparent;
}

.knowbase-accordion .accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23667eea'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.knowbase-accordion .accordion-button:not(.collapsed)::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    transform: rotate(180deg);
}

.knowbase-accordion .accordion-body {
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(102, 126, 234, 0.1);
}

.knowbase-accordion .badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-left: auto;
    margin-right: 0.5rem;
}

.knowbase-accordion .accordion-button:not(.collapsed) .badge {
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(10px);
}

.knowbase-accordion .accordion-button:hover .badge {
    transform: scale(1.05);
}

/* ===== ACCORDION BUTTON CONTENT LAYOUT ===== */
.knowbase-accordion .accordion-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.knowbase-accordion .accordion-button .category-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.knowbase-accordion .accordion-button .category-icon {
    flex-shrink: 0;
}

.knowbase-accordion .accordion-button .category-name {
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    line-height: 1.3;
}

/* ===== BACK BUTTON STYLING ===== */
.knowbase-back-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.knowbase-back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

.knowbase-back-btn i {
    margin-right: 0.5rem;
}

/* ===== MAIN CONTENT AREA ===== */
.knowbase-main-content {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

.knowbase-main-content h1,
.knowbase-main-content h2,
.knowbase-main-content h3 {
    color: #2d3748;
    margin-bottom: 1rem;
}

.knowbase-main-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== BREADCRUMB STYLING ===== */
.knowbase-breadcrumb {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
}

.knowbase-breadcrumb .breadcrumb {
    margin-bottom: 0;
    background: transparent;
    padding: 0;
}

.knowbase-breadcrumb .breadcrumb-item {
    color: #4a5568;
}

.knowbase-breadcrumb .breadcrumb-item.active {
    color: #667eea;
    font-weight: 500;
}

.knowbase-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: #cbd5e0;
    content: "›";
    font-weight: bold;
}

/* ===== ARTICLE LIST STYLING ===== */
.knowbase-article-list {
    list-style: none;
    padding: 0;
}

.knowbase-article-list li {
    margin-bottom: 0.5rem;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.knowbase-article-list li:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
    background: rgba(102, 126, 234, 0.02);
}

.knowbase-article-list a {
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.4;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.knowbase-article-list a:hover {
    color: #667eea;
}

.knowbase-article-list i {
    color: #667eea;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.knowbase-article-list .article-title {
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

/* ===== SEARCH RESULTS STYLING ===== */
.knowbase-search-results {
    margin-top: 2rem;
}

.knowbase-search-result-item {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.knowbase-search-result-item:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    border-left-color: #667eea;
}

.knowbase-search-result-title {
    color: #2d3748;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-decoration: none;
}

.knowbase-search-result-title:hover {
    color: #667eea;
    text-decoration: none;
}

.knowbase-search-result-excerpt {
    color: #718096;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.knowbase-search-result-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: #a0aec0;
}

.knowbase-search-result-meta i {
    margin-right: 0.25rem;
}

/* ===== PAGINATION STYLING ===== */
.knowbase-pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.knowbase-pagination .pagination {
    gap: 0.5rem;
}

.knowbase-pagination .page-item .page-link {
    border: none;
    color: #4a5568;
    background: white;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.knowbase-pagination .page-item .page-link:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.knowbase-pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* ===== MOBILE TOGGLE BUTTON ===== */
#sidebar-toggle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

#sidebar-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

#sidebar-toggle:focus {
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* ===== NO RESULTS MESSAGE ===== */
#no-categories-message {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    font-style: italic;
}

/* ===== RESPONSIVE ADJUSTMENTS FOR SIDEBAR PAGES ===== */
@media (max-width: 768px) {
    .knowbase-sidebar {
        margin-bottom: 1rem;
        padding: 1rem;
        position: static;
        max-height: none;
    }
    
    .knowbase-main-content {
        padding: 1.5rem;
    }
    
    .knowbase-main-content h1 {
        font-size: 2rem;
    }
    
    .knowbase-search-result-item {
        padding: 1rem;
    }
    
    .knowbase-search-result-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .knowbase-accordion .accordion-button {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }
    
    .knowbase-accordion .accordion-body {
        padding: 0.875rem 1rem;
    }
    
    .knowbase-back-btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .knowbase-sidebar {
        border-radius: 12px;
        padding: 0.875rem;
    }
    
    .knowbase-main-content {
        border-radius: 12px;
        padding: 1rem;
    }
    
    .knowbase-main-content h1 {
        font-size: 1.75rem;
    }
    
    .knowbase-accordion .accordion-button {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .knowbase-accordion .accordion-body {
        padding: 0.75rem;
    }
    
    .knowbase-sidebar .card-title {
        font-size: 1rem;
    }
    
    .knowbase-sidebar .form-control {
        padding: 0.625rem;
        font-size: 0.9rem;
    }
    
    #sidebar-toggle {
        width: 100%;
        margin-bottom: 1rem;
    }
}

/* ===== CLEAN & SIMPLE SIDEBAR MENU - MATCHING HOMEPAGE COLORS ===== */

/* Simple, clean accordion buttons */
.knowbase-sidebar .accordion-button {
    background: #f8f9ff;
    border: 1px solid rgba(102, 126, 234, 0.15);
    color: #4a5568;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: normal;
    text-align: left;
    word-wrap: break-word;
    line-height: 1.4;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.knowbase-sidebar .accordion-button:hover {
    background: rgba(102, 126, 234, 0.05);
    color: #667eea;
    border-color: rgba(102, 126, 234, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.knowbase-sidebar .accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.knowbase-sidebar .accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    outline: none;
}

/* Category name text wrapping */
.knowbase-sidebar .accordion-button .category-name {
    white-space: normal;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.4;
}

/* Simple badge styling - matching homepage colors */
.knowbase-sidebar .accordion-button .badge {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    margin-left: auto;
    transition: all 0.3s ease;
}

.knowbase-sidebar .accordion-button:hover .badge {
    background: rgba(102, 126, 234, 0.15);
    transform: scale(1.05);
}

.knowbase-sidebar .accordion-button:not(.collapsed) .badge {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    backdrop-filter: blur(10px);
}

/* Clean accordion body - matching homepage colors */
.knowbase-sidebar .accordion-body {
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    border: 1px solid rgba(102, 126, 234, 0.1);
    border-top: none;
    padding: 0.75rem;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.05);
}

/* Accordion collapse transitions */
.knowbase-sidebar .accordion-collapse {
    transition: height 0.3s ease;
}

.knowbase-sidebar .accordion-collapse.show {
    display: block;
}

.knowbase-sidebar .accordion-collapse:not(.show) {
    display: none;
}

/* Simple article links - matching homepage colors */
.knowbase-sidebar .knowbase-article-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.knowbase-sidebar .knowbase-article-list li {
    margin-bottom: 0.25rem;
}

.knowbase-sidebar .knowbase-article-list a {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: #4a5568;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.85rem;
    line-height: 1.4;
    word-wrap: break-word;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.knowbase-sidebar .knowbase-article-list a:hover {
    background: rgba(102, 126, 234, 0.05);
    color: #667eea;
    border-color: rgba(102, 126, 234, 0.1);
    transform: translateX(4px);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.1);
}

.knowbase-sidebar .knowbase-article-list a i {
    flex-shrink: 0;
    color: #667eea;
    width: 14px;
    margin-top: 0.1rem;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.knowbase-sidebar .knowbase-article-list a:hover i {
    opacity: 1;
    transform: scale(1.1);
}

.knowbase-sidebar .knowbase-article-list a .article-title {
    flex: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}
