/* ================================================
   PLATINIUMHOST - KNOWLEDGE BASE STYLES
   ================================================ */

/* --- KB Layout --------------------------------- */
.kb-wrapper { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.kb-hero { background: linear-gradient(135deg, #0a1628 0%, #0e2244 60%, #132d5e 100%); padding: 120px 20px 80px; text-align: center; }
.kb-hero h1 { font-size: 2.4rem; font-weight: 700; color: #fff; margin-bottom: 14px; }
.kb-hero p { font-size: 1.1rem; color: rgba(255,255,255,0.75); max-width: 600px; margin: 0 auto 32px; }

/* --- Search ------------------------------------ */
.kb-search-wrap { max-width: 680px; margin: 0 auto; position: relative; }
.kb-search-input {
    width: 100%; padding: 18px 60px 18px 24px;
    font-size: 1.05rem; border: none; border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    outline: none; background: #fff; color: #1a1a2e;
    box-sizing: border-box;
}
.kb-search-input::placeholder { color: #999; }
.kb-search-icon {
    position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
    color: #4a90d9; font-size: 1.3rem; pointer-events: none;
}
.kb-popular { margin-top: 16px; color: rgba(255,255,255,0.6); font-size: 0.88rem; }
.kb-popular a { color: rgba(255,255,255,0.85); text-decoration: none; margin: 0 6px;
    padding: 4px 12px; background: rgba(255,255,255,0.12); border-radius: 20px;
    display: inline-block; margin-top: 6px; transition: background 0.2s; }
.kb-popular a:hover { background: rgba(255,255,255,0.22); }

/* --- Search Results ----------------------------- */
.kb-search-results {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    background: #fff; border-radius: 12px; box-shadow: 0 16px 48px rgba(0,0,0,0.18);
    overflow: hidden; z-index: 1000; display: none; max-height: 420px; overflow-y: auto;
}
.kb-search-results.active { display: block; }
.kb-search-result-item {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 14px 20px; border-bottom: 1px solid #f0f0f0;
    text-decoration: none; cursor: pointer; transition: background 0.15s;
}
.kb-search-result-item:hover { background: #f7f9ff; }
.kb-search-result-item:last-child { border-bottom: none; }
.kb-result-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 2px; }
.kb-result-title { font-size: 0.95rem; font-weight: 600; color: #1a1a2e; margin-bottom: 3px; }
.kb-result-desc { font-size: 0.82rem; color: #666; line-height: 1.4; }
.kb-result-cat { font-size: 0.75rem; color: #4a90d9; margin-top: 4px; font-weight: 500; }
.kb-search-no-results { padding: 24px 20px; text-align: center; color: #888; font-size: 0.9rem; }

/* --- Categories Grid ---------------------------- */
.kb-categories-section { padding: 60px 20px; background: #f8faff; }
.kb-section-title { font-size: 1.4rem; font-weight: 700; color: #1a1a2e; margin-bottom: 28px; text-align: center; }
.kb-categories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.kb-cat-card {
    background: #fff; border-radius: 14px; padding: 24px;
    border: 1px solid #e8edf5; text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s; display: block;
}
.kb-cat-card:hover { transform: translateY(-4px); box-shadow: 0 12px 36px rgba(74,144,217,0.15); border-color: #4a90d9; }
.kb-cat-icon { font-size: 2rem; margin-bottom: 12px; display: block; }
.kb-cat-name { font-size: 1.05rem; font-weight: 700; color: #1a1a2e; margin-bottom: 6px; }
.kb-cat-desc { font-size: 0.87rem; color: #666; line-height: 1.5; margin-bottom: 12px; }
.kb-cat-count { font-size: 0.8rem; color: #4a90d9; font-weight: 600; }

/* --- Breadcrumb --------------------------------- */
.kb-breadcrumb { padding: 16px 0; font-size: 0.88rem; color: #888; }
.kb-breadcrumb a { color: #4a90d9; text-decoration: none; }
.kb-breadcrumb a:hover { text-decoration: underline; }
.kb-breadcrumb span { margin: 0 8px; }

/* --- Category Page ------------------------------ */
.kb-cat-header { padding: 48px 0 32px; border-bottom: 1px solid #e8edf5; }
.kb-cat-header-icon { font-size: 2.5rem; margin-bottom: 12px; }
.kb-cat-header h1 { font-size: 2rem; font-weight: 700; color: #1a1a2e; margin-bottom: 10px; }
.kb-cat-header p { font-size: 1rem; color: #666; max-width: 600px; }
.kb-articles-list { padding: 32px 0; }
.kb-article-link {
    display: flex; align-items: flex-start; gap: 16px;
    padding: 20px 24px; background: #fff; border-radius: 12px;
    border: 1px solid #e8edf5; margin-bottom: 12px;
    text-decoration: none; transition: all 0.2s;
}
.kb-article-link:hover { border-color: #4a90d9; box-shadow: 0 4px 16px rgba(74,144,217,0.12); transform: translateX(4px); }
.kb-article-link-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 2px; }
.kb-article-link-body { flex: 1; }
.kb-article-link-title { font-size: 1rem; font-weight: 600; color: #1a1a2e; margin-bottom: 4px; }
.kb-article-link-desc { font-size: 0.87rem; color: #666; line-height: 1.5; }
.kb-article-link-meta { font-size: 0.78rem; color: #999; margin-top: 6px; }
.kb-article-link-arrow { color: #4a90d9; font-size: 1.2rem; flex-shrink: 0; align-self: center; }

/* --- Article Page ------------------------------- */
.kb-article-layout { display: grid; grid-template-columns: 1fr 280px; gap: 40px; padding: 40px 0; }
@media (max-width: 900px) { .kb-article-layout { grid-template-columns: 1fr; } }
.kb-article-header { margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid #e8edf5; }
.kb-article-header h1 { font-size: 1.8rem; font-weight: 700; color: #1a1a2e; margin-bottom: 12px; line-height: 1.3; }
.kb-article-meta { display: flex; gap: 20px; font-size: 0.83rem; color: #888; flex-wrap: wrap; }
.kb-article-meta span { display: flex; align-items: center; gap: 6px; }
.kb-article-body { font-size: 0.97rem; line-height: 1.8; color: #2d3748; }
.kb-article-body h2 { font-size: 1.3rem; font-weight: 700; color: #1a1a2e; margin: 32px 0 14px; }
.kb-article-body h3 { font-size: 1.1rem; font-weight: 600; color: #1a1a2e; margin: 24px 0 10px; }
.kb-article-body p { margin-bottom: 16px; }
.kb-article-body ul, .kb-article-body ol { margin: 0 0 16px 20px; }
.kb-article-body li { margin-bottom: 8px; }
.kb-article-body a { color: #4a90d9; }
.kb-article-body code { background: #f0f4ff; padding: 2px 8px; border-radius: 4px; font-size: 0.9em; color: #1a1a2e; }

/* --- Alerts ------------------------------------- */
.kb-alert { border-radius: 10px; padding: 14px 18px; margin: 20px 0; font-size: 0.92rem; line-height: 1.6; }
.kb-alert-info { background: #e8f4ff; border-left: 4px solid #4a90d9; color: #1a4a7a; }
.kb-alert-warning { background: #fff8e6; border-left: 4px solid #f59e0b; color: #7a5500; }
.kb-alert-success { background: #e8fff2; border-left: 4px solid #10b981; color: #065f46; }
.kb-alert-danger { background: #fff0f0; border-left: 4px solid #ef4444; color: #7f1d1d; }

/* --- Code block --------------------------------- */
.kb-code-block {
    background: #1a1a2e; color: #a8d8f0; border-radius: 10px;
    padding: 18px 22px; font-family: monospace; font-size: 0.88rem;
    line-height: 1.8; margin: 16px 0; overflow-x: auto;
    white-space: pre-wrap; word-break: break-all;
}
.kb-code-block strong { color: #64d8a8; display: block; }

/* --- Sidebar ------------------------------------ */
.kb-sidebar { position: sticky; top: 80px; }
.kb-sidebar-card { background: #fff; border-radius: 12px; border: 1px solid #e8edf5; padding: 20px; margin-bottom: 20px; }
.kb-sidebar-title { font-size: 0.9rem; font-weight: 700; color: #1a1a2e; margin-bottom: 14px; }
.kb-sidebar-link { display: block; font-size: 0.87rem; color: #4a90d9; text-decoration: none; padding: 6px 0; border-bottom: 1px solid #f0f0f0; }
.kb-sidebar-link:hover { color: #2563eb; }
.kb-sidebar-link:last-child { border-bottom: none; }
.kb-need-help { background: linear-gradient(135deg, #0e2244, #132d5e); color: #fff; border-radius: 12px; padding: 22px; text-align: center; }
.kb-need-help h4 { font-size: 1rem; margin-bottom: 8px; }
.kb-need-help p { font-size: 0.85rem; color: rgba(255,255,255,0.75); margin-bottom: 14px; }
.kb-need-help a { display: inline-block; background: #4a90d9; color: #fff; padding: 10px 20px; border-radius: 8px; text-decoration: none; font-size: 0.88rem; font-weight: 600; }
.kb-need-help a:hover { background: #3478c5; }

/* --- Feedback ----------------------------------- */
.kb-feedback { margin-top: 48px; padding-top: 32px; border-top: 1px solid #e8edf5; text-align: center; }
.kb-feedback p { font-size: 1rem; color: #555; margin-bottom: 16px; }
.kb-feedback-btns { display: flex; gap: 12px; justify-content: center; }
.kb-feedback-btn { padding: 10px 24px; border-radius: 8px; border: 1px solid #e8edf5; cursor: pointer; font-size: 0.9rem; transition: all 0.2s; background: #fff; }
.kb-feedback-btn:hover { border-color: #4a90d9; color: #4a90d9; }
.kb-feedback-btn.yes:hover { background: #e8fff2; border-color: #10b981; color: #065f46; }
.kb-feedback-btn.no:hover { background: #fff0f0; border-color: #ef4444; color: #7f1d1d; }

/* --- Responsive --------------------------------- */
@media (max-width: 768px) {
    .kb-hero h1 { font-size: 1.7rem; }
    .kb-hero { padding: 40px 16px 60px; }
    .kb-categories-grid { grid-template-columns: 1fr 1fr; }
    .kb-article-layout { padding: 24px 0; }
}
@media (max-width: 480px) {
    .kb-categories-grid { grid-template-columns: 1fr; }
    .kb-hero h1 { font-size: 1.4rem; }
}
