/* style.css - v1.1 - Mobile - Nubix Knowledge Base (public)
CHANGELOG (v1.0 -> v1.1): Added a max-width:600px breakpoint - the fixed
800px card with 40px padding didn't leave room for actual content on a
phone. Card margins/padding shrink, heading sizes step down, and search
results get a max-height + scroll instead of running off the bottom of
the screen. */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1e1e24; color: #fff; line-height: 1.6;
}
a { color: #1e90ff; }

.background-layer {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1; pointer-events: none;
    background-size: cover; background-position: center;
}

header { padding: 20px 30px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.kb-home-link { text-decoration: none; color: #2ed573; font-weight: bold; }

.kb-home, .kb-article {
    max-width: 800px; margin: 40px auto; padding: 35px 40px;
    background-color: rgba(43, 43, 54, 0.60);
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px; box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.kb-home h1, .kb-article h1 { margin-bottom: 25px; }

.kb-search-box { position: relative; margin-bottom: 30px; }
#kb-search-input {
    width: 100%; padding: 14px 18px; border-radius: 30px; border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05); color: white; font-size: 1rem; outline: none;
}
#kb-search-results {
    position: absolute; top: 100%; left: 0; right: 0; margin-top: 8px;
    background: #2f3542; border-radius: 10px; overflow: hidden; z-index: 10;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4); display: none;
    max-height: 60vh; overflow-y: auto;
}
#kb-search-results.visible { display: block; }
.kb-search-result {
    padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,0.05); cursor: pointer;
    display: block; text-decoration: none; color: white;
}
.kb-search-result:hover { background: rgba(255,255,255,0.05); }
.kb-search-result .kb-result-title { font-weight: bold; margin-bottom: 4px; }
.kb-search-result .kb-result-snippet { font-size: 0.85rem; color: #aaa; }
.kb-search-empty { padding: 14px 18px; color: #888; font-size: 0.9rem; }

.kb-category-heading { margin: 25px 0 10px 0; color: #2ed573; font-size: 1.1rem; }
.kb-home ul { list-style: none; }
.kb-home li { padding: 8px 0; }
.kb-home li a { font-size: 1rem; }

.kb-category {
    display: inline-block; background: rgba(46,213,115,0.15); color: #2ed573;
    padding: 4px 12px; border-radius: 12px; font-size: 0.8rem; margin-bottom: 15px;
}
.kb-content h1, .kb-content h2, .kb-content h3, .kb-content h4 { margin: 22px 0 10px 0; color: #fff; }
.kb-content h1:first-child, .kb-content h2:first-child, .kb-content h3:first-child, .kb-content h4:first-child { margin-top: 0; }
.kb-content p { margin-bottom: 15px; }
.kb-content ul, .kb-content ol { margin: 0 0 15px 0; padding-left: 25px; }
.kb-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 15px 0; display: block; }
.kb-content li { margin-bottom: 6px; }
.kb-content li:last-child { margin-bottom: 0; }
.kb-content blockquote {
    border-left: 3px solid rgba(255,255,255,0.3); padding-left: 15px; margin: 0 0 15px 0;
    color: #ccc; font-style: italic;
}
.kb-content pre {
    background: rgba(0,0,0,0.4); padding: 12px; border-radius: 5px; overflow-x: auto;
    margin: 0 0 15px 0; font-family: 'Courier New', monospace; white-space: pre-wrap;
}
.kb-content hr { border: none; border-top: 1px solid rgba(255,255,255,0.15); margin: 22px 0; }

#kb-outage-banner {
    display: none; background: #ff4757; color: white; padding: 14px 20px;
    text-align: center; font-weight: bold;
}
#kb-outage-banner.visible { display: block; }

/* --- Mobile --- */
@media (max-width: 600px) {
    header { padding: 14px 18px; }

    .kb-home, .kb-article {
        margin: 16px; padding: 20px 20px; border-radius: 12px;
        max-width: none;
    }
    .kb-home h1, .kb-article h1 { font-size: 1.4rem; margin-bottom: 18px; }

    #kb-search-input { padding: 12px 16px; font-size: 0.95rem; }
    .kb-search-result { padding: 12px 14px; }

    .kb-content { font-size: 0.95rem; }
}
