/* Knowledge Base Styles */

/* Knowledge Base Wrapper */
.knowledge-wrapper {
    padding: 120px 20px 80px 20px;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100vh;
}

/* Hero Section */
.kb-hero {
    text-align: center;
    margin-bottom: 80px;
    padding: 60px 20px;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.05), rgba(0, 204, 255, 0.05));
    border-radius: 20px;
    border: 2px solid rgba(0, 255, 136, 0.2);
}

.kb-hero h1 {
    font-size: 3.5rem;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 20px;
    font-family: 'Orbitron', sans-serif;
}

.kb-hero-gradient {
    background: linear-gradient(135deg, #00ff88, #00ccff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.kb-hero p {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 800px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

/* Search Box */
.kb-search-box {
    max-width: 700px;
    margin: 40px auto;
}

.kb-search-form {
    display: flex;
    gap: 15px;
    background: var(--bg-card);
    padding: 10px;
    border-radius: 15px;
    border: 2px solid rgba(0, 255, 136, 0.3);
}

.kb-search-input {
    flex: 1;
    padding: 18px 25px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 1.1rem;
}

.kb-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.kb-search-btn {
    padding: 18px 35px;
    background: linear-gradient(135deg, #00ff88, #00dd77);
    border: none;
    border-radius: 10px;
    color: #0a0e1a;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.kb-search-btn:hover {
    background: linear-gradient(135deg, #00ff99, #00ee88);
    transform: translateY(-2px);
}

/* Stats */
.kb-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin: 50px 0;
}

.kb-stat {
    text-align: center;
    padding: 25px 40px;
    background: rgba(0, 255, 136, 0.08);
    border-radius: 15px;
    border: 2px solid rgba(0, 255, 136, 0.2);
}

.kb-stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 900;
    color: #00ff88;
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 10px;
}

.kb-stat-label {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Section Header */
.kb-section-header {
    text-align: center;
    margin-bottom: 60px;
}

.kb-section-header h2 {
    font-size: 2.8rem;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 15px;
    font-family: 'Orbitron', sans-serif;
}

.kb-section-header p {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.85);
}

/* Categories Grid */
.kb-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 35px;
    margin-top: 50px;
}

.kb-category-card {
    background: var(--bg-card);
    border: 2px solid rgba(0, 255, 136, 0.2);
    border-radius: 20px;
    padding: 40px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
}

.kb-category-card:hover {
    border-color: rgba(0, 255, 136, 0.5);
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 255, 136, 0.2);
}

.kb-category-header {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 25px;
}

.kb-category-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(0, 204, 255, 0.2));
    border-radius: 18px;
    font-size: 2.5rem;
    border: 2px solid rgba(0, 255, 136, 0.3);
    transition: all 0.3s ease;
}

.kb-category-icon i {
    /* Icons inherit their FontAwesome default colors or can be customized per category */
    font-size: 2.5rem;
}

.kb-category-card:hover .kb-category-icon {
    transform: scale(1.1) rotate(5deg);
}

.kb-category-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
}

.kb-category-count {
    font-size: 1.05rem;
    color: #00ff88;
    font-weight: 600;
}

.kb-category-desc {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    margin-bottom: 25px;
}

.kb-category-footer {
    padding-top: 25px;
    border-top: 2px solid rgba(0, 255, 136, 0.15);
}

.kb-category-link {
    color: #00ff88;
    font-size: 1.1rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.kb-category-card:hover .kb-category-link i {
    transform: translateX(5px);
}

.kb-category-link i {
    transition: transform 0.3s ease;
}

/* Empty State */
.kb-empty {
    text-align: center;
    padding: 100px 20px;
}

.kb-empty i {
    font-size: 5rem;
    background: linear-gradient(135deg, #00ff88, #00ccff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 32px;
    display: block;
}

.kb-empty h2 {
    font-size: 2.5rem;
    color: #ffffff;
    margin-bottom: 20px;
    font-family: 'Orbitron', sans-serif;
}

.kb-empty p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
}

/* Category Page Styles */
.kb-cat-wrapper {
    padding-top: 100px;
    min-height: 100vh;
    background: var(--bg-primary);
}

.kb-cat-hero {
    background: linear-gradient(135deg, rgba(10, 14, 26, 0.98) 0%, rgba(26, 31, 58, 0.98) 100%);
    padding: 60px 24px;
    position: relative;
}

.kb-cat-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(0, 255, 136, 0.08) 0%, transparent 50%);
}

.kb-cat-hero-content {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
}

.kb-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
    font-size: 0.95rem;
}

.kb-breadcrumb a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
}

.kb-breadcrumb a:hover {
    color: var(--primary);
}

.kb-breadcrumb span {
    color: white;
    font-weight: 600;
}

.kb-cat-header {
    display: flex;
    align-items: center;
    gap: 24px;
}

.kb-cat-icon {
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.15), rgba(0, 204, 255, 0.15));
    border: 2px solid rgba(0, 255, 136, 0.3);
    border-radius: 18px;
    font-size: 3rem;
}

.kb-cat-info h1 {
    font-size: 3rem;
    font-weight: 900;
    color: white;
    margin-bottom: 12px;
    font-family: 'Orbitron', sans-serif;
}

.kb-cat-info p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
}

.kb-cat-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 24px;
}

.kb-articles-grid {
    display: grid;
    gap: 28px;
}

.kb-article-card {
    background: linear-gradient(135deg, rgba(26, 31, 58, 0.6) 0%, rgba(10, 14, 26, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 32px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
}

.kb-article-card:hover {
    transform: translateX(8px);
    border-color: rgba(0, 255, 136, 0.3);
    box-shadow: 0 12px 40px rgba(0, 255, 136, 0.12);
}

.kb-article-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
}

.kb-article-excerpt {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin-bottom: 16px;
}

.kb-article-link {
    color: var(--primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.kb-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 40px;
}

.kb-back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

/* Article Page Styles */
.kb-art-wrapper {
    padding-top: 100px;
    min-height: 100vh;
    background: var(--bg-primary);
}

.kb-art-hero {
    background: linear-gradient(135deg, rgba(10, 14, 26, 0.98) 0%, rgba(26, 31, 58, 0.98) 100%);
    padding: 60px 24px;
    position: relative;
}

.kb-art-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(0, 255, 136, 0.08) 0%, transparent 50%);
}

.kb-art-hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
}

.kb-art-title {
    font-size: 3rem;
    font-weight: 900;
    color: white;
    margin-bottom: 16px;
    line-height: 1.2;
    font-family: 'Orbitron', sans-serif;
}

.kb-art-meta {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.kb-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
}

.kb-meta-item i {
    color: var(--primary);
}

.kb-art-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 24px;
}

.kb-art-body {
    background: linear-gradient(135deg, rgba(26, 31, 58, 0.6) 0%, rgba(10, 14, 26, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 48px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
}

.kb-art-body h2 {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    margin-top: 40px;
    margin-bottom: 20px;
    font-family: 'Orbitron', sans-serif;
}

.kb-art-body h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-top: 32px;
    margin-bottom: 16px;
}

.kb-art-body p {
    margin-bottom: 16px;
}

.kb-art-body ul, .kb-art-body ol {
    margin-bottom: 20px;
    padding-left: 24px;
}

.kb-art-body li {
    margin-bottom: 10px;
}

.kb-art-body code {
    background: rgba(0, 255, 136, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', 'Monaco', monospace;
    color: var(--primary);
    font-size: 0.9em;
}

.kb-art-body pre {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(0, 255, 136, 0.2);
    border-radius: 12px;
    padding: 24px;
    overflow-x: auto;
    margin: 24px 0;
    position: relative;
}

.kb-art-body pre code {
    background: none;
    padding: 0;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.95rem;
    line-height: 1.6;
    display: block;
}

/* Markdown Code Block Language Label */
.kb-art-body pre code::before {
    content: attr(class);
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 0.75rem;
    color: rgba(0, 255, 136, 0.6);
    text-transform: uppercase;
    font-weight: 600;
}

.kb-art-body blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 24px;
    margin: 24px 0;
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
}

.kb-art-body a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s;
}

.kb-art-body a:hover {
    border-bottom-color: var(--primary);
}

/* TinyMCE Generated Content Styles */
.kb-art-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    display: block;
}

.kb-art-body figure {
    margin: 24px 0;
    text-align: center;
}

.kb-art-body figcaption {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 8px;
    font-style: italic;
}

.kb-art-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
}

.kb-art-body thead {
    background: rgba(0, 255, 136, 0.1);
}

.kb-art-body th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 700;
    color: var(--primary);
    border-bottom: 2px solid rgba(0, 255, 136, 0.3);
}

.kb-art-body td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.kb-art-body tr:last-child td {
    border-bottom: none;
}

.kb-art-body tr:hover {
    background: rgba(0, 255, 136, 0.05);
}

/* TinyMCE Code Highlighting */
.kb-art-body .mce-content-body pre {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(0, 255, 136, 0.2);
    border-radius: 12px;
    padding: 24px;
}

/* Responsive */
@media (max-width: 1200px) {
    .kb-categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

@media (max-width: 768px) {
    .knowledge-wrapper {
        padding-top: 100px;
    }
    
    .kb-hero h1 {
        font-size: 2.5rem;
    }
    
    .kb-hero p {
        font-size: 1.2rem;
    }
    
    .kb-search-form {
        flex-direction: column;
    }
    
    .kb-stats {
        flex-direction: column;
        gap: 30px;
    }
    
    .kb-categories-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .kb-category-header {
        flex-direction: column;
        text-align: center;
    }
    
    .kb-cat-wrapper {
        padding-top: 80px;
    }
    
    .kb-cat-header {
        flex-direction: column;
        text-align: center;
    }
    
    .kb-cat-info h1 {
        font-size: 2.2rem;
    }
    
    .kb-art-wrapper {
        padding-top: 80px;
    }
    
    .kb-art-title {
        font-size: 2.2rem;
    }
    
    .kb-art-body {
        padding: 32px 24px;
    }
    
    .kb-art-body h2 {
        font-size: 1.6rem;
    }
}

/* Search Page Styles */
.kb-search-wrapper {
    padding-top: 100px;
    min-height: 100vh;
    background: var(--bg-primary);
}

.kb-search-hero {
    background: linear-gradient(135deg, rgba(10, 14, 26, 0.98) 0%, rgba(26, 31, 58, 0.98) 100%);
    padding: 60px 24px;
    position: relative;
}

.kb-search-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(0, 255, 136, 0.08) 0%, transparent 50%);
}

.kb-search-hero-content {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
}

.kb-search-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: white;
    margin-bottom: 16px;
    font-family: 'Orbitron', sans-serif;
}

.kb-search-query {
    background: linear-gradient(135deg, #00ff88, #00ccff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.kb-search-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 32px;
}

.kb-search-hero .kb-search-form {
    display: flex;
    gap: 12px;
    max-width: 700px;
}

.kb-search-hero .kb-search-input {
    flex: 1;
    padding: 18px 24px;
    font-size: 1.05rem;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    outline: none;
    transition: all 0.3s ease;
}

.kb-search-hero .kb-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 255, 136, 0.1);
}

.kb-search-hero .kb-search-btn {
    padding: 18px 36px;
    background: linear-gradient(135deg, #00ff88, #00dd77);
    border: none;
    border-radius: 12px;
    color: #0a0e1a;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 255, 136, 0.3);
}

.kb-search-hero .kb-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 136, 0.4);
}

.kb-search-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 24px;
}

.kb-results-grid {
    display: grid;
    gap: 28px;
}

.kb-result-card {
    background: linear-gradient(135deg, rgba(26, 31, 58, 0.6) 0%, rgba(10, 14, 26, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 32px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
}

.kb-result-card:hover {
    transform: translateX(8px);
    border-color: rgba(0, 255, 136, 0.3);
    box-shadow: 0 12px 40px rgba(0, 255, 136, 0.12);
}

.kb-result-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.kb-result-category {
    padding: 6px 14px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 6px;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
}

.kb-result-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
}

.kb-result-excerpt {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin-bottom: 16px;
}

.kb-result-link {
    color: var(--primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.kb-no-results {
    text-align: center;
    padding: 100px 24px;
}

.kb-no-results i {
    font-size: 5rem;
    background: linear-gradient(135deg, #00ff88, #00ccff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 32px;
    display: block;
}

.kb-no-results h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: white;
    margin-bottom: 16px;
    font-family: 'Orbitron', sans-serif;
}

.kb-no-results p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.7;
    margin-bottom: 40px;
}

/* Search Page Responsive */
@media (max-width: 768px) {
    .kb-search-wrapper {
        padding-top: 80px;
    }
    
    .kb-search-title {
        font-size: 2rem;
    }
    
    .kb-search-hero .kb-search-form {
        flex-direction: column;
    }
    
    .kb-search-hero .kb-search-btn {
        width: 100%;
    }
}
